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

github.com/mismith0227/hugo_theme_pickles.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Engel <vlow+git@turbocache3000.de>2021-09-18 20:21:48 +0300
committerFlorian Engel <vlow+git@turbocache3000.de>2021-09-18 20:56:05 +0300
commitcb165bea60234aa12a16c0b62f97648ae07cc25d (patch)
tree812429f15a515f069e40b11591fec22c3e4cca94
parent4b6cecc495d3f427035c1771cad4e5323188568f (diff)
Remove post decoration from pages
This commit removes the post header and footer (including comments and in-section links) from pages and adds a small update date instead.
-rwxr-xr-xlayouts/_default/single.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index c4e01ba..bff481d 100755
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -3,6 +3,7 @@
<article class="p-article">
<header>
<h1>{{ .Title }}</h1>
+ {{ if eq (.Type | singularize) "post" }}
<div>
{{ if not .Params.hideDate }}
<div class="c-time">
@@ -15,6 +16,7 @@
<a href="{{ $baseurl }}/tags/{{ . | urlize }}" class="c-tag">{{ . }}</a>
{{ end }}
</div>
+ {{ end }}
</header>
{{ with .Params.thumbnail }}
<img src="{{ . }}" alt="thumbnail" class="p-article__thumbnail">
@@ -23,6 +25,16 @@
{{ .Content }}
</section>
<footer>
+ {{ if eq (.Type | singularize) "page" }}
+ <div>
+ <div class="c-last-update">
+ Last Update:
+ <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
+ {{ .Date.Format "Jan 2, 2006" }}
+ </time>
+ </div>
+ </div>
+ {{ else }}
{{ partial "comment_custom.html" . }}
{{ with ($.Param "disqus") }}
<div id="disqus_thread"></div>
@@ -53,6 +65,7 @@
</div>
</div>
</nav>
+ {{ end }}
{{ partial "related.html" . }}
{{ partial "siteinfo.html" . }}
</footer>