From 98b512fe646b5de3e3b4173f2f3c38e4f67e559b Mon Sep 17 00:00:00 2001 From: Reorx Date: Fri, 22 Apr 2022 00:28:30 +0800 Subject: [PATCH] =?UTF-8?q?move=20tags=20to=20the=20top;=20use=20=C2=B6=20?= =?UTF-8?q?for=20anchor=20symbol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/common/post-single.css | 43 +++++++++++++------------ layouts/_default/single.html | 21 ++++++++---- layouts/partials/anchored_headings.html | 2 +- layouts/partials/post_meta.html | 17 +++++----- 4 files changed, 46 insertions(+), 37 deletions(-) diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index e5f85d5..61bdb66 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -18,11 +18,13 @@ .post-meta, .breadcrumbs { - color: var(--secondary); - font-size: 14px; + font-size: 15px; display: flex; flex-wrap: wrap; } +.post-meta * { + color: var(--secondary); +} .post-meta ul { margin: 0; @@ -39,6 +41,20 @@ margin-inline-end: .5em; } +.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: "#"; + margin-inline-end: 2px; +} + .breadcrumbs a { font-size: 16px; } @@ -92,7 +108,7 @@ } .post-content a.anchor:hover { color: var(--primary); - box-shadow: 0 -2px 0 var(--secondary) inset; + box-shadow: 0 2px 0 var(--secondary); } .post-content a code { @@ -112,6 +128,9 @@ h5 .anchor, h6 .anchor { box-shadow: none; user-select: none; + font-size: .8em; + position: relative; + top: -2px; } h1:hover .anchor, @@ -374,13 +393,6 @@ h6:hover .anchor { margin-top: 56px; } -.post-tags li { - display: inline-block; - margin-inline-end: 3px; - margin-bottom: 5px; -} - -.post-tags a, .share-buttons, .paginav { border-radius: var(--radius); @@ -388,17 +400,6 @@ h6:hover .anchor { border: 1px solid var(--border); } -.post-tags a { - display: block; - padding-inline-start: 14px; - padding-inline-end: 14px; - color: var(--secondary); - font-size: 14px; - line-height: 34px; - background: var(--code-bg); -} - -.post-tags a:hover, .paginav a:hover { background: var(--border); } diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d313500..7f0d181 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,6 +14,20 @@ {{- end }} {{- if not (.Param "hideMeta") }}
+ {{- if not .Date.IsZero -}} + {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} +  ·  + {{- end }} + + {{- if .Params.tags }} + +  ·  + {{- end }} + {{- partial "post_meta.html" . -}} {{- partial "translation_list.html" . -}} {{- partial "edit_post.html" . -}} @@ -36,13 +50,6 @@ {{- end }}