diff options
| author | Reorx <novoreorx@gmail.com> | 2022-04-22 15:00:00 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-04-22 15:00:00 +0800 |
| commit | 8deaaf2d048facf4fe8e8f8c5927af2a1a169b5d (patch) | |
| tree | 240f07a56c9bd9a3ec4b79b43dd307b2e36d639c | |
| parent | f499ed161bd72975e137356b70bd47b9442a4722 (diff) | |
update meta style in home page
| -rw-r--r-- | assets/css/common/main.css | 34 | ||||
| -rw-r--r-- | assets/css/common/post-single.css | 32 | ||||
| -rw-r--r-- | layouts/partials/post_meta.html | 12 |
3 files changed, 43 insertions, 35 deletions
diff --git a/assets/css/common/main.css b/assets/css/common/main.css index 30efab6..c5417e2 100644 --- a/assets/css/common/main.css +++ b/assets/css/common/main.css @@ -82,3 +82,37 @@ div.highlight:hover .copy-code, pre:hover .copy-code { display: block; } + +.meta-item * { + color: var(--secondary); +} + +.meta-item:not(:last-of-type):after { + content: "·"; + margin-inline-start: .3em; + margin-inline-end: .3em; +} + +.meta-item svg { + width: 1em; + height: 1em; + display: inline-block; + vertical-align: -0.15em; +} + +.meta-item a { + transition: var(--link-transition); +} +.meta-item a:hover { + color: var(--primary); + box-shadow: 0 1px 0 var(--secondary); +} +.meta-item .post-tags a:not(:last-of-type) { + margin-inline-end: .3em; +} +.meta-item .post-tags a:not(:last-of-type):after { + content: ","; +} +.meta-item .post-tags a:before { + content: "#"; +} diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 55689f1..8e44c39 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -20,35 +20,6 @@ .breadcrumbs { font-size: 15px; } -.post-meta * { - color: var(--secondary); -} - -.post-meta .item:not(:last-of-type):after { - content: "·"; - margin-inline-start: .3em; - margin-inline-end: .3em; -} - -.post-meta svg { - width: 1em; - height: 1em; - display: inline-block; - vertical-align: -0.15em; -} - -.post-tags a:hover { - color: var(--primary); -} -.post-tags a:not(:last-of-type) { - margin-inline-end: .3em; -} -.post-tags a:not(:last-of-type):after { - content: ","; -} -.post-tags a:before { - content: "#"; -} .breadcrumbs { display: flex; @@ -467,6 +438,9 @@ h6:hover .anchor { width: 50%; } +.paginav a span { + transition: var(--link-transition); +} .paginav a:hover span:not(.title) { box-shadow: 0 1px 0; } diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index b7eed17..776ecf8 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -1,6 +1,6 @@ {{- if not .Date.IsZero -}} -<span class="item"> +<span class="meta-item"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar" style="user-select: text;"><rect x="3" y="4" width="18" height="18" rx="2" ry="2" style="user-select: text;"></rect><line x1="16" y1="2" x2="16" y2="6" style="user-select: text;"></line><line x1="8" y1="2" x2="8" y2="6" style="user-select: text;"></line><line x1="3" y1="10" x2="21" y2="10" style="user-select: text;"></line></svg> <span>{{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }}</span> </span> @@ -8,7 +8,7 @@ {{- if .Params.tags }} -<span class="item"> +<span class="meta-item"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-tag meta-icon" style="user-select: text;"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" style="user-select: text;"></path><line x1="7" y1="7" x2="7" y2="7" style="user-select: text;"></line></svg> <span class="post-tags"> {{- range ($.GetTerms "tags") -}} @@ -20,7 +20,7 @@ {{- if (.Param "ShowWordCount") -}} -<span class="item"> +<span class="meta-item"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text" style="user-select: text;"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" style="user-select: text;"></path><polyline points="14 2 14 8 20 8" style="user-select: text;"></polyline><line x1="16" y1="13" x2="8" y2="13" style="user-select: text;"></line><line x1="16" y1="17" x2="8" y2="17" style="user-select: text;"></line><polyline points="10 9 9 9 8 9" style="user-select: text;"></polyline></svg> <span> {{- i18n "words" .WordCount | default (printf "%d words" .WordCount) -}} @@ -30,7 +30,7 @@ {{- if (.Param "ShowReadingTime") -}} -<span class="item"> +<span class="meta-item"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><circle cx="12" cy="12" r="9"></circle><polyline points="12 7 12 12 15 15"></polyline></svg> <span> {{- i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime) -}} @@ -40,7 +40,7 @@ {{- if (.Param "ShowAuthor") -}} -<span class="item"> +<span class="meta-item"> <svg xmlns="http://www.w3.org/2000/svg"width="24" height="24" viewBox="0 0 24 24" stroke="black" stroke-width="1" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><circle cx="12" cy="7" r="4"></circle><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg> {{- partial "author.html" . }} </span> @@ -48,7 +48,7 @@ {{- if .IsTranslated -}} -<span class="item"> +<span class="meta-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 5h7"></path><path d="M7 4c0 4.846 0 7 .5 8"></path><path d="M10 8.5c0 2.286 -2 4.5 -3.5 4.5s-2.5 -1.135 -2.5 -2c0 -2 1 -3 3 -3s5 .57 5 2.857c0 1.524 -.667 2.571 -2 3.143"></path><path d="M12 20l4 -9l4 9"></path><path d="M19.1 18h-6.2"></path></svg> <span class="i18n-links"> {{- range $i, $e := .Translations }} |
