Skip to content

Commit

Permalink
fix: 字体 预加载
Browse files Browse the repository at this point in the history
  • Loading branch information
camera-2018 committed Oct 28, 2023
1 parent e398fc5 commit 5bf6d3e
Show file tree
Hide file tree
Showing 4 changed files with 505 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { nav } from './nav.js';
import PanguPlugin from 'markdown-it-pangu'
import { fileURLToPath, URL } from 'node:url'
import VueMacros from 'unplugin-vue-macros/vite'
import webfontDownload from 'vite-plugin-webfont-dl'

// https://vitepress.dev/reference/site-config
export default withMermaid({
Expand Down Expand Up @@ -85,6 +86,9 @@ export default withMermaid({
vite: {
plugins: [
VueMacros(),
webfontDownload([
'https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&family=Noto+Sans+Mono:wght@400;600;700&family=Noto+Sans+SC:wght@400;600;700&display=swap'
]),
],
resolve: {
alias: [
Expand Down
10 changes: 0 additions & 10 deletions .vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@
* Colors
* -------------------------------------------------------------------------- */

@import url('https://fonts.loli.net/css2?family=Noto+Sans+Mono:wght@400&family=Noto+Sans+SC:wght@400;500;700&display=swap');

@font-face {
font-family: 'Noto Color Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://gstatic.loli.net/s/notocoloremoji/v25/Yq6P-KqIXTD0t4D9z1ESnKM3-HpFabsE4tq3luCC7p-aXxcn.9.woff2) format('woff2');
unicode-range: U+200d, U+261d, U+2620, U+2639-263a, U+2665, U+270a-270d, U+2728, U+2763-2764, U+2b50, U+fe0f, U+1f31a-1f31f, U+1f32b, U+1f383, U+1f389, U+1f3fb-1f3ff, U+1f440-1f450, U+1f463-1f465, U+1f479-1f47b, U+1f47d-1f480, U+1f485, U+1f48b-1f48c, U+1f493-1f49f, U+1f4a4-1f4a6, U+1f4a8-1f4ab, U+1f4af, U+1f525, U+1f573, U+1f590, U+1f595-1f596, U+1f5a4, U+1f5e3, U+1f600-1f644, U+1f648-1f64a, U+1f64c, U+1f64f, U+1f90c-1f925, U+1f927-1f92f, U+1f932-1f933, U+1f970-1f976, U+1f978-1f97a, U+1f9a0, U+1f9b4-1f9b7, U+1f9bb, U+1f9be-1f9bf, U+1f9d0, U+1f9e0-1f9e1, U+1fa75-1fa79, U+1fac0-1fac2, U+1fae0-1fae6, U+1fae8, U+1faf0-1faf8;
}

.dark .vp-doc a,#loading, .dark .vp-doc a>code, .dark .VPNavBarMenuLink.VPNavBarMenuLink:hover, .dark .VPNavBarMenuLink.VPNavBarMenuLink.active, .dark .link.link:hover, .dark .link.link.active, .dark .edit-link-button.edit-link-button, .dark .pager-link .title {
color: var(--vp-c-brand-3);
Expand Down
Loading

0 comments on commit 5bf6d3e

Please sign in to comment.