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 @@
{{ template "_internal/disqus.html" . }}

View File

@@ -0,0 +1,6 @@
{{- $scriptSrc := .Page.Site.Params.comments.isso.scriptSrc -}}
{{- $dataAttrs := .Page.Site.Params.comments.isso.dataAttrs -}}
<script src='{{ $scriptSrc }}' {{- with $dataAttrs }} {{ . | safeHTMLAttr }} {{- end -}}></script>
<section id='isso-thread'></section>

View File

@@ -0,0 +1,5 @@
{{ partial "comments/staticman/submission-feedback" . }}
{{ partial "comments/staticman/list" . }}
{{ partial "comments/staticman/form" . }}

View File

@@ -0,0 +1,4 @@
{{ $rawStaticmanYML := ( readFile "staticman.yml" ) }}
{{ $parsedStaticmanYML := ( transform.Unmarshal $rawStaticmanYML ) }}
{{ return $parsedStaticmanYML }}

View File

@@ -0,0 +1,43 @@
{{- $comment := .Comment -}}
{{- $maxDepth := .Page.Site.Params.comments.staticman.maxDepth -}}
<li id='comment-{{ $comment._id }}' class='comment'>
<article class='comment-body'>
<header class='comment-header'>
<div class='comment-author'>
<img alt='{{ i18n "authorsAvatar" ( dict "Author" $comment.author ) }}' src='https://www.gravatar.com/avatar/{{ $comment.email }}?s=64' class='avatar'/>
<b class='fn'>
{{- if $comment.site -}}
<a href='{{ $comment.site }}' rel='external nofollow' class='url'>
{{- $comment.author -}}
</a>
{{- else -}}
{{- $comment.author -}}
{{- end -}}
</b>
<span class='says'>{{ i18n "says" }}: </span>
</div>
<div class='comment-meta'>
<a href='#comment-{{ $comment._id }}'>
{{- $date := ( time ( div ( int $comment.date ) 1000 ) ) -}}
<time datetime='{{ dateFormat "2006-01-02T15:04:05Z07:00" $date }}'>
{{- dateFormat "15:04, Jan 2, 2006" $date -}}
</time>
</a>
</div>
</header>
<div class='comment-content'>
{{ $comment.content | markdownify }}
</div>
<footer class='reply'>
{{- if lt ( .Page.Scratch.Get "comments_depth" ) $maxDepth -}}
<a rel='nofollow' class='button comment-reply-link' href='#respond' onclick='return moveRespondBlock({{ $comment._id }})' aria-label='{{ i18n "replyToAuthor" ( dict "Author" $comment.author ) }}'>
{{ i18n "reply" }}
</a>
{{- end -}}
</footer>
</article>
{{- if lt ( .Page.Scratch.Get "comments_depth" ) $maxDepth -}}
{{ partial "comments/staticman/replies-list" ( dict "ParentId" $comment._id "Page" .Page ) }}
{{- end -}}
</li>

View File

@@ -0,0 +1,75 @@
{{- $staticman := ( partialCached "comments/staticman/GetStaticmanYML" . ) -}}
{{- $config := .Site.Params.comments.staticman -}}
{{- $apiEndpoint := $config.apiEndpoint -}}
{{- $username := $config.github.username | default $config.username -}}
{{- $repo := $config.github.repository | default $config.repository -}}
{{- $_branch := $config.github.branch | default $config.branch -}}
{{- $branch := $_branch | default $staticman.comments.branch -}}
{{- $api := ( print $apiEndpoint "/" $username "/" $repo "/" $branch ) -}}
{{- $reCaptcha := $staticman.comments.reCaptcha | default ( dict "enabled" false ) -}}
<div id='respond' class='comment-respond'>
<h4 class='comment-reply-title'>
{{- i18n "leaveAComment" -}}
<small>
<a rel='nofollow' id='cancel-comment-reply-link' href='#respond' class='button' style='display:none' aria-label='{{ i18n "cancelComment" }}'>
{{- i18n "cancel" -}}
</a>
</small>
</h4>
<form action='{{ $api }}/comments' method='post' id='comment-form' class='comment-form'>
<input type='hidden' name='options[postId]' value='{{ .File.UniqueID }}'>
<input type='hidden' name='options[redirect]' value='{{ .Permalink }}#submission-success'>
<input type='hidden' name='options[redirectError]' value='{{ .Permalink }}#submission-failure'>
<input type='address' name='fields[honeypot]' style='display:none'>
<input type='hidden' name='fields[permalink]' value='{{ .RelPermalink }}'>
<input type='hidden' name='fields[parent_id]' value=''>
{{- if $reCaptcha.enabled -}}
<input type='hidden' name='options[reCaptcha][siteKey]' value='{{ $reCaptcha.siteKey }}'>
<input type='hidden' name='options[reCaptcha][secret]' value='{{ $reCaptcha.secret }}'>
{{- end -}}
<div>
<label for='comment'>{{ i18n "comment" }}*</label>
<textarea id='comment' name='fields[content]' required rows='3'></textarea>
</div>
<div>
<label for='name'>{{ i18n "name" }}*</label>
<input id='name' name='fields[author]' type='text' required>
</div>
<div>
<label for='email'>{{ i18n "email" }}*</label>
<input id='email' name='fields[email]' type='email' required>
</div>
<div>
<label for='url'>{{ i18n "website" }}</label>
<input id='url' name='fields[site]' type='url'>
</div>
{{- if $reCaptcha.enabled -}}
<div class='g-recaptcha' data-sitekey='{{ $reCaptcha.siteKey }}' data-callback="enableSubmitComment"></div>
<script type="text/javascript">
function enableSubmitComment(){
document.getElementById("submitComment").disabled = false;
}
</script>
<script async src='https://www.google.com/recaptcha/api.js'></script>
{{- end -}}
<div>
<button type='submit' id="submitComment" {{- with $reCaptcha.enabled }} disabled {{- end }}>
{{- i18n "submitComment" -}}
</button>
</div>
</form>
</div>

View File

@@ -0,0 +1,19 @@
{{- $entryId := .File.UniqueID -}}
{{- if isset .Site.Data.comments $entryId -}}
{{- $comments := ( index .Site.Data.comments $entryId ) -}}
<h3 class='comments-title'>
{{ i18n "commentsOnEntry" ( dict "Count" ( len $comments ) "Title" .Title ) }}
</h3>
<ol class='comment-list'>
{{- range $index, $comment := $comments -}}
{{- $.Scratch.Set "comments_depth" 1 -}}
{{- if not $comment.parent_id -}}
{{ partial "comments/staticman/comment" ( dict "Comment" $comment "Page" $ ) }}
{{- end -}}
{{- end -}}
</ol>
{{- end -}}

View File

@@ -0,0 +1,11 @@
{{- .Page.Scratch.Add "comments_depth" 1 -}}
{{- $comments := ( index .Page.Site.Data.comments .Page.File.UniqueID ) -}}
{{- $parentId := .ParentId -}}
<ol class='children'>
{{- range $index, $comment := $comments -}}
{{- if ( eq $comment.parent_id $parentId ) -}}
{{ partial "comments/staticman/comment" ( dict "Comment" $comment "Page" $.Page ) }}
{{- end -}}
{{- end -}}
</ol>

View File

@@ -0,0 +1,11 @@
<div id='submission-success' class='comment-submission-feedback'>
<h4>{{ i18n "commentSubmissionSuccessTitle" }}</h4>
<span>{{ i18n "commentSubmissionSuccessMessage" }}</span>
<a href='#comments' class='button'>{{ i18n "ok" }}</a>
</div>
<div id='submission-failure' class='comment-submission-feedback'>
<h4>{{ i18n "commentSubmissionErrorTitle" }}</h4>
<span>{{ i18n "commentSubmissionErrorMessage" }}</span>
<a href='#comments' class='button'>{{ i18n "ok" }}</a>
</div>

View File

@@ -0,0 +1,19 @@
{{- $scriptSrc := "https://utteranc.es/client.js" -}}
{{- $issueTerm := .Page.Site.Params.comments.utterances.issueTerm -}}
{{- $label := .Page.Site.Params.comments.utterances.label -}}
{{- $theme := .Page.Site.Params.comments.utterances.theme -}}
{{- $username := .Page.Site.Params.comments.utterances.github.username -}}
{{- $repository := .Page.Site.Params.comments.utterances.github.repository -}}
<script src='{{ $scriptSrc }}'
repo='{{ print $username "/" $repository }}'
issue-term='{{ $issueTerm }}'
{{ if $label -}}
label='{{ $label }}'
{{- end }}
{{ if $theme -}}
theme='{{ $theme }}'
{{- end }}
crossorigin='anonymous' async>
</script>

View File

@@ -0,0 +1,15 @@
{{- $.Scratch.Set "authorID" "" -}}
{{- if eq .Kind "term" -}}
{{- $.Scratch.Set "authorID" .Data.Term -}}
{{- else if eq .Kind "taxonomy" -}}
{{- $.Scratch.Set "authorID" .Name -}}
{{- else if eq .Kind "page" -}}
{{- $.Scratch.Set "authorID" ( index .Params.authors 0 ) -}}
{{- end -}}
{{- $lang := ( .Params.lang | default .Lang ) -}}
{{- $author := ( index $.Site.Data.authors ( $.Scratch.Get "authorID" ) ) -}}
{{- $i18nAuthor := ( index $author $lang ) -}}
{{- $name := ( or $i18nAuthor.name $author.name ) -}}
{{- $name.display -}}

View File

@@ -0,0 +1,11 @@
{{- with .Description -}}
{{- . -}}
{{- else -}}
{{- if .IsPage -}}
{{- .Summary -}}
{{- else -}}
{{- with .Site.Params.info.description -}}
{{- . -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,27 @@
{{- $title := ( .Title ) -}}
{{- $siteTitle := ( .Site.Title ) -}}
{{- $sep := ( .Site.Params.seo.titleSeparator | default "•" ) -}}
{{- $title404 := ( .Site.Params.info.title404 | default $title ) -}}
{{- if .IsHome -}}
{{ $siteTitle }}
{{- else if eq .Kind "404" -}}
{{ $title404 }} {{ $sep }} {{ $siteTitle }}
{{- else if eq .Kind "term" -}}
{{- ( ( i18n .Data.Singular 1 ) | default .Data.Singular ) -}}
{{- print ": " -}}
{{- if eq .Data.Singular "author" -}}
{{- partial "data/author/displayName" . -}}
{{- else -}}
{{- $title -}}
{{- end -}}
{{- print " " $sep " " $siteTitle -}}
{{- else if ( or .IsNode ( eq .Section "page" ) ) -}}
{{ $title }} {{ $sep }} {{ $siteTitle }}
{{- else -}}
{{- if .Params.authors -}}
{{ $title }} {{ $sep }} {{ partial "data/author/displayName" . }}
{{- else -}}
{{ $title }} {{ $sep }} {{ $siteTitle }}
{{- end -}}
{{- end -}}

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 }}

View File

@@ -0,0 +1,42 @@
{{- $Scope := .Scope -}}
{{- $Site := $Scope.Site -}}
{{- $Scratch := $Scope.Scratch -}}
{{- $Shuffle := ( .Shuffle | default true ) -}}
{{- $TaxonomyPage := ( $Site.GetPage ( print "/" .Taxonomy ) ) -}}
{{- $Data := $TaxonomyPage.Data -}}
<div class='container list-container'>
<ul class='list taxonomy-cloud {{- if not $Shuffle }} no-shuffle {{- end -}}'>
{{- if gt ( len $Data.Terms ) 0 -}}
{{- $maxSize := 2.0 -}}
{{- $minSize := 1.0 -}}
{{- $sizeSpread := ( sub $maxSize $minSize ) -}}
{{- $maxCount := ( index $Data.Terms.ByCount 0 ).Count -}}
{{- $minCount := ( index $Data.Terms.ByCount.Reverse 0 ).Count -}}
{{- $countSpread := ( sub $maxCount $minCount ) -}}
{{- $Scratch.Set "sizeStep" 0 -}}
{{- if gt $countSpread 0 -}}
{{- $Scratch.Set "sizeStep" ( div $sizeSpread $countSpread ) -}}
{{- end -}}
{{- range $Data.Terms.Alphabetical -}}
{{- $count := .Count -}}
{{- $sizeStep := ( $Scratch.Get "sizeStep" ) -}}
{{- $size := ( add $minSize ( mul $sizeStep ( sub $count $minCount ) ) ) -}}
<li>
<a href='{{ .Page.RelPermalink }}' style='font-size:{{ $size }}em'>
{{- .Page.Title -}}
</a>
</li>
{{- end -}}
{{- else -}}
<span>
{{- $term := ( ( ( i18n $Data.Singular 1 ) | default $Data.Singular ) ) -}}
{{- i18n "noTerm" ( dict "Term" $term ) -}}
</span>
{{- end -}}
</ul>
</div>

View File

@@ -0,0 +1,9 @@
{{- range .Widgets -}}
{{- if eq . "search" -}}
{{- if not ( eq $.Scope.Layout "search" ) -}}
{{- partial ( print "widgets/" . ) $.Scope -}}
{{- end -}}
{{- else -}}
{{- partial ( print "widgets/" . ) $.Scope -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,18 @@
</main>
<footer id='footer' class='footer'>
<div class='container sep-before'>
{{- $footerWidgets := .Site.Params.widgets.footer -}}
{{- partial "extras/widget_area" ( dict "Widgets" $footerWidgets "Scope" . ) -}}
{{ partial "footer/copyright" . }}
</div>
</footer>
</div>
</div>
{{- partial "footer/scripts" . -}}
</body>
</html>

View File

@@ -0,0 +1,18 @@
<div class='copyright'>
<p>
{{- with .Site.Copyright -}}
{{ . }}
{{- else -}}
{{- with .Site.Params.copyright -}}
{{- with .startyear -}}
{{- if lt ( int . ) now.Year -}}
{{- $.Scratch.Set "copyrightStartYear" . -}}
{{- end -}}
{{- end -}}
{{ .prefix | markdownify }} &copy; {{ with ( $.Scratch.Get "copyrightStartYear" ) }}{{ . }}-{{ end }}{{ now.Year }} {{ or .holder $.Site.Title | markdownify }} {{ .suffix | markdownify }}
{{- end -}}
{{- end -}}
</p>
</div>

View File

@@ -0,0 +1,5 @@
{{/*
If you need to add content to your page footer, override this template in your
blog by creating a file named `/layout/partials/footer/extra.html`. This way
you don't have to edit the theme itself.
*/}}

View File

@@ -0,0 +1,16 @@
{{- $defaultKatex := .Site.Data.config.default.katex -}}
{{- $katex := ( or .Site.Data.config.katex $defaultKatex ) -}}
{{- if or ( eq .Params.katex true ) ( .HasShortcode "katex" ) -}}
<link rel='stylesheet' href='{{- $katex.library.css.main -}}'>
<script src='{{- $katex.library.js.main -}}'></script>
<script src='{{- $katex.library.js.autoRender -}}'></script>
<script type='text/javascript'>
renderMathInElement(document.querySelector('.entry-content'),
{{- $katex.options | jsonify | safeJS -}}
);
</script>
{{- end -}}

View File

@@ -0,0 +1,14 @@
{{- $defaultMathjax := .Site.Data.config.default.mathjax -}}
{{- $mathjax := ( or .Site.Data.config.mathjax $defaultMathjax ) -}}
{{- if eq .Params.mathjax true -}}
<script type='text/x-mathjax-config'>
MathJax.Hub.Config(
{{- $mathjax.config | jsonify -}}
)
</script>
<script type='text/javascript' async src='{{- $mathjax.library.path -}}{{- with $mathjax.library.config -}}?config={{- . -}}{{- end -}}'></script>
{{- end -}}

View File

@@ -0,0 +1,14 @@
{{- $defaultMermaid := .Site.Data.config.default.mermaid -}}
{{- $mermaid := ( or .Site.Data.config.mermaid $defaultMermaid ) -}}
{{- if eq .Params.mermaid true -}}
<script src='{{- $mermaid.library.path -}}' />
<script type='text/javascript'>
mermaid.initialize(
{{- $mermaid.config | jsonify | safeJS -}}
);
</script>
{{- end -}}

View File

@@ -0,0 +1,13 @@
<script>window.__assets_js_src={{- "assets/js/" | relURL -}}</script>
<script src='{{ print "/assets/js/" .Site.Data.assets.main.js | relURL }}'></script>
{{- range .Site.Params.assets.customJS -}}
<script src='{{ . | relURL }}'></script>
{{- end -}}
{{ partial "footer/mathjax" . }}
{{- partial "footer/katex" . -}}
{{- partial "footer/mermaid" . -}}
{{ partial "footer/extra" . }}

View File

@@ -0,0 +1 @@
{{- template "_internal/google_analytics_async.html" . -}}

View File

@@ -0,0 +1,3 @@
<style>
:root{--color-accent: {{- .Site.Params.settings.accentColor | default "#ffcd00" -}};}
</style>

View File

@@ -0,0 +1,5 @@
{{/*
If you need to add content to your page header, override this template in your
blog by creating a file named `/layout/partials/head/extra.html`. This way you
don't have to edit the theme itself.
*/}}

View File

@@ -0,0 +1,11 @@
<head>
{{ partial "head/meta" . }}
<title>{{ partial "data/title" . }}</title>
<link rel='canonical' href='{{ .Permalink }}'>
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ partial "head/hreflang" . }}
{{ partial "head/includes" . }}
{{ partial "head/extra" . }}
</head>

View File

