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

@ -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>
{{- /**/ -}}