From 8ab5cf130fbea2084a0455c424f522450b92f7c3 Mon Sep 17 00:00:00 2001 From: Reorx Date: Thu, 5 May 2022 17:29:31 +0800 Subject: [PATCH] fix meta item break into multiple lines --- assets/css/common/main.css | 7 +++++-- layouts/partials/post_meta.html | 21 +++++++-------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/assets/css/common/main.css b/assets/css/common/main.css index c5417e2..3721408 100644 --- a/assets/css/common/main.css +++ b/assets/css/common/main.css @@ -83,14 +83,17 @@ pre:hover .copy-code { display: block; } +.meta-item { + display: inline-block; +} .meta-item * { color: var(--secondary); } .meta-item:not(:last-of-type):after { content: "ยท"; - margin-inline-start: .3em; - margin-inline-end: .3em; + margin-inline-start: .5em; + margin-inline-end: .5em; } .meta-item svg { diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 776ecf8..253617d 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -2,20 +2,17 @@ {{- if not .Date.IsZero -}} - {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} - + {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} {{- end }} - -{{- if .Params.tags }} +{{- if .Params.tags -}} - + {{- end }} @@ -24,8 +21,7 @@ {{- i18n "words" .WordCount | default (printf "%d words" .WordCount) -}} - - + {{- end }} @@ -34,16 +30,14 @@ {{- i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime) -}} - - + {{- end }} {{- if (.Param "ShowAuthor") -}} - {{- partial "author.html" . }} - + {{- partial "author.html" . -}} {{- end }} @@ -63,6 +57,5 @@ {{- end }} {{- end }} - - + {{- end }}