@@ -0,0 +1,20 @@
{{- define "hreflang_x" -}}
<link rel='alternate' hreflang='{{ .Lang }}' href='{{ .Permalink }}'>
{{- end -}}
{{- define "hreflang_x_default" -}}
{{- if eq .Lang ( index .Site.Languages 0 ).Lang -}}
<link rel='alternate' hreflang='x-default' href='{{ .Permalink }}'>
{{- end -}}
{{- end -}}
{{- if .IsTranslated -}}
{{- template "hreflang_x" . -}}
{{- template "hreflang_x_default" . -}}
{{- range .Translations -}}
{{- template "hreflang_x" . -}}
{{- template "hreflang_x_default" . -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,14 @@
<link rel='icon' href='{{ ( or .Site.Params.assets.favicon "favicon.ico" ) | relURL }}'>
<link rel='stylesheet' href='{{ print "/assets/css/" .Site.Data.assets.main.css | relURL }}'>
{{- if or ( .Site.Params.settings.rtl ) ( eq .Site.Language.LanguageDirection "rtl" ) -}}
<link rel='stylesheet' href='{{ print "/assets/css/" .Site.Data.assets.rtl.css | relURL }}'>
{{- end -}}
{{- range .Site.Params.assets.customCSS -}}
<link rel='stylesheet' href='{{ . | relURL }}'>
{{- end -}}
{{- partial "head/css" . -}}
{{- partial "head/analytics" . -}}

View File

@@ -0,0 +1,8 @@
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta name='description' content='{{ partial "data/description" . }}'>
<meta name='theme-color' content='{{- .Site.Params.settings.accentColor | default "#ffcd00" -}}'>
{{ partial "head/opengraph" . }}
{{ hugo.Generator }}

View File

@@ -0,0 +1,114 @@
<meta property='og:title' content='{{ partial "data/title" . }}'>
<meta property='og:description' content='{{ partial "data/description" . }}'>
<meta property='og:url' content='{{ .Permalink }}'>
<meta property='og:site_name' content='{{ .Site.Title }}'>
<meta property='og:type' content='
{{- if .IsPage -}}
article
{{- else -}}
website
{{- end -}}
'>
{{- with .Params.cover -}}
{{- $type := ( printf "%T" . ) -}}
{{- $isMap := ( not ( eq $type "string" ) ) -}}
{{- $image := "" -}}
{{- if $isMap -}}
{{- $image = .image -}}
{{- else -}}
{{- $image = . -}}
{{- end -}}
{{- $image = ( replaceRE "^\\./" $.RelPermalink $image ) -}}
<meta property='og:image' content='{{- $image | absURL -}}'>
{{- end -}}
{{- with .Params.images -}}
{{- range first 5 . -}}
<meta property='og:image' content='{{ ( replaceRE "^\\./" $.RelPermalink . ) | absURL }}'>
{{- end -}}
{{- end -}}
{{- if not ( or .Params.images .Params.cover ) -}}
{{- range $authorID := .Params.authors -}}
{{- $author := ( index $.Site.Data.authors $authorID ) -}}
{{- with $author -}}
{{- if or .social.email ( and .email.username .email.host ) -}}
<meta property='og:image' content='https://www.gravatar.com/avatar/
{{- with .social.email -}}
{{- . | md5 -}}
{{- else -}}
{{- with .email -}}
{{- ( print .username "@" .host ) | md5 -}}
{{- end -}}
{{- end -}}
?s=256'>
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- with .Params.audios -}}
{{- range first 5 . -}}
<meta property='og:audio' content='{{ ( replaceRE "^\\./" $.RelPermalink . ) | absURL }}'>
{{- end -}}
{{- end -}}
{{- with .Params.videos -}}
{{- range first 5 . -}}
<meta property='og:video' content='{{ ( replaceRE "^\\./" $.RelPermalink . ) | absURL }}'>
{{- end -}}
{{- end -}}
{{- if .IsPage -}}
{{- range $authorID := .Params.authors -}}
{{- $author := ( index $.Site.Data.authors $authorID ) -}}
{{- with $author.social.facebook -}}
<meta property='article:author' content='https://facebook.com/{{ . }}'>
{{- end -}}
{{- end -}}
{{- with .Site.Params.opengraph.facebook.pageid -}}
<meta property='article:publisher' content='{{ . }}'>
{{- end -}}
<meta property='article:section' content='{{- .Section -}}'>
{{- range .Params.tags -}}
<meta property='article:tag' content='{{ . }}'>
{{- end -}}
{{- end -}}
{{- $dateFormat := "2006-01-02T15:04:05Z07:00" -}}
{{- if .IsPage -}}
{{- if not .PublishDate.IsZero -}}
<meta property='article:published_time' content='{{ .PublishDate.Format $dateFormat }}'/>
{{- else if not .Date.IsZero -}}
<meta property='article:published_time' content='{{ .Date.Format $dateFormat }}'/>
{{- end -}}
{{- if not .Lastmod.IsZero -}}
<meta property='article:modified_time' content='{{ .Lastmod.Format $dateFormat }}'/>
{{- end -}}
{{- if not .ExpiryDate.IsZero -}}
<meta property='article:expiration_time' content='{{ .ExpiryDate.Format $dateFormat }}'/>
{{- end -}}
{{- else -}}
{{- if not .Site.LastChange.IsZero -}}
<meta property='og:updated_time' content='{{ .Site.LastChange.Format $dateFormat }}'/>
{{- end -}}
{{- end -}}
{{- with .Site.Params.opengraph.facebook -}}
{{- with .appid -}}
<meta property='fb:app_id' content='{{ . }}'>
{{- end -}}
{{- range .admins -}}
<meta property='fb:admins' content='{{ . }}'>
{{- end -}}
{{- end -}}
{{- partial "head/opengraph/twitter" . -}}

View File

@@ -0,0 +1,33 @@
<meta name='twitter:card' content='summary{{- if .Params.cover -}}_large_image{{- end -}}'>
{{- with .Site.Params.opengraph.twitter.page -}}
<meta name='twitter:site' content='@{{- . -}}'>
{{- end -}}
{{- range $authorID := .Params.authors -}}
{{- $author := ( index $.Site.Data.authors $authorID ) -}}
{{- with $author.social.twitter -}}
<meta name='twitter:creator' content='@{{- . -}}'>
{{- end -}}
{{- end -}}
{{- with .Params.cover -}}
{{- $type := ( printf "%T" . ) -}}
{{- $isMap := ( not ( eq $type "string" ) ) -}}
{{- $image := "" -}}
{{- if $isMap -}}
{{- $image = .image -}}
{{- else -}}
{{- $image = . -}}
{{- end -}}
{{- $image = ( replaceRE "^\\./" $.RelPermalink $image ) -}}
<meta property='twitter:image' content='{{- $image | absURL -}}'>
{{- if $isMap -}}
{{- with .caption -}}
<meta property='twitter:image:alt' content='{{ . | markdownify }}'>
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang='{{ .Site.Language.Lang }}' dir='{{ .Site.Language.LanguageDirection | default "auto" }}'>
{{- partial "head/head" . -}}
<body class='{{ partial "header/bodyClasses" . }}'>
<div class='site'>
{{- partial "sidebar/sidebar" . -}}
<div class='main'>
{{- partial "nav/menus/main" . -}}
{{- $headerWidgets := .Site.Params.widgets.header -}}
<div class='header-widgets'>
<div class='container'>
{{- partial "extras/widget_area" ( dict "Widgets" $headerWidgets "Scope" . ) -}}
</div>
</div>
<header id='header' class='header site-header'>
<div class='container sep-after'>
<div class='header-info'>
{{- if eq .Kind "home" -}}
<h1 class='site-title title'>{{ .Site.Title }}</h1>
{{- else -}}
<p class='site-title title'>{{ .Site.Title }}</p>
{{- end -}}
<p class='desc site-desc'>{{ .Site.Params.info.description }}</p>
</div>
</div>
</header>
<main id='content'>

