feat: change the web font.

This commit is contained in:
Yufan Sheng 2024-12-09 16:37:09 +08:00
parent 8e9217711f
commit 0c347576cc
Signed by: syhily
GPG Key ID: 9D18A22A7DCD5A9B
7 changed files with 65 additions and 26 deletions

View File

@ -89,6 +89,7 @@
"loveness", "loveness",
"luoli", "luoli",
"luxon", "luxon",
"lxgw",
"mboker", "mboker",
"metas", "metas",
"microflash", "microflash",
@ -128,6 +129,7 @@
"sauvignon", "sauvignon",
"sheng", "sheng",
"shiki", "shiki",
"shikijs",
"shinmun", "shinmun",
"shmily", "shmily",
"skrs", "skrs",

View File

@ -1,5 +1,12 @@
import mdx from '@astrojs/mdx'; import mdx from '@astrojs/mdx';
import node from '@astrojs/node'; import node from '@astrojs/node';
import {
transformerNotationDiff,
transformerNotationErrorLevel,
transformerNotationFocus,
transformerNotationHighlight,
transformerNotationWordHighlight,
} from '@shikijs/transformers';
import { uploader } from 'astro-uploader'; import { uploader } from 'astro-uploader';
import { defineConfig, envField } from 'astro/config'; import { defineConfig, envField } from 'astro/config';
import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import rehypeAutolinkHeadings from 'rehype-autolink-headings';
@ -72,6 +79,13 @@ export default defineConfig({
shikiConfig: { shikiConfig: {
theme: 'solarized-light', theme: 'solarized-light',
wrap: false, wrap: false,
transformers: [
transformerNotationDiff(),
transformerNotationHighlight(),
transformerNotationWordHighlight(),
transformerNotationFocus(),
transformerNotationErrorLevel(),
],
}, },
}, },
server: { server: {

59
package-lock.json generated
View File

@ -29,6 +29,7 @@
"@astrojs/check": "^0.9.4", "@astrojs/check": "^0.9.4",
"@biomejs/biome": "^1.9.4", "@biomejs/biome": "^1.9.4",
"@napi-rs/canvas": "^0.1.65", "@napi-rs/canvas": "^0.1.65",
"@shikijs/transformers": "^1.24.1",
"@types/lodash": "^4.17.13", "@types/lodash": "^4.17.13",
"@types/luxon": "^3.4.2", "@types/luxon": "^3.4.2",
"@types/node": "^22.10.1", "@types/node": "^22.10.1",
@ -2013,44 +2014,54 @@
] ]
}, },
"node_modules/@shikijs/core": { "node_modules/@shikijs/core": {
"version": "1.24.0", "version": "1.24.1",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.24.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.24.1.tgz",
"integrity": "sha512-6pvdH0KoahMzr6689yh0QJ3rCgF4j1XsXRHNEeEN6M4xJTfQ6QPWrmHzIddotg+xPJUPEPzYzYCKzpYyhTI6Gw==", "integrity": "sha512-3q/9oarMVcLqJ+NQOdKL40dJVq/UKCsiWXz3QRQPBglHqa8dDJ0p6TuMuk2gHphy5FZcvFtg4UHBgpW0JtZ8+A==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/engine-javascript": "1.24.0", "@shikijs/engine-javascript": "1.24.1",
"@shikijs/engine-oniguruma": "1.24.0", "@shikijs/engine-oniguruma": "1.24.1",
"@shikijs/types": "1.24.0", "@shikijs/types": "1.24.1",
"@shikijs/vscode-textmate": "^9.3.0", "@shikijs/vscode-textmate": "^9.3.0",
"@types/hast": "^3.0.4", "@types/hast": "^3.0.4",
"hast-util-to-html": "^9.0.3" "hast-util-to-html": "^9.0.3"
} }
}, },
"node_modules/@shikijs/engine-javascript": { "node_modules/@shikijs/engine-javascript": {
"version": "1.24.0", "version": "1.24.1",
"resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.24.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.24.1.tgz",
"integrity": "sha512-ZA6sCeSsF3Mnlxxr+4wGEJ9Tto4RHmfIS7ox8KIAbH0MTVUkw3roHPHZN+LlJMOHJJOVupe6tvuAzRpN8qK1vA==", "integrity": "sha512-lNgUSHYDYaQ6daj4lJJqcY2Ru9LgHwpFoposJkRVRPh21Yg4kaPFRhzaWoSg3PliwcDOpDuMy3xsmQaJp201Fg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "1.24.0", "@shikijs/types": "1.24.1",
"@shikijs/vscode-textmate": "^9.3.0", "@shikijs/vscode-textmate": "^9.3.0",
"oniguruma-to-es": "0.7.0" "oniguruma-to-es": "0.7.0"
} }
}, },
"node_modules/@shikijs/engine-oniguruma": { "node_modules/@shikijs/engine-oniguruma": {
"version": "1.24.0", "version": "1.24.1",
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.1.tgz",
"integrity": "sha512-Eua0qNOL73Y82lGA4GF5P+G2+VXX9XnuUxkiUuwcxQPH4wom+tE39kZpBFXfUuwNYxHSkrSxpB1p4kyRW0moSg==", "integrity": "sha512-KdrTIBIONWd+Xs61eh8HdIpfigtrseat9dpARvaOe2x0g/FNTbwbkGr3y92VSOVD1XotzEskh3v/nCzyWjkf7g==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "1.24.0", "@shikijs/types": "1.24.1",
"@shikijs/vscode-textmate": "^9.3.0" "@shikijs/vscode-textmate": "^9.3.0"
} }
}, },
"node_modules/@shikijs/transformers": {
"version": "1.24.1",
"resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.24.1.tgz",
"integrity": "sha512-IQmk8o0RNlaQ3Ig0Urx4bfen/zvS5St6as7o0q+bTDfbuFjqUMNjoMMKMN1Lu66mAh83seURwPLi2EjjLTD6+w==",
"dev": true,
"license": "MIT",
"dependencies": {
"shiki": "1.24.1"
}
},
"node_modules/@shikijs/types": { "node_modules/@shikijs/types": {
"version": "1.24.0", "version": "1.24.1",
"resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.24.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.24.1.tgz",
"integrity": "sha512-aptbEuq1Pk88DMlCe+FzXNnBZ17LCiLIGWAeCWhoFDzia5Q5Krx3DgnULLiouSdd6+LUM39XwXGppqYE0Ghtug==", "integrity": "sha512-ZwZFbShFY/APfKNt3s9Gv8rhTm29GodSKsOW66X6N+HGsZuaHalE1VUEX4fv93UXHTZTLjb3uxn63F96RhGfXw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/vscode-textmate": "^9.3.0", "@shikijs/vscode-textmate": "^9.3.0",
@ -6987,15 +6998,15 @@
} }
}, },
"node_modules/shiki": { "node_modules/shiki": {
"version": "1.24.0", "version": "1.24.1",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-1.24.0.tgz", "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.24.1.tgz",
"integrity": "sha512-qIneep7QRwxRd5oiHb8jaRzH15V/S8F3saCXOdjwRLgozZJr5x2yeBhQtqkO3FSzQDwYEFAYuifg4oHjpDghrg==", "integrity": "sha512-/qByWMg05+POb63c/OvnrU17FcCUa34WU4F6FCrd/mjDPEDPl8YUNRkRMbo8l3iYMLydfCgxi1r37JFoSw8A4A==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/core": "1.24.0", "@shikijs/core": "1.24.1",
"@shikijs/engine-javascript": "1.24.0", "@shikijs/engine-javascript": "1.24.1",
"@shikijs/engine-oniguruma": "1.24.0", "@shikijs/engine-oniguruma": "1.24.1",
"@shikijs/types": "1.24.0", "@shikijs/types": "1.24.1",
"@shikijs/vscode-textmate": "^9.3.0", "@shikijs/vscode-textmate": "^9.3.0",
"@types/hast": "^3.0.4" "@types/hast": "^3.0.4"
} }

