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

github.com/colorchestra/smol.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormorph <morph@posteo.de>2020-05-27 01:34:21 +0300
committermorph <morph@posteo.de>2020-05-27 01:34:21 +0300
commit5b51f4d9da25aa86b2e5ec3e62f3c09f0d8b8cf8 (patch)
tree3c3932335a474eb1c07201047bf61d25c7606d81
parente284283965188dc91d0fbb7fcdfeb2daf6c0811c (diff)
bring sidebar back for single pages
-rw-r--r--layouts/_default/single.html1
-rw-r--r--layouts/partials/sidebar.html14
2 files changed, 15 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index ce7a5dd..7920d00 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -17,4 +17,5 @@
{{ end }}
</article>
</main>
+{{ partial "sidebar.html" . }}
{{ end }}
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
new file mode 100644
index 0000000..92bbd80
--- /dev/null
+++ b/layouts/partials/sidebar.html
@@ -0,0 +1,14 @@
+<aside>
+ <div>
+ <div>
+ <h3>LATEST POSTS</h3>
+ </div>
+ <div>
+ <ul>
+ {{ range first 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+ </div>
+ </div>
+</aside>