diff --git a/assets/css/common/footer.css b/assets/css/common/footer.css index 80d2ba0f45..240df53350 100644 --- a/assets/css/common/footer.css +++ b/assets/css/common/footer.css @@ -23,27 +23,28 @@ .footer a { color: inherit; - border-bottom: 1px solid var(--secondary); -} - -.footer a:hover { - border-bottom: 1px solid var(--primary); + text-underline-offset: 0.25rem; + text-decoration: underline; } .top-link { - visibility: hidden; position: fixed; - bottom: 60px; - right: 30px; + bottom: 4rem; + right: 2rem; z-index: 99; background: var(--tertiary); - width: 42px; - height: 42px; + width: 2.5rem; + height: 2.5rem; padding: 10px; border-radius: 64px; transition: visibility .3s, opacity .3s cubic-bezier(0.4, 0, 1, 1); } +.hidden { + visibility: hidden; + opacity: 0; +} + .top-link, .top-link svg { filter: drop-shadow(0px 0px 0px var(--theme)); diff --git a/assets/css/common/header.css b/assets/css/common/header.css index 7ca29352bc..49a2ff6c93 100644 --- a/assets/css/common/header.css +++ b/assets/css/common/header.css @@ -1,4 +1,4 @@ -.nav { +.header-nav { display: flex; flex-wrap: wrap; justify-content: space-between; @@ -8,7 +8,7 @@ line-height: var(--header-height); } -.nav a { +.header-nav a { display: block; } @@ -19,26 +19,27 @@ } .logo { - flex-wrap: inherit; + align-items: center; + column-gap: 0.55rem; + flex-wrap: wrap; } .logo a { font-size: 24px; font-weight: 700; + display: flex; + align-items: center; + column-gap: 0.55rem; } -.logo a img, .logo a svg { - display: inline; - vertical-align: middle; +.logo a img, +.logo a svg { pointer-events: none; - transform: translate(0, -10%); border-radius: 6px; - margin-inline-end: 8px; } .theme-toggle { - font-size: 26px; - margin: auto 4px; + padding: 0 0.4rem; } [data-theme="dark"] .moon { @@ -49,6 +50,33 @@ display: none; } +.logo-switches { + display: inline-flex; + gap: 0.4rem; + align-items: inherit; + min-height: stretch; + flex-wrap: inherit; +} + +.logo-switches>* { + min-height: inherit; + align-items: center; + display: inline-flex; +} + +.lang-menu * { + display: inherit; + min-height: inherit; + align-items: inherit; +} + +.lang-menu a { + font-size: 1rem; + font-weight: 500; + padding: 0 0.4rem; + display: inline-flex +} + .menu { list-style: none; word-break: keep-all; @@ -56,7 +84,7 @@ white-space: nowrap; } -.menu li + li { +.menu li+li { margin-inline-start: var(--gap); } @@ -68,25 +96,3 @@ font-weight: 500; border-bottom: 2px solid currentColor; } - -.lang-switch li, -.lang-switch ul, -.logo-switches { - display: inline-flex; - margin: auto 4px; -} - -.lang-switch { - display: flex; - flex-wrap: inherit; -} - -.lang-switch a { - margin: auto 3px; - font-size: 16px; - font-weight: 500; -} - -.logo-switches { - flex-wrap: inherit; -} diff --git a/assets/css/common/md-content.css b/assets/css/common/md-content.css index 83d526bcf1..9087384919 100644 --- a/assets/css/common/md-content.css +++ b/assets/css/common/md-content.css @@ -32,15 +32,8 @@ } .md-content a { - box-shadow: 0 1px 0; - box-decoration-break: clone; - -webkit-box-decoration-break: clone; -} - -.md-content a code { - margin: auto 0; - border-radius: 0; - box-shadow: 0 -1px 0 var(--primary) inset; + text-underline-offset: 0.3rem; + text-decoration: underline; } .md-content del { @@ -115,7 +108,7 @@ } .md-content .highlight:not(table) { - margin: 10px auto; + margin-bottom: var(--content-gap); background: var(--code-block-bg) !important; border-radius: var(--radius); direction: ltr; @@ -150,13 +143,12 @@ margin-bottom: 0; } -.md-content code { - margin: auto 4px; - padding: 4px 6px; +.post-content code { + padding: 0.2rem 0.3rem; font-size: 0.78em; line-height: 1.5; background: var(--code-bg); - border-radius: 2px; + border-radius: 0.2rem; } .md-content pre code { @@ -171,9 +163,9 @@ } .md-content blockquote { - margin: 20px 0; - padding: 0 14px; - border-inline-start: 3px solid var(--primary); + margin: 1rem 0; + padding-inline-start: 1rem; + border-inline-start: 0.3rem solid var(--primary); } .md-content hr { @@ -188,7 +180,7 @@ } .md-content img { - border-radius: 4px; + border-radius: var(--radius); margin: 1rem 0; } @@ -213,12 +205,12 @@ font-weight: normal; } -h1:hover .anchor, -h2:hover .anchor, -h3:hover .anchor, -h4:hover .anchor, -h5:hover .anchor, -h6:hover .anchor { +.md-content h1:hover .anchor, +.md-content h2:hover .anchor, +.md-content h3:hover .anchor, +.md-content h4:hover .anchor, +.md-content h5:hover .anchor, +.md-content h6:hover .anchor { display: inline-flex; color: var(--secondary); margin-inline-start: 8px; @@ -227,7 +219,7 @@ h6:hover .anchor { } -img.in-text { +.md-content img.in-text { display: inline; margin: auto; } @@ -238,8 +230,17 @@ mark { } audio { - width: stretch; - max-width: 100%; + display: block; + width: 100%; + border: 1px solid var(--border); + border-radius: var(--radius); + overflow: hidden; + height: 2.5rem; + margin-bottom: var(--content-gap); +} + +audio::-webkit-media-controls-enclosure { + border-radius: 0; } video { diff --git a/assets/css/common/post-entry.css b/assets/css/common/post-entry.css index d6a83138b3..4809c7041b 100644 --- a/assets/css/common/post-entry.css +++ b/assets/css/common/post-entry.css @@ -108,6 +108,10 @@ font-size: 14px; margin-bottom: var(--gap); text-align: center; + border-radius: var(--radius); + display: flex; + flex-direction: column; + gap: .5rem; } .entry-cover img { @@ -117,5 +121,6 @@ } .entry-cover a { - box-shadow: 0 1px 0 var(--primary); + text-underline-offset: 0.3rem; + text-decoration: underline; } diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index b21b9b0f19..2e01b2e1bc 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -4,13 +4,15 @@ } .post-title { - margin-bottom: 2px; font-size: 40px; } .post-description { margin-top: 10px; - margin-bottom: 5px; +} + +.post-meta { + margin-top: 5px; } .post-meta, @@ -23,6 +25,15 @@ display: flex; flex-wrap: wrap; align-items: center; + gap: 0.2rem; +} + +.breadcrumbs a { + font-size: 16px; +} + +.breadcrumbs svg { + height: 1em; } .i18n_list { @@ -34,51 +45,71 @@ margin: auto 3px; } -.breadcrumbs a { - font-size: 16px; +.post-meta a, +.toc a:hover { + text-underline-offset: 0.3rem; + text-decoration: underline; } -.post-meta .i18n_list li a, -.toc a:hover { - box-shadow: 0 1px 0; - box-decoration-break: clone; - -webkit-box-decoration-break: clone; +.post-meta a { + color: var(--secondary); + text-decoration-style: dotted; } -.toc { +details.toc { margin-bottom: var(--content-gap); - border: 1px solid var(--border); background: var(--code-bg); border-radius: var(--radius); - padding: 0.4em; + border: 1px solid var(--border); } -[data-theme="dark"] .toc { +[data-theme="dark"] details.toc { background: var(--entry); } -.toc details summary { - cursor: zoom-in; - margin-inline-start: 10px; - user-select: none; +details.toc summary { + padding: 0.5rem 1.2rem; + border-radius: var(--radius); } -.toc details[open] summary { - cursor: zoom-out; +details summary { + cursor: pointer; + display: list-item; + width: 100%; + margin-inline-start: 0; + user-select: none; } -.toc .details { +details .title { display: inline; font-weight: 500; + margin-inline-start: 0.2rem; +} + +details { + interpolate-size: allow-keywords; +} + +details::details-content { + height: 0; + opacity: 0; + overflow: clip; + transition: height 150ms ease, + opacity 150ms ease, + content-visibility 150ms allow-discrete; +} + +details[open]::details-content { + height: auto; + opacity: 1; } -.toc .inner { - margin: 5px 20px; - padding: 0 10px; - opacity: 0.9; +details .inner { + margin: 0 2.4rem; + padding-bottom: 0.6rem; } -.toc li ul { +details li ul { margin-inline-start: var(--gap); } @@ -146,29 +177,28 @@ .paginav { display: flex; - line-height: 30px; -} - -.paginav a { - padding-inline-start: 14px; - padding-inline-end: 14px; - border-radius: var(--radius); + line-height: 1.2; } .paginav .title { letter-spacing: 1px; text-transform: uppercase; - font-size: small; + font-size: 0.8rem; color: var(--secondary); } -.paginav .prev, -.paginav .next { +.paginav a { width: 50%; + display: flex; + flex-direction: column; + gap: 0.5rem; + padding: 0.8rem; + border-radius: var(--radius); } .paginav span:hover:not(.title) { - box-shadow: 0 1px 0; + text-underline-offset: 0.2rem; + text-decoration: underline; } .paginav .next { diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html index 2686ca0994..ba53824ed5 100644 --- a/layouts/partials/breadcrumbs.html +++ b/layouts/partials/breadcrumbs.html @@ -1,19 +1,23 @@ {{- if (.Param "ShowBreadCrumbs") -}} - + {{- end -}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 929aad39b6..d2a70c2fef 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -23,9 +23,9 @@ {{- end }} {{- if (not site.Params.disableScrollToTop) }} - - + {{- $currentPage := . }} + {{- else }} + + + {{- end -}} + {{- end }} + + {{- end }} + + {{- end }} diff --git a/layouts/shortcodes/audio.html b/layouts/shortcodes/audio.html index 1497a75c94..c98b5f3b43 100644 --- a/layouts/shortcodes/audio.html +++ b/layouts/shortcodes/audio.html @@ -1,2 +1,2 @@ {{ $src := (.Get "src") }} - +