View File

@@ -0,0 +1,10 @@
{{- $sidebarEnabled := .Site.Params.sidebar.enable -}}
{{- $sidebarWidgets := .Site.Params.widgets.sidebar -}}
{{- if eq .Kind "404" -}} error{{- end -}}{{- .Kind -}}
{{- with .Type }} type-{{ . }}{{ end -}}
{{- with .Layout }} layout-{{ . }}{{ end -}}
{{- with .Data.Singular }} taxonomy-{{ . }}{{ end -}}
{{- if .Params.cover }} has-cover{{ end -}}
{{- if ( and $sidebarEnabled $sidebarWidgets ) }} has-sidebar{{ end -}}
{{- if eq .Params.emoji true }} has-emoji{{ end -}}

View File

@@ -0,0 +1,5 @@
{{ with .Description }}
<p class='desc'>
{{- . -}}
</p>
{{ end }}

View File

@@ -0,0 +1,24 @@
<header class='header'>
<div class='container sep-after'>
<div class='header-info'>
<h1 class='title'>
{{- if eq .Kind "term" -}}
<span class='taxonomy-name'>
{{- ( ( i18n .Data.Singular 1 ) | default .Data.Singular ) -}}
{{- print ": " -}}
</span>
{{- end -}}
{{- if eq .Kind "taxonomy" -}}
{{- ( ( i18n .Data.Singular 2 ) | default .Title ) -}}
{{- else if eq .Data.Singular "author" -}}
{{- partial "data/author/displayName" . -}}
{{- else -}}
{{- .Title -}}
{{- end -}}
</h1>
{{ partial "header/description" . }}
</div>
</div>
</header>

View File

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

View File

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

View File

@@ -0,0 +1,46 @@
{{- $config := ( .Site.Params.settings.hideEntryNavigation ) -}}
{{- $configType := ( printf "%T" $config ) -}}
{{- if ( eq $configType "bool" ) -}}
{{- $.Scratch.Set "showEntryNav" ( not $config ) -}}
{{- else -}}
{{- $.Scratch.Set "showEntryNav" ( not ( in $config .Section ) ) -}}
{{- end -}}
{{- if ( $.Scratch.Get "showEntryNav" ) -}}
{{ if gt ( len ( where .Site.RegularPages "Section" .Section ) ) 1 }}
<nav class='entry-nav'>
<div class='container'>
{{- if .PrevInSection -}}
<div class='prev-entry sep-before'>
<a href='{{ .PrevInSection.Permalink | relURL }}'>
<span aria-hidden='true'>
{{- partial "svg/icon" "prev" -}}
{{- print " " ( i18n "previous" ) -}}
</span>
<span class='screen-reader-text'>{{ i18n "previousPost" }}: </span>
{{- .PrevInSection.Title -}}
</a>
</div>
{{- end -}}
{{- if .NextInSection -}}
<div class='next-entry sep-before'>
<a href='{{ .NextInSection.Permalink | relURL }}'>
<span class='screen-reader-text'>{{ i18n "nextPost" }}: </span>
{{- .NextInSection.Title -}}
<span aria-hidden='true'>
{{- print ( i18n "next" ) " " -}}
{{- partial "svg/icon" "next" -}}
</span>
</a>
</div>
{{- end -}}
</div>
</nav>
{{ end }}
{{- end -}}

View File

@@ -0,0 +1,25 @@
{{- if not .Site.Params.settings.hideMainMenu -}}
<nav id='main-menu' class='menu main-menu' aria-label='{{ i18n "mainMenu" }}'>
<div class='container'>
{{ partial "sidebar/toggler" . }}
<ul>
{{- range .Site.Menus.main -}}
{{- $isCurrent := ( or ( $.IsMenuCurrent "main" . ) ( $.HasMenuCurrent "main" . ) ) -}}
<li class='item {{- if $isCurrent }} current {{- end -}}'>
<a {{ if $isCurrent -}} aria-current='page' {{ end -}} href='{{ .URL }}'>
{{- with .Pre -}}{{- . -}}{{- end -}}
{{- .Name -}}
{{- with .Post -}}{{- . -}}{{- end -}}
</a>
</li>
{{- end -}}
</ul>
</div>
</nav>
{{- else -}}
{{ partial "sidebar/toggler" . }}
{{- end -}}

View File

