From 60984fd13658db175e8945467d3dd799f2fdcc32 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 16 Dec 2023 14:06:46 +0530 Subject: [PATCH] Add icon for 'draft' posts https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Aedit_note%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048 LICENSE: https://developers.google.com/fonts/faq#can_i_use_any_font_in_a_commercial_product --- assets/css/common/post-entry.css | 10 +++++++--- layouts/_default/archives.html | 13 ++++++++++--- layouts/_default/list.html | 11 +++++++++-- layouts/_default/single.html | 11 +++++++++-- 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/assets/css/common/post-entry.css b/assets/css/common/post-entry.css index 885aa2a4..c3cba370 100644 --- a/assets/css/common/post-entry.css +++ b/assets/css/common/post-entry.css @@ -80,13 +80,17 @@ bottom: 0; } -.entry-cover, -.entry-isdraft { - font-size: 14px; +.entry-hint { color: var(--secondary); } +.entry-hint-parent { + display: flex; + justify-content: space-between; +} + .entry-cover { + font-size: 14px; margin-bottom: var(--gap); text-align: center; } diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index d2c4d76b..b38e39a1 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -6,7 +6,7 @@ {{- if (.Param "ShowRssButtonInSectionTermList") }} {{- $rss := (.OutputFormats.Get "rss") }} {{- if (eq .Kind `page`) }} - {{- $rss = (.Parent.OutputFormats.Get "rss") }} + {{- $rss = (.Parent.OutputFormats.Get "rss") }} {{- end }} {{- with $rss }} @@ -46,9 +46,16 @@ {{- range .Pages }} {{- if eq .Kind "page" }}
-

+

{{- .Title | markdownify }} - {{- if .Draft }}  [draft]{{- end }} + {{- if .Draft }} + + + + + + {{- end }}

{{- partial "post_meta.html" . -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 2640f164..81aea6e4 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -67,9 +67,16 @@ {{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }} {{- partial "cover.html" (dict "cxt" . "IsSingle" false "isHidden" $isHidden) }}
-

+

{{- .Title }} - {{- if .Draft }}  [draft]{{- end }} + {{- if .Draft }} + + + + + + {{- end }}

{{- if (ne (.Param "hideSummary") true) }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 837f6197..19a624f4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,9 +3,16 @@
{{ partial "breadcrumbs.html" . }} -

+

{{ .Title }} - {{- if .Draft }}  [draft]{{- end }} + {{- if .Draft }} + + + + + + {{- end }}

{{- if .Description }}