From a0f4a692b586ac3fbb8cf4885a8c1d117030b24e Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 25 Oct 2017 22:09:16 +0100 Subject: [PATCH] Add list page for blog --- layouts/posts/list.html | 29 +++++++++++++++++++++++++++++ static/src/scss/style.scss | 18 ++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 layouts/posts/list.html diff --git a/layouts/posts/list.html b/layouts/posts/list.html new file mode 100644 index 0000000..bdce83c --- /dev/null +++ b/layouts/posts/list.html @@ -0,0 +1,29 @@ +{{ define "main" }} +
+
+ {{ $paginator := .Paginate (.Data.Pages.GroupByDate "2006-01") }} +

{{ .Title }}

+ {{ range $paginator.PageGroups }} + {{ $month := (print .Key "-01") }} +

+ {{ if ne .Key "0001-01" }} + {{ dateFormat "2006-01" $month }} + {{ end }} +

+ {{ range .Pages.ByDate }} +
+
+ {{ .Title }} image +
+
+ +
{{ .Title }}
+
+

{{ .Summary }}

+
+
+ {{ end }} + {{ end }} +
+
+{{ end }} diff --git a/static/src/scss/style.scss b/static/src/scss/style.scss index ae3fd6e..ab9b661 100644 --- a/static/src/scss/style.scss +++ b/static/src/scss/style.scss @@ -118,3 +118,21 @@ footer { } } } + +#main { + margin-top: $spacer * 6; +} + +.list-page-item { + .img-wrapper { + width: 20%; + } + + img { + width: 100%; + } + + a { + color: #e89980; + } +}