diff options
| author | i-shm <[email protected]> | 2026-08-18 13:06:55 +0000 |
|---|---|---|
| committer | i-shm <[email protected]> | 2026-08-18 13:06:55 +0000 |
| commit | 74e7cbcd44fc8923740838b378f600d14be7e8ff (patch) | |
| tree | 937960995298a86a920d55fe9d1ab9eef737879a /css | |
| parent | ef479f5b188c64f6edf98805a8271f2c820172c9 (diff) | |
| download | blog-74e7cbcd44fc8923740838b378f600d14be7e8ff.tar.gz | |
deploy: 410346c15dffdc48b6b8e6c04bdcb48bab48bd85
Diffstat (limited to 'css')
| -rw-r--r-- | css/partials/footer.css | 18 | ||||
| -rw-r--r-- | css/partials/profile.css | 63 | ||||
| -rw-r--r-- | css/post/code.css | 79 | ||||
| -rw-r--r-- | css/post/mermaid.css | 88 |
4 files changed, 248 insertions, 0 deletions
diff --git a/css/partials/footer.css b/css/partials/footer.css index e69de29b..16f93d9f 100644 --- a/css/partials/footer.css +++ b/css/partials/footer.css @@ -0,0 +1,18 @@ +.footer { + margin-top: auto; + border-top: 1px solid $color-border; +} +.footer .footer-text { + margin-top: $margin-m-0; + margin-bottom: $margin-m-0; +} +@media (max-width: 688px) { + .footer { + margin-top: $margin-l-0; + } + .footer .footer-text { + font-size: 0.625rem; + margin-top: $margin-s-1; + margin-bottom: $margin-s-1; + } +} diff --git a/css/partials/profile.css b/css/partials/profile.css index e69de29b..68487866 100644 --- a/css/partials/profile.css +++ b/css/partials/profile.css @@ -0,0 +1,63 @@ +.profile { + margin-top: 20vh; + display: flex; + flex-direction: row-reverse; + align-items: center; +} +.profile .profile-content { + width: 50%; + margin: 0 $margin-l-0 0 0; +} +.profile .profile-content .profile-title { + margin-top: 0; + margin-bottom: $margin-m-0; +} +.profile .profile-content .profile-body { + margin-top: 0; + margin-bottom: $margin-m-1; + color: $color-text-secondary; +} +.profile .profile-content .profile-link { + margin-top: 0; + margin-bottom: $margin-m-1; + font-size: 0.9375rem; +} +.profile .profile-content .profile-link a { + text-decoration: underline; + text-underline-offset: 3px; + transition: color $transition-duration ease; +} +.profile .profile-content .profile-link a:hover { + color: $color-accent; +} +.profile .profile-image { + width: 50%; + display: flex; + align-items: center; + justify-content: center; +} +.profile .profile-image img { + max-width: 100%; + max-height: 35vh; + object-fit: contain; +} +@media (max-width: 480px) { + .profile { + flex-wrap: wrap; + align-items: flex-start; + margin-top: $margin-l-0; + } + .profile .profile-content { + width: 100%; + margin-top: $margin-m-0; + } + .profile .profile-content .profile-link { + font-size: 0.875rem; + } + .profile .profile-image { + width: 100%; + } + .profile .profile-image img { + max-height: 25vh; + } +} diff --git a/css/post/code.css b/css/post/code.css index e69de29b..84147ae7 100644 --- a/css/post/code.css +++ b/css/post/code.css @@ -0,0 +1,79 @@ +code { + font-weight: 400; +} +.code pre span { + font-weight: 400; +} +.highlight { + margin: 0 0 $margin-m-2 0; + overflow-x: auto; + border: 1px solid $color-border; + border-radius: $margin-s-1; + background-color: $color-code-background; +} +.highlight .line { + width: $margin-l-2; +} +.highlight table { + margin: 0; + border-spacing: 0; + border: none; + background-color: transparent; +} +.highlight td.code { + padding: 0 $margin-s-1 0 $margin-m-0; +} +.highlight pre { + font-weight: 400; + background-color: transparent; +} +td.gutter { + width: $margin-l-0; + padding: 0 $margin-m-0; + vertical-align: top; + position: -webkit-sticky; + position: sticky; + left: 0; + background-color: $color-code-background; + border-right: 1px solid $color-border; + z-index: 1; +} +td.gutter pre { + margin: 0; + color: $color-code-marker; + font-size: $font-size-code; + 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 { + font-size: 0.75rem; + } + .highlight pre { + font-size: 0.75rem; + } + .highlight td.gutter { + width: $margin-m-2; + padding-right: $margin-s-2; + font-size: 0.6875rem; + background-color: $color-code-background; + } +} diff --git a/css/post/mermaid.css b/css/post/mermaid.css index e69de29b..dc40ad43 100644 --- a/css/post/mermaid.css +++ b/css/post/mermaid.css @@ -0,0 +1,88 @@ +.mermaid { + display: flex; + justify-content: center; + align-items: center; + margin: $margin-l-0 auto; + padding: $margin-m-2; + background: $color-text-fourth; + border: $line-third solid $color-border; + border-radius: $margin-s-2; + cursor: pointer; + transition: all $transition-duration ease; + max-width: 100%; + overflow: auto; + position: relative; +} +.mermaid:hover { + border-color: $color-accent; + box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.1); +} +.mermaid::after { + content: "点击放大"; + position: absolute; + bottom: $margin-s-2; + right: $margin-s-2; + font-size: $font-size-post-tag; + color: $color-text-secondary; + opacity: 0; + transition: opacity $transition-duration; +} +.mermaid:hover::after { + opacity: 1; +} +.mermaid svg { + max-width: 100%; + height: auto; +} +.mermaid-modal { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: $color-overlay; + z-index: 10000; + justify-content: center; + align-items: center; + padding: $margin-primary; +} +.mermaid-modal.active { + display: flex; +} +.mermaid-modal .mermaid-close { + position: absolute; + top: $margin-m-2; + right: $margin-m-2; + width: 3rem; + height: 3rem; + background: $color-background; + border: $line-third solid $color-border; + border-radius: 50%; + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + font-size: 1.5rem; + color: $color-text-primary; + transition: all $transition-duration; +} +.mermaid-modal .mermaid-close:hover { + background: $color-accent; + color: $color-background; + border-color: $color-accent; +} +.mermaid-modal .mermaid-content { + max-width: 95vw; + max-height: 90vh; + overflow: auto; + background: $color-background; + padding: $margin-l-0; + border-radius: $margin-s-2; + box-shadow: 0 0.5rem 2rem rgba(0,0,0,0.3); +} +.mermaid-modal .mermaid-content svg { + display: block; + max-width: none; + max-height: none; +} |