@@ -0,0 +1,46 @@
{{ if gt .Paginator.TotalPages 1 }}
<nav id='pagination'>
<div class='page-links'>
{{ with .Paginator.Prev }}
<a class='page-link prev' href='{{ .URL }}'>
{{- partial "svg/icon" "prev" -}}
<span class='screen-reader-text'>{{ i18n "previousPage" }}</span>
</a>
{{ end }}
{{- $.Scratch.Set "hasPrevDots" false -}}
{{- $.Scratch.Set "hasNextDots" false -}}
{{ range .Paginator.Pagers }}
{{ if ( eq . $.Paginator ) }}
<span aria-current='page' class='page-link current'>
<span class='screen-reader-text'>{{ i18n "currentPage" }}: </span>
{{- .PageNumber -}}
</span>
{{ else if or ( or ( eq . $.Paginator.First ) ( eq . $.Paginator.Prev ) ) ( or ( eq . $.Paginator.Next ) ( eq . $.Paginator.Last ) ) }}
<a class='page-link' href='{{ .URL }}'>
<span class='screen-reader-text'>{{ i18n "page" }}: </span>
{{- .PageNumber -}}
</a>
{{ else }}
{{ if and ( not ( $.Scratch.Get "hasPrevDots" ) ) ( lt .PageNumber $.Paginator.PageNumber ) }}
{{- $.Scratch.Set "hasPrevDots" true -}}
<span class='page-link dots'>&hellip;</span>
{{ else if and ( not ( $.Scratch.Get "hasNextDots" ) ) ( gt .PageNumber $.Paginator.PageNumber ) }}
{{- $.Scratch.Set "hasNextDots" true -}}
<span class='page-link dots'>&hellip;</span>
{{ end }}
{{ end }}
{{ end }}
{{ with .Paginator.Next }}
<a class='page-link next' href='{{ .URL }}'>
<span class='screen-reader-text'>{{ i18n "nextPage" }}</span>
{{- partial "svg/icon" "next" -}}
</a>
{{ end }}
</div>
</nav>
{{ end }}

View File

@@ -0,0 +1,20 @@
{{- $sidebarEnabled := .Site.Params.sidebar.enable -}}
{{- $sidebarWidgets := .Site.Params.widgets.sidebar -}}
{{- if ( and $sidebarEnabled $sidebarWidgets ) -}}
<div id='sidebar' class='sidebar'>
<a class='screen-reader-text' href='#main-menu'>{{ i18n "skipToMainMenu" }}</a>
<div class='container'>
{{- partial "extras/widget_area" ( dict "Widgets" $sidebarWidgets "Scope" . ) -}}
</div>
<div class='sidebar-overlay'></div>
</div>
{{- else -}}
<a class='screen-reader-text' href='#content'>{{ i18n "skipToContent" }}</a>
{{- end -}}

View File

@@ -0,0 +1,18 @@
{{- $sidebarEnabled := .Site.Params.sidebar.enable -}}
{{- $sidebarWidgets := .Site.Params.widgets.sidebar -}}
{{- if ( and $sidebarEnabled $sidebarWidgets ) -}}
<a class='screen-reader-text' href='#content'>{{ i18n "skipToContent" }}</a>
<button id='sidebar-toggler' class='sidebar-toggler' aria-controls='sidebar'>
<span class='screen-reader-text'>{{ i18n "toggleSidebar" }}</span>
<span class='open'>
{{- partial "svg/icon" "menu" -}}
</span>
<span class='close'>
{{- partial "svg/icon" "x" -}}
</span>
</button>
{{- end -}}

View File

@@ -0,0 +1,2 @@
<path d="M21,21V20c0-2.76-4-5-9-5s-9,2.24-9,5v1" />
<path d="M16,6.37A4,4,0,1,1,12.63,3,4,4,0,0,1,16,6.37Z" />

View File

@@ -0,0 +1,4 @@
<rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
<line x1="16" y1="2" x2="16" y2="6" />
<line x1="8" y1="2" x2="8" y2="6" />
<line x1="3" y1="10" x2="21" y2="10" />

View File

@@ -0,0 +1 @@
<path d="M22,19a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V5A2,2,0,0,1,4,3H9l2,3h9a2,2,0,0,1,2,2Z" />

View File

@@ -0,0 +1,2 @@
<circle cx="12" cy="12" r="10" />
<polyline points="12 6 12 12 15 15" />

View File

@@ -0,0 +1,5 @@
<polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2" />
<line x1="12" y1="22" x2="12" y2="15.5" />
<polyline points="22 8.5 12 15.5 2 8.5" />
<polyline points="2 15.5 12 8.5 22 15.5" />
<line x1="12" y1="2" x2="12" y2="8.5" />

View File

@@ -0,0 +1,2 @@
<path d="M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34" />
<polygon points="18 2 22 6 12 16 8 16 8 12 18 2" />

View File

@@ -0,0 +1,2 @@
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" />
<polyline points="22,6 12,13 2,6" />

View File

@@ -0,0 +1 @@
<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z" />

View File

@@ -0,0 +1 @@
<path d="M23.546 10.93L13.067.452c-.604-.603-1.582-.603-2.188 0L8.708 2.627l2.76 2.76c.645-.215 1.379-.07 1.889.441.516.515.658 1.258.438 1.9l2.658 2.66c.645-.223 1.387-.078 1.9.435.721.72.721 1.884 0 2.604-.719.719-1.881.719-2.6 0-.539-.541-.674-1.337-.404-1.996L12.86 8.955v6.525c.176.086.342.203.488.348.713.721.713 1.883 0 2.6-.719.721-1.889.721-2.609 0-.719-.719-.719-1.879 0-2.598.182-.18.387-.316.605-.406V8.835c-.217-.091-.424-.222-.6-.401-.545-.545-.676-1.342-.396-2.009L7.636 3.7.45 10.881c-.6.605-.6 1.584 0 2.189l10.48 10.477c.604.604 1.582.604 2.186 0l10.43-10.43c.605-.603.605-1.582 0-2.187" />

View File

@@ -0,0 +1 @@
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" />

View File

@@ -0,0 +1 @@
<path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z" />

View File

@@ -0,0 +1 @@
<path d="M12 24a7 7 0 1 1 0-14 7 7 0 0 1 0 14zm0-24L0 9.5l4.838 3.94A8 8 0 0 1 12 9a8 8 0 0 1 7.162 4.44L24 9.5z" />

View File

@@ -0,0 +1,3 @@
<rect x="2" y="2" width="20" height="20" rx="5" ry="5" />
<path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" />
<line x1="17.5" y1="6.5" x2="17.51" y2="6.5" />

View File

@@ -0,0 +1,3 @@
<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" />
<rect x="2" y="9" width="4" height="12" />
<circle cx="4" cy="4" r="2" />

View File

@@ -0,0 +1,3 @@
<line x1="3" y1="12" x2="21" y2="12" />
<line x1="3" y1="6" x2="21" y2="6" />
<line x1="3" y1="18" x2="21" y2="18" />

View File

@@ -0,0 +1,2 @@
<line x1="4" y1="12" x2="20" y2="12" />
<polyline points="14 6 20 12 14 18" />

