mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-07 17:12:27 +00:00
Switch themes to minimo
This commit is contained in:
37
themes/minimo/layouts/partials/entry/comments.html
Normal file
37
themes/minimo/layouts/partials/entry/comments.html
Normal 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 -}}
|
3
themes/minimo/layouts/partials/entry/content.html
Normal file
3
themes/minimo/layouts/partials/entry/content.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class='container entry-content'>
|
||||
{{ .Content }}
|
||||
</div>
|
27
themes/minimo/layouts/partials/entry/cover.html
Normal file
27
themes/minimo/layouts/partials/entry/cover.html
Normal 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 -}}
|
25
themes/minimo/layouts/partials/entry/footer.html
Normal file
25
themes/minimo/layouts/partials/entry/footer.html
Normal 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 }}
|
11
themes/minimo/layouts/partials/entry/header.html
Normal file
11
themes/minimo/layouts/partials/entry/header.html
Normal 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>
|
17
themes/minimo/layouts/partials/entry/meta.html
Normal file
17
themes/minimo/layouts/partials/entry/meta.html
Normal 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 }}
|
20
themes/minimo/layouts/partials/entry/meta/author.html
Normal file
20
themes/minimo/layouts/partials/entry/meta/author.html
Normal 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 -}}
|
8
themes/minimo/layouts/partials/entry/meta/posted-on.html
Normal file
8
themes/minimo/layouts/partials/entry/meta/posted-on.html
Normal 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>
|
@@ -0,0 +1,6 @@
|
||||
{{ if .Site.Params.settings.showReadingTime }}
|
||||
<span class='reading-time'>
|
||||
{{- partial "svg/icon" "clock" -}}
|
||||
{{ i18n "readingTime" .ReadingTime }}
|
||||
</span>
|
||||
{{ end }}
|
15
themes/minimo/layouts/partials/entry/taxonomy-list.html
Normal file
15
themes/minimo/layouts/partials/entry/taxonomy-list.html
Normal 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>
|
10
themes/minimo/layouts/partials/entry/toc.html
Normal file
10
themes/minimo/layouts/partials/entry/toc.html
Normal 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 }}
|
Reference in New Issue
Block a user