mirror of
https://github.com/m1ngsama/FUJI.git
synced 2025-12-25 02:56:38 +00:00
fix dark mode
This commit is contained in:
parent
4e7a9cc736
commit
da0566143e
4 changed files with 12 additions and 8 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
import { Navbar, NavbarBrand, NavbarContent, NavbarItem, NavbarMenuToggle, NavbarMenu, NavbarMenuItem, Link } from "@nextui-org/react"
|
import { Navbar, NavbarBrand, NavbarContent, NavbarItem, NavbarMenuToggle, NavbarMenu, NavbarMenuItem, Link } from "@nextui-org/react"
|
||||||
import { SITE_TITLE } from "../../consts"
|
import { SITE_TITLE } from "../../consts"
|
||||||
|
import CALogoWhite from "./assets/CA-logo-white.png"
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
||||||
|
|
@ -31,10 +32,16 @@ export default function App() {
|
||||||
<img
|
<img
|
||||||
src="https://oss.nbtca.space/CA-logo.svg"
|
src="https://oss.nbtca.space/CA-logo.svg"
|
||||||
alt=""
|
alt=""
|
||||||
className="w-8 aspect-square cursor-pointer"
|
className="w-8 aspect-square cursor-pointer dark:hidden"
|
||||||
onClick={() => window.location.href = "/"}
|
onClick={() => window.location.href = "/"}
|
||||||
/>
|
/>
|
||||||
<span className="hidden sm:flex select-none cursor-default text-lg text-[#1d1d1f]">
|
<img
|
||||||
|
src={CALogoWhite.src}
|
||||||
|
alt=""
|
||||||
|
className="w-8 aspect-square cursor-pointer hidden dark:block"
|
||||||
|
onClick={() => window.location.href = "/"}
|
||||||
|
/>
|
||||||
|
<span className="hidden sm:flex select-none cursor-default text-lg text-[#1d1d1f] dark:text-white">
|
||||||
{SITE_TITLE}
|
{SITE_TITLE}
|
||||||
</span>
|
</span>
|
||||||
</NavbarBrand>
|
</NavbarBrand>
|
||||||
|
|
|
||||||
BIN
src/components/header/assets/CA-logo-white.png
Normal file
BIN
src/components/header/assets/CA-logo-white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 575 KiB |
|
|
@ -5,7 +5,7 @@ pubDate: 2024-10-13
|
||||||
description: ' '
|
description: ' '
|
||||||
author: 'zzh0u'
|
author: 'zzh0u'
|
||||||
tags: ["技术","开发","Git"]
|
tags: ["技术","开发","Git"]
|
||||||
theme: 'white'
|
theme: 'dark'
|
||||||
featured: true
|
featured: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
import { nextui } from "@nextui-org/react"
|
import { nextui } from "@nextui-org/react"
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
content: [
|
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}", "./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"],
|
||||||
"./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}",
|
|
||||||
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
|
|
||||||
],
|
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
colors: {
|
colors: {
|
||||||
|
|
@ -12,6 +9,6 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
darkMode: "class",
|
darkMode: ["selector", "body.theme-dark"],
|
||||||
plugins: [nextui()],
|
plugins: [nextui()],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue