-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
112 fix tailwind colors on homepage (#113)
* change and fix most colors * update color usage * feat(frontend): ✨ add ntnu logo component that automaticaly applies darkmode
- Loading branch information
Magnus Strømseng
authored and
GitHub
committed
Feb 28, 2024
1 parent
540a76a
commit 18b3878
Showing
10 changed files
with
278 additions
and
35 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| "use client"; | ||
| import { useTheme } from "next-themes"; | ||
| import NTNULogoImageHelper from "./NTNULogoImage"; | ||
|
|
||
| export default function NTNULogo() { | ||
| const { theme } = useTheme(); | ||
| return <NTNULogoImageHelper darkMode={theme === "dark"} />; | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import Image from "next/image"; | ||
| interface NTNULogoProps { | ||
| darkMode?: boolean; | ||
| } | ||
|
|
||
| export default function NTNULogoImageHelper({ darkMode }: NTNULogoProps) { | ||
| if (darkMode) { | ||
| return ( | ||
| <Image | ||
| src="/images/ntnu-white.svg" | ||
| alt="NTNU logo" | ||
| width={200} | ||
| height={200} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| return ( | ||
| <Image | ||
| src="/images/ntnu-black.svg" | ||
| alt="NTNU logo" | ||
| width={200} | ||
| height={200} | ||
| /> | ||
| ); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters