various updates

This commit is contained in:
Ben Goldsworthy 2023-06-30 21:16:59 -06:00
parent 4955708f0e
commit ee87009471
37 changed files with 1734 additions and 401 deletions

View file

@ -0,0 +1,36 @@
{{ with .Params.href -}}
<a href="{{ if eq . "asCite" }}{{ $.Params.cite }}{{ else }}{{ . }}{{ end }}">
{{- end -}}
<cite class="cite{{ with .Params.citeStyle }} cite--{{ . }}{{ end }}"
{{ with .Params.cite -}}cite="{{ . }}"{{- end }}
itemscope
itemprop="citation"
itemtype="https://schema.org/
{{- with .Params.schemaType -}}
{{- . -}}
{{- else -}}
CreativeWork
{{- end -}}"
{{ if .Params.titleLang -}}
lang="{{- .Params.titleLang -}}"
title="{{- .Params.titleTr -}}"
{{ end -}}
>
{{- with .Params.cite -}}<meta itemprop="url" content="{{ . }}">{{- end -}}
<span itemprop="name">
{{- if .Params.titleLang -}}
<i lang="{{ .Params.titleLang }}" title="{{ .Params.titleTr }}">
{{- end -}}
{{- if .Params.shortTitle -}}
{{- .Params.shortTitle | markdownify | safeHTML -}}
{{- else -}}
{{- .Params.title | markdownify | safeHTML -}}
{{- end -}}
{{- if .Params.titleLang -}}
</i>
{{- end -}}
</span>{{- /**/ -}}
</cite>
{{- with .Params.href -}}
</a>
{{- end -}}

View file

@ -1,12 +1,14 @@
{{ "<!--" | safeHTML }}
{{ .Site.Title}} - {{ .Site.Params.tagline }}
Page content written in {{ now.Format "2006" }} by {{ .Site.Author.name }} <{{ .Site.Author.email }}>
This page was created by {{ .Site.Author.name }} <{{ .Site.Author.email }}>.
The date of creation and last modification should be available within the page
below.
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
Unless stated otherwise, and to the extent possible under law, the author has
dedicated all copyright and related and neighboring rights to this content to
the public domain worldwide. This file is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along
with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
See <http://creativecommons.org/publicdomain/zero/1.0/> for
a copy of the CC0 Public Domain Dedication.
{{ "-->" | safeHTML }}

View file

@ -1,5 +1,5 @@
{{ if gt ( len .content ) 4 }}
<details id="posts" class="org-items row">
<details id="{{ .section_title | anchorize }}" class="org-items row">
<summary>
<h2 class="subheading">{{ .section_title }} ({{ len .content }})</h2>
<div class="index">
@ -15,7 +15,7 @@
</div>
</details>
{{ else }}
<div id="posts" class="org-items row">
<div id="{{ .section_title | anchorize }}" class="org-items row">
<h2 class="subheading">{{ .section_title }} ({{ len .content }})</h2>
<div class="index">
{{ range first 4 .content }}

View file

@ -1,4 +1,4 @@
<li class="hierarchy-item hierarchy-item--child"><a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a>
<li class="hierarchy-item hierarchy-item--child"><a href="{{ .RelPermalink }}">{{ with .Params.markup_title }}{{ . | safeHTML }}{{ else }}{{ .Title | safeHTML }}{{ end }}</a>
{{ range .Sections }}<ul>
{{ partial "cv/organisations/recursive-children.html" . }}
</ul>{{ end }}

View file

@ -1,8 +1,8 @@
<header class="site-header">
<header class="site-header h-card">
{{ block "header" . }}
<h1 class="site-header__title" itemprop="name"><a href="{{ .Site.Home.RelPermalink }}">{{ .Site.Title }}</a></h1>
<p class="site-header__tagline" itemprop="about">Views my own. Discussion ≠ endorsement. Do try this at home.</p>
<p class="site-header__icons">~ <a href="mailto:{{ $.Site.Author.email }}" rel="me">&#128231;</a> ~ <a href="{{ .Site.Params.codeURL }}">&#128187;</a> ~ <a href="/{{ .Site.Params.keyfile }}">&#128272;</a> ~ <a href="/index.xml"><img class="feed-icon" src="/images/feed-icon.png"></a> ~</p>
<h2 class="p-name site-header__title" itemprop="name"><a class="u-url" href="{{ .Site.Home.RelPermalink }}" rel="me author">{{ .Site.Title }}</a></h2>
<p class="p-note site-header__tagline" itemprop="about">Views my own. Discussion ≠ endorsement. Do try this at home.</p>
<p class="site-header__icons">~ <a class="u-email" href="mailto:{{ $.Site.Author.email }}" rel="me">&#128231;</a> ~ <a class="u-url" href="{{ .Site.Params.codeURL }}" rel="me">&#128187;</a> ~ <a class="u-key" href="/{{ .Site.Params.keyfile }}" rel="me">&#128272;</a> ~ <a href="/index.xml" aria-label="{{ .Site.Title }} RSS feed"><img class="feed-icon" alt="RSS icon" src="{{ .Site.Params.feedIcon }}"></a> ~</p>
{{ partial "header/site-nav.html" . }}
{{ end }}
</header>

