This commit is contained in:
2024-01-24 18:01:48 +08:00
parent 9bf9c770f1
commit 87fcb12960
5 changed files with 10 additions and 11 deletions

View File

@@ -1,22 +1,20 @@
<script setup lang="ts">
import "normalize.css"
import { zhCN, dateZhCN, darkTheme } from "naive-ui"
import { isDark } from "./shared/composables/dark"
import hljs from "highlight.js/lib/core"
import c from "highlight.js/lib/languages/c"
import python from "highlight.js/lib/languages/python"
import "./index.css"
const theme = computed(() => (isDark.value ? darkTheme : null))
hljs.registerLanguage("c", c)
hljs.registerLanguage("python", python)
const isDark = useDark()
</script>
<template>
<n-config-provider
inline-theme-disabled
:theme="theme"
:theme="isDark ? darkTheme : null"
:locale="zhCN"
:date-locale="dateZhCN"
:hljs="hljs"