-
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.
添加了.eslintignore文件,更新了.sonner.client.ts文件,更新了auto-imports.d.ts文件,更新了.…
…vscode/settings.json文件,更新了components.d.ts文件,更新了.vscode/extensions.json文件,添加了naiveui.ts文件,更新了assets/css/main.css文件,更新了app.vue文件。
- Loading branch information
Showing
16 changed files
with
11,231 additions
and
10,188 deletions.
There are no files selected for viewing
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,12 @@ | ||
node_modules/ | ||
.backup/ | ||
.nuxt/ | ||
.output/ | ||
dist/ | ||
build/ | ||
public/ | ||
|
||
script/* | ||
|
||
tsconfig.json | ||
.gitignore |
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 |
---|---|---|
@@ -1,12 +1,18 @@ | ||
{ | ||
"recommendations": [ | ||
"vue.volar", | ||
"vue.vscode-typescript-vue-plugin", | ||
"willjleong.nuxt-typescript-snippets", | ||
"allanoricil.nuxt-vscode-extension", | ||
"dbaeumer.vscode-eslint", | ||
"redjue.git-commit-plugin", | ||
"seatonjiang.gitmoji-vscode", | ||
"eamodio.gitlens" | ||
"eamodio.gitlens", | ||
"bradlc.vscode-tailwindcss", | ||
"standard.vscode-standard", | ||
"stylelint.vscode-stylelint", | ||
"mohsen1.prettify-json", | ||
"xabikos.javascriptsnippets", | ||
"heybourn.headwind", | ||
"steoates.autoimport", | ||
"antfu.iconify" | ||
], | ||
} |
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
{ | ||
"nuxt.isNuxtApp": true, | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
"eslint.enable": true, | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports": "never" | ||
"source.fixAll": "explicit", | ||
"source.fixAll.eslint": "always", | ||
"source.organizeImports": "always" | ||
}, | ||
"files.autoSave": "afterDelay", | ||
"files.autoSaveDelay": 5000, | ||
"prettier.enable": false, | ||
} |
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 |
---|---|---|
@@ -1,3 +1,55 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@tailwind utilities; | ||
|
||
@layer components { | ||
.line-tight { | ||
@apply leading-tight; | ||
} | ||
|
||
.line-snug { | ||
@apply leading-snug; | ||
} | ||
|
||
.line-normal { | ||
@apply leading-normal; | ||
} | ||
|
||
.line-relaxed { | ||
@apply leading-relaxed; | ||
} | ||
|
||
.line-loose { | ||
@apply leading-loose; | ||
} | ||
|
||
.navbar { | ||
@apply flex items-center m-0 display min-h-12 w-full | ||
} | ||
|
||
} | ||
|
||
@layer utilities { | ||
.no-scrollbar::-webkit-scrollbar { | ||
/* Hide scrollbar for Chrome, Safari and Opera */ | ||
display: none; | ||
} | ||
|
||
/* Hide scrollbar for IE, Edge and Firefox */ | ||
.no-scrollbar { | ||
-ms-overflow-style: none; | ||
/* IE and Edge */ | ||
scrollbar-width: none; | ||
/* Firefox */ | ||
} | ||
} | ||
|
||
body { | ||
background-color: #fff; | ||
color: rgba(0, 0, 0); | ||
} | ||
|
||
.dark body { | ||
background-color: #000; | ||
color: #ebf4f1; | ||
} |
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 |
---|---|---|
@@ -1,32 +1,45 @@ | ||
<script setup lang="ts"> | ||
type Theme = 'light' | 'dark' | 'system' | ||
const colorTheme: Ref<Theme> = ref('system') | ||
import { themeChange } from 'theme-change'; | ||
function setColorTheme() { | ||
if (colorTheme.value === 'system') | ||
colorTheme.value = 'light' | ||
else if (colorTheme.value === 'light') | ||
colorTheme.value = 'dark' | ||
else if (colorTheme.value === 'dark') | ||
colorTheme.value = 'system' | ||
const colorMode = useColorMode() | ||
const themes = [ | ||
{ | ||
icon: 'i-heroicons-computer-desktop', | ||
theme: 'system', | ||
}, { | ||
icon: 'i-heroicons-sun', | ||
theme: 'light', | ||
}, { | ||
icon: 'i-heroicons-moon', | ||
theme: 'dark', | ||
}, | ||
] | ||
useColorMode().preference = colorTheme.value | ||
const currentThemeIcon = computed(() => { | ||
return themes.find((item) => item.theme === colorMode.preference)?.icon | ||
}) | ||
function setTheme(name: string) { | ||
colorMode.preference = name | ||
} | ||
onMounted(() => { | ||
themeChange(false) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<UButton v-if="colorTheme === 'dark'" color="gray" icon="i-heroicons-moon" variant="ghost" @click="setColorTheme()" /> | ||
<UButton v-if="colorTheme === 'light'" color="gray" icon="i-heroicons-sun" variant="ghost" @click="setColorTheme()" /> | ||
<UButton v-if="colorTheme === 'system'" color="gray" icon="i-heroicons-computer-desktop" variant="ghost" @click="setColorTheme()" /> | ||
<div class="dropdown dropdown-end"> | ||
<button tabindex="0" class="btn btn-sm btn-ghost"> | ||
<UIcon class="w-6 h-6" :name="currentThemeIcon" dynamic /> | ||
</button> | ||
<ul tabindex="0" class="dropdown-content z-[1] menu p-1 shadow bg-base-100 rounded-box min-w-max space-y-1"> | ||
<li v-for="item of themes" :key="item.theme"> | ||
<button class="btn btn-sm min-w-max" @click="setTheme(item.theme)"> | ||
<UIcon class="w-6 h-6" :name="item.icon" /> | ||
<!-- {{ item.icon }} {{ item.theme }} --> | ||
</button> | ||
</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
body { | ||
background-color: #fafafa; | ||
color: #000000; | ||
} | ||
.dark body { | ||
background-color: #000000; | ||
color: #fafafa; | ||
} | ||
</style> |
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
Oops, something went wrong.