From 2a00d217171c9620e46c056abe46a87378862a06 Mon Sep 17 00:00:00 2001 From: Jonas Braathen Date: Mon, 6 Oct 2025 21:08:48 +0200 Subject: [PATCH] temporarily use the DNS pig with hat --- web/src/components/general/Logo.tsx | 219 +++++++++++++++++++++------ web/src/components/layout/Header.tsx | 14 +- 2 files changed, 180 insertions(+), 53 deletions(-) diff --git a/web/src/components/general/Logo.tsx b/web/src/components/general/Logo.tsx index 9a2f03c..b83ac1d 100644 --- a/web/src/components/general/Logo.tsx +++ b/web/src/components/general/Logo.tsx @@ -2,7 +2,13 @@ import styles from "./logo.module.scss"; import { usePathname } from "next/navigation"; -export const Logo = ({ christmas }: { christmas: boolean }) => { +export const Logo = ({ + christmas, + studentHat, +}: { + christmas: boolean; + studentHat: boolean; +}) => { // Check if the current page is the index page const isIndexPage = usePathname() === "/"; @@ -11,6 +17,7 @@ export const Logo = ({ christmas }: { christmas: boolean }) => { className={`${styles.logo} ${styles.main} ${isIndexPage && styles.index}`} > + {/* Start letters */} { d="M423.367 154.314V163.343H440.341V172.063H423.367V189.072H412.898V145.281H441.769V154.31H423.367V154.314Z" fill="currentColor" /> - - - - - - - - + {/* End letters */} + {/* Start pig without hat */} + {!studentHat && ( + <> + + + + + + + + + + )} + {/* End pig without hat */} + {/* Start pig with hat (DNS-ikon-svart) */} + {/* original viewBox="0 0 613.2 730.27", scaled to 271px height */} + {studentHat && ( + + + + + + + + + + + + )} + {/* End pig with hat */} {christmas && ( - - - - - - - + + + + + + + )} @@ -159,7 +246,13 @@ export const LogoText = () => { ); }; -export const LogoIcon = ({ face, christmas }: { face?: "left" | "right", christmas: boolean }) => { +export const LogoIcon = ({ + face, + christmas, +}: { + face?: "left" | "right"; + christmas: boolean; +}) => { return (
@@ -181,13 +274,43 @@ export const LogoIcon = ({ face, christmas }: { face?: "left" | "right", christm /> {christmas && ( - - - - - - - + + + + + + + )}
diff --git a/web/src/components/layout/Header.tsx b/web/src/components/layout/Header.tsx index 154f3b3..aaa296d 100644 --- a/web/src/components/layout/Header.tsx +++ b/web/src/components/layout/Header.tsx @@ -49,6 +49,13 @@ export const Header = () => { // let's add a santa hat during December const isChristmas = new Date().getMonth() === 11; + // let's add the student hat during grisefestuka + const pigWearsHat = + new Date().getFullYear() === 2025 && + new Date().getMonth() === 9 && + new Date().getDate() >= 6 && + new Date().getDate() <= 12; + return ( <>
{ data-small={!isInView} > - +