Christoph Cullmann 2021-08-29 11:48:16 +02:00
parent f237551193
commit 0321812a29
57 changed files with 25676 additions and 4089 deletions

View file

@ -124,6 +124,47 @@
Please enable JavaScript to view the comments powered by <a href="https://utteranc.es/">Utterances</a>.
</noscript>
{{- end -}}
{{- /* Waline Comment System */ -}}
{{- $waline := $comment.waline | default dict -}}
{{- if $waline.enable -}}
<div id="waline"></div>
{{- $source := $cdn.walineJS | default "/lib/waline/Waline.min.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
<script src='{{ $source }}'></script>
<script>
Waline({
el: '#waline',
serverURL: '{{ $waline.serverURL }}',
visitor: '{{ $waline.visitor }}',
dark: '{{ $waline.dark }}',
});
</script>
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://waline.js.org/">Waline</a>.
</noscript>
{{- end -}}
{{- /* Twikoo Comment System */ -}}
{{- $twikoo := $comment.twikoo | default dict -}}
{{- if $twikoo.enable -}}
<div id="twikoo"></div>
{{- $source := $cdn.twikooJS | default "/lib/twikoo/twikoo.all.min.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
<script src='{{ $source }}'></script>
<script>
twikoo.init({
envId: '{{ $twikoo.evnId }}',
el: '#twikoo',
// region: 'ap-guangzhou',
// path: 'window.location.pathname',
})
</script>
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://twikoo.js.org/">Twikoo</a>.
</noscript>
{{- end -}}
</div>
{{- end -}}

View file

@ -1,19 +1,23 @@
{{- $content := .Content -}}
{{- if .Ruby -}}
{{- $content = partial "function/ruby.html" $content -}}
{{- if $content -}}
{{- if .Ruby -}}
{{- $content = partial "function/ruby.html" $content -}}
{{- end -}}
{{- if .Fraction -}}
{{- $content = partial "function/fraction.html" $content -}}
{{- end -}}
{{- if .Fontawesome -}}
{{- $content = partial "function/fontawesome.html" $content -}}
{{- end -}}
{{- $content = partial "function/checkbox.html" $content -}}
{{- $content = partial "function/escape.html" $content -}}
{{- end -}}
{{- if .Fraction -}}
{{- $content = partial "function/fraction.html" $content -}}
{{- end -}}
{{- if .Fontawesome -}}
{{- $content = partial "function/fontawesome.html" $content -}}
{{- end -}}
{{- $content = partial "function/checkbox.html" $content -}}
{{- $content = partial "function/escape.html" $content -}}
{{- return $content -}}

View file

@ -7,16 +7,17 @@
{{- if $avatar -}}
<div class="home-avatar">
{{- $menus := $.Site.Menus.main | default slice -}}
{{- $avatarAlt := $profile.avatarAlt | default .Site.Author.name -}}
{{- with index $menus 0 -}}
{{- $url := .URL | relLangURL -}}
{{- with .Page -}}
{{- $url = .RelPermalink -}}
{{- end -}}
<a href="{{ $url }}"{{ with .Title | default .Name }} title="{{ . }}"{{ end }}{{ if (urls.Parse $url).Host }} rel="noopener noreferrer" target="_blank"{{ end }}>
{{- dict "Src" $avatar | partial "plugin/image.html" -}}
{{- dict "Src" $avatar "Alt" $avatarAlt | partial "plugin/image.html" -}}
</a>
{{- else -}}
{{- dict "Src" $avatar | partial "plugin/image.html" -}}
{{- dict "Src" $avatar "Alt" $avatarAlt | partial "plugin/image.html" -}}
{{- end -}}
</div>
{{- end -}}
@ -34,7 +35,7 @@
<div id="{{ $id }}" class="typeit"></div>
{{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
{{- else -}}
{{- . -}}
{{- . | safeHTML -}}
{{- end -}}
</h2>
{{- end -}}

View file

@ -196,4 +196,11 @@
{{- dict "Class" "fab fa-mix fa-fw" | partial "plugin/icon.html" -}}
</a>
{{- end -}}
{{- /* 029: Telegram */ -}}
{{- if $share.Telegram -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Telegram" data-sharer="telegram" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- dict "Class" "fab fa-telegram-plane fa-fw" | partial "plugin/icon.html" -}}
</a>
{{- end -}}
{{- end -}}

View file

@ -1,4 +1,4 @@
{{- $params := .Page.Params | merge .Site.Params.Page | merge (dict "author" .Site.Author.name) -}}
{{- $params := .Page.Params | merge .Site.Params.Page | merge (dict "author" .Site.Author.name "email" .Site.Author.email) -}}
<item>
<title>
{{- .Page.Title -}}
@ -9,9 +9,16 @@
<pubDate>
{{- .Page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
</pubDate>
<author>
{{- .params.author | default (T "author") -}}
</author>
{{- with $params.email -}}
<author>
{{- $params.email -}}
</author>
{{- end -}}
{{- with $params.author -}}
<dc:creator>
{{- $params.author -}}
</dc:creator>
{{- end -}}
<guid>
{{- .Page.Permalink -}}
</guid>