View File

@ -62,6 +62,7 @@
"@astrojs/check": "^0.9.4", "@astrojs/check": "^0.9.4",
"@biomejs/biome": "^1.9.4", "@biomejs/biome": "^1.9.4",
"@napi-rs/canvas": "^0.1.65", "@napi-rs/canvas": "^0.1.65",
"@shikijs/transformers": "^1.24.1",
"@types/lodash": "^4.17.13", "@types/lodash": "^4.17.13",
"@types/luxon": "^3.4.2", "@types/luxon": "^3.4.2",
"@types/node": "^22.10.1", "@types/node": "^22.10.1",

View File

@ -1561,6 +1561,11 @@ a.list-title:hover {
color: #fff; color: #fff;
} }
.list-nice-overlay .list-title:hover {
color: var(--color-light);
text-shadow: var(--border-primary) 1px 0 4px;
}
.list-nice-overlay .text-muted:not(i) { .list-nice-overlay .text-muted:not(i) {
color: #eaecf3 !important; color: #eaecf3 !important;
} }

View File

@ -139,6 +139,11 @@ td {
/* code -------------------------- */ /* code -------------------------- */
pre,
code {
font-family: 'LXGW WenKai Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
}
code { code {
font-size: 90%; font-size: 90%;
color: inherit; color: inherit;
@ -149,7 +154,7 @@ code {
counter-increment: step 0; counter-increment: step 0;
} }
code .line::before { code .line:not(:last-child)::before {
content: counter(step); content: counter(step);
counter-increment: step; counter-increment: step;
width: 1rem; width: 1rem;
@ -198,6 +203,7 @@ table caption {
body { body {
font-family: font-family:
'LXGW WenKai',
OPPOSans, OPPOSans,
OPPOSans2, OPPOSans2,
OPlusSans3, OPlusSans3,

View File

@ -7,7 +7,6 @@ import '@/assets/styles/globals.css';
import 'aplayer/dist/APlayer.min.css'; import 'aplayer/dist/APlayer.min.css';
import 'photoswipe/style.css'; import 'photoswipe/style.css';
import 'photoswipe-dynamic-caption-plugin/photoswipe-dynamic-caption-plugin.css'; import 'photoswipe-dynamic-caption-plugin/photoswipe-dynamic-caption-plugin.css';
import '@/assets/styles/opposans/opposans.css';
import Footer from '@/components/footer/Footer.astro'; import Footer from '@/components/footer/Footer.astro';
import Header from '@/components/header/Header.astro'; import Header from '@/components/header/Header.astro';
@ -45,6 +44,7 @@ const showFooter = Astro.props.footer !== undefined ? Astro.props.footer : true;
<PageMeta {title} {description} /> <PageMeta {title} {description} />
</slot> </slot>
<meta name="robots" content="index, follow" /> <meta name="robots" content="index, follow" />
<link rel="stylesheet" type="text/css" href="https://npm.elemecdn.com/lxgw-wenkai-webfont/style.css" />
<meta name="googlebot" content="index, follow, max-video-preview:-1, max-image-preview:large, max-snippet:-1" /> <meta name="googlebot" content="index, follow, max-video-preview:-1, max-image-preview:large, max-snippet:-1" />
<link rel="alternate" type="application/rss+xml" title="且听书吟" href="/feed" /> <link rel="alternate" type="application/rss+xml" title="且听书吟" href="/feed" />
<link rel="icon" href="/favicon.ico" sizes="32x32" /> <link rel="icon" href="/favicon.ico" sizes="32x32" />