diff --git a/assets/css/040_content.css b/assets/css/040_content.css index 0438408..3290f43 100644 --- a/assets/css/040_content.css +++ b/assets/css/040_content.css @@ -13,12 +13,21 @@ { blockquote, dl, + h1, h2, h3, h4, h5, h6, + hr, + nav, ol, section, ul, .footnotes, + .main__section-header, .page-footer { grid-column: main-start / main-end; } } + +.main__posts-by-year { + display: grid; + grid-template-columns: subgrid; +} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 8d428dc..1e281c1 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,7 +1,7 @@ {{ define "main" }} {{ if eq . .FirstSection }} - {{ partial "page/first_section.list.html" . }} + {{ partial "page/first_section.list.html" (dict "page" .) }} {{ else }} - {{ partial "page/descendent_section.list.html" . }} + {{ partial "page/descendent_section.list.html" (dict "page" .) }} {{ end }} {{ end }} diff --git a/layouts/blog/list.html b/layouts/blog/list.html deleted file mode 100644 index 8d428dc..0000000 --- a/layouts/blog/list.html +++ /dev/null @@ -1,7 +0,0 @@ -{{ define "main" }} - {{ if eq . .FirstSection }} - {{ partial "page/first_section.list.html" . }} - {{ else }} - {{ partial "page/descendent_section.list.html" . }} - {{ end }} -{{ end }} diff --git a/layouts/partials/page/descendent_section.list.html b/layouts/partials/page/descendent_section.list.html index 0191d75..f96f402 100644 --- a/layouts/partials/page/descendent_section.list.html +++ b/layouts/partials/page/descendent_section.list.html @@ -1,13 +1,19 @@ -
+{{- $page := .page -}} +{{- $class := .class | default "" -}} +
{{- .Content -}} - {{ range .RegularPages.ByPublishDate -}} - {{ if or (not .Draft) hugo.IsDevelopment -}} - {{ .Render "page_summary" }} - {{ end }} + {{ with $page.RegularPages.ByPublishDate -}} +
+ {{ range $page.RegularPages.ByPublishDate -}} + {{ if or (not $page.Draft) hugo.IsDevelopment -}} + {{ .Render "page_summary" }} + {{ end }} + {{ end }} +
{{ end }}
diff --git a/layouts/partials/page/first_section.list.html b/layouts/partials/page/first_section.list.html index 283dd98..2dc62e3 100644 --- a/layouts/partials/page/first_section.list.html +++ b/layouts/partials/page/first_section.list.html @@ -1,10 +1,12 @@ -
+{{- $page := .page -}} +{{- $class := .class | default "" -}} +
{{/* Each page is a year section. */}} - {{- $yearPages := .Pages.ByPublishDate.Reverse -}} + {{- $yearPages := $page.Pages.ByPublishDate.Reverse -}} {{- $yearLimit := math.Max ($.Site.Params.blog.yearLimit | default 5) 3 -}} {{- $expandedYears := first $yearLimit $yearPages -}} {{- $collapsedYears := after $yearLimit $yearPages -}} @@ -17,23 +19,27 @@ ) -}} - {{- .Content -}} + {{- $page.Content -}} {{ range $expandedYears -}} -

{{ .Title }}

- {{ range .RegularPagesRecursive.ByPublishDate.Reverse -}} - {{ if or (not .Draft) hugo.IsDevelopment -}} - {{ .Render "page_summary" }} +
+

{{ .Title }}

+ {{ range .RegularPagesRecursive.ByPublishDate.Reverse -}} + {{ if or (not .Draft) hugo.IsDevelopment -}} + {{ .Render "page_summary" }} + {{ end }} {{ end }} - {{ end }} +
{{- end }} {{ with $collapsedYears -}} -

{{ i18n "olderPagesSectionTitle" }}

- +
+

{{ i18n "olderPagesSectionTitle" }}

+ +
{{ end }}