Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import FooterColumn from "./FooterColumn";
import Image from "next/image";
import Logo from "./Logo";
import { useState, useRef } from "react";

export default function Footer({ entityTitle, logoSrc, footerItems, socials }) {
Expand Down Expand Up @@ -98,13 +99,7 @@ export default function Footer({ entityTitle, logoSrc, footerItems, socials }) {
<div className="flex flex-wrap items-center">
<div className="w-full lg:w-1/2 mb-6 lg:mb-0">
<a className="text-gray-600 text-2xl leading-none" href="#">
<img
className="h-16"
src={logoSrc}
alt={`${entityTitle} logo`}
width="auto"
height="4rem"
/>
<Logo logoSrc={logoSrc} entityTitle={entityTitle} />
</a>
<p className="hidden lg:block mt-3 text-sm text-gray-500">
{`All rights reserved. © ${entityTitle} 2022`}
Expand Down
17 changes: 17 additions & 0 deletions components/Logo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default function Logo({ logoSrc, entityTitle }) {
return logoSrc ? (
<img
className="h-16"
src={logoSrc}
alt={`The ${entityTitle} logo`}
width="auto"
height="4rem"
/>
) : (
<div className="inline">
<h1 className="first-letter:text-indigo-800 first-letter:font-extrabold first-letter:text-5xl font-semibold tracking-wide text-indigo-500 text-2xl italic">
{entityTitle}
</h1>
</div>
);
}
21 changes: 3 additions & 18 deletions components/MobileNavbar.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import MobileNavigationItem from "./MobileNavigationItem";
import { signIn, signOut } from "next-auth/react";
import Link from "next/link";
import Logo from "./Logo";

export default function MobileNavbar({
entityTitle,
Expand Down Expand Up @@ -31,21 +32,7 @@ export default function MobileNavbar({
onClick={() => setMobileMenuIsClicked(!mobileMenuIsClicked)}
>
{" "}
{logoSrc ? (
<img
className="h-16"
src={logoSrc}
alt={`The ${entityTitle} logo`}
width="auto"
height="4rem"
/>
) : (
<div className="inline">
<h1 className="first-letter:font-extrabold first-letter:text-5xl font-bold tracking-wide text-indigo-700 text-3xl">
{entityTitle}
</h1>
</div>
)}
<Logo logoSrc={logoSrc} entityTitle={entityTitle} />
</a>
</Link>
<button
Expand Down Expand Up @@ -128,9 +115,7 @@ export default function MobileNavbar({
</div>
</nav>
</>
) : (
<div className="transition duration-200" />
)}
) : null}
</div>
);
}
20 changes: 2 additions & 18 deletions components/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import NavigationItem from "./NavigationItem";
import Logo from "./Logo";
import { signIn, signOut } from "next-auth/react";

export default function Navbar({
Expand All @@ -11,27 +12,10 @@ export default function Navbar({
mobileMenuIsClicked,
setMobileMenuIsClicked,
}) {
const [first, last] = [entityTitle?.slice(0, 1), entityTitle?.slice(1)];

return (
<nav className="flex justify-between items-center py-8">
<a className="text-gray-700 text-2xl leading-none" href="#">
{!!logoSrc ? (
<img
className="h-16"
src={logoSrc}
alt={`The ${entityTitle} logo`}
width="auto"
height="4rem"
/>
) : (
<div className="inline">
<h1 className="font-extrabold tracking-wide text-indigo-700 text-5xl">
{first}
<span className="font-bold text-3xl">{last}</span>
</h1>
</div>
)}
<Logo logoSrc={logoSrc} entityTitle={entityTitle} />
</a>
<div className="lg:hidden">
<button
Expand Down