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:
26
layouts/now/list.html
Normal file
26
layouts/now/list.html
Normal 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
21
layouts/now/single.html
Normal 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 }}
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user