From 3f8216700189b09461c0a9b7c1db7850031a8cd1 Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Sat, 1 Jul 2017 20:25:54 +0800 Subject: [PATCH] Initial work on categories page #55 --- layouts/_default/list.html | 19 ++++++++++++------- layouts/_default/single.html | 7 ++++--- static/scss/lists.scss | 3 +++ static/scss/main.scss | 1 + 4 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 static/scss/lists.scss diff --git a/layouts/_default/list.html b/layouts/_default/list.html index cc3f6535..6b8d7deb 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,9 +1,14 @@ {{ define "main" }} -

Posts

- {{ range .Data.Pages }} -
-

{{ .Title }}

- {{ .Content }} -
- {{ end }} +{{ $ctx := . }} +

+ {{ if .Data.Singular }} + {{ .Data.Singular | title }} + {{ end }} + {{ .Title }} +

+{{ range .Data.Pages }} +
+

{{ .Title }}

+
+{{ end }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e3e685b2..120aeffd 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,4 +1,5 @@ {{ define "main" }} +{{ $ctx := . }}
@@ -20,13 +21,13 @@

Posted on by {{ .Para