From 4ccf226f91d9d2cd2045d36a521291bf0f9bb4b1 Mon Sep 17 00:00:00 2001 From: cgiacomi Date: Sat, 12 Oct 2019 09:27:08 +0200 Subject: [PATCH 1/3] feat: add tag list to post header --- layouts/_default/single.html | 11 +++++++++++ static/css/main.css | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 26d1c1b..58c3828 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,6 +8,17 @@

{{ .Title }}

Posted at — {{ dateFormat "Jan 2, 2006" .Date }}
+
diff --git a/static/css/main.css b/static/css/main.css index c0f2453..4e7a78a 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -279,6 +279,14 @@ ul { margin: 0; } +.post .post-header .post-tags { + padding-left: 5px; +} + +.post .post-header .post-tags a { + margin-right: 5px; +} + .post .post-header .meta { padding-left: 5px; margin-top: 10px; From 470638b4bc911ff2127ea057992ab13f4e4c17d6 Mon Sep 17 00:00:00 2001 From: cgiacomi Date: Sat, 12 Oct 2019 17:39:40 +0200 Subject: [PATCH 2/3] fix: move tags to bottom of post --- layouts/_default/single.html | 23 ++++++++++++----------- static/css/main.css | 6 +----- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 58c3828..496a564 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,23 +8,24 @@

{{ .Title }}

Posted at — {{ dateFormat "Jan 2, 2006" .Date }}
-
{{ .Content }}
+ + {{- $.Scratch.Set "isDisqus" true -}} {{- if and (isset .Params "type") (in .Site.Params.disableDisqusTypes .Params.type) -}} diff --git a/static/css/main.css b/static/css/main.css index 4e7a78a..62577ad 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -279,11 +279,7 @@ ul { margin: 0; } -.post .post-header .post-tags { - padding-left: 5px; -} - -.post .post-header .post-tags a { +.post-tags a { margin-right: 5px; } From 28c2f28a13ea427329c32ef2043f48c42e46583b Mon Sep 17 00:00:00 2001 From: cgiacomi Date: Thu, 17 Oct 2019 21:57:21 +0200 Subject: [PATCH 3/3] fix: change layout for tags --- layouts/_default/single.html | 18 ++++++++++-------- static/css/dark.css | 5 +++++ static/css/main.css | 17 +++++++++++++++++ 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a09cfc8..2283e9a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -15,15 +15,17 @@
- - {{ if ne .Type "page" }} - {{ if gt .Params.tags 0 }} - {{ range .Params.tags }} - {{ . }} - {{ end }} - {{ end }} + {{ if ne .Type "page" }} + {{ if gt .Params.tags 0 }} + {{ end }} - + {{ end }}
{{- $.Scratch.Set "isDisqus" true -}} diff --git a/static/css/dark.css b/static/css/dark.css index 1b6eb1f..cc1fe66 100644 --- a/static/css/dark.css +++ b/static/css/dark.css @@ -34,6 +34,11 @@ a:hover { opacity: 0.8; } +.post-tags .tags a { + border: 1px solid #fff; + color: #fff; +} + .header nav, .footer { border-color: #333; diff --git a/static/css/main.css b/static/css/main.css index 355f437..000e721 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -301,6 +301,23 @@ ul { background-color: #f9f2f4; } +.post-tags .tags li { + margin-bottom: 0; + margin-top: 20px; +} + +.post-tags .tags a { + display: inline-block; + border: 1px solid #a00; + border-radius: 4px; + padding: 0px 6px; + color: #a00; + line-height: 20px; + font-size: 12px; + text-decoration: none; + margin: 0 1px; +} + .list .posts .post .meta { margin-bottom: 0; margin-left: 5px;