From 0321812a29e6ec32663556fa7abe2bf2880e5762 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Sun, 29 Aug 2021 11:48:16 +0200 Subject: update to https://github.com/sunt-programator/CodeIT/releases/tag/v0.2.0 --- themes/CodeIT/layouts/partials/comment.html | 41 ++++++++++++++++++++++ .../CodeIT/layouts/partials/function/content.html | 26 ++++++++------ themes/CodeIT/layouts/partials/home/profile.html | 7 ++-- themes/CodeIT/layouts/partials/plugin/share.html | 7 ++++ themes/CodeIT/layouts/partials/rss/item.html | 15 +++++--- 5 files changed, 78 insertions(+), 18 deletions(-) (limited to 'themes/CodeIT/layouts/partials') diff --git a/themes/CodeIT/layouts/partials/comment.html b/themes/CodeIT/layouts/partials/comment.html index 0382ae1..f977957 100644 --- a/themes/CodeIT/layouts/partials/comment.html +++ b/themes/CodeIT/layouts/partials/comment.html @@ -124,6 +124,47 @@ Please enable JavaScript to view the comments powered by Utterances. {{- end -}} + + {{- /* Waline Comment System */ -}} + {{- $waline := $comment.waline | default dict -}} + {{- if $waline.enable -}} +
+ {{- $source := $cdn.walineJS | default "/lib/waline/Waline.min.js" -}} + {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + + + + {{- end -}} + + {{- /* Twikoo Comment System */ -}} + {{- $twikoo := $comment.twikoo | default dict -}} + {{- if $twikoo.enable -}} +
+ {{- $source := $cdn.twikooJS | default "/lib/twikoo/twikoo.all.min.js" -}} + {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} + + + + {{- end -}} + {{- end -}} diff --git a/themes/CodeIT/layouts/partials/function/content.html b/themes/CodeIT/layouts/partials/function/content.html index f1d7ce8..250a5b7 100644 --- a/themes/CodeIT/layouts/partials/function/content.html +++ b/themes/CodeIT/layouts/partials/function/content.html @@ -1,19 +1,23 @@ {{- $content := .Content -}} -{{- if .Ruby -}} - {{- $content = partial "function/ruby.html" $content -}} -{{- end -}} +{{- if $content -}} -{{- if .Fraction -}} - {{- $content = partial "function/fraction.html" $content -}} -{{- end -}} + {{- if .Ruby -}} + {{- $content = partial "function/ruby.html" $content -}} + {{- end -}} -{{- if .Fontawesome -}} - {{- $content = partial "function/fontawesome.html" $content -}} -{{- end -}} + {{- if .Fraction -}} + {{- $content = partial "function/fraction.html" $content -}} + {{- end -}} -{{- $content = partial "function/checkbox.html" $content -}} + {{- if .Fontawesome -}} + {{- $content = partial "function/fontawesome.html" $content -}} + {{- end -}} -{{- $content = partial "function/escape.html" $content -}} + {{- $content = partial "function/checkbox.html" $content -}} + + {{- $content = partial "function/escape.html" $content -}} + +{{- end -}} {{- return $content -}} diff --git a/themes/CodeIT/layouts/partials/home/profile.html b/themes/CodeIT/layouts/partials/home/profile.html index 7a573ae..ba2462e 100644 --- a/themes/CodeIT/layouts/partials/home/profile.html +++ b/themes/CodeIT/layouts/partials/home/profile.html @@ -7,16 +7,17 @@ {{- if $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 -}} - {{- dict "Src" $avatar | partial "plugin/image.html" -}} + {{- dict "Src" $avatar "Alt" $avatarAlt | partial "plugin/image.html" -}} {{- else -}} - {{- dict "Src" $avatar | partial "plugin/image.html" -}} + {{- dict "Src" $avatar "Alt" $avatarAlt | partial "plugin/image.html" -}} {{- end -}}
{{- end -}} @@ -34,7 +35,7 @@
{{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}} {{- else -}} - {{- . -}} + {{- . | safeHTML -}} {{- end -}} {{- end -}} diff --git a/themes/CodeIT/layouts/partials/plugin/share.html b/themes/CodeIT/layouts/partials/plugin/share.html index 941647c..3273f9f 100644 --- a/themes/CodeIT/layouts/partials/plugin/share.html +++ b/themes/CodeIT/layouts/partials/plugin/share.html @@ -196,4 +196,11 @@ {{- dict "Class" "fab fa-mix fa-fw" | partial "plugin/icon.html" -}} {{- end -}} + + {{- /* 029: Telegram */ -}} + {{- if $share.Telegram -}} + + {{- dict "Class" "fab fa-telegram-plane fa-fw" | partial "plugin/icon.html" -}} + + {{- end -}} {{- end -}} diff --git a/themes/CodeIT/layouts/partials/rss/item.html b/themes/CodeIT/layouts/partials/rss/item.html index 28256b4..64da953 100644 --- a/themes/CodeIT/layouts/partials/rss/item.html +++ b/themes/CodeIT/layouts/partials/rss/item.html @@ -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) -}} {{- .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> -- cgit v1.2.3