Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vividvilla/ezhil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcgiacomi <christiangiacomi@gmail.com>2019-10-12 10:27:08 +0300
committercgiacomi <christiangiacomi@gmail.com>2019-10-12 10:27:08 +0300
commit4ccf226f91d9d2cd2045d36a521291bf0f9bb4b1 (patch)
treedcc3ded4cdc27db9ff9a48c52326acdebb22f65a
parent6e5bf0c053c93be02982d1d265b468b853ecae30 (diff)
feat: add tag list to post header
-rw-r--r--layouts/_default/single.html11
-rw-r--r--static/css/main.css8
2 files changed, 19 insertions, 0 deletions
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 @@
<div class="post-header">
<h1 class="title">{{ .Title }}</h1>
<div class="meta">Posted at &mdash; {{ dateFormat "Jan 2, 2006" .Date }}</div>
+ <div class="post-tags">
+ <small>
+ {{ if ne .Type "page" }}
+ {{ if gt .Params.tags 0 }}
+ {{ range .Params.tags }}
+ <a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ </small>
+ </div>
</div>
<div class="markdown">
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;