Switch themes to minimo

This commit is contained in:
Dave Gallant
2021-09-06 11:55:05 -04:00
parent 75f9797c91
commit 4ff7aec7c1
302 changed files with 17841 additions and 607 deletions

View File

@@ -0,0 +1,37 @@
{{- $config := .Site.Params.comments -}}
{{- $enabledGlobally := $config.enable -}}
{{- $disabledGlobally := ( not $enabledGlobally ) -}}
{{ $optOut := ( eq .Params.comments false ) }}
{{ $optIn := .Params.comments }}
{{- $enableConditionOne := ( and $disabledGlobally $optIn ) -}}
{{- $enableConditionTwo := ( and $enabledGlobally ( not $optOut ) ) -}}
{{- if ( or $enableConditionOne $enableConditionTwo ) -}}
{{- $disqusEnabled := .Site.DisqusShortname -}}
{{- $issoEnabled := $config.isso.enable -}}
{{- $staticmanEnabled := $config.staticman.enable -}}
{{- $utterancesEnabled := $config.utterances.enable -}}
{{- if ( $disqusEnabled | or $issoEnabled | or $staticmanEnabled | or $utterancesEnabled ) -}}
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'>
{{- if $disqusEnabled -}}
{{ partial "comments/disqus" . }}
{{- else if $issoEnabled -}}
{{ partial "comments/isso" . }}
{{- else if $staticmanEnabled -}}
{{ partial "comments/staticman" . }}
{{- else if $utterancesEnabled -}}
{{ partial "comments/utterances" . }}
{{- end -}}
</div>
</div>
</section>
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,3 @@
<div class='container entry-content'>
{{ .Content }}
</div>

View File

@@ -0,0 +1,27 @@
{{- with .Params.cover -}}
{{- $type := ( printf "%T" . ) -}}
{{- $isMap := ( not ( eq $type "string" ) ) -}}
<div class='entry-cover'>
<figure class='container cover-{{- if $isMap -}}
{{- with .style -}} {{ . }} {{- else -}} normal {{- end -}}
{{- else -}} normal {{- end -}}
'>
<img src='{{ if $isMap }}{{ .image }}{{ else }}{{ . }}{{ end }}'
{{- if $isMap }}
{{- with ( .alternate | default .caption ) }} alt='{{ . | markdownify }}'{{ end -}}
{{ end -}} />
{{ if $isMap }}
{{ with .caption }}
<figcaption class='container'>
<span>
{{- . | markdownify -}}
</span>
</figcaption>
{{ end }}
{{ end }}
</figure>
</div>
{{- end -}}

View File

@@ -0,0 +1,25 @@
{{ if not ( eq .Section "page" ) }}
<footer class='entry-footer'>
<div class='container sep-before'>
{{- if and ( eq .Site.Params.settings.showLastmod true ) ( not ( eq .Lastmod .Date ) ) -}}
{{- $dateFormat := ( .Site.Params.settings.dateFormat | default "2006, Jan 02" ) -}}
<div class='last-updated'>
{{- partial "svg/icon" "edit" -}}
<span class='screen-reader-text'>{{ i18n "lastUpdated" }}: </span>
<time class='entry-date' datetime='{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}'>
{{- .Lastmod.Format $dateFormat -}}
</time>
</div>
{{- end -}}
{{ range $taxonomy, $pages := .Site.Taxonomies }}
{{- if not ( eq $taxonomy "authors" ) -}}
{{- if ( index $.Params $taxonomy ) -}}
{{- $.Scratch.Set "taxonomy" $taxonomy -}}
{{- partial "entry/taxonomy-list" $ -}}
{{- end -}}
{{- end -}}
{{ end }}
</div>
</footer>
{{ end }}

View File

@@ -0,0 +1,11 @@
<header class='header entry-header'>
<div class='container sep-after'>
<div class='header-info'>
<h1 class='title'>
{{- .Title -}}
</h1>
{{ partial "header/description" . }}
</div>
{{ partial "entry/meta" . }}
</div>
</header>

View File

@@ -0,0 +1,17 @@
{{- $defaultConfig := slice "page" -}}
{{- $config := .Site.Params.settings.hideEntryMeta | default $defaultConfig -}}
{{- $configType := ( printf "%T" $config ) -}}
{{- if ( eq $configType "bool" ) -}}
{{- $.Scratch.Set "showEntryMeta" ( not $config ) -}}
{{- else -}}
{{- $.Scratch.Set "showEntryMeta" ( not ( in $config .Section ) ) -}}
{{- end -}}
{{- if ( $.Scratch.Get "showEntryMeta" ) -}}
<div class='entry-meta'>
{{ partial "entry/meta/posted-on" . }}
{{ partial "entry/meta/author" . }}
{{ partial "entry/meta/reading-time" . }}
</div>
{{ end }}

View File

@@ -0,0 +1,20 @@
{{- with .Params.authors -}}
{{- $lang := ( $.Params.lang | default $.Lang ) -}}
<span class='byline'>
{{- partial "svg/icon" "author" -}}
<span class='screen-reader-text'> {{ i18n "by" }} </span>
{{- range $i, $authorID := . -}}
{{- $author := ( index $.Site.Data.authors $authorID ) -}}
{{- $i18nAuthor := ( index $author $lang ) -}}
{{- $name := ( or $i18nAuthor.name $author.name ) -}}
{{- if gt $i 0 }}, {{ end -}}
<a href='{{ ( print "authors" "/" $author.id ) | relLangURL }}'>
{{- $name.display -}}
</a>
{{- end -}}
</span>
{{- end -}}

View File

@@ -0,0 +1,8 @@
{{- $dateFormat := ( .Site.Params.settings.dateFormat | default "2006, Jan 02" ) -}}
<span class='posted-on'>
{{- partial "svg/icon" "calendar" -}}
<span class='screen-reader-text'>{{ i18n "postedOn" }} </span>
<time class='entry-date' datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
{{- .Date.Format $dateFormat -}}
</time>
</span>

View File

@@ -0,0 +1,6 @@
{{ if .Site.Params.settings.showReadingTime }}
<span class='reading-time'>
{{- partial "svg/icon" "clock" -}}
{{ i18n "readingTime" .ReadingTime }}
</span>
{{ end }}

View File

@@ -0,0 +1,15 @@
{{- $txs := ( $.Scratch.Get "taxonomy" ) -}}
{{- $tx := ( $txs | singularize ) -}}
{{- $taxonomies := ( index $.Site.Taxonomies $txs ) -}}
<div class='{{ $txs }}'>
{{- partial "svg/icon" $tx -}}
<span class='screen-reader-text'>{{ ( ( i18n $tx 2 ) | default $txs ) }}: </span>
{{- range $i, $item := ( $.GetTerms $txs ) -}}
{{- if gt $i 0 }}, {{ end -}}
<a class='{{ $tx }}' href='{{ $item.RelPermalink }}'>
{{- $item.Title -}}
</a>
{{- end -}}
</div>

View File

@@ -0,0 +1,10 @@
{{ if eq .Params.toc true }}
<details class='container entry-toc'>
<summary class='title'>
<span>
{{- i18n "tableOfContents" -}}
</span>
</summary>
{{ .TableOfContents }}
</details>
{{ end }}