update theme

This commit is contained in:
Ben Goldsworthy 2023-08-07 18:23:46 -04:00
parent ee87009471
commit 920db1a5ce
43 changed files with 848 additions and 6444 deletions

View file

View file

@ -1 +1 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="{{ range after 1 ( seq .Level ) }}sub{{ end }}heading">{{ .Text | safeHTML }} <a class="heading-anchor" href="#{{ .Anchor | safeURL }}"></a></h{{ .Level }}>
<h{{ .Level }} id="{{ .Anchor }}" class="{{ range after 1 ( seq .Level ) }}sub{{ end }}heading">{{ .Text | safeHTML }} <a class="heading-anchor" href="#{{ .Anchor }}"></a></h{{ .Level }}>

View file

@ -1 +0,0 @@
{{- with 1 -}}{{- end -}}<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>{{- with 1 -}}{{- end -}}

View file

@ -23,19 +23,24 @@
<link rel="canonical" href="{{ .Permalink }}">
{{ with .OutputFormats.Get "rss" }}<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .RelPermalink }}" title="{{ $.Site.Title | safeHTML }}" />{{ end }}
{{ with .OutputFormats.Get "rss" -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .RelPermalink }}" title="{{ $.Site.Title | safeHTML }}" />
{{- end }}
<link href="/css/sanitize.css" rel="stylesheet" />
{{- $sass := resources.Get "css/main.scss" }}
{{- $style := $sass | resources.ToCSS | resources.Fingerprint }}
<link rel="stylesheet" type="text/css" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity | html }}">
{{- $mainStylesheet := resources.Get "css/main.scss" }}
{{- $mainStylesheet := $mainStylesheet | resources.ToCSS | resources.Fingerprint }}
<link rel="stylesheet" type="text/css" href="{{ $mainStylesheet.Permalink }}" integrity="{{ $mainStylesheet.Data.Integrity | html }}">
{{- $printStylesheet := resources.Get "css/print.scss" }}
{{- $printStylesheet := $printStylesheet | resources.ToCSS | resources.Fingerprint }}
<link rel="stylesheet" media="print" href="{{ $printStylesheet.Permalink }}" integrity="{{ $printStylesheet.Data.Integrity | html }}">
{{- block "header-scripts" . -}}<!-- -->{{- end -}}
{{- block "header-styles" . -}}<!-- -->{{- end -}}
</head>
<body class="site-container site-container{{ block "main-class" . }}{{ end }}">
<body class="site-container site-container{{ block "main-class" . }} layouts-default-baseof{{ end }}">
{{ block "header" . -}}
{{- partialCached "header/site-header.html" . -}}
{{- end }}
@ -50,7 +55,7 @@
<footer class="site-footer">
<p>
By <a href="/">{{ $.Site.Author.name }}</a> |
<a href="{{ $.Site.Params.reportIssueURL }}" target="_blank" rel="noopener noreferrer">Report an Issue</a> |
<a href="{{ $.Site.Params.codeURL }}{{ $.Site.Params.reportIssueURL }}">Report an Issue</a> |
<a href="{{ relref . "privacy-policy" }}">Privacy Policy</a> |
<a href="/{{ .Sitemap.Filename }}">Sitemap</a> |
Built: {{ now.Format "2006-01-02T15:04:05" }}

View file

@ -2,7 +2,7 @@
{{ .Type | singularize }}: &lsquo;{{ .Page.Title | plainify }}&rsquo; | {{ .Site.Title }}
{{ end }}
{{ define "main-class" }}--list{{ end}}
{{ define "main-class" }}--list layouts-default-list{{ end}}
{{ define "main-header" }}
<header class="site-content__header">

View file

@ -2,7 +2,7 @@
{{ .Page.Title | plainify }} | {{ .Site.Title }}
{{ end }}
{{ define "main-class" }}--section{{ end }}
{{ define "main-class" }}--section layouts-default-section{{ end }}
{{ define "main-type" }}.{{ .Params.mainType }}{{ end }}
{{ define "item-type" }}{{ .Params.itemsType }}{{ end }}

View file

