use Monaco for code font

This commit is contained in:
2024-01-23 15:30:59 +08:00
parent dfa168a751
commit 7337905cbc
5 changed files with 12 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
<link rel="shortcut icon" href="/public/website/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>徐越的判题狗</title>
<link rel="stylesheet" href="/style.css">
<script>
this.globalThis || (this.globalThis = window)
</script>

9
package-lock.json generated
View File

@@ -5834,9 +5834,9 @@
}
},
"node_modules/vite": {
"version": "5.0.11",
"resolved": "https://registry.npmmirror.com/vite/-/vite-5.0.11.tgz",
"integrity": "sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==",
"version": "5.0.12",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz",
"integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==",
"dev": true,
"dependencies": {
"esbuild": "^0.19.3",
@@ -5849,6 +5849,9 @@
"engines": {
"node": "^18.0.0 || >=20.0.0"
},
"funding": {
"url": "https://github.com/vitejs/vite?sponsor=1"
},
"optionalDependencies": {
"fsevents": "~2.3.3"
},

BIN
public/Monaco.ttf Normal file

Binary file not shown.

4
public/style.css Normal file
View File

@@ -0,0 +1,4 @@
@font-face {
font-family: "Monaco";
src: url(/Monaco.ttf);
}

View File

@@ -10,7 +10,7 @@ import { isDark } from "../composables/dark"
const styleTheme = EditorView.baseTheme({
"& .cm-scroller": {
"font-family": "Consolas",
"font-family": "Monaco",
},
"&.cm-editor.cm-focused": {
outline: "none",