fix: 替换 CDN 为国内可访问的 staticfile.org 和 fonts.googleapis.cn
This commit is contained in:
parent
b419e988e6
commit
f7b48027ce
|
|
@ -133,9 +133,9 @@ function buildHtml(data, theme = 'light') {
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
|
<link rel="stylesheet" href="https://cdn.staticfile.org/KaTeX/0.16.9/katex.min.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/styles/${isDark ? 'github-dark' : 'github'}.min.css">
|
<link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/11.9.0/styles/${isDark ? 'github-dark' : 'github'}.min.css">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.cn/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
color-scheme: ${theme};
|
color-scheme: ${theme};
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ function buildCss(theme) {
|
||||||
const emojiFonts = "'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', 'Noto Emoji', 'Android Emoji', 'EmojiOne Color', sans-serif";
|
const emojiFonts = "'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', 'Noto Emoji', 'Android Emoji', 'EmojiOne Color', sans-serif";
|
||||||
|
|
||||||
return `
|
return `
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');
|
@import url('https://fonts.googleapis.cn/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');
|
||||||
|
|
||||||
:root { color-scheme: ${isDark ? 'dark' : 'light'}; }
|
:root { color-scheme: ${isDark ? 'dark' : 'light'}; }
|
||||||
${isDark ? `
|
${isDark ? `
|
||||||
|
|
@ -380,10 +380,10 @@ async function main() {
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=${PAGE_WIDTH}">
|
<meta name="viewport" content="width=${PAGE_WIDTH}">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
|
<link rel="stylesheet" href="https://cdn.staticfile.org/KaTeX/0.16.9/katex.min.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/styles/${theme === 'dark' ? 'github-dark' : 'github'}.min.css">
|
<link rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/11.9.0/styles/${theme === 'dark' ? 'github-dark' : 'github'}.min.css">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
|
<script src="https://cdn.staticfile.org/mermaid/10.9.0/mermaid.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/highlight.min.js"></script>
|
<script src="https://cdn.staticfile.org/highlight.js/11.9.0/highlight.min.js"></script>
|
||||||
<style>${buildCss(theme)}</style>
|
<style>${buildCss(theme)}</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue