From 29414e01ac8a5d99c8f5755d86d6d9504bb28fda Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Tue, 5 Oct 2021 19:12:10 -0500 Subject: [PATCH] Add icons --- assets/css/bobastyle.css | 14 +++++++++++++- layouts/_default/list.html | 9 ++++++++- layouts/_default/single.html | 11 ++++++++++- layouts/partials/icon.html | 3 +++ static/feather-sprite.svg | 1 + 5 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 layouts/partials/icon.html create mode 100644 static/feather-sprite.svg diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index ca62b12..64373a3 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -21,7 +21,7 @@ } .tags { - padding-left: 5px; + padding-left: 10px; } @@ -93,6 +93,18 @@ hr { +/* Icons */ +.icon { + width: 20px; + height: 20px; + color: lightgray; + text-align: center; + display: inline; + vertical-align: middle; +} + + + /* Breadcrumb navigation */ ul.breadcrumb { padding 10px 16px; diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 7aead0a..f796a1a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -17,19 +17,26 @@ {{ if or .Date (.GetTerms "tags") }}
{{ if .Date }} + + {{ partial "icon.html" "calendar" }} + {{ if ne .Lastmod .Date }} {{ end }} + {{ end }} {{ range (.GetTerms "tags") }} - #{{ .LinkTitle }} + + {{ partial "icon.html" "tag" }} + {{ .LinkTitle }} + {{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index cc60c7a..5efec93 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,24 +3,33 @@

{{ .Title | markdownify }}

+{{ if or .Date (.GetTerms "tags") }}
{{ if .Date }} + + {{ partial "icon.html" "calendar" }} + {{ if ne .Lastmod .Date }} {{ end }} + {{ end }} {{ range (.GetTerms "tags") }} - #{{ .LinkTitle }} + + {{ partial "icon.html" "tag" }} + {{ .LinkTitle }} + {{ end }}
+{{ end }} {{ if .Params.Toc }}
diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html new file mode 100644 index 0000000..958bf89 --- /dev/null +++ b/layouts/partials/icon.html @@ -0,0 +1,3 @@ + + + diff --git a/static/feather-sprite.svg b/static/feather-sprite.svg new file mode 100644 index 0000000..19a2534 --- /dev/null +++ b/static/feather-sprite.svg @@ -0,0 +1 @@ + \ No newline at end of file