Skip to content

Commit

Permalink
Merge pull request #16 from jwenger100/consulting-site-updates
Browse files Browse the repository at this point in the history
Animation for header menu
  • Loading branch information
kylejoe authored Mar 4, 2024
2 parents 3ee61ac + 5605c76 commit 00e5d5d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
23 changes: 22 additions & 1 deletion src/app/components/HeaderMenu.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,30 @@
}
}

@keyframes slideDown {
from {
transform: translateY(-100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}

.headerVisible {
animation: slideDown 0.5s ease-out forwards;
}

.header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: rem(56);
z-index: 2;
animation: slideDown 0.5s ease-out forwards;
background-color: var(--mantine-color-body);
height: rem(56px);
border-bottom: rem(1px) solid
light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
}
Expand Down
15 changes: 4 additions & 11 deletions src/app/components/HeaderMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import classes from "./HeaderMenu.module.css";
import Image from "next/image";
import Link from "next/link";
import { IconBrandFacebook, IconBrandLinkedin } from "@tabler/icons-react";
import { Fade } from "react-awesome-reveal";

const links = [
{ link: "/#about", label: "About" },
Expand Down Expand Up @@ -101,17 +102,9 @@ export function HeaderMenu() {
return (
<>
<header
className={classes.header}
style={{
position: "fixed",
top: 0,
left: 0,
right: 0,
height: rem(56),
zIndex: 2,
transition: "transform 400ms ease",
backgroundColor: "var(--mantine-color-body)",
}}
className={`${classes.header} ${
showHeader ? classes.headerVisible : ""
}`}
>
<Container size="lg">
<div className={classes.inner}>
Expand Down

0 comments on commit 00e5d5d

Please sign in to comment.