View File

@@ -0,0 +1,2 @@
<line x1="20" y1="12" x2="4" y2="12" />
<polyline points="10 18 4 12 10 6" />

View File

@@ -0,0 +1,3 @@
<path d="M4 11a9 9 0 0 1 9 9" />
<path d="M4 4a16 16 0 0 1 16 16" />
<circle cx="5" cy="19" r="1" />

View File

@@ -0,0 +1,2 @@
<circle cx="11" cy="11" r="8" />
<line x1="21" y1="21" x2="16.65" y2="16.65" />

View File

@@ -0,0 +1,6 @@
<line x1="8" y1="6" x2="21" y2="6" />
<line x1="8" y1="12" x2="21" y2="12" />
<line x1="8" y1="18" x2="21" y2="18" />
<line x1="3" y1="6" x2="3" y2="6" />
<line x1="3" y1="12" x2="3" y2="12" />
<line x1="3" y1="18" x2="3" y2="18" />

View File

@@ -0,0 +1,2 @@
<path d="M20.59,13.41l-7.17,7.17a2,2,0,0,1-2.83,0L2,12V2H12l8.59,8.59A2,2,0,0,1,20.59,13.41Z" />
<line x1="7" y1="7" x2="7" y2="7" />

View File

@@ -0,0 +1 @@
<path d="M23.91 3.79L20.3 20.84c-.25 1.21-.98 1.5-2 .94l-5.5-4.07-2.66 2.57c-.3.3-.55.56-1.1.56-.72 0-.6-.27-.84-.95L6.3 13.7l-5.45-1.7c-1.18-.35-1.19-1.16.26-1.75l21.26-8.2c.97-.43 1.9.24 1.53 1.73z" />

View File

@@ -0,0 +1 @@
<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z" />

View File

@@ -0,0 +1,2 @@
<line x1="18" y1="6" x2="6" y2="18" />
<line x1="6" y1="6" x2="18" y2="18" />

View File

@@ -0,0 +1,2 @@
<path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z" />
<polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02" />

View File

@@ -0,0 +1,12 @@
<svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
>
{{- $icon := print "svg/content/" . ".svg" -}}
{{- partialCached $icon . -}}
</svg>

After

Width:  |  Height:  |  Size: 260 B

View File

@@ -0,0 +1,33 @@
{{- $defaultConfig := .Site.Data.config.default.widgets.about -}}
{{- $configData := ( or .Site.Data.config.widgets.about $defaultConfig ) -}}
{{- $lang := .Site.Language.Lang -}}
{{- $config := ( ( index $configData $lang ) | default $configData ) -}}
<section class='widget widget-about sep-after'>
<header>
{{ with $config.logo }}
<div class='logo'>
<a href='{{ $.Site.Home.RelPermalink }}'>
<img src='{{ . | relURL }}'>
</a>
</div>
{{ end }}
<h2 class='title site-title '>
<a href='{{ $.Site.Home.RelPermalink }}'>
{{ with $config.title }}
{{- . -}}
{{ else }}
{{- .Site.Title -}}
{{ end }}
</a>
</h2>
<div class='desc'>
{{ with $config.description }}
{{- . | markdownify -}}
{{ else }}
{{- .Site.Params.info.description -}}
{{ end }}
</div>
</header>
</section>

View File

@@ -0,0 +1,58 @@
{{- $defaultConfig := .Site.Data.config.default.widgets.breadcrumbs -}}
{{- $configData := ( or .Site.Data.config.widgets.breadcrumbs $defaultConfig ) -}}
{{- $lang := .Site.Language.Lang -}}
{{- $config := ( ( index $configData $lang ) | default $configData ) -}}
{{- define "breadcrumbs_add_parents" -}}
{{- .Scratch.Set "parent" .Page.Parent -}}
{{- if eq .Page.Kind "term" -}}
{{- .Scratch.Set "parent" ( .Page.Site.GetPage ( print "/" .Page.Data.Plural ) ) -}}
{{- end -}}
{{- $parent := ( .Scratch.Get "parent" ) -}}
{{- if $parent -}}
{{- if and ( ne $parent.Kind "home" ) ( not ( in .Config.excludeParents $parent.Type ) ) -}}
{{- .Scratch.Add "crumbs" $parent -}}
{{- end }}
{{ template "breadcrumbs_add_parents" ( dict "Config" .Config "Page" $parent "Scratch" .Scratch ) }}
{{- end -}}
{{- end -}}
{{- define "breadcrumbs" -}}
{{- $crumbs := ( .Scratch.Get "crumbs" ) -}}
{{- $length := len $crumbs -}}
{{- $separator := .Config.separator -}}
<style>.widget-breadcrumbs li:after{content:'{{- $separator | default "/" -}}'}</style>
<section class='widget widget-breadcrumbs sep-after'>
<nav id='breadcrumbs'>
<ol>
{{- range $i, $_ := $crumbs -}}
{{- $crumb := ( index $crumbs ( sub $length ( add $i 1 ) ) ) -}}
<li>
{{- if lt ( add $i 1 ) $length -}}
<a href='{{- $crumb.RelPermalink -}}'>
{{- $crumb.LinkTitle -}}
</a>
{{- else -}}
<span>
{{- $crumb.LinkTitle -}}
</span>
{{- end -}}
</li>
{{- end -}}
</ol>
</nav>
</section>
{{- end -}}
{{- $scratch := newScratch -}}
{{- $scratch.Set "crumbs" ( slice . ) -}}
{{- template "breadcrumbs_add_parents" ( dict "Config" $config "Page" . "Scratch" $scratch ) -}}
{{- if ne .Kind "home" -}}
{{- $scratch.Add "crumbs" .Site.Home -}}
{{- end -}}
{{- template "breadcrumbs" ( dict "Config" $config "Scratch" $scratch ) -}}

View File

