Skip to content

Commit

Permalink
Lego/fix navbar footer (#49)
Browse files Browse the repository at this point in the history
* fix(CFP): include new footer

* fix(Header): include social links on NOHeader pages
  • Loading branch information
joseglego authored Jun 11, 2024
1 parent 3c0b310 commit 33987c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 30 deletions.
21 changes: 3 additions & 18 deletions src/app/cfp/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CallToActionProps, Hero, ImageProps } from "@/sections/Hero/Hero";
import { Footer } from "@/components/Footer/Footer";
import { Header } from "@/components/Header/Header";
import { cfp as data, footer } from "@/lib/data";
import { cfp as data } from "@/lib/data";
import { getMetaData, getViewports } from "@/lib/metadata";

export const generateMetadata = () =>
Expand Down Expand Up @@ -56,23 +57,7 @@ export default function Home() {
</div>
</div>
</main>
<footer className="relative z-10 p-4 font-koulen text-white">
<div className="container mx-auto flex flex-col items-center justify-center gap-4 lg:flex-row">
<div className="flex flex-col gap-4 text-center lg:flex-row lg:gap-8">
{footer.map((link) => (
<a
key={link.url}
href={link.url}
target="_blank"
rel="noreferrer"
className="hover:text-jsconf-yellow"
>
{link.name}
</a>
))}
</div>
</div>
</footer>
<Footer />
</div>
);
}
24 changes: 12 additions & 12 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { usePathname } from "next/navigation";
import type { Link as LinkType } from "@/api/types";

import { Logo } from "@/components/Icons/Logo";
import { SocialLink } from "@/components/SocialLink/SocialLink";
import { links as socialLinks } from "@/lib/data";
import { theme } from "@/lib/theme";
import { cn } from "@/lib/utils";

Expand All @@ -18,24 +20,22 @@ interface HeaderProps {
export function Header({ links }: HeaderProps) {
const pathname = usePathname();
return (
<header className="container relative z-10 mx-auto flex h-20 max-w-[1136px] items-center justify-between p-4">
<header className="container relative z-10 mx-auto flex h-20 max-w-[1136px] items-center justify-between p-4 text-jsconf-yellow">
<Link href="/">
<Logo color={theme?.colors?.jsconfYellow} size="36" />
</Link>
<div
className={cn("hidden items-center md:flex", links ? "gap-2" : "gap-4")}
>
{links &&
links.map(
(link) =>
link && (
<HeaderLink
key={link.url}
isActive={pathname == link.url}
{...link}
/>
),
)}
{links
? links.map((link) => (
<HeaderLink
key={link.url}
isActive={pathname == link.url}
{...link}
/>
))
: socialLinks.map((link) => <SocialLink key={link.id} link={link} />)}
</div>
{links?.length ? <MobileNav links={links} activePath={pathname} /> : null}
</header>
Expand Down

0 comments on commit 33987c1

Please sign in to comment.