diff options
| author | muqiuhan <[email protected]> | 2026-03-15 14:07:26 +0000 |
|---|---|---|
| committer | muqiuhan <[email protected]> | 2026-03-15 14:07:26 +0000 |
| commit | 353e53fce4310ed6fbafa818be74831b5dc57f24 (patch) | |
| tree | a1ad631dad45f732110543a41ce03f6adbc9eba4 | |
| parent | 9eb13df1a8ebac9774bfa9820b65c9d3b2c8fc47 (diff) | |
| download | blog-353e53fce4310ed6fbafa818be74831b5dc57f24.tar.gz | |
deploy: a045cc55214515d5a4472a117aed7c5a421e90a6
| -rw-r--r-- | css/color.css | 10 | ||||
| -rw-r--r-- | css/color_mode/classic.css | 10 | ||||
| -rw-r--r-- | css/color_mode/default.css | 10 | ||||
| -rw-r--r-- | css/component/button.css | 2 | ||||
| -rw-r--r-- | css/highlight/ascetic.css | 2 | ||||
| -rw-r--r-- | css/highlight/brown-paper.css | 4 | ||||
| -rw-r--r-- | css/highlight/dark.css | 2 | ||||
| -rw-r--r-- | css/highlight/foundation.css | 2 | ||||
| -rw-r--r-- | css/highlight/github.css | 10 | ||||
| -rw-r--r-- | css/highlight/googlecode.css | 2 | ||||
| -rw-r--r-- | css/highlight/idea.css | 8 | ||||
| -rw-r--r-- | css/highlight/rainbow.css | 2 | ||||
| -rw-r--r-- | css/highlight/school-book.css | 4 | ||||
| -rw-r--r-- | css/highlight/solarized-dark.css | 2 | ||||
| -rw-r--r-- | css/highlight/solarized-light.css | 2 | ||||
| -rw-r--r-- | css/highlight/tomorrow.css | 2 | ||||
| -rw-r--r-- | css/highlight/vs.css | 2 | ||||
| -rw-r--r-- | css/highlight/xcode.css | 2 | ||||
| -rw-r--r-- | css/highlight/zenburn.css | 2 | ||||
| -rw-r--r-- | css/normalize.css | 2 | ||||
| -rw-r--r-- | css/partials/header.css | 2 | ||||
| -rw-r--r-- | css/partials/post_list.css | 1 | ||||
| -rw-r--r-- | css/post/table.css | 4 | ||||
| -rw-r--r-- | css/style.css | 112 | ||||
| -rw-r--r-- | js/mermaid-zoom.js | 46 |
25 files changed, 155 insertions, 92 deletions
diff --git a/css/color.css b/css/color.css index 5c880459..a6759878 100644 --- a/css/color.css +++ b/css/color.css @@ -11,7 +11,7 @@ .highlight .code .selector-tag, .highlight .code .subst { color: #333; - font-weight: bold; + font-weight: normal; } .highlight .code .number, .highlight .code .literal, @@ -28,7 +28,7 @@ .highlight .code .section, .highlight .code .selector-id { color: #900; - font-weight: bold; + font-weight: normal; } .highlight .code .subst { font-weight: normal; @@ -36,7 +36,7 @@ .highlight .code .type, .highlight .code .class .title { color: #458; - font-weight: bold; + font-weight: normal; } .highlight .code .tag, .highlight .code .name, @@ -58,7 +58,7 @@ } .highlight .code .meta { color: #999; - font-weight: bold; + font-weight: normal; } .highlight .code .deletion { background: #fdd; @@ -70,5 +70,5 @@ font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/color_mode/classic.css b/css/color_mode/classic.css index 5c880459..a6759878 100644 --- a/css/color_mode/classic.css +++ b/css/color_mode/classic.css @@ -11,7 +11,7 @@ .highlight .code .selector-tag, .highlight .code .subst { color: #333; - font-weight: bold; + font-weight: normal; } .highlight .code .number, .highlight .code .literal, @@ -28,7 +28,7 @@ .highlight .code .section, .highlight .code .selector-id { color: #900; - font-weight: bold; + font-weight: normal; } .highlight .code .subst { font-weight: normal; @@ -36,7 +36,7 @@ .highlight .code .type, .highlight .code .class .title { color: #458; - font-weight: bold; + font-weight: normal; } .highlight .code .tag, .highlight .code .name, @@ -58,7 +58,7 @@ } .highlight .code .meta { color: #999; - font-weight: bold; + font-weight: normal; } .highlight .code .deletion { background: #fdd; @@ -70,5 +70,5 @@ font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/color_mode/default.css b/css/color_mode/default.css index 5c880459..a6759878 100644 --- a/css/color_mode/default.css +++ b/css/color_mode/default.css @@ -11,7 +11,7 @@ .highlight .code .selector-tag, .highlight .code .subst { color: #333; - font-weight: bold; + font-weight: normal; } .highlight .code .number, .highlight .code .literal, @@ -28,7 +28,7 @@ .highlight .code .section, .highlight .code .selector-id { color: #900; - font-weight: bold; + font-weight: normal; } .highlight .code .subst { font-weight: normal; @@ -36,7 +36,7 @@ .highlight .code .type, .highlight .code .class .title { color: #458; - font-weight: bold; + font-weight: normal; } .highlight .code .tag, .highlight .code .name, @@ -58,7 +58,7 @@ } .highlight .code .meta { color: #999; - font-weight: bold; + font-weight: normal; } .highlight .code .deletion { background: #fdd; @@ -70,5 +70,5 @@ font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/component/button.css b/css/component/button.css index cf0f8624..e84188d3 100644 --- a/css/component/button.css +++ b/css/component/button.css @@ -5,7 +5,7 @@ white-space: nowrap; border-radius: $margin-m-2; font-size: $font-size-header; - font-weight: $font-weight-medium; + font-weight: 400; transition: all $transition-duration ease; cursor: pointer; border: none; diff --git a/css/highlight/ascetic.css b/css/highlight/ascetic.css index 21a98194..479dc35f 100644 --- a/css/highlight/ascetic.css +++ b/css/highlight/ascetic.css @@ -30,7 +30,7 @@ Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiac .highlight .code .name, .highlight .code .type, .highlight .code .strong { - font-weight: bold; + font-weight: normal; } .highlight .code .emphasis { font-style: italic; diff --git a/css/highlight/brown-paper.css b/css/highlight/brown-paper.css index 612de86a..1561f5a8 100644 --- a/css/highlight/brown-paper.css +++ b/css/highlight/brown-paper.css @@ -11,7 +11,7 @@ Brown Paper style from goldblog.com.ua (c) Zaripov Yura <[email protected]> .highlight .code .selector-tag, .highlight .code .literal { color: #059; - font-weight: bold; + font-weight: normal; } .highlight .code .highlight, .highlight .code .subst { @@ -48,7 +48,7 @@ Brown Paper style from goldblog.com.ua (c) Zaripov Yura <[email protected]> .highlight .code .type, .highlight .code .name, .highlight .code .strong { - font-weight: bold; + font-weight: normal; } .highlight .code .emphasis { font-style: italic; diff --git a/css/highlight/dark.css b/css/highlight/dark.css index 4ed0f763..e5c7d57a 100644 --- a/css/highlight/dark.css +++ b/css/highlight/dark.css @@ -46,7 +46,7 @@ .highlight .code .type, .highlight .code .name, .highlight .code .strong { - font-weight: bold; + font-weight: normal; } .highlight .code .emphasis { font-style: italic; diff --git a/css/highlight/foundation.css b/css/highlight/foundation.css index 3d6a99e3..92f898fd 100644 --- a/css/highlight/foundation.css +++ b/css/highlight/foundation.css @@ -24,7 +24,7 @@ Date: 2013-04-02 color: #d14; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } .highlight .code .quote, .highlight .code .comment { diff --git a/css/highlight/github.css b/css/highlight/github.css index 28777a5a..7ac5be0c 100644 --- a/css/highlight/github.css +++ b/css/highlight/github.css @@ -16,7 +16,7 @@ github.com style (c) Vasily Polovnyov <[email protected]> .highlight .code .selector-tag, .highlight .code .subst { color: #333; - font-weight: bold; + font-weight: normal; } .highlight .code .number, .highlight .code .literal, @@ -33,7 +33,7 @@ github.com style (c) Vasily Polovnyov <[email protected]> .highlight .code .section, .highlight .code .selector-id { color: #900; - font-weight: bold; + font-weight: normal; } .highlight .code .subst { font-weight: normal; @@ -41,7 +41,7 @@ github.com style (c) Vasily Polovnyov <[email protected]> .highlight .code .type, .highlight .code .class .title { color: #458; - font-weight: bold; + font-weight: normal; } .highlight .code .tag, .highlight .code .name, @@ -63,7 +63,7 @@ github.com style (c) Vasily Polovnyov <[email protected]> } .highlight .code .meta { color: #999; - font-weight: bold; + font-weight: normal; } .highlight .code .deletion { background: #fdd; @@ -75,5 +75,5 @@ github.com style (c) Vasily Polovnyov <[email protected]> font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/highlight/googlecode.css b/css/highlight/googlecode.css index d84832ee..b587b107 100644 --- a/css/highlight/googlecode.css +++ b/css/highlight/googlecode.css @@ -65,7 +65,7 @@ Google Code style (c) Aahan Krish <[email protected]> } .highlight .code .doctag, .highlight .code .strong { - font-weight: bold; + font-weight: normal; } .highlight .code .emphasis { font-style: italic; diff --git a/css/highlight/idea.css b/css/highlight/idea.css index bc499b39..61a1ce2d 100644 --- a/css/highlight/idea.css +++ b/css/highlight/idea.css @@ -31,14 +31,14 @@ Intellij Idea-like styling (c) Vasily Polovnyov <[email protected]> .highlight .code .type, .highlight .code .selector-id, .highlight .code .selector-class { - font-weight: bold; + font-weight: normal; color: #000080; } .highlight .code .attribute, .highlight .code .number, .highlight .code .regexp, .highlight .code .link { - font-weight: bold; + font-weight: normal; color: #00f; } .highlight .code .number, @@ -48,7 +48,7 @@ Intellij Idea-like styling (c) Vasily Polovnyov <[email protected]> } .highlight .code .string { color: #008000; - font-weight: bold; + font-weight: normal; } .highlight .code .symbol, .highlight .code .bullet, @@ -74,5 +74,5 @@ Intellij Idea-like styling (c) Vasily Polovnyov <[email protected]> font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/highlight/rainbow.css b/css/highlight/rainbow.css index 8e09431d..b2885bb5 100644 --- a/css/highlight/rainbow.css +++ b/css/highlight/rainbow.css @@ -44,7 +44,7 @@ .highlight .code .section, .highlight .code .name, .highlight .code .strong { - font-weight: bold; + font-weight: normal; } .highlight .code .symbol, .highlight .code .bullet, diff --git a/css/highlight/school-book.css b/css/highlight/school-book.css index 16c8190a..63519e75 100644 --- a/css/highlight/school-book.css +++ b/css/highlight/school-book.css @@ -12,7 +12,7 @@ School Book style from goldblog.com.ua (c) Zaripov Yura <[email protected]> .highlight .code .selector-tag, .highlight .code .literal { color: #059; - font-weight: bold; + font-weight: normal; } .highlight .code .highlight, .highlight .code .subst { @@ -50,7 +50,7 @@ School Book style from goldblog.com.ua (c) Zaripov Yura <[email protected]> .highlight .code .name, .highlight .code .selector-id, .highlight .code .strong { - font-weight: bold; + font-weight: normal; } .highlight .code .emphasis { font-style: italic; diff --git a/css/highlight/solarized-dark.css b/css/highlight/solarized-dark.css index 94855f3f..21b827c7 100644 --- a/css/highlight/solarized-dark.css +++ b/css/highlight/solarized-dark.css @@ -60,5 +60,5 @@ font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/highlight/solarized-light.css b/css/highlight/solarized-light.css index 835dc1d9..be3fe43d 100644 --- a/css/highlight/solarized-light.css +++ b/css/highlight/solarized-light.css @@ -62,5 +62,5 @@ Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmai font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/highlight/tomorrow.css b/css/highlight/tomorrow.css index 3f5ceb48..09dec665 100644 --- a/css/highlight/tomorrow.css +++ b/css/highlight/tomorrow.css @@ -47,5 +47,5 @@ font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/highlight/vs.css b/css/highlight/vs.css index 2fdd7357..dec1fc23 100644 --- a/css/highlight/vs.css +++ b/css/highlight/vs.css @@ -54,5 +54,5 @@ Visual Studio-like style based on original C# coloring by Jason Diamond <jason@d font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/highlight/xcode.css b/css/highlight/xcode.css index b2b5163c..6826f763 100644 --- a/css/highlight/xcode.css +++ b/css/highlight/xcode.css @@ -67,7 +67,7 @@ XCode style (c) Angel Garcia <[email protected]> } .highlight .code .doctag, .highlight .code .strong { - font-weight: bold; + font-weight: normal; } .highlight .code .emphasis { font-style: italic; diff --git a/css/highlight/zenburn.css b/css/highlight/zenburn.css index 4bb4abc4..fee7f489 100644 --- a/css/highlight/zenburn.css +++ b/css/highlight/zenburn.css @@ -59,5 +59,5 @@ font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } diff --git a/css/normalize.css b/css/normalize.css index 22783054..dd65b9b7 100644 --- a/css/normalize.css +++ b/css/normalize.css @@ -66,7 +66,7 @@ abbr[title] { */ b, strong { - font-weight: bolder; + font-weight: 400; } /** * 1. Correct the inheritance and scaling of font size in all browsers. diff --git a/css/partials/header.css b/css/partials/header.css index 44363f71..350797a9 100644 --- a/css/partials/header.css +++ b/css/partials/header.css @@ -35,7 +35,7 @@ overflow-x: auto; } .site-brand-container a { - font-weight: $font-weight-semibold; + font-weight: 400; color: $color-text-primary; } .menu-list { diff --git a/css/partials/post_list.css b/css/partials/post_list.css index 3aee41e5..b6e0ad09 100644 --- a/css/partials/post_list.css +++ b/css/partials/post_list.css @@ -10,7 +10,6 @@ } .post-list-item .post-title { flex-grow: 1; - font-variation-settings: 'wght' $font-weight-medium; } .post-list-item .post-date { margin-left: $margin-l-0; diff --git a/css/post/table.css b/css/post/table.css index b8fd1da8..99783075 100644 --- a/css/post/table.css +++ b/css/post/table.css @@ -10,10 +10,10 @@ padding: $margin-m-1; } .post-content table th { - font-variation-settings: 'wght' $font-weight-medium; + font-weight: 400; } .post-content table td { - font-variation-settings: 'wght' $font-weight-light; + font-weight: 400; } .post-content table table, .post-content table tboby, diff --git a/css/style.css b/css/style.css index d19a9415..d16e8e9f 100644 --- a/css/style.css +++ b/css/style.css @@ -63,7 +63,7 @@ abbr[title] { } b, strong { - font-weight: bolder; + font-weight: 400; } code, kbd, @@ -189,7 +189,7 @@ template { .highlight .code .selector-tag, .highlight .code .subst { color: #333; - font-weight: bold; + font-weight: normal; } .highlight .code .number, .highlight .code .literal, @@ -206,7 +206,7 @@ template { .highlight .code .section, .highlight .code .selector-id { color: #900; - font-weight: bold; + font-weight: normal; } .highlight .code .subst { font-weight: normal; @@ -214,7 +214,7 @@ template { .highlight .code .type, .highlight .code .class .title { color: #458; - font-weight: bold; + font-weight: normal; } .highlight .code .tag, .highlight .code .name, @@ -236,7 +236,7 @@ template { } .highlight .code .meta { color: #999; - font-weight: bold; + font-weight: normal; } .highlight .code .deletion { background: #fdd; @@ -248,7 +248,7 @@ template { font-style: italic; } .highlight .code .strong { - font-weight: bold; + font-weight: normal; } @font-face { font-family: 'GoogleSansCode'; @@ -329,8 +329,8 @@ input { } body { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.9375rem; font-weight: 400; + font-size: 0.9375rem; line-height: 1.375rem; color: #09090b; background-color: #fff; @@ -362,8 +362,8 @@ input[type="search"]::-webkit-search-results-decoration { -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid #e4e4e7; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.8125rem; - font-weight: 500; line-height: 1.125rem; color: #09090b; } @@ -393,7 +393,7 @@ input[type="search"]::-webkit-search-results-decoration { overflow-x: auto; } .site-brand-container a { - font-weight: 600; + font-weight: 400; color: #09090b; } .menu-list { @@ -495,8 +495,8 @@ input[type="search"]::-webkit-search-results-decoration { margin-top: auto; border-top: 1px solid #e4e4e7; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.6875rem; font-weight: 400; + font-size: 0.6875rem; line-height: 1.125rem; color: #71717a; } @@ -528,8 +528,8 @@ input[type="search"]::-webkit-search-results-decoration { margin-top: 2rem; margin-bottom: 0.75rem; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 1.625rem; - font-weight: 700; line-height: 2rem; color: #a1a1aa; } @@ -542,19 +542,18 @@ input[type="search"]::-webkit-search-results-decoration { .post-list-item .post-title { flex-grow: 1; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.9375rem; font-weight: 400; + font-size: 0.9375rem; line-height: 1.375rem; color: #09090b; - font-variation-settings: 'wght' 500; } .post-list-item .post-date { margin-left: 1.5rem; min-width: 8rem; text-align: right; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.8125rem; font-weight: 400; + font-size: 0.8125rem; line-height: 1.125rem; color: #71717a; line-height: 1.375rem; @@ -593,15 +592,15 @@ input[type="search"]::-webkit-search-results-decoration { .post-gallery-item .post-info .post-title { margin-bottom: 0.75rem; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 1.625rem; - font-weight: 700; line-height: 2rem; color: #09090b; } .post-gallery-item .post-info .post-date { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.8125rem; font-weight: 400; + font-size: 0.8125rem; line-height: 1.125rem; color: #71717a; } @@ -636,8 +635,8 @@ input[type="search"]::-webkit-search-results-decoration { .pagination { margin-top: 0.75rem; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.8125rem; - font-weight: 500; line-height: 1.125rem; color: #09090b; display: flex; @@ -696,15 +695,15 @@ input[type="search"]::-webkit-search-results-decoration { } .profile .profile-content .profile-title { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 1.625rem; - font-weight: 700; line-height: 2rem; color: #09090b; } .profile .profile-content .profile-body { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.9375rem; font-weight: 400; + font-size: 0.9375rem; line-height: 1.375rem; color: #09090b; } @@ -786,7 +785,8 @@ input[type="search"]::-webkit-search-results-decoration { } .search-result-container .search-result-message { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-family: monospace; + font-weight: 400; + font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 0.8125rem; line-height: 0.9375rem; color: #a1a1aa; @@ -795,8 +795,8 @@ input[type="search"]::-webkit-search-results-decoration { } .search-result-container .search-result-title { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.9375rem; - font-weight: 700; line-height: 1.25rem; color: #09090b; color: #09090b; @@ -817,8 +817,8 @@ input[type="search"]::-webkit-search-results-decoration { } .search-result-container .search-result { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.9375rem; font-weight: 400; + font-size: 0.9375rem; line-height: 1.375rem; color: #09090b; color: #09090b; @@ -842,8 +842,8 @@ input[type="search"]::-webkit-search-results-decoration { .search-header .search-input-container .search-input { width: 100%; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.875rem; - font-weight: 500; line-height: 1.125rem; color: #09090b; color: #09090b; @@ -880,72 +880,72 @@ h6 { } h1 { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 1.625rem; - font-weight: 700; line-height: 2rem; color: #09090b; } h2 { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 1.375rem; - font-weight: 700; line-height: 1.75rem; color: #09090b; } h3 { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 1.0625rem; - font-weight: 700; line-height: 1.375rem; color: #09090b; } h4 { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.9375rem; - font-weight: 700; line-height: 1.25rem; color: #09090b; } h5 { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.875rem; - font-weight: 600; line-height: 1.125rem; color: #09090b; } h6 { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.875rem; - font-weight: 500; line-height: 1.125rem; color: #09090b; } p { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.9375rem; font-weight: 400; + font-size: 0.9375rem; line-height: 1.375rem; color: #09090b; } strong { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.9375rem; - font-weight: 700; line-height: 1.375rem; color: #09090b; } em { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.9375rem; font-weight: 400; + font-size: 0.9375rem; font-style: italic; line-height: 1.375rem; color: #09090b; } del { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.9375rem; font-weight: 400; + font-size: 0.9375rem; line-height: 1.375rem; text-decoration: line-through; color: #09090b; @@ -982,8 +982,8 @@ blockquote blockquote { } .post-content li { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.9375rem; font-weight: 400; + font-size: 0.9375rem; line-height: 1.375rem; color: #09090b; margin-top: 0.5rem; @@ -1018,8 +1018,8 @@ blockquote blockquote { dl dt { padding: 0.5rem 0; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.9375rem; - font-weight: 700; line-height: 1.375rem; color: #09090b; } @@ -1040,15 +1040,15 @@ dl dd { .post-head .post-info .post-title { margin-bottom: 0.75rem; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 1.625rem; - font-weight: 700; line-height: 2rem; color: #09090b; } .post-head .post-info .post-date { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-size: 0.8125rem; font-weight: 400; + font-size: 0.8125rem; line-height: 1.125rem; color: #71717a; } @@ -1073,8 +1073,8 @@ dl dd { display: flex; flex-wrap: wrap; font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.8125rem; - font-weight: 500; line-height: 1.125rem; color: #09090b; } @@ -1110,24 +1110,28 @@ dl dd { } code { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-family: monospace; + font-weight: 400; + font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 0.8125rem; line-height: 0.9375rem; color: #2563eb; + font-weight: 400; } .code pre span { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - font-family: monospace; + font-weight: 400; + font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 0.8125rem; line-height: 0.9375rem; color: #52525b; + font-weight: 400; } .highlight { margin: 0 0 1rem 0; overflow-x: auto; border: 1px solid #e4e4e7; border-radius: 0.125rem; - padding: 0.5rem; + background-color: #f4f4f5; } .highlight .line { width: 2.5rem; @@ -1136,10 +1140,15 @@ code { margin: 0; border-spacing: 0; border: none; + background-color: transparent; } .highlight td.code { padding: 0 0.125rem 0 0.5rem; } +.highlight pre { + font-weight: 400; + background-color: transparent; +} td.gutter { width: 1.5rem; padding: 0 0.5rem; @@ -1147,22 +1156,34 @@ td.gutter { position: -webkit-sticky; position: sticky; left: 0; - background: #fff; + background-color: #f4f4f5; + border-right: 1px solid #e4e4e7; + z-index: 1; } td.gutter pre { margin: 0; color: #a1a1aa; font-size: 0.8125rem; + font-weight: 400; + background-color: transparent; } td.code { vertical-align: top; + background-color: transparent; } td.code pre { margin: 0; + font-weight: 400; + background-color: transparent; } pre { margin: 0; overflow-x: auto; + font-weight: 400; +} +.highlight code { + background-color: transparent; + padding: 0; } @media (max-width: 688px) { code { @@ -1175,6 +1196,7 @@ pre { width: 1rem; padding-right: 0.25rem; font-size: 0.6875rem; + background-color: #f4f4f5; } } .post-content table { @@ -1189,10 +1211,10 @@ pre { padding: 0.75rem; } .post-content table th { - font-variation-settings: 'wght' 500; + font-weight: 400; } .post-content table td { - font-variation-settings: 'wght' 300; + font-weight: 400; } .post-content table table, .post-content table tboby, @@ -1459,8 +1481,8 @@ hr { } .post-tag { font-family: 'GoogleSansCode', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-weight: 400; font-size: 0.6875rem; - font-weight: 500; line-height: 0.875rem; color: #71717a; border: 1px solid #e4e4e7; diff --git a/js/mermaid-zoom.js b/js/mermaid-zoom.js index 5d6d2cff..6b4f0e17 100644 --- a/js/mermaid-zoom.js +++ b/js/mermaid-zoom.js @@ -9,6 +9,21 @@ if (mermaidElements.length === 0) return; + // 检测是否为移动端 + const isMobile = window.innerWidth <= 688; + + // 移动端:为 mermaid 元素添加提示样式 + if (isMobile) { + mermaidElements.forEach(function(el) { + el.style.position = 'relative'; + // 创建提示元素 + const hint = document.createElement('span'); + hint.textContent = '点击放大'; + hint.style.cssText = 'position:absolute;bottom:4px;right:4px;font-size:10px;padding:2px 6px;background:rgba(0,0,0,0.5);color:#fff;border-radius:4px;pointer-events:none;'; + el.appendChild(hint); + }); + } + // 创建模态框 const modal = document.createElement('div'); modal.className = 'mermaid-modal'; @@ -42,8 +57,19 @@ const originalWidth = svg.viewBox.baseVal.width || svg.width.baseVal.value || 800; const originalHeight = svg.viewBox.baseVal.height || svg.height.baseVal.value || 600; - // 计算放大比例:目标宽度为视口宽度的 80% - const targetWidth = Math.min(window.innerWidth * 0.85, 1600); + // 检测是否为移动端 + const isMobile = window.innerWidth <= 688; + + // 计算放大比例 + let targetWidth; + if (isMobile) { + // 移动端:适配屏幕宽度,留出边距 + targetWidth = window.innerWidth - 32; // 16px padding × 2 + } else { + // 桌面端:85% 视口宽度,最大 1600px + targetWidth = Math.min(window.innerWidth * 0.85, 1600); + } + const scale = targetWidth / originalWidth; const newWidth = originalWidth * scale; const newHeight = originalHeight * scale; @@ -66,6 +92,22 @@ // 显示模态框 modal.classList.add('active'); document.body.style.overflow = 'hidden'; + + // 移动端样式调整 + if (isMobile) { + content.style.maxWidth = '100vw'; + content.style.maxHeight = '100vh'; + content.style.padding = '12px'; + content.style.borderRadius = '0'; + modal.style.padding = '0'; + } else { + // 恢复桌面端样式 + content.style.maxWidth = ''; + content.style.maxHeight = ''; + content.style.padding = ''; + content.style.borderRadius = ''; + modal.style.padding = ''; + } }); }); |
