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

github.com/calintat/minimal.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalin Tataru <calintat@gmail.com>2019-10-06 03:12:00 +0300
committerCalin Tataru <calintat@gmail.com>2019-10-06 03:12:00 +0300
commit2662c63c6c4d06b548f146941dcbf8081cb5d230 (patch)
tree91eb9a57d4cf45af258d117db94d695c7836d36a
parent6bc3f62cb1314511f272b2e6871a8afde4cab201 (diff)
Add different layout for pages like about
-rw-r--r--layouts/_default/single.html11
-rw-r--r--layouts/page/single.html11
2 files changed, 21 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 7a6ba5f..cc4aa29 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -2,7 +2,16 @@
<main>
- {{ partial "list-item" . }}
+ {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "subtitle" }}
+ {{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
+
+ <div class="item">
+ <h2>{{ .Title }}</h2>
+ <h5>{{ $.Scratch.Get "subtitle" }}</h5>
+ {{ range .Params.tags }}
+ <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag">{{ . }}</kbd></a>
+ {{ end }}
+ </div>
<br> <div class="text-justify">{{ .Content }}</div>
diff --git a/layouts/page/single.html b/layouts/page/single.html
new file mode 100644
index 0000000..463fcf2
--- /dev/null
+++ b/layouts/page/single.html
@@ -0,0 +1,11 @@
+{{ partial "header" . }}
+
+<main>
+
+ <h2>{{ .Title }}</h2>
+
+ <br> <div class="text-justify">{{ .Content }}</div>
+
+</main>
+
+{{ partial "footer.html" . }}