diff --git a/assets/css/common/post-entry.css b/assets/css/common/post-entry.css index b23805f..9f1f0c4 100644 --- a/assets/css/common/post-entry.css +++ b/assets/css/common/post-entry.css @@ -81,7 +81,8 @@ -webkit-line-clamp: 2; } -.entry-footer { +.entry-footer, +.entry-footer span > a { color: var(--secondary); font-size: 13px; } diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index a843154..55689f1 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -19,26 +19,22 @@ .post-meta, .breadcrumbs { font-size: 15px; - display: flex; - flex-wrap: wrap; } .post-meta * { color: var(--secondary); } -.post-meta ul { - margin: 0; - padding: 0; +.post-meta .item:not(:last-of-type):after { + content: "·"; + margin-inline-start: .3em; + margin-inline-end: .3em; } -.post-meta .i18n_list li { - display: inline-flex; - list-style: none; - margin: auto 3px; - box-shadow: 0 1px 0 var(--secondary); -} -.post-meta .delimiter { - margin-inline-start: .5em; - margin-inline-end: .5em; + +.post-meta svg { + width: 1em; + height: 1em; + display: inline-block; + vertical-align: -0.15em; } .post-tags a:hover { @@ -52,9 +48,12 @@ } .post-tags a:before { content: "#"; - margin-inline-end: 2px; } +.breadcrumbs { + display: flex; + flex-wrap: wrap; +} .breadcrumbs a { font-size: 16px; } diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 6a8b3c9..01f2a62 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -65,7 +65,11 @@ {{- if (ne (.Param "hideSummary") true) }}
-

{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}

+ {{ if .Description }} +

{{ .Description | plainify | htmlUnescape }}

+ {{ else }} +

{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}

+ {{ end }}
{{- end }} {{- if not (.Param "hideMeta") }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 0a5f5bf..32bc143 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,24 +14,10 @@ {{- end }} {{- if not (.Param "hideMeta") }}
- {{- if not .Date.IsZero -}} - {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} -  ·  - {{- end }} - - {{- if .Params.tags }} - - {{- range ($.GetTerms "tags") -}} - {{ .LinkTitle }} - {{- end -}} - -  ·  - {{- end }} - {{- partial "post_meta.html" . -}} - {{- partial "translation_list.html" . -}} - {{- partial "edit_post.html" . -}} - {{- partial "post_canonical.html" . -}} + {{/* TODO move to footer */}} + {{/* partial "edit_post.html" . */}} + {{/* partial "post_canonical.html" . */}}
{{- end }} diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 6ab5b80..b7eed17 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -1,24 +1,68 @@ -{{- $scratch := newScratch }} + +{{- if not .Date.IsZero -}} + + + {{ .Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }} + +{{- end }} + + +{{- if .Params.tags }} + + + + {{- range ($.GetTerms "tags") -}} + {{ .LinkTitle }} + {{- end -}} + + +{{- end }} + {{- if (.Param "ShowWordCount") -}} -{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) -}} + + + + {{- i18n "words" .WordCount | default (printf "%d words" .WordCount) -}} + + {{- end }} + {{- if (.Param "ShowReadingTime") -}} -{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) -}} + + + + {{- i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime) -}} + + {{- end }} + {{- if (.Param "ShowAuthor") -}} -{{- with (partial "author.html" .) }} -{{- $scratch.Add "meta" (slice .) }} -{{- end }} + + + {{- partial "author.html" . }} + {{- end }} -{{- with ($scratch.Get "meta") }} -{{ range $i, $e := . }} -{{ if $i }} - ·  -{{ end }} -{{ $e }} -{{- end -}} -{{- end -}} + +{{- if .IsTranslated -}} + + + + {{- range $i, $e := .Translations }} + {{- if $i }} | {{ end -}} + {{- with $e }} + + {{- if (and site.Params.displayFullLangName (.Language.LanguageName)) }} + {{- .Language.LanguageName | emojify -}} + {{- else }} + {{- .Lang | title -}} + {{- end -}} + + {{- end }} + {{- end }} + + +{{- end }}