style(代码配色): 全站代码换成 Dracula 配色(亮色用官方浅色版 Alucard);编辑器、题面和教程的代码块、练一练、提交详情的颜色一模一样了
Deploy / deploy (push) Canceled after 0s
Deploy / deploy (push) Canceled after 0s
原来三套配色各管一块:编辑器是 smoothy / One Dark,正文代码块和练一练是仿 GitHub, 提交详情是 Naive 自带的,同一段 printf 在一课里就有两种颜色。现在静态代码也走编辑器 那套 lezer 解析器,颜色只在 shared/highlight.css 写一份,highlight.js 删掉。 填空题顺手修好:空会把语法搅乱,(humidity ____ 40) 被认成类型声明、humidity 染成类型色, 现在空里先填上答案再解析,答案不输出。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
27210eac1b
commit
df3b4f0dfd
18 files changed
+345
-462
No files matched your search
@@ -2,6 +2,7 @@
|
||||
import { darkTheme, dateZhCN, zhCN } from "naive-ui"
|
||||
import "normalize.css"
|
||||
import "./index.css"
|
||||
import "shared/highlight.css"
|
||||
import { useConfigStore } from "shared/store/config"
|
||||
import { useConfigUpdate } from "shared/composables/configUpdate"
|
||||
import { useUserStore } from "shared/store/user"
|
||||
@@ -40,7 +41,8 @@ watch(
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
// n-code(提交详情、看代码的弹框)用的 highlight.js,空闲时再加载,不挡首屏
|
||||
// n-code(提交详情、看代码的弹框)的高亮,空闲时再加载,不挡首屏。
|
||||
// 它只认 highlight.js 的接口,shared/highlight 给了一个同名的壳,里面是和编辑器同一套解析器
|
||||
const hljsInstance = shallowRef<typeof import("shared/highlight").hljs>()
|
||||
onMounted(() => {
|
||||
const load = async () => {
|
||||
|
||||
Reference in new issue
Block a user