@@ -0,0 +1,20 @@
{{- $defaultConfig := .Site.Data.config.default.widgets.recent_posts -}}
{{- $configData := ( or .Site.Data.config.widgets.recent_posts $defaultConfig ) -}}
{{- $lang := .Site.Language.Lang -}}
{{- $config := ( ( index $configData $lang ) | default $configData ) -}}
{{- $length := ( $config.length | default 5 ) -}}
<section class='widget widget-recent_posts sep-after'>
<header>
<h4 class='title widget-title'>
{{- $config.title | default ( i18n "recentPosts" ) -}}
</h4>
</header>
<ul class='list'>
{{ range ( first $length ( where .Site.RegularPages "Type" "not in" $config.excludeTypes ) ) }}
{{ .Render "li" }}
{{ end }}
</ul>
</section>

View File

@@ -0,0 +1,27 @@
{{- $defaultConfig := .Site.Data.config.default.widgets.search -}}
{{- $configData := ( or .Site.Data.config.widgets.search $defaultConfig ) -}}
{{- $lang := .Site.Language.Lang -}}
{{- $config := ( ( index $configData $lang ) | default $configData ) -}}
<section class='widget widget-search sep-after'>
<header>
<h4 class='title widget-title'>
{{- $config.title | default ( i18n "search" ) -}}
</h4>
</header>
<form action='{{ "search" | relLangURL }}' id='search-form' class='search-form'>
<label>
<span class='screen-reader-text'>{{ i18n "search" }}</span>
<input id='search-term' class='search-term' type='search' name='q' placeholder='{{ i18n "search" }}&hellip;'>
</label>
{{- if eq .Layout "search" -}}
<button type='submit' class='search-submit'>
<span class='screen-reader-text'>{{ i18n "search" }}</span>
{{- partial "svg/icon" "search" -}}
</button>
{{- end -}}
</form>
</section>

View File

@@ -0,0 +1,72 @@
{{- $defaultConfig := .Site.Data.config.default.widgets.sidebar_menu -}}
{{- $configData := ( or .Site.Data.config.widgets.sidebar_menu $defaultConfig ) -}}
{{- $lang := .Site.Language.Lang -}}
{{- $config := ( ( index $configData $lang ) | default $configData ) -}}
{{- $menu := ( $config.mirror | default "sidebar" ) -}}
{{- $.Scratch.Set "menu" $menu -}}
{{- $items := ( index .Site.Menus $menu ) -}}
{{- if $items -}}
<section class='widget widget-sidebar_menu sep-after'>
{{- with $config.title -}}
<header>
<h4 class='title widget-title'>
{{- . -}}
</h4>
</header>
{{- end -}}
<nav id='sidebar-menu' class='menu sidebar-menu' aria-label='{{ i18n "sidebarMenu" }}'>
<div class='container'>
<ul>
{{- range $items -}}
{{- template "menu_item" ( dict "Item" . "Page" $ ) -}}
{{- end -}}
</ul>
</div>
</nav>
</section>
{{- end -}}
{{- define "menu_item" -}}
{{- $menu := ( .Page.Scratch.Get "menu" ) -}}
{{- $isCurrent := ( .Page.IsMenuCurrent $menu .Item ) -}}
{{- $hasCurrent := ( .Page.HasMenuCurrent $menu .Item ) -}}
{{- $hasChildren := ( .Item.HasChildren ) -}}
<li class='item
{{- if $hasChildren }} has-children {{- end -}}
{{- if $hasCurrent }} has-current {{- end -}}
{{- if $isCurrent }} current {{- end -}}
'>
<a {{ if $isCurrent -}} aria-current='page' {{ end -}} href='{{ .Item.URL }}'>
{{- with .Item.Pre -}}{{- . -}}{{- end -}}
{{- .Item.Name -}}
{{- with .Item.Post -}}{{- . -}}{{- end -}}
</a>
{{- if $hasChildren -}}
<button class='sub-menu-toggler'>
<span class='screen-reader-text'>expand sub menu</span>
<span class='sign'></span>
</button>
<ul class='sub-menu'>
{{- range .Item.Children -}}
{{- template "menu_item" ( dict "Item" . "Page" $.Page ) -}}
{{- end -}}
</ul>
{{- end -}}
</li>
{{- end -}}

View File

@@ -0,0 +1,41 @@
{{- $social := .Site.Params.social -}}
{{- if $social -}}
{{- $defaultConfig := .Site.Data.config.default.widgets.social_menu -}}
{{- $configData := ( or .Site.Data.config.widgets.social_menu $defaultConfig ) -}}
{{- $lang := .Site.Language.Lang -}}
{{- $config := ( ( index $configData $lang ) | default $configData ) -}}
<section class='widget widget-social_menu sep-after'>
{{- with $config.title -}}
<header>
<h4 class='title widget-title'>
{{- . -}}
</h4>
</header>
{{- end -}}
<nav aria-label='{{ i18n "socialMenu" }}'>
<ul>
{{- range $platform := $config.platforms -}}
{{- with $username := ( index $social $platform ) -}}
<li>
<a href='{{ print ( index $.Site.Data.theme.social.base $platform ) $username }}' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>
{{- if eq $platform "email" -}}
{{- i18n "contactViaEmail" -}}
{{- else -}}
{{- i18n "openAccountInNewTab" ( dict "Platform" ( $platform | title ) ) -}}
{{- end -}}
</span>
{{- partial "svg/icon" $platform -}}
</a>
</li>
{{- end -}}
{{- end -}}
</ul>
</nav>
</section>
{{- end -}}

View File

@@ -0,0 +1,20 @@
{{- $defaultConfig := .Site.Data.config.default.widgets.taxonomy_cloud -}}
{{- $configData := ( or .Site.Data.config.widgets.taxonomy_cloud $defaultConfig ) -}}
{{- $lang := .Site.Language.Lang -}}
{{- $config := ( ( index $configData $lang ) | default $configData ) -}}
{{- $shuffle := ( $config.shuffle | default true ) -}}
{{- $taxonomy := ( $config.taxonomy | default "tags" ) -}}
{{- $taxonomyData := ( .Site.GetPage $taxonomy ).Data -}}
{{- $taxonomySingular := $taxonomyData.Singular -}}
<section class='widget widget-taxonomy_cloud sep-after'>
<header>
<h4 class='title widget-title'>
{{- ( $config.title | default ( i18n $taxonomySingular 2 ) ) -}}
</h4>
</header>
{{ partial "extras/taxonomy_cloud" ( dict "Taxonomy" $taxonomy "Shuffle" $shuffle "Scope" . ) }}
</section>