diff --git a/assets/scss/partials/layout/archives.scss b/assets/scss/partials/layout/archives.scss index 2ac3836..34e5f62 100644 --- a/assets/scss/partials/layout/archives.scss +++ b/assets/scss/partials/layout/archives.scss @@ -1,31 +1,3 @@ .archives-group { margin-bottom: var(--section-separation); -} - -.template-archives { - .category-list { - margin-bottom: var(--section-separation); - overflow-x: auto; - - .article-list--tile { - display: flex; - padding-bottom: 15px; - - article { - width: 250px; - height: 150px; - margin-right: 20px; - flex-shrink: 0; - - .article-title { - margin: 0; - font-size: 1.8rem; - } - - .article-details { - padding: 20px; - } - } - } - } -} +} \ No newline at end of file diff --git a/assets/scss/partials/layout/taxonomy.scss b/assets/scss/partials/layout/list.scss similarity index 57% rename from assets/scss/partials/layout/taxonomy.scss rename to assets/scss/partials/layout/list.scss index 4575a20..1a0e346 100644 --- a/assets/scss/partials/layout/taxonomy.scss +++ b/assets/scss/partials/layout/list.scss @@ -1,4 +1,4 @@ -.taxonomy-card { +.section-card { border-radius: var(--card-border-radius); background-color: var(--card-background); padding: var(--small-card-padding); @@ -9,37 +9,37 @@ --separation: 15px; - .taxonomy-term { + .section-term { font-size: 2.2rem; margin: 0; margin-top: calc(var(--separation) / 2); color: var(--card-text-color-main); - & + .taxonomy-description { + & + .section-description { margin-top: var(--separation); } } - .taxonomy-description { + .section-description { font-weight: normal; color: var(--card-text-color-secondary); font-size: 1.6rem; margin: 0; } - .taxonomy-details { + .section-details { flex-grow: 1; margin-right: 20px; } - .taxonomy-image { + .section-image { img { width: 60px; height: 60px; } } - .taxonomy-count { + .section-count { color: var(--card-text-color-tertiary); font-size: 1.4rem; margin: 0; @@ -47,3 +47,29 @@ text-transform: uppercase; } } + +.subsection-list { + margin-bottom: var(--section-separation); + overflow-x: auto; + + .article-list--tile { + display: flex; + padding-bottom: 15px; + + article { + width: 250px; + height: 150px; + margin-right: 20px; + flex-shrink: 0; + + .article-title { + margin: 0; + font-size: 1.8rem; + } + + .article-details { + padding: 20px; + } + } + } +} diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 3e4b56a..2f5aac9 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -21,7 +21,7 @@ @import "partials/base.scss"; @import "partials/layout/archives.scss"; @import "partials/layout/article.scss"; -@import "partials/layout/taxonomy.scss"; +@import "partials/layout/list.scss"; @import "partials/layout/404.scss"; @import "partials/layout/search.scss"; diff --git a/i18n/en.yaml b/i18n/en.yaml index 1c0fdd8..7f3b4fa 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,6 +1,18 @@ toggleMenu: other: Toggle Menu +list: + page: + one: "{{ .Count }} page" + other: "{{ .Count }} pages" + + section: + other: Section + + subsection: + one: Subsection + other: Subsections + archives: categories: other: Categories diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index 1a681e9..49c0ddf 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -3,7 +3,7 @@ {{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }} {{ if $categories }}

{{ T "archives.categories" }}

-
+
{{ range $categories }} {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e44a5f1..2ee1ad1 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,8 +1,51 @@ {{ define "main" }} -

{{ .Title }}

+

+ {{ if eq .Parent (.GetPage "/") }} + {{ T "list.section" }} + {{ else }} + {{ .Parent.Title }} + {{ end }} +

+
+
+

{{ T "list.page" (len .Pages) }}

+

{{ .Title }}

+ {{ with .Params.description }} +

{{ . }}

+ {{ end }} +
+ + {{- $image := partialCached "helper/image" (dict "Context" . "Type" "section") .RelPermalink "section" -}} + {{ if $image.exists }} +
+ {{ if $image.resource }} + {{- $thumbnail := $image.resource.Fill "120x120" -}} + + {{ else }} + + {{ end }} +
+ {{ end }} +
+ + {{ $subsections := .Sections }} + {{ with $subsections }} +

{{ T "list.subsection" (len $subsections) }}

+
+
+ {{ range . }} + {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "section") }} + {{ end }} +
+
+ {{ end }} + + {{/* List only pages that are not a subsection */}} + {{ $paginator := .Paginate (.Pages | complement $subsections) }}
- {{ range .Paginator.Pages }} + {{ range $paginator.Pages }} {{ partial "article-list/compact" . }} {{ end }}
diff --git a/layouts/_default/term.html b/layouts/_default/term.html deleted file mode 100644 index 3bfcc28..0000000 --- a/layouts/_default/term.html +++ /dev/null @@ -1,37 +0,0 @@ -{{ define "main" }} -

{{ .Type | singularize | humanize }}

-
-
-

{{ len .Pages }} post{{ if gt (len .Pages) 1 }}s{{ end }}

-

{{ .Title }}

- {{ with .Params.description }} -

{{ . }}

- {{ end }} -
- - {{- $image := partialCached "helper/image" (dict "Context" . "Type" "taxonomy") .RelPermalink "taxonomy" -}} - {{ if $image.exists }} -
- {{ if $image.resource }} - {{- $thumbnail := $image.resource.Fill "120x120" -}} - - {{ else }} - - {{ end }} -
- {{ end }} -
- -
- {{ $v2 := where .Pages "Params.hidden" "!=" true }} - {{ $pag := .Paginate (.Pages) }} - {{ range $pag.Pages }} - {{ partial "article-list/compact" . }} - {{ end }} -
- - {{- partial "pagination.html" . -}} - - {{ partialCached "footer/footer" . }} -{{ end }} \ No newline at end of file