From 29decd270e9dde64be4a1b1afa028edcc8806259 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Mon, 2 May 2022 00:05:34 -0400 Subject: [PATCH] New layout type "feed" --- assets/css/style.css | 18 ++++++++++++++++++ layouts/feed/list.html | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 layouts/feed/list.html diff --git a/assets/css/style.css b/assets/css/style.css index eeaac4e..a181b39 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -77,6 +77,7 @@ footer { /* Top page */ #profileContainer { min-height: calc(100vh - 100px); + /* max-width: 600px; */ display: flex; justify-content: center; align-items: center; @@ -204,6 +205,23 @@ nav li { border: solid 1px #c9c9c9; } +#feedList { + text-align: left; + max-width: 800px; + margin-left: auto; + margin-right: auto; +} + +#feedList h2 { + margin-bottom: 0.25rem; +} + +#feedList .date { + margin-top: 0; + margin-bottom: 0; + border-bottom: 1px solid #c9c9c9; +} + /* Page */ #contentBody { max-width: 800px; diff --git a/layouts/feed/list.html b/layouts/feed/list.html new file mode 100644 index 0000000..15de3f4 --- /dev/null +++ b/layouts/feed/list.html @@ -0,0 +1,40 @@ +{{ define "main"}} +

{{ .Title }}

+ {{ partial "header.html" . }} + + + +
+ +
+ {{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}} + {{ range $index, $value := .Pages.GroupByDate $listPageDateFormat }} + {{ range .Pages }} +
+

{{ .Title }}

+ + {{ if not .Date.IsZero }} + {{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}} +

+ + {{ end }} +
+ {{ .Content }} +
+
+ {{ end }} + {{ end }} +
+ {{ partial "footer.html" . }} + {{ $jquery := resources.Get "js/jquery-3.5.1.min.js" }} + {{ $mark := resources.Get "js/jquery.mark.es6.min.js" }} + {{ $lunr := resources.Get "js/lunr.js" }} + {{ $search := resources.Get "js/search.js" }} + + + + +{{ end }}