@ -2,19 +2,57 @@
{{ define "head-description" }}{{ .Summary | plainify }}{{ end }}
{{ define "main-class" }}--single{{ end }}
{{ define "main-class" }}--single layouts-default-single{{ end }}
{{ define "header-scripts" }}
{{ with .Params.locations }}
{{ $mapJS := resources.Get "js/leaflet.js" | fingerprint }}
<script id="Map-script" src="{{ $mapJS.Permalink }}" integrity="{{ $mapJS.Data.Integrity }}"></script>
{{ end }}
{{ end }}
{{ define "header-styles" }}
{{ with .Params.styles }}
<link rel="stylesheet" type="text/css" href="{{ ( $.Page.Resources.GetMatch "style").RelPermalink }}">
{{ end }}
{{ with .Params.locations }}
<link rel="stylesheet" href="/css/leaflet.css">
{{ end }}
{{ end }}
{{ define "footer-scripts" }}
{{ with .Params.locations }}
<script src="/js/openlayers.js"></script>
{{ $script := resources.Get "js/render-meta-map.js" | resources.ExecuteAsTemplate "render-meta-map.js" . }}
<script src="{{ $script.RelPermalink }}"></script>
<script>
var map = L.map('map').setView([55, -3], 13);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
var latLons = [];
{{ range . }}
{{ with ( index $.Site.Data.locations . ) }}
L.marker([{{ .lat }}, {{ .lon }}]).addTo(map);
latLons.push([{{ .lat }}, {{ .lon }}]);
{{ else }}
{{ warnf "Could not find lat-lon for %q (%q)" . $.File.Path }}
{{ end }}
{{ end }}
map.fitBounds(latLons);
</script>
{{ end }}
{{ with .Params.scripts }}
{{ if in . "mathjax" }}
<script src="/js/polyfill.js"></script>
<script id="MathJax-script" async src="/js/mathjax.js"></script>
<script src="/js/mathjax-config.js"></script>
<script id="MathJax-script" async src="/js/mathjax/tex-chtml.js"></script>
<script src="/js/mathjax/config.js"></script>
{{ end }}
{{ if in . "charts" }}
{{ $chartsCoreJS := resources.Get "js/chart.js" | fingerprint }}
{{ $chartsConfigJS := $.Page.Resources.GetMatch "charts-init" }}
<script id="Charts-script" src="{{ $chartsCoreJS.Permalink }}" integrity="{{ $chartsCoreJS.Data.Integrity }}"></script>
<script id="Charts-config-script" src="{{ $chartsConfigJS.Permalink }}"></script>
{{ end }}
{{ end }}
{{ end }}

View file

@ -2,7 +2,7 @@
{{ .Page.Title | plainify }} | {{ .Site.Title }}
{{ end }}
{{ define "main-class" }}--section{{ end }}
{{ define "main-class" }}--section layouts-blog-section{{ end }}
{{ define "main-type" }}{{ .Params.mainType }}{{ end }}

View file

@ -2,7 +2,7 @@
&ldquo;{{ .Title | plainify }}&rdquo; | {{ .Site.Title }}
{{ end }}
{{ define "main-class" }}--single{{ end }}
{{ define "main-class" }}--single layouts-blog-single{{ end }}
{{ define "header-scripts" }}
{{ with .Params.locations }}
@ -44,10 +44,9 @@
{{ end }}
{{ with .Params.scripts }}
{{ if in . "mathjax" }}
{{ $mathJaxCoreJS := resources.Get "js/mathjax.js" | fingerprint }}
{{ $mathJaxConfigJS := resources.Get "js/mathjax-config.js" | js.Build | fingerprint }}
<script id="MathJax-script" async src="{{ $mathJaxCoreJS.Permalink }}" integrity="{{ $mathJaxCoreJS.Data.Integrity }}"></script>
<script id="MathJax-config-script" async src="{{ $mathJaxConfigJS.Permalink }}" integrity="{{ $mathJaxConfigJS.Data.Integrity }}"></script>
<script src="/js/polyfill.js"></script>
<script id="MathJax-script" async src="/js/mathjax/tex-chtml.js"></script>
<script src="/js/mathjax/config.js"></script>
{{ end }}
{{ if in . "charts" }}
{{ $chartsCoreJS := resources.Get "js/chart.js" | fingerprint }}
@ -180,6 +179,11 @@
</li>
</ul>
{{- end -}}
{{- if fileExists ( path.Join $.Page.File.Dir "corrigenda.md" ) -}}
<ul class="toc-list--corrigenda">
<li><a href="#corrigenda">Corrigenda</a></li>
</ul>
{{- end -}}
</nav>
{{ end }}
</header>
@ -236,6 +240,14 @@
{{ $file | .RenderString }}
</section>
{{ end }}
{{ if fileExists ( path.Join $.Page.File.Dir "Corrigendum.md" ) }}
<section class="article-body__corrigendum">
<h2 class="subheading subheading--corrigendum" id="corrigendum">Corrigendum</h2>
{{ $file := path.Join $.Page.File.Dir "corrigendum.md" | readFile }}
{{ $file | .RenderString }}
</section>
{{ end }}
</section>
{{ end }}

