Adds "Now" page functionality

Implements a "Now" page to share current activities, inspired by nownownow.com.

- Introduces a new content type "now" with corresponding layouts and archetype.
- Adds a "Now" entry to the main menu.
- Creates a script to easily generate new "now" entries.
- Updates the colophon page with information about the "now" page.
- Deletes weeknote config as it isn't in use anymore
This commit is contained in:
fundor333
2025-08-05 02:49:10 +02:00
parent 7f3aa3ec77
commit f86b05b476
11 changed files with 95 additions and 65 deletions

26
layouts/now/list.html Normal file
View File

@@ -0,0 +1,26 @@
{{- define "main" -}}
<div class="wrapper list-page">
<header class="header">
<h1 class="header-title center">{{ .Title }}</h1>
</header>
<main class="page-content" aria-label="Content">
{{.Content}}
{{/* create a list of posts for each month, with month as heading */}}
{{ range $index, $element := .Pages.ByDate.Reverse }}
{{ if (eq $index 0) }}
{{ $element.Content}}
{{else}}
{{ partial "postCard" $element }}
{{ end }}
{{ end }} {{/* end range .Pages.ByDate */}}
</main>
{{- partial "syndication.html" . -}}
{{- partial "comments.html" . -}}
</div>
{{- end -}}

21
layouts/now/single.html Normal file
View File

@@ -0,0 +1,21 @@
{{ define "main" }}
<div class="wrapper post">
<main class="page-content" aria-label="Content">
<article class="h-entry post-entry">
<header class="header">
<h1 class="header-title p-name">{{ .Title }} <a href="/now/"><i class="fa-whiteboard fa-semibold fa-backward-step"></i></a></h1>
<div>
<a class="u-url" href="{{ .Permalink }}"><div style="display: none;" class="p-summary">{{ .Description }}</div></a>
<a rel="author" class="p-author h-card no-underline " href="{{ .Site.BaseURL }}" style="display: none;" >{{ .Site.Params.Author.name }}</a>
</div>
</header>
<div class="page-content e-content">
{{ .Content }}
</div>
{{- partial "syndication.html" . -}}
{{- partial "comments.html" . -}}
</article>
</main>
</div>
{{ end }}

View File

@@ -2,15 +2,17 @@
<h4 class="post-item-title">
<a href="{{ .RelPermalink }}">
{{if eq .Type "post" }}
<i class="fa-regular fa-newspaper"></i>
<i class="fa-whiteboard fa-semibold fa-newspaper fa-xl"></i>
{{ else if eq .Type "micro" }}
<i class="fa-regular fa-thought-bubble fa-flip-horizontal"></i>
<i class="fa-whiteboard fa-semibold fa-quotes fa-xl"></i>
{{ else if eq .Type "photos" }}
<i class="fa-regular fa-camera-retro"></i>
<i class="fa-whiteboard fa-semibold fa-camera fa-xl"></i>
{{ else if eq .Type "weeknote" }}
<i class="fa-kit fa-regular-bowl-chopsticks-noodles-at fa-xl"></i>
{{ else if eq .Type "now" }}
<i class="fa-whiteboard fa-semibold fa-skull fa-xl"></i>
{{ else }}
<i class="fa-duotone fa-solid fa-sushi"></i>
<i class="fa-whiteboard fa-semibold fa-ghost fa-xl"></i>
{{ end}}
{{ .Title }}</a>
</h4>