Skip to content

Commit

Permalink
Docs: update font to LXGW WenKai (labring#325)
Browse files Browse the repository at this point in the history
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>
  • Loading branch information
yangchuansheng authored Sep 19, 2023
1 parent ac4355d commit 858117f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 19 deletions.
5 changes: 5 additions & 0 deletions docSite/assets/docs/scss/custom/pages/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ footer a:hover {
}
*/

.medium-zoom-overlay,
.medium-zoom-image--opened {
z-index: 1999;
}

/* 徽章样式 */
.github-badge {
display: inline-block;
Expand Down
4 changes: 2 additions & 2 deletions docSite/assets/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"baseUrl": ".",
"paths": {
"*": [
"../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js/*",
"../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.0+incompatible/js/*"
"../../../../../Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js/*",
"../../../../../Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.0+incompatible/js/*"
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions docSite/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ defaultContentLanguage = 'zh-cn'
["JetBrains Mono", "500, 700"]
]

sans_serif_font = "Inter" # Default is System font
secondary_font = "Inter" # Default is System font
sans_serif_font = "LXGW WenKai Screen" # Default is System font
secondary_font = "LXGW WenKai Screen" # Default is System font
mono_font = "JetBrains Mono" # Default is System font

[params.footer]
Expand Down
13 changes: 4 additions & 9 deletions docSite/layouts/partials/docs/footer/footer-scripts.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<!-- change -->
<style>
.medium-zoom-overlay,
.medium-zoom-image--opened {
z-index: 1999;
}
</style>

{{ $dayjs := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/dayjs.min.js") }}
{{ $relativeTime := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/relativeTime.min.js") }}
{{ $app := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/app.js") -}}
Expand Down Expand Up @@ -37,7 +29,10 @@

{{ if eq .Site.Params.docs.prism true -}}
{{ $prism := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/prism.js") }}
{{ $prism := $prism | js.Build -}}
{{- $opts := dict
"params" (dict "langPath" (urls.JoinPath .Site.BaseURL "docs/js/components/"))
-}}
{{ $prism := $prism | js.Build $opts -}}
{{ $slice = $slice | append $prism -}}
{{ end -}}

Expand Down
2 changes: 2 additions & 0 deletions docSite/layouts/partials/docs/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,6 @@
{{- template "_internal/google_analytics.html" . -}}
{{- end -}}
{{- end -}}
<!-- change -->
<link rel="stylesheet" href="https://jsdelivr.icloudnative.io/npm/lxgw-wenkai-screen-webfont@1.1.0/style.css" />
</head>
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
--bs-dark-border-subtle: #adb5bd;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-font-sans-serif: Inter;
--bs-font-sans-serif: LXGW WenKai Screen;
--bs-font-monospace: JetBrains Mono;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
Expand Down Expand Up @@ -9576,7 +9576,7 @@ html {
background-color: var(--body-bg); }

body {
font-family: Inter;
font-family: LXGW WenKai Screen;
overflow-x: hidden !important;
font-size: 1rem;
color: var(--body-color);
Expand Down Expand Up @@ -10120,19 +10120,25 @@ i.title-icon {
:root {
--toc-link-hover-bg-color: var(--gray-300);
--toc-mobile-btn-bg-color: var(--gray-100);
--toc-mobile-menu-bg-color: var(--white); }
--toc-mobile-menu-bg-color: var(--white);
--toc-mobile-link-hover-color: var(--primary); }

[data-dark-mode] {
--toc-link-hover-bg-color: var(--gray-700);
--toc-mobile-btn-bg-color: var(--gray-900);
--toc-mobile-menu-bg-color: var(--body-bg); }
--toc-mobile-menu-bg-color: var(--body-bg);
--toc-mobile-link-hover-color: var(--primary-300); }

.docs-toc-mobile {
position: sticky;
top: 85px;
padding-left: calc(var(--bs-gutter-x) * 1.05);
padding-right: calc(var(--bs-gutter-x) * 1.05);
z-index: 20; }
.docs-toc-mobile a {
color: var(--text-default); }
.docs-toc-mobile a:hover {
color: var(--toc-mobile-link-hover-color); }
.docs-toc-mobile .dropdown-toggle {
margin-bottom: 16px;
background: var(--toc-mobile-btn-bg-color);
Expand Down Expand Up @@ -12033,6 +12039,10 @@ footer a:hover {
text-decoration: none !important;
}
*/
.medium-zoom-overlay,
.medium-zoom-image--opened {
z-index: 1999; }

/* 徽章样式 */
.github-badge {
display: inline-block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
--bs-dark-border-subtle: #adb5bd;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-font-sans-serif: Inter;
--bs-font-sans-serif: LXGW WenKai Screen;
--bs-font-monospace: JetBrains Mono;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
Expand Down Expand Up @@ -9438,7 +9438,7 @@ textarea.form-control-lg {
src: local("Material Icons"), local("MaterialIcons-Outlined"), url("../docs/fonts/material-symbols-outlined.woff2") format("woff2"); }

body {
font-family: Inter;
font-family: LXGW WenKai Screen;
overflow-x: hidden !important;
font-size: 1rem;
color: #3C4257;
Expand Down

0 comments on commit 858117f

Please sign in to comment.