View file

@ -1,7 +1,7 @@
<nav class="site-header__nav">
<ul>
{{ range ( where .Site.Sections.ByTitle "Type" "in" site.Params.mainSections ) }}
<a href="{{ .RelPermalink }}"><li>{{ .Title | safeHTML }}</li></a>
<li><a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a></li>
{{ end }}
</ul>
</nav>

View file

@ -1,11 +1,11 @@
<a id="{{ .Slug }}" class="link--tile" href="{{ .RelPermalink }}" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<a id="{{ .Title | urlize }}" class="h-entry u-url link--tile" href="{{ .RelPermalink }}" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<article class="item-tile lazy {{- with .Params.site }} item-tile--{{ . }}{{ end -}}"
{{ if .Params.featured_image }}
{{ with .Resources.GetMatch .Params.featured_image }}
{{ if eq .MediaType.SubType "svg" }}
style="background-image: url({{ .RelPermalink }})"
{{ else }}
{{ with .Resize "2000x webp" }}
{{ with .Resize "1000x webp" }}
style="background-image: url({{ .RelPermalink }})"
{{ end }}
{{ end }}
@ -14,22 +14,43 @@
{{ end }}
{{ end }}
>
<header class="item-tile__header">
{{ if ( or .Params.series .Params.published_in ) }}
<span class="item-tile__banner item-tile__banner--{{ if .Params.series }}series{{ else if .Params.published_in }}published-in{{ end}}">
{{- if .Params.series -}}
{{ .Params.series | safeHTML }}
{{- else if .Params.published_in -}}
{{ .Params.published_in | safeHTML }}
{{- end -}}
</span>
{{ end }}
<h1 class="item-tile__title{{ if gt ( len ( .Title | plainify ) ) 40 }} item-tile__title--long{{ end }}" itemprop="name">
<span role="text">{{ .Title | safeHTML }}</span>
</h1>
{{ with .Params.subtitle }}
<p class="item-tile__subtitle">{{ . | safeHTML }}</p>
{{ end }}
</header>
</article>
{{ if .Params.featured_image -}}
<img class="u-photo" style="display: none;" src="
{{- with .Resources.GetMatch .Params.featured_image -}}
{{- if eq .MediaType.SubType "svg" -}}
{{ .RelPermalink }}
{{- else -}}
{{- with .Resize "1000x webp" -}}
{{- .RelPermalink -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{ .Params.featured_image }}
{{ end }}
" alt="
{{- with .Resources.GetMatch .Params.featured_image -}}
{{- .Params.alt -}}
{{- end -}}
"
/>
{{- end }}
<header class="item-tile__header">
{{ if ( or .Params.series .Params.published_in ) }}
<span class="item-tile__banner item-tile__banner--{{ if .Params.series }}series{{ else if .Params.published_in }}published-in{{ end}}">
{{- if .Params.series -}}
{{ .Params.series | safeHTML }}
{{- else if .Params.published_in -}}
{{ .Params.published_in | safeHTML }}
{{- end -}}
</span>
{{ end }}
<h2 class="p-name item-tile__title{{ if gt ( len ( .Title | plainify ) ) 40 }} item-tile__title--long{{ end }}" itemprop="name">
{{ .Title | safeHTML }}
</h2>
{{ with .Params.subtitle }}
<p class="item-tile__subtitle">{{ . | safeHTML }}</p>
{{ end }}
<p style="display: none;">Published: <time class="dt-published" itemprop="datePublished" datetime="{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}">{{ .PublishDate | time.Format "2006-01-02T15:04:05-07:00"}}</time></p>
</header>
</article>
</a>

View file

@ -1,8 +1,10 @@
<section class="site-content__body">
{{ range ( ( where .Pages "Draft" false ).GroupByPublishDate "2006" ) }}
{{ partial "header-tile.html" . }}
{{ range .Pages }}
{{ partial "item-tile.html" . }}
{{ if ( not ( eq .Key "0001" ) ) }}
{{ partial "header-tile.html" . }}
{{ range .Pages }}
{{ partial "item-tile.html" . }}
{{ end }}
{{ end }}
{{ end }}
</section>

View file

@ -1,61 +1,31 @@
<footer class="site-content__footer">
<h1>Meta</h1>
<h2>Meta</h2>
{{- if .GetTerms "categories" -}}
<section id="post-categories" class="article-footer__categories" aria-labelledby="post-categories-title">
<h2 id="post-categories-title">Categories</h2>
<section id="post-categories" class="article-footer__categories" aria-labelledby="post-categories-title" itemprop="articleSection">
<h3 id="post-categories-title">Categories</h3>
<ul>
{{- range (.GetTerms "categories") -}}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
{{- end -}}
</ul>
</section>
{{- end -}}
{{- with .Params.internal_links -}}
<section class="article-footer__links">
<h2>Internal Links</h2>
<ul>
{{- range . -}}
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
<li><a href="{{ .link }}">{{ .title | safeHTML }}</a></li>
{{ else }}
<li><a href="{{ . }}">Link</a></li>
{{ end }}
{{- end -}}
</ul>
</section>
{{- end -}}
{{- with .Params.external_links -}}
<section class="article-footer__links">
<h2>External Links</h2>
<ul>
{{- range . -}}
{{ if eq ( printf "%T" . ) "map[string]interface {}" }}
<li><a href="{{ .link }}" rel="noopener noreferrer" target="_blank">{{ .title | safeHTML }}</a></li>
{{ else }}
<li><a href="{{ . }}" rel="noopener noreferrer" target="_blank">Link</a></li>
{{ end }}
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
{{- end -}}
</ul>
</section>
{{- end -}}
{{- if .GetTerms "areas" -}}
<section class="article-footer__links">
<h2 id="item-areas-title">Areas</h2>
<section class="article-footer__links" itemprop="articleSection">
<h3 id="item-areas-title">Areas</h3>
<ul>
{{- range ( .GetTerms "areas" ).ByTitle -}}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end -}}
</ul>
</section>
{{- end -}}
{{- if .GetTerms "organisations" -}}
<section id="post-organisations" class="article-footer__organisations" aria-labelledby="post-organisations-title">
<h2 id="post-organisations-title">Organisations</h2>
<section id="post-organisations" class="article-footer__organisations" aria-labelledby="post-organisations-title" itemprop="articleSection">
<h3 id="post-organisations-title">Organisations</h3>
<ul>
{{ $all_organisations := partialCached "get_all_organisations.html" . }}
<!-- TODO: Replace with hierarchy partial -->
@ -75,17 +45,22 @@
{{- if .GetTerms "locations" -}}
<section id="post-locations" class="article-footer__locations" aria-labelledby="post-locations-title">
<h2 id="post-locations-title">Locations</h2>
<div id="mapdiv" style="width: 100%; height: 500px; margin: 0; display: block;"></div>
<h3 id="post-locations-title">Locations</h3>
<div id="map" style="width: 100%; height: 500px; margin: 0; display: block;"></div>
<ul style="display: none">
{{- range ( .GetTerms "locations" ).ByTitle -}}
<li class="p-location"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
{{- end -}}
</ul>
</section>
{{- end -}}
{{- if .GetTerms "tags" -}}
<section id="post-tags" class="article-footer__tags" aria-labelledby="post-tags-title">
<h2 id="post-tags-title">Tags</h2>
<h3 id="post-tags-title">Tags</h3>
<ul>
{{- range ( .GetTerms "tags" ).ByTitle -}}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle | safeHTML }}</a></li>
{{- end -}}
</ul>
</section>

View file

@ -1,5 +1,7 @@
<ul class="minor-links__years">
{{ range ( ( where .Pages "Draft" false ).GroupByDate "2006" ) }}
<li><a href="#items-{{ .Key }}">{{ .Key }}</a></li>
{{ if ( not ( eq .Key "0001" ) ) }}
<li><a href="#items-{{ .Key }}">{{ .Key }}</a></li>
{{ end }}
{{ end }}
</ul>