From 18b3878685166c950ef408b1698ccdf33efead5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Str=C3=B8mseng?= Date: Wed, 28 Feb 2024 11:15:51 +0100 Subject: [PATCH] 112 fix tailwind colors on homepage (#113) * change and fix most colors * update color usage * feat(frontend): :sparkles: add ntnu logo component that automaticaly applies darkmode --- frontend/public/images/ntnu-black.svg | 106 ++++++++++++++++++ frontend/public/images/ntnu-white.svg | 106 ++++++++++++++++++ frontend/src/app/globals.css | 34 +++--- frontend/src/app/page.tsx | 2 +- frontend/src/components/Footer.tsx | 19 +--- frontend/src/components/Navbar.tsx | 4 +- frontend/src/components/map/MyGlobe.tsx | 2 +- frontend/src/components/ntnu/NTNULogo.tsx | 8 ++ .../src/components/ntnu/NTNULogoImage.tsx | 26 +++++ frontend/tailwind.config.ts | 6 +- 10 files changed, 278 insertions(+), 35 deletions(-) create mode 100644 frontend/public/images/ntnu-black.svg create mode 100644 frontend/public/images/ntnu-white.svg create mode 100644 frontend/src/components/ntnu/NTNULogo.tsx create mode 100644 frontend/src/components/ntnu/NTNULogoImage.tsx diff --git a/frontend/public/images/ntnu-black.svg b/frontend/public/images/ntnu-black.svg new file mode 100644 index 0000000..a95c895 --- /dev/null +++ b/frontend/public/images/ntnu-black.svg @@ -0,0 +1,106 @@ + + diff --git a/frontend/public/images/ntnu-white.svg b/frontend/public/images/ntnu-white.svg new file mode 100644 index 0000000..a47cae7 --- /dev/null +++ b/frontend/public/images/ntnu-white.svg @@ -0,0 +1,106 @@ + + diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index f0afa48..2427c3e 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -13,7 +13,7 @@ --secondary: 210 40% 96.1%; --secondary-foreground: 222.2 47.4% 11.2%; - --muted: 210 40% 96.1%; + --muted: 0 0% 96.08%; --muted-foreground: 215.4 16.3% 46.9%; --destructive: 0 84.2% 60.2%; @@ -25,24 +25,26 @@ --radius: 0.5rem; + --background: 0 0% 100%; /* FFFFFF */ + --foreground: 0 0% 0%; /* 000000 */ + --accent: 210 40% 96.1%; /* f1f5f9 */ + /* NTNU colors */ - --background: 150, 7%, 6%; /* 0E100F */ - --foreground: 0, 0%, 100%; /* FFFFFF */ - --accent: 182, 41%, 71%; /* 97D2D4 */ - --primary: 210, 100%, 31%; /* 00509E */ - --ntnuBlue: 210, 100%, 31%; /* 00509E */ - --ntnuCyan: 182, 41%, 71%; /* 97D2D4 */ - --ntnuPurple: 271, 23%, 50%; /* 7F619C */ - --ntnuOrange: 29, 87%, 68%; /* F4AC67 */ - --ntnuYellow: 251, 223, 123; /* FBDF7B */ - --ntnuLightblue: 47, 94%, 73%; /* 9DB7E1 */ - --ntnuPink: 319, 44%, 61%; /* C871AC */ - --ntnuBrown: 40, 44%, 78%; /* E0D0AF */ + --primary: 210 100% 31%; /* 00509E */ + --ntnuBlue: 210 100% 31%; /* 00509E */ + --ntnuBlue-foreground: 0 0% 100%; /* FFFFFF */ + --ntnuCyan: 182 41% 71%; /* 97D2D4 */ + --ntnuPurple: 271 23% 50%; /* 7F619C */ + --ntnuOrange: 29 87% 68%; /* F4AC67 */ + --ntnuYellow: 251 223 123; /* FBDF7B */ + --ntnuLightblue: 47 94% 73%; /* 9DB7E1 */ + --ntnuPink: 319 44% 61%; /* C871AC */ + --ntnuBrown: 40 44% 78%; /* E0D0AF */ } .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; + --background: 150 7% 6%; /* 0e100f */ + --foreground: 54 100% 94%; /* fffce1 */ --card: 222.2 84% 4.9%; --card-foreground: 210 40% 98%; @@ -56,7 +58,7 @@ --secondary: 217.2 32.6% 17.5%; --secondary-foreground: 210 40% 98%; - --muted: 217.2 32.6% 17.5%; + --muted: 0 0% 2%; --muted-foreground: 215 20.2% 65.1%; --accent: 217.2 32.6% 17.5%; diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index dcb69d4..7e2ca27 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -23,7 +23,7 @@ export default function Home() { id="about-us" className="flex flex-col items-center py-12 px-8" > -
+

Empowering Space Exploration One Satellite at a Time

diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx index 2691891..53975a3 100644 --- a/frontend/src/components/Footer.tsx +++ b/frontend/src/components/Footer.tsx @@ -1,18 +1,11 @@ -import Image from "next/image"; +import NTNULogo from "./ntnu/NTNULogo"; export default function Footer() { return ( -