From 95d0cf887535137b9f0b04dce166b294db914b03 Mon Sep 17 00:00:00 2001 From: tdro Date: Tue, 2 May 2023 18:18:44 -0400 Subject: themes/default/layouts: Squash history + records -> archives That was as interesting experiment.. --- assets/css/default.css | 6 +-- config.json | 18 ++----- config.toml | 17 ++----- config.yaml | 15 ++---- themes/default/layouts/_default/home.archives.html | 57 ++++++++++++++++++++++ themes/default/layouts/_default/home.history.html | 57 ---------------------- themes/default/layouts/_default/home.records.html | 52 -------------------- themes/default/layouts/shortcodes/version.html | 2 +- 8 files changed, 69 insertions(+), 155 deletions(-) create mode 100644 themes/default/layouts/_default/home.archives.html delete mode 100644 themes/default/layouts/_default/home.history.html delete mode 100644 themes/default/layouts/_default/home.records.html diff --git a/assets/css/default.css b/assets/css/default.css index de97f3f..4830aa2 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -882,8 +882,7 @@ micro-tags { display: block; } -history-archive h1, -records-archive h1 { +archive-list h1 { text-align: center; font-weight: 400; font-size: 150%; @@ -1745,8 +1744,7 @@ item-list li:hover span:last-child { text-decoration: underline; } -item-list li > a, -records-archive li { +item-list li > a { display: flex; text-decoration: none; align-items: baseline; diff --git a/config.json b/config.json index 8ae6924..06fd3c7 100644 --- a/config.json +++ b/config.json @@ -44,17 +44,11 @@ "icon": "home" }, { - "name": "History", + "name": "Archives", "url": "/archives/messages/", "identifier": "tabler/clock", "weight": 3 }, - { - "name": "Records", - "url": "/archives/tags/", - "identifier": "tabler/book-2", - "weight": 4 - }, { "name": "Authors", "url": "/authors/", @@ -219,16 +213,11 @@ "baseName": "authors", "mediaType": "text/html" }, - "history": { + "archives": { "path": "archives/messages", "baseName": "index", "mediaType": "text/html" }, - "records": { - "path": "archives/tags", - "baseName": "index", - "mediaType": "text/html" - }, "sources": { "path": "sources", "baseName": "index", @@ -266,8 +255,7 @@ "authors.section", "sources", "browserconfig", - "history", - "records", + "archives", "webmanifest" ], "section": [ diff --git a/config.toml b/config.toml index d615726..13466fe 100644 --- a/config.toml +++ b/config.toml @@ -39,17 +39,11 @@ enableRobotsTXT = true icon = "home" [[menu.main]] - name = "History" + name = "Archives" url = "/archives/messages/" identifier = "tabler/clock" weight = 3 - [[menu.main]] - name = "Records" - url = "/archives/tags/" - identifier = "tabler/book-2" - weight = 4 - [[menu.main]] name = "Authors" url = "/authors/" @@ -166,16 +160,11 @@ enableRobotsTXT = true baseName = "authors" mediaType = "text/html" - [outputFormats.history] + [outputFormats.archives] path = "archives/messages" baseName = "index" mediaType = "text/html" - [outputFormats.records] - path = "archives/tags" - baseName = "index" - mediaType = "text/html" - [outputFormats.sources] path = "sources" baseName = "index" @@ -202,7 +191,7 @@ enableRobotsTXT = true mediaType = "text/html" [outputs] - home = ["html", "rss", "xslt.rss", "xslt.sitemap", "json", "authors", "authors.section", "sources", "browserconfig", "history", "records", "webmanifest"] + home = ["html", "rss", "xslt.rss", "xslt.sitemap", "json", "authors", "authors.section", "sources", "browserconfig", "archives", "webmanifest"] section = ["html", "rss", "gallery", "following", "webring"] taxonomy = ["html", "rss"] term = ["html", "rss"] diff --git a/config.yaml b/config.yaml index 539ba0c..e202889 100644 --- a/config.yaml +++ b/config.yaml @@ -40,14 +40,10 @@ menu: identifier: feather/tag weight: 2 icon: home - - name: History + - name: Archives url: /archives/messages/ identifier: tabler/clock weight: 3 - - name: Records - url: /archives/tags/ - identifier: tabler/book-2 - weight: 4 - name: Authors url: /authors/ identifier: feather/users @@ -144,14 +140,10 @@ outputFormats: authors.section: baseName: authors mediaType: text/html - history: + archives: path: archives/messages baseName: index mediaType: text/html - records: - path: archives/tags - baseName: index - mediaType: text/html sources: path: sources baseName: index @@ -183,8 +175,7 @@ outputs: - authors.section - sources - browserconfig - - history - - records + - archives - webmanifest section: - html diff --git a/themes/default/layouts/_default/home.archives.html b/themes/default/layouts/_default/home.archives.html new file mode 100644 index 0000000..370bec0 --- /dev/null +++ b/themes/default/layouts/_default/home.archives.html @@ -0,0 +1,57 @@ +{{ define "title" }}Message Archive — {{ end }} +{{ define "description" }}This page contains an archive of all messages — {{ end }} +{{ define "styles" }} + +{{ end }} + +{{ define "middle" }} + + {{ partial "navigator-middle.html" + (dict + "Title" "Archives" + "Subtitle" (partial "count-total-messages.html" .) + "Icon" "arrow-left" + "IconLabel" "Back" + "Href" "/" + "Id" "back" + "Context" . + ) + }} + + {{- $author := partial "function-authors-data.html" . -}} + + + + {{ range (.Paginator.Pages.GroupByDate "2006") }} + {{ range (first 1 .Pages) }} +

{{ .Date.Format "2006" }}

+ {{ end }} + + {{ end }} +
+
+ + {{ partial "pagination.html" . }} + +{{ end }} + +{{ define "right" }} + {{- partial "navigator-right.html" . -}} +{{ end }} diff --git a/themes/default/layouts/_default/home.history.html b/themes/default/layouts/_default/home.history.html deleted file mode 100644 index 5765826..0000000 --- a/themes/default/layouts/_default/home.history.html +++ /dev/null @@ -1,57 +0,0 @@ -{{ define "title" }}Message History — {{ end }} -{{ define "description" }}This page contains an archive of all messages — {{ end }} -{{ define "styles" }} - -{{ end }} - -{{ define "middle" }} - - {{ partial "navigator-middle.html" - (dict - "Title" "History" - "Subtitle" (partial "count-total-messages.html" .) - "Icon" "arrow-left" - "IconLabel" "Back" - "Href" "/" - "Id" "back" - "Context" . - ) - }} - - {{- $author := partial "function-authors-data.html" . -}} - - - - {{ range (.Paginator.Pages.GroupByDate "2006") }} - {{ range (first 1 .Pages) }} -

{{ .Date.Format "2006" }}

- {{ end }} - - {{ end }} -
-
- - {{ partial "pagination.html" . }} - -{{ end }} - -{{ define "right" }} - {{- partial "navigator-right.html" . -}} -{{ end }} diff --git a/themes/default/layouts/_default/home.records.html b/themes/default/layouts/_default/home.records.html deleted file mode 100644 index 137c673..0000000 --- a/themes/default/layouts/_default/home.records.html +++ /dev/null @@ -1,52 +0,0 @@ -{{ define "title" }}Tags Archive — {{ end }} -{{ define "description" }}This page contains an archive of all tags — {{ end }} -{{ define "styles" }} - -{{ end }} - -{{ define "middle" }} - - {{ partial "navigator-middle.html" - (dict - "Title" "Records" - "Subtitle" (partial "count-tags.html" .) - "Icon" "arrow-left" - "IconLabel" "Back" - "Href" "/" - "Id" "back" - "Context" . - ) - }} - - {{- $author := partial "function-authors-data.html" . -}} - - - - {{ range (.Paginator.Pages.GroupByDate "2006") }} - {{ range (first 1 .Pages) }} -

{{ .Date.Format "2006" }}

- {{ end }} -
    - {{ range .Pages }} -
  • - - {{ .Date.Format "02 Jan" }} - - {{ partial "meta-tags.html" . }} — {{ partial "meta-title.html" . }} - @{{ $author.user }} -
  • - {{ end }} -
- {{ end }} -
-
- - {{ partial "pagination.html" . }} - -{{ end }} - -{{ define "right" }} - {{- partial "navigator-right.html" . -}} -{{ end }} diff --git a/themes/default/layouts/shortcodes/version.html b/themes/default/layouts/shortcodes/version.html index 11e7685..9c028c7 100644 --- a/themes/default/layouts/shortcodes/version.html +++ b/themes/default/layouts/shortcodes/version.html @@ -1,4 +1,4 @@ -{{- $theme := "0.11.11" -}} +{{- $theme := "0.11.12" -}} {{- $generator := "0.108.0" -}} {{- $number := default false (.Get "number" | default (.Get 0)) -}} -- cgit v1.2.3