View file

@ -1,219 +0,0 @@
{{ define "title" }}
{{ .Page.Title | plainify }} | {{ .Site.Title }}
{{ end }}
{{ define "main-class" }}
{{- if .IsDescendant ( .GetPage "/cv/organisations" ) -}}--single{{- else -}}--section{{- end -}}
{{ end }}
{{ define "header-scripts" }}
{{ if ( or ( eq .Type "cv" ) ( .IsDescendant ( .GetPage "/cv/organisations" ) ) ) }}
{{ $googleChartsJS := resources.Get "js/google-charts.js" | fingerprint }}
<script id="Google-Charts-script" src="{{ $googleChartsJS.Permalink }}" integrity="{{ $googleChartsJS.Data.Integrity }}"></script>
{{ end }}
{{ end }}
{{ define "footer-scripts" }}
{{ if eq .Type "cv" }}
{{ $js := resources.Get "js/roles-chart.js" | resources.ExecuteAsTemplate "/js/render-roles-timeline.js" . }}
<script type="text/javascript" src="{{ $js.RelPermalink }}"></script>
{{ else if .IsDescendant ( .GetPage "/cv/organisations" ) }}
{{ $titles := .Scratch.Get "titles" }}
<script>
google.charts.load('current', {'packages':['timeline']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var container = document.getElementById('timeline');
var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn({ type: 'string', id: 'Type' });
dataTable.addColumn({ type: 'string', id: 'Job Title' });
dataTable.addColumn({ type: 'string', id: 'style', role: 'style' });
dataTable.addColumn({ type: 'date', id: 'Start' });
dataTable.addColumn({ type: 'date', id: 'End' });
dataTable.addRows([
{{ range where ((.GetPage "cv").Sections) "Title" "Roles" -}}
{{- range where (where ( where .Site.Pages "Section" "cv" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles -}}
[
"{{- delimit (intersect .Params.organisations $titles ) "" | safeHTML -}}",
"{{- .Title | safeHTML -}}",
"{{ if .Params.end_date }}#FFFFF0{{ else }}#BBBBB0{{ end }}",
new Date("{{ .Date.Format "2006-01-02" }}"),
new Date("{{ if .Params.end_date }}{{ delimit ( first 1 .Params.end_date ) "" }}{{ else }}{{ now.Format "2006-01-02" }}{{ end }}")
],
{{- end -}}
{{ end -}}
]);
var options = {
title: '{{ .Title | plainify }} Roles Timeline',
timeline: { showBarLabels: true }
};
chart.draw(dataTable, options);
{{ if $titles }}
container.style.height = ( ( ( {{ len $titles }} - 1 ) * 41 ) + 15 )+ "px";
{{ end }}
}
</script>
{{ end }}
{{ end }}
{{ define "main-header" }}
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
<header class="site-content__header">
<div class="article-header__featured-image"
{{ if .Params.featured_image }}
{{ with .Resources.GetMatch .Params.featured_image }}
style="background-image: url({{ .RelPermalink }})"
{{ end }}
{{ end }}>
<div class="article-header__title-wrapper{{ if .Params.title_in_logo }} article-header__title-wrapper--no-title{{ end }}">
<h1 class="article-header__title">{{ .Title | safeHTML }}LIST</h1>
</div>
</div>
</header>
{{ else }}
<header class="site-content__header">
<h1 class="page-title">{{ .Title | safeHTML }}.</h1>
{{ .Content }}
{{ if eq .Type "cv" }}
<nav class="page-header__minor-links">
<ul>
{{ range ( where .Sections "Type" "not in" ( slice "cv/roles" ) ).ByTitle }}
<li><a href="{{ .RelPermalink }}"><h2>{{ .Title }}</h2></a> <p>({{ len (where ( where .Site.Pages "Section" "cv" ) "Parent.Title" .Title ) }})</p></li>
{{ end }}
</ul>
</nav>
{{ end }}
{{ if eq .Type "cv" }}
<aside class="timeline__legend">
<label for="legend__past">Past</label>
<div id="legend__past">
<span><div class="colour-square colour-square--unpaid-past"></div> <p>Unpaid</p></span>
<span><div class="colour-square colour-square--paid-past"></div> <p>Paid</p></span>
</div>
<br>
<label for="legend__current">Current</label>
<div id="legend__current">
<span><div class="colour-square colour-square--unpaid-current"></div> <p>Unpaid</p></span>
<span><div class="colour-square colour-square--paid-current"></div> <p>Paid</p></span>
</div>
</aside>
{{ end }}
</header>
{{ end }}
{{ end }}
{{ define "main-body" }}
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
{{ $titles := slice (.Title | plainify) }}
{{ range .Sections.ByTitle }}
{{ $titles = $titles | append (slice (.Title | plainify) )}}
{{ $titles = $titles | append ( partial "cv/organisations/recursive-children-titles.html" . ) }}
{{ end }}
{{ .Scratch.Set "titles" $titles }}
<main id="organisation-body" class="site-content__body">
<section id="description">
{{ .Content }}
</section>
<section id="roles-timelimne">
<aside class="timeline__legend">
<label for="legend__past">Past</label>
<div id="legend__past">
<span><div class="colour-square colour-square--unpaid-past"></div> <p>Unpaid</p></span>
<span><div class="colour-square colour-square--paid-past"></div> <p>Paid</p></span>
</div>
<br>
<label for="legend__current">Current</label>
<div id="legend__current">
<span><div class="colour-square colour-square--unpaid-current"></div> <p>Unpaid</p></span>
<span><div class="colour-square colour-square--paid-current"></div> <p>Paid</p></span>
</div>
</aside>
<div id="timeline" aria-label="Role Time" role="img">Javascript must be enabled to view this chart.</div>
</section>
<section id="related" class="row">
{{ if ne .Parent.Title "Organisations" }}
<section id="parents" class="col-6 col-m-12">
<h2 class="subheading">Parent</h2>
{{ with .Parent }}
<ul>
<li><a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a></li>
</ul>
{{ end }}
</section>
{{ end }}
{{ if gt (len .Sections) 0 }}
<section id="children" class="col-6 col-m-12">
<h2 class="subheading">Children</h2>
<ul>
{{ range .Sections.ByTitle }}
<li>
<a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a>
{{ partial "cv/organisations/recursive-children.html" . }}
</li>
{{ end }}
</ul>
</section>
{{ end }}
{{- $titles := .Scratch.Get "titles" -}}
{{ range (where ((.GetPage "blog").Sections) "Title" "Blog Posts") }}
{{ $section_title := .Title }}
{{ with where (where ( where .Site.Pages "Section" "blog" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles }}
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
{{ end }}
{{ end }}
{{ range (where ((.GetPage "portfolio").Sections) "Title" "!=" "Appearances").ByTitle }}
{{ $section_title := .Title }}
{{ with where (where ( where .Site.Pages "Section" "portfolio" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles }}
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
{{ end }}
{{ end }}
{{ range (where ((.GetPage "cv").Sections) "Title" "Qualifications") }}
{{ $section_title := .Title }}
{{ with where (where ( where .Site.Pages "Section" "portfolio" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles }}
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
{{ end }}
{{ end }}
{{ range (where ((.GetPage "cv").Sections) "Title" "Awards") }}
{{ $section_title := .Title }}
{{ with where (where ( where .Site.Pages "Section" "portfolio" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles }}
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
{{ end }}
{{ end }}
{{ range (where ((.GetPage "portfolio").Sections) "Title" "Appearances").ByTitle }}
{{ $section_title := .Title }}
{{ with where (where ( where .Site.Pages "Section" "portfolio" ) "Parent.Title" .Title ) ".Params.organisations" "intersect" $titles }}
{{ partial "cv/organisations/organisation-items.html" ( dict "section_title" $section_title "content" . ) }}
{{ end }}
{{ end }}
</section>
</main>
{{ else }}
{{ if eq .Type "cv" }}
<article class="site-content__body site-content__body--list">
<div id="timeline" width="1000" height="400" aria-label="Roles Timeline" role="img">Javascript must be enabled to view this chart.</div>
</article>
{{ else if eq .Type "cv/organisations" . }}
{{ with .GetPage "cv/organisations" }}
{{ partial "items-table.html" . }}
{{ end }}
{{ else }}
{{ partial "items-grid.html" . }}
{{ end }}
{{ end }}
{{ end }}

View file

@ -3,7 +3,7 @@
{{ end }}
{{ define "main-class" }}
{{- if .IsDescendant ( .GetPage "/cv/organisations" ) -}}--single{{- else -}}--section{{- end -}}
{{- if .IsDescendant ( .GetPage "/cv/organisations" ) -}}--single{{- else -}}--section{{- end }} layouts-cv-section
{{ end }}
{{ define "header-scripts" }}
@ -135,7 +135,6 @@
{{ end }}
{{ define "main-body" }}
<!-- TODO: Replace with check for 'cv/organsation' -->
{{ if .IsDescendant ( .GetPage "/cv/organisations" ) }}
{{ $titles := slice ( .Title | plainify ) }}
{{ with .Sections }}
@ -214,7 +213,7 @@
</article>
{{ else if eq .Type "cv/organisations" . }}
{{ with .GetPage "cv/organisations" }}
{{ partial "items-table.html" . }}
{{ partial "cv/organisations/items-table.html" . }}
{{ end }}
{{ else }}
{{ partial "items-grid.html" . }}
@ -229,7 +228,7 @@
<h3 class="subheading">Hierarchy</h3>
{{ $.Scratch.Set "parents" ( slice ) }}
{{ partial "cv/organisations/recursive-parents.html" (dict "c" . "g" $ ) }}
{{- $parents := partial "reverse-slice.html" ( $.Scratch.Get "parents" ) -}}
{{- $parents := partial "cv/organisations/reverse-slice.html" ( $.Scratch.Get "parents" ) -}}
{{- range $parents -}}<ul><li class="hierarchy-item hierarchy-item--parent"><a href="{{ .RelPermalink }}">{{ .Title | safeHTML }}</a>{{- end -}}
<ul><li class="hierarchy-item hierarchy-item--current">{{ .Title | safeHTML }}</li>

View file

@ -2,7 +2,7 @@
featured_image: {{ .Name }}
resources:
- name: {{ .Name }}
alt:
src: images/{{ .Name }}.*
params:
alt:
attr:

View file

@ -1,22 +1,21 @@
{{ with .Params.href -}}
{{- $itemType := default "CreativeWork" ( .Params.schemaType ) -}}
{{- if ( in $.Site.Data.itemtypes $itemType ) -}}
{{- 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 -}}
{{- end -}}
<cite
class="cite{{ with .Params.citeStyle }} cite--{{ . }}{{ end }}"
itemscope
itemprop="citation"
itemtype="https://schema.org/{{- $itemType -}}"
{{- 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 }}">
@ -31,6 +30,9 @@
{{- end -}}
</span>{{- /**/ -}}
</cite>
{{- with .Params.href -}}
{{- with .Params.href -}}
</a>
{{- end -}}
{{- else -}}
{{- warnf "Invalid Schema.org type value: %q (%q)" $itemType .Page.File.Path -}}
{{- end -}}

View file

@ -1,8 +0,0 @@
<!--. is .c-->
<!--$ is .g-->
{{ $scratch := .g.Scratch }}
{{ with ( where ( where .g.Site.Pages "Type" "organisations" ) "Params.parent" .g.File.ContentBaseName ) }}
{{ $scratch.Add "children" ( slice . ) }}
{{ partial "cv/organisations/recursive-children.html" (dict "c" . "g" $.g ) }}
{{ end }}

View file

@ -1,3 +1,13 @@
{{ if fileExists ( path.Join $.Page.File.Dir "comments.md" ) }}
<!--<section id="comments">
<h2 class="subheading subheading--comments" id="comments">Comments</h2>
<ol>
{{ $file := path.Join $.Page.File.Dir "comments.md" | readFile }}
{{ $file | .RenderString }}
</ol>
</section>-->
{{ end }}
<footer class="site-content__footer">
<h2>Meta</h2>
@ -23,6 +33,23 @@
</section>
{{- end -}}
{{- if .GetTerms "skills" -}}
<section class="article-footer__links" itemprop="articleSection">
<h3 id="item-skills-title">Skills</h3>
<ul>
{{- .Scratch.Set "i" 0 -}}
{{- range ( .GetTerms "skills" ).ByTitle -}}
{{- if hasPrefix .LinkTitle "CIISec/" -}}
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> <span class="level">{{ index $.Params.skills_ciisec_levels ( $.Scratch.Get "i" ) }}</span></li>
{{- $.Scratch.Add "i" 1 -}}
{{- else -}}
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end -}}
{{- end -}}
</ul>
</section>
{{- end -}}
{{- if .GetTerms "organisations" -}}
<section id="post-organisations" class="article-footer__organisations" aria-labelledby="post-organisations-title" itemprop="articleSection">
<h3 id="post-organisations-title">Organisations</h3>

View file

@ -2,7 +2,7 @@
{{ .Page.Title | plainify }} | {{ .Site.Title }}
{{ end }}
{{ define "main-class" }}--section{{ end }}
{{ define "main-class" }}--section layouts-portfolio-section{{ end }}
{{ define "footer-scripts" }}
<script>
@ -64,7 +64,7 @@
<h2 class="page-title">{{ .Title | safeHTML }}.
{{ range .AlternativeOutputFormats -}}
<a href="{{ .RelPermalink }}">
<img class="feed-icon" src="/images/feed-icon.png">
<img class="feed-icon" src="{{ $.Site.Params.feedIcon }}">
</a>
{{ end }}
</h2>

View file

@ -1,2 +1,25 @@
# Internet Archive
# If I ever decomission this site, I will archive it first. Until then, no
# archiving.
User-agent: ia_archiver
Disallow: /
# Common Crawl
User-agent: CCBot
Disallow: /
# OpenAI
User-agent: ChatGPT-User
Disallow: /
# Turn It In Plagiarism Checker
User-Agent: TurnitinBot
Disallow: /
# Name Protect
User-Agent: NPBot
Disallow: /
# Sly Search
User-Agent: SlySearch
Disallow: /

View file

@ -2,7 +2,7 @@
{{ .Type | singularize }}: &lsquo;{{ .Page.Title | plainify }}&rsquo; | {{ .Site.Title }}
{{ end }}
{{ define "main-class" }}--list{{ end}}
{{ define "main-class" }}--list layouts-series-list{{ end}}
{{ define "main-header" }}
<header class="site-content__header">

View file

@ -1,35 +1,57 @@
{{- /**/ -}}
{{- $abbr := .Get 0 -}}
{{- $mode := default "shortTitle" ( .Get 1 ) -}}
{{- with ( index $.Site.Data.abbreviations $abbr ) -}}
<!-- Short titles (e.g. 'FBB') -->
{{- if ( or ( eq $mode "shortTitle" ) ( eq $mode "shortTitlePl" ) ) -}}
<abbr class="abbr" title="
{{- if ( eq $mode "shortTitle" ) -}}
<abbr
class="abbr"
title="
{{- if ( eq $mode "shortTitle" ) -}}
{{- .longTitle -}}
{{- else if ( eq $mode "shortTitlePl" ) -}}
{{- else if ( eq $mode "shortTitlePl" ) -}}
{{- with .longTitlePl -}}{{- . -}}{{- else -}}{{- .longTitle -}}s{{- end -}}
{{- end -}}
">
{{- end -}}
{{- if .lang }} [{{ .longTitleTrans }}]{{- end -}}
"
{{- with .lang }} lang="{{ . }}"{{- end -}}
>
{{- if ( eq $mode "shortTitle" ) -}}
{{- .shortTitle | safeHTML -}}
{{- else if ( eq $mode "shortTitlePl" ) -}}
{{- with .shortTitlePl -}}{{- . | safeHTML -}}{{- else -}}{{- .shortTitle | safeHTML -}}s{{- end -}}
{{- end -}}
</abbr>
{{- else if ( or ( eq $mode "longtitle" ) ( eq $mode "longTitlePl" ) ) -}}
</abbr>{{- /**/ -}}
<!-- Long titles (e.g. 'foo bar baz') -->
{{- else if ( or ( eq $mode "longTitle" ) ( eq $mode "longTitlePl" ) ) -}}
{{- if ( eq $mode "longTitle" ) -}}
{{- if .lang -}}<i lang="{{- .lang -}}" title="{{- $.longTitleTrans | safeHTML -}}">{{- end -}}
{{- .longTitle | safeHTML -}}
{{- if .lang -}}</i>{{- end -}}
{{- else if ( eq $mode "longTitlePl" ) -}}
{{- if .lang -}}<i lang="{{- .lang -}}" title="{{- with .longTitleTransPl -}}{{- . | safeHTML -}}{{- else -}}{{- .longTitleTrans | safeHTML -}}s{{- end -}}">{{- end -}}
{{- with .longTitlePl -}}{{- . | safeHTML -}}{{- else -}}{{- .longTitle | safeHTML -}}s{{- end -}}
{{- if .lang -}}</i>{{- end -}}{{- /**/ -}}
{{- end -}}
<!-- Full titles (e.g. 'foo bar baz (FBB)') -->
{{- else if ( or ( eq $mode "fullTitle" ) ( eq $mode "fullTitlePl" ) ) -}}
{{- if ( eq $mode "fullTitle" ) -}}
{{- .longTitle | safeHTML -}}&nbsp;(<abbr>{{- .shortTitle | safeHTML -}}</abbr>)
{{- if .lang -}}<i lang="{{- .lang -}}" title="{{- .longTitleTrans | safeHTML -}}">{{- end -}}
{{- .longTitle | safeHTML -}}
{{- if .lang -}}</i>{{- end -}}
&nbsp;(<abbr{{- with .lang }} lang="{{ . }}"{{- end -}}>{{- .shortTitle | safeHTML -}}</abbr>)
{{- else if ( eq $mode "fullTitlePl" ) -}}
{{- if .lang -}}<i lang="{{- .lang -}}" title="{{- with .longTitleTransPl -}}{{- . | safeHTML -}}{{- else -}}{{- .longTitleTrans | safeHTML -}}s{{- end -}}">{{- end -}}
{{- with .longTitlePl -}}{{- . | safeHTML -}}{{- else -}}{{- .longTitle | safeHTML -}}s{{- end -}}
&nbsp;(<abbr>{{- with .shortTitlePl -}}{{- . | safeHTML -}}{{- else -}}{{- .shortTitle | safeHTML -}}s{{- end -}}</abbr>)
{{- if .lang -}}</i>{{- end -}}
&nbsp;(<abbr{{- with .lang }} lang="{{ . }}"{{- end -}}>{{- with .shortTitlePl -}}{{- . | safeHTML -}}{{- else -}}{{- .shortTitle | safeHTML -}}s{{- end -}}</abbr>){{- /**/ -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- errorf "No definition found for abbreviation '%q'" $abbr -}}
{{- end -}}
{{- /**/ -}}

View file

@ -11,21 +11,21 @@
class="blockquote__body"
{{- if .Params.cite }} cite="{{ .Params.cite }}"{{- end -}}
>
{{ .Inner | markdownify | safeHTML }}
{{- .Inner | .Page.RenderString -}}
</blockquote>
<figcaption class="blockquote__caption">
{{- if .Params.ibid -}}
<abbr lang="la" title="ibīdem [in the same place]">Ibid.</abbr>
{{- else -}}
<span itemprop="spokenByCharacter">{{- .Params.source -}}</span>
<span itemprop="spokenByCharacter">{{- .Params.source | safeHTML -}}</span>
{{- if .Params.title -}}, <span itemprop="isBasedOn">{{- partial "cite.html" . -}}
{{- if .Params.titleSeries }} (
{{- .Scratch.SetInMap "Params" "title" .Params.titleSeries -}}
{{- .Scratch.SetInMap "Params" "titleLang" .Params.titleSeriesLang -}}
{{- .Scratch.SetInMap "Params" "titleTr" .Params.titleSeriesTr -}}
{{- .Scratch.SetInMap "Params" "cite" .Params.citeSeries -}}
{{- .Scratch.SetInMap "Params" "schematype" .Params.schemaTypeSeries -}}
{{- .Scratch.Set "parentCite" ( .Scratch.Get "Params" ) -}}
{{- .Scratch.SetInMap "Params" "schemaType" .Params.schemaTypeSeries -}}
{{- .Scratch.SetInMap "parentCite" "Params" ( .Scratch.Get "Params" ) -}}
{{- partial "cite.html" ( .Scratch.Get "parentCite" ) -}}
{{- with .Params.numberSeries }}, {{ . | safeHTML -}}{{- end -}}
){{- end -}}</span>

View file

@ -0,0 +1,13 @@
<li class="comment">
<article class="comment__body">
<header class="comment__header">
<h3 class="comment__author">{{ .Params.author }}</h3>
</header>
{{ .Inner | markdownify }}
<footer class="comment__footer">
{{ with .Params.source }}<p class="comment__source">Source: {{ . }}</p>{{ end }}
</footer>
</article>
</li>

View file

@ -4,7 +4,7 @@
{{ $src := $.Page.Resources.GetMatch (.Get "src") }}
{{ if ( and ( not $src ) ( not ( .Get "chart-id" ) ) ) }}
{{- errorf "No Page Resource found for src '%v' for post '%v'" ( .Get "src" ) $.File.Path -}}
{{- errorf "No Page Resource found for src '%q' (%q)" ( .Get "src" ) .Page.File.Path -}}
{{ end }}
{{ $linkedResource := $.Page.Resources.GetMatch (.Get "link") }}
@ -60,7 +60,7 @@
{{- .RelPermalink -}}
{{- end -}}
{{- else -}}
{{- warnf "No poster defined for resource %q" $src.RelPermalink -}}
{{- warnf "No poster defined for resource %q (%q)" $src.RelPermalink .Page.File.Path -}}
{{- end -}}
"
itemprop="video"

View file

@ -63,7 +63,9 @@
{{- end -}}
</h5>
{{- else -}}
<p class="figcaption__title">Link</p>
{{- with .Params.href -}}
<p class="figcaption__title">Link</p>
{{- end -}}
{{- end -}}
{{- if .Params.href -}}
</a>

View file

@ -0,0 +1,9 @@
{{- /**/ -}}
<q
itemscope
itemtype="Quotation"
{{- if .Params -}}{{- with .Params.cite }} cite="{{ . }}"{{- end -}}{{- if .Params.lang }} lang="{{ .Params.lang }}" title="{{ .Params.trans }}"{{- end -}}{{- end -}}>
{{- with .Params -}}{{- with .cite -}}<meta itemprop="isBasedOn" content="{{ . }}">{{- end -}}{{- end -}}
{{- .Inner | .Page.RenderString -}}
</q>
{{- /**/ -}}