From 51fb029ca27d67d7cd67352cdede45e5b25868f7 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Sun, 14 Aug 2022 19:01:21 +0200 Subject: switch back to LoveIt, other theme is deprectated --- themes/CodeIT/layouts/partials/assets.html | 207 --------------------- themes/CodeIT/layouts/partials/comment.html | 171 ----------------- themes/CodeIT/layouts/partials/footer.html | 51 ----- .../CodeIT/layouts/partials/function/checkbox.html | 9 - .../CodeIT/layouts/partials/function/content.html | 23 --- .../CodeIT/layouts/partials/function/escape.html | 5 - .../layouts/partials/function/fontawesome.html | 14 -- .../CodeIT/layouts/partials/function/fraction.html | 5 - themes/CodeIT/layouts/partials/function/id.html | 8 - themes/CodeIT/layouts/partials/function/path.html | 3 - .../CodeIT/layouts/partials/function/resource.html | 16 -- themes/CodeIT/layouts/partials/function/ruby.html | 5 - themes/CodeIT/layouts/partials/head/link.html | 51 ----- themes/CodeIT/layouts/partials/head/meta.html | 17 -- themes/CodeIT/layouts/partials/head/seo.html | 153 --------------- themes/CodeIT/layouts/partials/header.html | 181 ------------------ themes/CodeIT/layouts/partials/home/profile.html | 96 ---------- themes/CodeIT/layouts/partials/init.html | 41 ---- themes/CodeIT/layouts/partials/paginator.html | 30 --- .../CodeIT/layouts/partials/plugin/analytics.html | 27 --- .../layouts/partials/plugin/compatibility.html | 22 --- themes/CodeIT/layouts/partials/plugin/icon.html | 13 -- themes/CodeIT/layouts/partials/plugin/image.html | 38 ---- themes/CodeIT/layouts/partials/plugin/link.html | 9 - themes/CodeIT/layouts/partials/plugin/script.html | 25 --- themes/CodeIT/layouts/partials/plugin/share.html | 206 -------------------- themes/CodeIT/layouts/partials/plugin/social.html | 11 -- themes/CodeIT/layouts/partials/plugin/style.html | 31 --- themes/CodeIT/layouts/partials/rss/item.html | 43 ----- themes/CodeIT/layouts/partials/scratch/script.html | 4 - themes/CodeIT/layouts/partials/scratch/style.html | 4 - themes/CodeIT/layouts/partials/single/footer.html | 72 ------- 32 files changed, 1591 deletions(-) delete mode 100644 themes/CodeIT/layouts/partials/assets.html delete mode 100644 themes/CodeIT/layouts/partials/comment.html delete mode 100644 themes/CodeIT/layouts/partials/footer.html delete mode 100644 themes/CodeIT/layouts/partials/function/checkbox.html delete mode 100644 themes/CodeIT/layouts/partials/function/content.html delete mode 100644 themes/CodeIT/layouts/partials/function/escape.html delete mode 100644 themes/CodeIT/layouts/partials/function/fontawesome.html delete mode 100644 themes/CodeIT/layouts/partials/function/fraction.html delete mode 100644 themes/CodeIT/layouts/partials/function/id.html delete mode 100644 themes/CodeIT/layouts/partials/function/path.html delete mode 100644 themes/CodeIT/layouts/partials/function/resource.html delete mode 100644 themes/CodeIT/layouts/partials/function/ruby.html delete mode 100644 themes/CodeIT/layouts/partials/head/link.html delete mode 100644 themes/CodeIT/layouts/partials/head/meta.html delete mode 100644 themes/CodeIT/layouts/partials/head/seo.html delete mode 100644 themes/CodeIT/layouts/partials/header.html delete mode 100644 themes/CodeIT/layouts/partials/home/profile.html delete mode 100644 themes/CodeIT/layouts/partials/init.html delete mode 100644 themes/CodeIT/layouts/partials/paginator.html delete mode 100644 themes/CodeIT/layouts/partials/plugin/analytics.html delete mode 100644 themes/CodeIT/layouts/partials/plugin/compatibility.html delete mode 100644 themes/CodeIT/layouts/partials/plugin/icon.html delete mode 100644 themes/CodeIT/layouts/partials/plugin/image.html delete mode 100644 themes/CodeIT/layouts/partials/plugin/link.html delete mode 100644 themes/CodeIT/layouts/partials/plugin/script.html delete mode 100644 themes/CodeIT/layouts/partials/plugin/share.html delete mode 100644 themes/CodeIT/layouts/partials/plugin/social.html delete mode 100644 themes/CodeIT/layouts/partials/plugin/style.html delete mode 100644 themes/CodeIT/layouts/partials/rss/item.html delete mode 100644 themes/CodeIT/layouts/partials/scratch/script.html delete mode 100644 themes/CodeIT/layouts/partials/scratch/style.html delete mode 100644 themes/CodeIT/layouts/partials/single/footer.html (limited to 'themes/CodeIT/layouts/partials') diff --git a/themes/CodeIT/layouts/partials/assets.html b/themes/CodeIT/layouts/partials/assets.html deleted file mode 100644 index 2ae78b7..0000000 --- a/themes/CodeIT/layouts/partials/assets.html +++ /dev/null @@ -1,207 +0,0 @@ -{{- $params := .Scratch.Get "params" -}} -{{- $cdn := .Scratch.Get "cdn" | default dict -}} -{{- $fingerprint := .Scratch.Get "fingerprint" -}} -{{- $config := (.Scratch.Get "this").config -}} - -{{- /* Smooth Scroll */ -}} -{{- $source := $cdn.smoothScrollJS | default "lib/smooth-scroll/smooth-scroll.min.js" -}} -{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - -{{- /* Search */ -}} -{{- if .Site.Params.search | and .Site.Params.search.enable -}} - {{- $search := .Site.Params.search -}} - {{- $source := $cdn.autocompleteJS | default "lib/autocomplete/autocomplete.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $config = dict "maxResultLength" $search.maxResultLength "snippetLength" $search.snippetLength "highlightTag" $search.highlightTag "noResultsFound" (T "noResultsFound") | dict "search" | merge $config -}} - {{- if eq $search.type "lunr" -}} - {{- with .Site.Home.OutputFormats.Get "json" -}} - {{- $config = dict "type" "lunr" "lunrIndexURL" .RelPermalink | dict "search" | merge $config -}} - {{- end -}} - {{- $source := $cdn.lunrJS | default "lib/lunr/lunr.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- if T "lunrLanguageLib" -}} - {{- $config = T "lunrLanguageCode" | dict "lunrLanguageCode" | dict "search" | merge $config -}} - {{- with T "lunrSegmentitLib" -}} - {{- $config = dict "lunrSegmentitURL" (resources.Get .).RelPermalink | dict "search" | merge $config -}} - {{- end -}} - {{- dict "Source" "lib/lunr/lunr.stemmer.support.js" "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- dict "Source" (T "lunrLanguageLib") "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- end -}} - {{- else if eq $search.type "algolia" -}} - {{- $source := $cdn.algoliasearchJS | default "lib/algoliasearch/algoliasearch-lite.umd.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $config = dict "type" "algolia" "algoliaIndex" $search.algolia.index "algoliaAppID" $search.algolia.appID "algoliaSearchKey" $search.algolia.searchKey | dict "search" | merge $config -}} - {{- end -}} -{{- end -}} - -{{- /* lazysizes */ -}} -{{- $source := $cdn.lazysizesJS | default "lib/lazysizes/lazysizes.min.js" -}} -{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - -{{- /* twemoji */ -}} -{{- if $params.twemoji -}} - {{- $source := $cdn.twemojiJS | default "lib/twemoji/twemoji.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $config = dict "twemoji" true | merge $config -}} -{{- end -}} - -{{- /* lightgallery.js */ -}} -{{- if $params.lightgallery -}} - {{- $source := $cdn.lightgalleryCSS | default "lib/lightgallery/lightgallery.min.css" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} - {{- $source := $cdn.lightgalleryJS | default "lib/lightgallery/lightgallery.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $source := $cdn.lightgalleryThumbnailJS | default "lib/lightgallery/lg-thumbnail.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $source := $cdn.lightgalleryZoomJS | default "lib/lightgallery/lg-zoom.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $config = dict "selector" ".lightgallery" "speed" 400 "hideBarsDelay" 2000 "thumbnail" true "exThumbImage" "data-thumbnail" "thumbWidth" 80 "thumbContHeight" 80 "actualSize" false | dict "lightGallery" | merge $config -}} -{{- end -}} - -{{- $code := $params.code | default dict -}} -{{- $config = cond (ne $code.maxShownLines nil) $code.maxShownLines 10 | dict "maxShownLines" | dict "code" | merge $config -}} - -{{- /* clipboard.js */ -}} -{{- if ne $code.copy false -}} - {{- $source := $cdn.clipboardJS | default "lib/clipboard/clipboard.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $config = T "copyToClipboard" | dict "copyTitle" | dict "code" | merge $config -}} -{{- end -}} - -{{- /* Sharer.js */ -}} -{{- if $params.share.enable -}} - {{- $source := $cdn.sharerJS | default "lib/sharer/sharer.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} -{{- end -}} - -{{- /* TypeIt */ -}} -{{- with (.Scratch.Get "this").typeitMap -}} - {{- $typeit := $.Site.Params.typeit -}} - {{- $source := $cdn.typeitJS | default "lib/typeit/typeit.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}} - {{- $config = dict "speed" $typeit.speed "cursorSpeed" $typeit.cursorSpeed "cursorChar" $typeit.cursorChar "duration" $typeit.duration "data" . | dict "typeit" | merge $config -}} -{{- end -}} - -{{- /* KaTeX */ -}} -{{- $math := $params.math -}} -{{- if eq $math true -}} - {{- $math = .Site.Params.page.math | default dict -}} -{{- else if eq $math false -}} - {{- $math = dict "enable" false -}} -{{- end -}} -{{- if $math.enable -}} - {{- $source := $cdn.katexCSS | default "lib/katex/katex.min.css" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} - {{- $source := $cdn.katexJS | default "lib/katex/katex.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $source := $cdn.katexAutoRenderJS | default "lib/katex/auto-render.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- if $math.copyTex -}} - {{- $source := $cdn.katexCopyTexCSS | default "lib/katex/copy-tex.min.css" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} - {{- $source := $cdn.katexCopyTexJS | default "lib/katex/copy-tex.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- end -}} - {{- if $math.mhchem -}} - {{- $source := $cdn.katexMhchemJS | default "lib/katex/mhchem.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- end -}} - {{- $delimiters := slice (dict "left" "$$" "right" "$$" "display" true) (dict "left" "\\[" "right" "\\]" "display" true) -}} - {{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}} - {{- $delimiters = $delimiters | append (dict "left" $math.blockLeftDelimiter "right" $math.blockRightDelimiter "display" true) -}} - {{- end -}} - {{- $delimiters = $delimiters | append (dict "left" "$" "right" "$" "display" false) (dict "left" "\\(" "right" "\\)" "display" false) -}} - {{- if and $math.inlineLeftDelimiter $math.inlineRightDelimiter -}} - {{- $delimiters = $delimiters | append (dict "left" $math.inlineRightDelimiter "right" $math.inlineRightDelimiter "display" false) -}} - {{- end -}} - {{- $config = dict "strict" false "delimiters" $delimiters | dict "math" | merge $config -}} -{{- end -}} - -{{- /* mermaid */ -}} -{{- if (.Scratch.Get "this").mermaid -}} - {{- $source := $cdn.mermaidJS | default "lib/mermaid/mermaid.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $options := dict "targetPath" "lib/mermaid/mermaid.min.css" "enableSourceMap" true -}} - {{- dict "Source" "lib/mermaid/mermaid.scss" "ToCSS" $options "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} -{{- end -}} - -{{- /* ECharts */ -}} -{{- if (.Scratch.Get "this").echarts -}} - {{- $source := $cdn.echartsJS | default "lib/echarts/echarts.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $source := $cdn.echartsMacaronsJS | default "lib/echarts/macarons.js" -}} - {{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} -{{- end -}} - -{{- /* Mapbox GL */ -}} -{{- if (.Scratch.Get "this").mapbox -}} - {{- $source := $cdn.mapboxGLCSS | default "lib/mapbox-gl/mapbox-gl.min.css" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} - {{- $source := $cdn.mapboxGLJS | default "lib/mapbox-gl/mapbox-gl.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- dict "Source" "lib/mapbox-gl/mapbox-gl-language.js" "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $config = dict "accessToken" $params.mapbox.accessToken "RTLTextPlugin" "https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js" | dict "mapbox" | merge $config -}} -{{- end -}} - -{{- /* Music */ -}} -{{- if (.Scratch.Get "this").music -}} - {{- /* APlayer */ -}} - {{- $source := $cdn.aplayerCSS | default "lib/aplayer/APlayer.min.css" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} - {{- $options := dict "targetPath" "lib/aplayer/dark.min.css" "enableSourceMap" true -}} - {{- dict "Source" "lib/aplayer/dark.scss" "ToCSS" $options "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} - {{- $source := $cdn.aplayerJS | default "lib/aplayer/APlayer.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - - {{- /* MetingJS */ -}} - {{- $source := $cdn.metingJS | default "lib/meting/Meting.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} -{{- end -}} - -{{- /* Cookie Consent */ -}} -{{- if .Site.Params.cookieconsent | and .Site.Params.cookieconsent.enable -}} - {{- $source := $cdn.cookieconsentCSS | default "lib/cookieconsent/cookieconsent.min.css" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} - {{- $source := $cdn.cookieconsentJS | default "lib/cookieconsent/cookieconsent.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $cookieconsentConfig := dict "popup" (dict "background" "#1aa3ff") "button" (dict "background" "#f0f0f0") | dict "theme" "edgeless" "palette" -}} - {{- $cookieconsentConfig = .Site.Params.cookieconsent | merge $cookieconsentConfig -}} - {{- $cookieconsentConfig = dict "message" ($cookieconsentConfig.content.message | default (T "cookieconsentMessage")) "dismiss" ($cookieconsentConfig.content.dismiss | default (T "cookieconsentDismiss")) "link" ($cookieconsentConfig.content.link | default (T "cookieconsentLink")) | dict "content" | merge $cookieconsentConfig -}} - {{- $config = $cookieconsentConfig | dict "cookieconsent" | merge $config -}} -{{- end -}} - -{{- range $params.library.css -}} - {{- dict "Source" . "Fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/style.html" -}} -{{- end -}} - -{{- range $params.library.js -}} - {{- dict "Source" . "Fingerprint" $fingerprint | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}} -{{- end -}} - -{{- with (.Scratch.Get "this").styleArr -}} - {{- $content := delimit . "" -}} - {{- $path := substr (md5 $content) 0 6 | printf "css/%v" -}} - {{- $options := printf "%v.min.css" $path | dict "targetPath" -}} - {{- dict "Content" $content "Path" (printf "%v.scss" $path) "ToCSS" $options | dict "Scratch" $.Scratch "Data" | partial "scratch/style.html" -}} -{{- end -}} - -{{- /* Config script */ -}} -{{- $config | jsonify | printf "window.config=%s;" | dict "Content" | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - -{{- /* Theme script */ -}} -{{- dict "Source" "js/theme.min.js" "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} -{{- $_ := (resources.Get "js/theme.min.js.map").RelPermalink -}} - -{{- with (.Scratch.Get "this").scriptArr -}} - {{- delimit . "\n" | dict "Content" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}} -{{- end -}} - -{{- range (.Scratch.Get "this").style -}} - {{- partial "plugin/style.html" . -}} -{{- end -}} - -{{- range (.Scratch.Get "this").script -}} - {{- partial "plugin/script.html" . -}} -{{- end -}} - -{{- partial "plugin/analytics.html" . -}} diff --git a/themes/CodeIT/layouts/partials/comment.html b/themes/CodeIT/layouts/partials/comment.html deleted file mode 100644 index f977957..0000000 --- a/themes/CodeIT/layouts/partials/comment.html +++ /dev/null @@ -1,171 +0,0 @@ -{{- $cdn := .Scratch.Get "cdn" | default dict -}} -{{- $fingerprint := .Scratch.Get "fingerprint" -}} -{{- $comment := .Scratch.Get "comment" | default dict -}} -{{- $commentConfig := dict -}} - -{{- if $comment.enable -}} -
- {{- /* Disqus Comment System */ -}} - {{- $disqus := $comment.disqus | default dict -}} - {{- if $disqus.enable -}} -
- {{- $source := printf "https://%v.disqus.com/embed.js" $disqus.shortname -}} - {{- dict "Source" $source "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - - {{- end -}} - - {{- /* Gitalk Comment System */ -}} - {{- $gitalk := $comment.gitalk | default dict -}} - {{- if $gitalk.enable -}} -
- {{- $source := $cdn.gitalkCSS | default "lib/gitalk/gitalk.css" -}} - {{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} - {{- $source := $cdn.gitalkJS | default "lib/gitalk/gitalk.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $commentConfig = dict "id" .Date "title" .Title "clientID" $gitalk.clientId "clientSecret" $gitalk.clientSecret "repo" $gitalk.repo "owner" $gitalk.owner "admin" (slice $gitalk.owner) | dict "gitalk" | merge $commentConfig -}} - - {{- end -}} - - {{- /* Valine Comment System */ -}} - {{- $valine := $comment.valine | default dict -}} - {{- if $valine.enable -}} -
- {{- $options := dict "targetPath" "lib/valine/valine.min.css" -}} - {{- dict "Source" "lib/valine/valine.scss" "ToCSS" $options | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}} - {{- $source := $cdn.valineJS | default "lib/valine/Valine.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - {{- $commentConfig = dict "el" "#valine" "appId" $valine.appId "appKey" $valine.appKey "lang" ($valine.lang | default (T "valineLang")) "visitor" $valine.visitor "recordIP" $valine.recordIP "placeholder" ($valine.placeholder | default (T "valinePlaceholder")) "highlight" (ne $valine.highlight false) "enableQQ" $valine.enableQQ | dict "valine" | merge $commentConfig -}} - {{- with $valine.avatar -}} - {{- $commentConfig = dict "avatar" . | dict "valine" | merge $commentConfig -}} - {{- end -}} - {{- with $valine.meta -}} - {{- $commentConfig = dict "meta" . | dict "valine" | merge $commentConfig -}} - {{- end -}} - {{- with $valine.pageSize -}} - {{- $commentConfig = dict "pageSize" . | dict "valine" | merge $commentConfig -}} - {{- end -}} - {{- with $valine.serverURLs -}} - {{- $commentConfig = dict "serverURLs" . | dict "valine" | merge $commentConfig -}} - {{- end -}} - {{- $commentConfig = $valine.emoji | default "google.yml" | printf "data/emoji/%v" | resources.Get | transform.Unmarshal | dict "valine" | merge $commentConfig -}} - - {{- end -}} - - {{- /* Facebook Comment System */ -}} - {{- $facebook := $comment.facebook | default dict -}} - {{- if $facebook.enable -}} -
-
- {{- $source := printf "https://connect.facebook.net/%v/sdk.js#xfbml=1&version=v5.0&appId=%v&autoLogAppEvents=1" ($facebook.languageCode | default (T "facebookLanguageCode")) $facebook.appId -}} - {{- dict "Source" $source "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - - {{- end -}} - - {{- /* Telegram Comments System */ -}} - {{- $telegram := $comment.telegram | default dict -}} - {{- if $telegram.enable -}} -
- {{- $attr := printf `data-comments-app-website="%v"` $telegram.siteID -}} - {{- $attr = printf `%v data-limit="%v"` $attr ($telegram.limit | default 5) -}} - {{- with $telegram.height -}} - {{- $attr = printf `%v data-height="%v"` $attr . -}} - {{- end -}} - {{- with $telegram.color -}} - {{- $attr = printf `%v data-color="%v"` $attr . -}} - {{- end -}} - {{- if $telegram.colorful -}} - {{- $attr = printf `%v data-colorful="1"` $attr -}} - {{- end -}} - {{- if $telegram.dislikes -}} - {{- $attr = printf `%v data-dislikes="1"` $attr -}} - {{- end -}} - {{- if $telegram.outlined -}} - {{- $attr = printf `%v data-outlined="1"` $attr -}} - {{- end -}} - {{- dict "Source" "https://comments.app/js/widget.js?2" "Defer" true "Attr" $attr | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - - {{- end -}} - - {{- /* Commento Comment System */ -}} - {{- $commento := $comment.commento | default dict -}} - {{- if $commento.enable -}} -
- {{- dict "Source" "https://cdn.commento.io/js/commento.js" "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} - - {{- end -}} - - {{- /* Utterances Comment System */ -}} - {{- $utterances := $comment.utterances | default dict -}} - {{- if $utterances.enable -}} -
- {{- $commentConfig = dict "repo" $utterances.repo | dict "utterances" | merge $commentConfig -}} - {{- $commentConfig = $utterances.issueTerm | default "pathname" | dict "issueTerm" | dict "utterances" | merge $commentConfig -}} - {{- $commentConfig = dict "label" $utterances.label | dict "utterances" | merge $commentConfig -}} - {{- $commentConfig = $utterances.lightTheme | default "github-light" | dict "lightTheme" | dict "utterances" | merge $commentConfig -}} - {{- $commentConfig = $utterances.darkTheme | default "github-dark" | dict "darkTheme" | dict "utterances" | merge $commentConfig -}} - - {{- 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 -}} - -{{- dict "comment" $commentConfig | dict "config" | merge (.Scratch.Get "this") | .Scratch.Set "this" -}} diff --git a/themes/CodeIT/layouts/partials/footer.html b/themes/CodeIT/layouts/partials/footer.html deleted file mode 100644 index 05e6fc7..0000000 --- a/themes/CodeIT/layouts/partials/footer.html +++ /dev/null @@ -1,51 +0,0 @@ -{{- if ne .Site.Params.footer.enable false -}} - -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/function/checkbox.html b/themes/CodeIT/layouts/partials/function/checkbox.html deleted file mode 100644 index 2283592..0000000 --- a/themes/CodeIT/layouts/partials/function/checkbox.html +++ /dev/null @@ -1,9 +0,0 @@ -{{- /* Checkbox unchecked */ -}} -{{- $old := `` -}} -{{- $new := `` -}} -{{- $content := replace . $old $new -}} - -{{- /* Checkbox checked */ -}} -{{- $old = `` -}} -{{- $new = `` -}} -{{- return replace $content $old $new -}} diff --git a/themes/CodeIT/layouts/partials/function/content.html b/themes/CodeIT/layouts/partials/function/content.html deleted file mode 100644 index 250a5b7..0000000 --- a/themes/CodeIT/layouts/partials/function/content.html +++ /dev/null @@ -1,23 +0,0 @@ -{{- $content := .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 -}} - -{{- return $content -}} diff --git a/themes/CodeIT/layouts/partials/function/escape.html b/themes/CodeIT/layouts/partials/function/escape.html deleted file mode 100644 index 1ff794f..0000000 --- a/themes/CodeIT/layouts/partials/function/escape.html +++ /dev/null @@ -1,5 +0,0 @@ -{{- /* Escape character */ -}} -{{- /* {?X} -> X */ -}} -{{- $REin := `\{\?(.)\}` -}} -{{- $REout := `$1` -}} -{{- return replaceRE $REin $REout . -}} diff --git a/themes/CodeIT/layouts/partials/function/fontawesome.html b/themes/CodeIT/layouts/partials/function/fontawesome.html deleted file mode 100644 index 9d64c3d..0000000 --- a/themes/CodeIT/layouts/partials/function/fontawesome.html +++ /dev/null @@ -1,14 +0,0 @@ -{{- /* Font Awesome */ -}} -{{- /* :(far fa-circle): -> */ -}} - -{{- $REin := ` (:\([\w- ]+?\):)` -}} -{{- $REout := ` $1` -}} -{{- $content := replaceRE $REin $REout . -}} - -{{- $REin = `(:\([\w- ]+?\):) ` -}} -{{- $REout = `$1 ` -}} -{{- $content = replaceRE $REin $REout . -}} - -{{- $REin = `:\(([\w- ]+?)\):` -}} -{{- $REout = `` -}} -{{- return replaceRE $REin $REout $content -}} diff --git a/themes/CodeIT/layouts/partials/function/fraction.html b/themes/CodeIT/layouts/partials/function/fraction.html deleted file mode 100644 index 9aa85d0..0000000 --- a/themes/CodeIT/layouts/partials/function/fraction.html +++ /dev/null @@ -1,5 +0,0 @@ -{{- /* Fraction */ -}} -{{- /* [A]/[B] -> A/B */ -}} -{{- $REin := `\[(.+?)\]/\[(.+?)\]` -}} -{{- $REout := `$1/$2` -}} -{{- return replaceRE $REin $REout . -}} diff --git a/themes/CodeIT/layouts/partials/function/id.html b/themes/CodeIT/layouts/partials/function/id.html deleted file mode 100644 index e84ef9c..0000000 --- a/themes/CodeIT/layouts/partials/function/id.html +++ /dev/null @@ -1,8 +0,0 @@ -{{- /* ID */ -}} -{{- $count := (.Scratch.Get "this").count | default 1 -}} -{{- $id := printf "id-%d" $count -}} -{{- $count | add 1 | .Scratch.SetInMap "this" "count" -}} -{{- with .Content -}} - {{- dict $id . | dict "data" | dict "config" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}} -{{- end -}} -{{- return $id -}} diff --git a/themes/CodeIT/layouts/partials/function/path.html b/themes/CodeIT/layouts/partials/function/path.html deleted file mode 100644 index ece426f..0000000 --- a/themes/CodeIT/layouts/partials/function/path.html +++ /dev/null @@ -1,3 +0,0 @@ -{{- /* https://discourse.gohugo.io/t/how-decode-urls-in-hugo/7549/4 */ -}} -{{- $URL := . | urlize | urls.Parse -}} -{{- return $URL.Path -}} diff --git a/themes/CodeIT/layouts/partials/function/resource.html b/themes/CodeIT/layouts/partials/function/resource.html deleted file mode 100644 index 2febef3..0000000 --- a/themes/CodeIT/layouts/partials/function/resource.html +++ /dev/null @@ -1,16 +0,0 @@ -{{- $resource := 0 -}} -{{- $url := urls.Parse .Path -}} -{{- if not $url.Host | and $url.Path | and (strings.HasSuffix $url.Path "/" | not) -}} - {{- if .Resources -}} - {{- with .Resources.GetMatch $url.Path -}} - {{- $resource = . -}} - {{- end -}} - {{- end -}} - {{- if not $resource -}} - {{- with resources.Get $url.Path -}} - {{- $resource = . -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- return $resource -}} diff --git a/themes/CodeIT/layouts/partials/function/ruby.html b/themes/CodeIT/layouts/partials/function/ruby.html deleted file mode 100644 index 49aa35b..0000000 --- a/themes/CodeIT/layouts/partials/function/ruby.html +++ /dev/null @@ -1,5 +0,0 @@ -{{- /* Ruby */ -}} -{{- /* [EN]^(English) -> ENEnglish */ -}} -{{- $REin := `\[(.+?)\]\^\((.+?)\)` -}} -{{- $REout := `$1$2` -}} -{{- return replaceRE $REin $REout . -}} diff --git a/themes/CodeIT/layouts/partials/head/link.html b/themes/CodeIT/layouts/partials/head/link.html deleted file mode 100644 index 080a1f9..0000000 --- a/themes/CodeIT/layouts/partials/head/link.html +++ /dev/null @@ -1,51 +0,0 @@ -{{- $cdn := .Scratch.Get "cdn" | default dict -}} -{{- $fingerprint := .Scratch.Get "fingerprint" -}} - -{{- if not .Site.Params.app.noFavicon -}} - {{- with .Site.Params.app.svgFavicon -}} - - {{- else -}} - - - - {{- end -}} - - {{- with .Site.Params.app.iconColor -}} - - {{- end -}} - -{{- end -}} - - -{{- if .PrevInSection -}} - -{{- end -}} -{{- if .NextInSection -}} - -{{- end -}} - -{{- with .OutputFormats.Get "RSS" -}} - - -{{- end -}} - -{{- /* normalize.css */ -}} -{{- $source := $cdn.normalizeCSS | default "lib/normalize/normalize.min.css" -}} -{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}} -{{- partial "plugin/style.html" $style -}} - -{{- /* style.min.css */ -}} -{{- $style := dict "Source" "css/style.scss" "Fingerprint" $fingerprint -}} -{{- $options := dict "targetPath" "css/style.min.css" "enableSourceMap" true -}} -{{- $style = dict "Context" . "ToCSS" $options | merge $style -}} -{{- partial "plugin/style.html" $style -}} - -{{- /* Font Awesome */ -}} -{{- $source := $cdn.fontawesomeFreeCSS | default "lib/fontawesome-free/all.min.css" -}} -{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}} -{{- partial "plugin/style.html" $style -}} - -{{- /* Animate.css */ -}} -{{- $source := $cdn.animateCSS | default "lib/animate/animate.min.css" -}} -{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}} -{{- partial "plugin/style.html" $style -}} diff --git a/themes/CodeIT/layouts/partials/head/meta.html b/themes/CodeIT/layouts/partials/head/meta.html deleted file mode 100644 index 9a7cce2..0000000 --- a/themes/CodeIT/layouts/partials/head/meta.html +++ /dev/null @@ -1,17 +0,0 @@ -{{- $params := .Scratch.Get "params" -}} - - - -{{- template "_internal/opengraph.html" . -}} -{{- template "_internal/twitter_cards.html" . -}} - - - - -{{- with .Site.Params.app.themeColor -}} - -{{- end -}} - -{{- with .Site.Params.app.tileColor -}} - -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/head/seo.html b/themes/CodeIT/layouts/partials/head/seo.html deleted file mode 100644 index d431ad0..0000000 --- a/themes/CodeIT/layouts/partials/head/seo.html +++ /dev/null @@ -1,153 +0,0 @@ -{{- $params := .Scratch.Get "params" -}} - -{{- with .Site.Params.verification.google -}} - -{{- end -}} -{{- with .Site.Params.verification.bing -}} - -{{- end -}} -{{- with .Site.Params.verification.yandex -}} - -{{- end -}} -{{- with .Site.Params.verification.pinterest -}} - -{{- end -}} -{{- with .Site.Params.verification.baidu -}} - -{{- end -}} - -{{- /* Home SEO */ -}} -{{- if .IsHome -}} - - -{{- /* Page SEO */ -}} -{{- else if .IsPage -}} - -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/header.html b/themes/CodeIT/layouts/partials/header.html deleted file mode 100644 index b4a1d30..0000000 --- a/themes/CodeIT/layouts/partials/header.html +++ /dev/null @@ -1,181 +0,0 @@ -{{- /* Desktop header */ -}} -
- -
- -{{- /* Mobile header */ -}} -
- -
-
-
-
-
-
-
diff --git a/themes/CodeIT/layouts/partials/home/profile.html b/themes/CodeIT/layouts/partials/home/profile.html deleted file mode 100644 index ba2462e..0000000 --- a/themes/CodeIT/layouts/partials/home/profile.html +++ /dev/null @@ -1,96 +0,0 @@ -{{- $profile := .Site.Params.home.profile -}} -
- {{- $avatar := $profile.avatarURL -}} - {{- with $profile.gravatarEmail -}} - {{- $avatar = md5 . | printf "https://www.gravatar.com/avatar/%v?s=240&d=mp" -}} - {{- end -}} - {{- 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 "Alt" $avatarAlt | partial "plugin/image.html" -}} - - {{- else -}} - {{- dict "Src" $avatar "Alt" $avatarAlt | partial "plugin/image.html" -}} - {{- end -}} -
- {{- end -}} - - {{- with $profile.title -}} -

- {{- . | safeHTML -}} -

- {{- end -}} - - {{- with $profile.subtitle -}} -

- {{- if $profile.typeit -}} - {{- $id := dict "Content" . "Scratch" $.Scratch | partial "function/id.html" -}} -
- {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}} - {{- else -}} - {{- . | safeHTML -}} - {{- end -}} -

- {{- end -}} - - {{- if $profile.social -}} - - {{- end -}} - - {{- with $profile.disclaimer -}} -

- {{- . | safeHTML -}} -

- {{- end -}} -
diff --git a/themes/CodeIT/layouts/partials/init.html b/themes/CodeIT/layouts/partials/init.html deleted file mode 100644 index 078b854..0000000 --- a/themes/CodeIT/layouts/partials/init.html +++ /dev/null @@ -1,41 +0,0 @@ -{{- .Scratch.Set "version" "0.2.10" -}} - -{{- /* CodeIT theme version detection */ -}} -{{- $VERSION := "0.2.X" -}} -{{- if eq .Site .Sites.First -}} - {{- if not .Site.Params.version -}} - {{- errorf "Configuration Error 配置文件错误\n\nYou haven't configured the CodeIT version param correctly yet. See https://codeit.suntprogramator.dev/theme-documentation-basics/#basic-configuration\n你还没有正确配置 CodeIT 的版本参数. 参考 https://hugoCodeIT.com/zh-cn/theme-documentation-basics/#basic-configuration\n" -}} - {{- else if ne .Site.Params.version $VERSION -}} - {{- errorf (printf "Compatibility Error 兼容性错误\n\n%v -> %v:\nYou have an incompatible update. See https://github.com/suntprogramator/CodeIT/releases\n你进行了一次不兼容的更新. 参考 https://github.com/suntprogramator/CodeIT/releases\n" .Site.Params.version $VERSION) -}} - {{- end -}} -{{- end -}} - -{{- $params := .Params | merge .Site.Params.page -}} - -{{- if eq hugo.Environment "production" -}} - {{- $cdn := .Site.Params.cdn -}} - {{- with $cdn.data -}} - {{- $cdnData := printf "data/cdn/%v" . | resources.Get | transform.Unmarshal -}} - {{- $cdn = dict "simpleIconsPrefix" $cdnData.prefix.simpleIcons -}} - {{- $prefix := $cdnData.prefix.libFiles | default "" -}} - {{- range $key, $value := $cdnData.libFiles -}} - {{- $cdn = printf "%v%v" $prefix $value | dict $key | merge $cdn -}} - {{- end -}} - {{- end -}} - {{- .Scratch.Set "cdn" $cdn -}} - {{- .Scratch.Set "fingerprint" .Site.Params.fingerprint -}} - {{- .Scratch.Set "analytics" .Site.Params.analytics -}} - {{- .Scratch.Set "comment" $params.comment -}} - {{- if eq .Params.comment true -}} - {{- .Scratch.Set "comment" .Site.Params.comment -}} - {{- else if eq .Params.comment false -}} - {{- .Scratch.Set "comment" dict -}} - {{- end -}} -{{- else if eq .Site .Sites.First -}} - {{- warnf "\n\nCurrent environment is \"development\". The \"comment system\", \"CDN\" and \"fingerprint\" will be disabled.\n当前运行环境是 \"development\". \"评论系统\", \"CDN\" 和 \"fingerprint\" 不会启用.\n" -}} -{{- end -}} - -{{- .Scratch.Set "params" $params -}} -{{- .Scratch.Set "this" dict -}} - -{{- partial "plugin/compatibility.html" . -}} diff --git a/themes/CodeIT/layouts/partials/paginator.html b/themes/CodeIT/layouts/partials/paginator.html deleted file mode 100644 index 170144f..0000000 --- a/themes/CodeIT/layouts/partials/paginator.html +++ /dev/null @@ -1,30 +0,0 @@ -{{- if gt .Paginator.TotalPages 1 -}} - -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/plugin/analytics.html b/themes/CodeIT/layouts/partials/plugin/analytics.html deleted file mode 100644 index bb23248..0000000 --- a/themes/CodeIT/layouts/partials/plugin/analytics.html +++ /dev/null @@ -1,27 +0,0 @@ -{{- $analytics := .Scratch.Get "analytics" | default dict -}} - -{{- if $analytics.enable -}} - {{- /* Google Analytics */ -}} - {{- with $analytics.google.id -}} - - {{- printf "https://www.googletagmanager.com/gtag/js?id=%v" . | dict "Async" true "Source" | partial "plugin/script.html" -}} - {{- end -}} - - {{- /* Fathom Analytics */ -}} - {{- with $analytics.fathom.id -}} - - {{- dict "Source" ($analytics.fathom.server | default "cdn.usefathom.com" | printf "https://%v/tracker.js") "Async" true "Attr" "id=fathom-script" | partial "plugin/script.html" -}} - {{- end -}} - - {{- /* Plausible Analytics */ -}} - {{- with $analytics.plausible.domain -}} - {{- dict "Source" "https://plausible.io/js/plausible.js" "Async" true "Defer" true "Attr" ($analytics.plausible.domain | printf `data-domain="%v"`) | partial "plugin/script.html" -}} - {{- end -}} -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/plugin/compatibility.html b/themes/CodeIT/layouts/partials/plugin/compatibility.html deleted file mode 100644 index b460f18..0000000 --- a/themes/CodeIT/layouts/partials/plugin/compatibility.html +++ /dev/null @@ -1,22 +0,0 @@ -{{- $compatibility := .Site.Params.compatibility | default dict -}} -{{- $cdn := .Scratch.Get "cdn" | default dict -}} -{{- $fingerprint := .Scratch.Get "fingerprint" -}} - -{{- /* Polyfill.io */ -}} -{{- if $compatibility.polyfill -}} - {{- $features := slice -}} - {{- range resources.Get "data/polyfill.yml" | transform.Unmarshal -}} - {{- range . -}} - {{- $features = $features | append . -}} - {{- end -}} - {{- end -}} - {{- with $features | uniq -}} - {{- delimit . "%2C" | printf "https://polyfill.io/v3/polyfill.min.js?features=%v" | dict "Source" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}} - {{- end -}} -{{- end -}} - -{{- /* object-fit-images */ -}} -{{- if $compatibility.objectFit -}} - {{- $source := $cdn.objectFitImagesJS | default "lib/object-fit-images/ofi.min.js" -}} - {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}} -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/plugin/icon.html b/themes/CodeIT/layouts/partials/plugin/icon.html deleted file mode 100644 index 5bc2a11..0000000 --- a/themes/CodeIT/layouts/partials/plugin/icon.html +++ /dev/null @@ -1,13 +0,0 @@ -{{- with .Class -}} - -{{- else -}} - {{- $src := .Src -}} - {{- with .Simpleicons -}} - {{- $prefix := $.Prefix | default "lib/simple-icons/icons" | strings.TrimSuffix "/" -}} - {{- $src = printf "%v/%v.svg" $prefix . -}} - {{- end -}} - {{- if (urls.Parse $src).Host | not -}} - {{- $src = (resources.Get $src | minify).RelPermalink -}} - {{- end -}} - -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/plugin/image.html b/themes/CodeIT/layouts/partials/plugin/image.html deleted file mode 100644 index 84a61b3..0000000 --- a/themes/CodeIT/layouts/partials/plugin/image.html +++ /dev/null @@ -1,38 +0,0 @@ -{{- /* lazysizes and lightgallery.js */ -}} -{{- $src := .Src -}} -{{- with dict "Path" .Src "Resources" .Resources | partial "function/resource.html" -}} - {{- $src = .RelPermalink -}} -{{- end -}} - -{{- $small := .SrcSmall | default $src -}} -{{- with dict "Path" .SrcSmall "Resources" .Resources | partial "function/resource.html" -}} - {{- $small = .RelPermalink -}} -{{- end -}} - -{{- $large := .SrcLarge | default $src -}} -{{- with dict "Path" .SrcLarge "Resources" .Resources | partial "function/resource.html" -}} - {{- $large = .RelPermalink -}} -{{- end -}} - -{{- $alt := .Alt | default $src -}} -{{- $loading := resources.Get "svg/loading.svg" | minify -}} -{{- if .Linked -}} - - {{ $alt }} - -{{- else -}} - {{ $alt }} -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/plugin/link.html b/themes/CodeIT/layouts/partials/plugin/link.html deleted file mode 100644 index 8e07a6c..0000000 --- a/themes/CodeIT/layouts/partials/plugin/link.html +++ /dev/null @@ -1,9 +0,0 @@ -{{- $rel := "" -}} - - {{- with .Icon -}} - {{- partial "plugin/icon.html" . -}} - {{- end -}} - {{- with .Content -}} - {{- . | safeHTML -}} - {{- end -}} - \ No newline at end of file diff --git a/themes/CodeIT/layouts/partials/plugin/script.html b/themes/CodeIT/layouts/partials/plugin/script.html deleted file mode 100644 index e12e74e..0000000 --- a/themes/CodeIT/layouts/partials/plugin/script.html +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Content -}} - -{{- else if strings.HasPrefix .Source " -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/plugin/share.html b/themes/CodeIT/layouts/partials/plugin/share.html deleted file mode 100644 index 3273f9f..0000000 --- a/themes/CodeIT/layouts/partials/plugin/share.html +++ /dev/null @@ -1,206 +0,0 @@ -{{- $share := (.Scratch.Get "params").share | default dict -}} - -{{- if $share.enable -}} - {{- /* 001: Twitter */ -}} - {{- if $share.Twitter -}} - - {{- dict "Class" "fab fa-twitter fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 002: Facebook */ -}} - {{- if $share.Facebook -}} - - {{- dict "Class" "fab fa-facebook-square fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 003: Linkedin */ -}} - {{- if $share.Linkedin -}} - - {{- dict "Class" "fab fa-linkedin fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 004: WhatsApp */ -}} - {{- if $share.Whatsapp -}} - - {{- dict "Class" "fab fa-whatsapp fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 005: Viber */ -}} - {{- if $share.Viber -}} - - {{- dict "Class" "fab fa-viber fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 006: Pinterest */ -}} - {{- if $share.Pinterest -}} - - {{- dict "Class" "fab fa-pinterest fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 007: Tumblr */ -}} - {{- if $share.Tumblr -}} - - {{- dict "Class" "fab fa-tumblr fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 008: Hacker News */ -}} - {{- if $share.Hackernews -}} - - {{- dict "Class" "fab fa-hacker-news fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 009: Reddit */ -}} - {{- if $share.Reddit -}} - - {{- dict "Class" "fab fa-reddit fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 010: VK */ -}} - {{- if $share.VK -}} - - {{- dict "Class" "fab fa-vk fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 011: Buffer */ -}} - {{- if $share.Buffer -}} - - {{- dict "Class" "fab fa-buffer fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 012: Xing */ -}} - {{- if $share.Xing -}} - - {{- dict "Class" "fab fa-xing fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 013: Line */ -}} - {{- if $share.Line -}} - - {{- dict "Simpleicons" "line" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 014: Instapaper */ -}} - {{- if $share.Instapaper -}} - - {{- dict "Simpleicons" "instapaper" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 015: Pocket */ -}} - {{- if $share.Pocket -}} - - {{- dict "Class" "fab fa-get-pocket fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 016: Digg */ -}} - {{- if $share.Digg -}} - - {{- dict "Class" "fab fa-digg fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 017: StumbleUpon */ -}} - {{- if $share.Stumbleupon -}} - - {{- dict "Class" "fab fa-stumbleupon fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 018: Flipboard */ -}} - {{- if $share.Flipboard -}} - - {{- dict "Class" "fab fa-flipboard fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 019: 微博 */ -}} - {{- if $share.Weibo -}} - - {{- dict "Class" "fab fa-weibo fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 020: 人人 */ -}} - {{- if $share.Renren -}} - - {{- dict "Class" "fab fa-renren fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 021: Myspace */ -}} - {{- if $share.Myspace -}} - - {{- dict "Simpleicons" "myspace" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 022: Blogger */ -}} - {{- if $share.Blogger -}} - - {{- dict "Class" "fab fa-blogger fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 023: 百度 */ -}} - {{- if $share.Baidu -}} - - {{- dict "Simpleicons" "baidu" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 024: OK.RU */ -}} - {{- if $share.Odnoklassniki -}} - - {{- dict "Class" "fab fa-odnoklassniki fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 025: Evernote */ -}} - {{- if $share.Evernote -}} - - {{- dict "Class" "fab fa-evernote fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 026: Skype */ -}} - {{- if $share.Skype -}} - - {{- dict "Class" "fab fa-skype fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 027: Trello */ -}} - {{- if $share.Trello -}} - - {{- dict "Class" "fab fa-trello fa-fw" | partial "plugin/icon.html" -}} - - {{- end -}} - - {{- /* 028: Mix */ -}} - {{- if $share.Mix -}} - - {{- 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/plugin/social.html b/themes/CodeIT/layouts/partials/plugin/social.html deleted file mode 100644 index e6d2005..0000000 --- a/themes/CodeIT/layouts/partials/plugin/social.html +++ /dev/null @@ -1,11 +0,0 @@ -{{- $destination := "" -}} -{{- with .Url -}} - {{- $destination = . | relLangURL -}} -{{- else -}} - {{- $template := .Template | default "%v" -}} - {{- with .Prefix -}} - {{- $template = . | strings.TrimSuffix "/" | printf "%v/%%v" -}} - {{- end -}} - {{- $destination = printf (string $template) .Id -}} -{{- end -}} -{{- dict "Destination" $destination "Rel" "me" | merge . | partial "plugin/link.html" -}} diff --git a/themes/CodeIT/layouts/partials/plugin/style.html b/themes/CodeIT/layouts/partials/plugin/style.html deleted file mode 100644 index 9c9c989..0000000 --- a/themes/CodeIT/layouts/partials/plugin/style.html +++ /dev/null @@ -1,31 +0,0 @@ -{{- if strings.HasPrefix .Source " -{{- end -}} diff --git a/themes/CodeIT/layouts/partials/rss/item.html b/themes/CodeIT/layouts/partials/rss/item.html deleted file mode 100644 index 64da953..0000000 --- a/themes/CodeIT/layouts/partials/rss/item.html +++ /dev/null @@ -1,43 +0,0 @@ -{{- $params := .Page.Params | merge .Site.Params.Page | merge (dict "author" .Site.Author.name "email" .Site.Author.email) -}} - - - {{- .Page.Title -}} - - - {{- .Page.Permalink -}} - - - {{- .Page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}} - - {{- with $params.email -}} - - {{- $params.email -}} - - {{- end -}} - {{- with $params.author -}} - - {{- $params.author -}} - - {{- end -}} - - {{- .Page.Permalink -}} - - - {{- " - - - {{- end -}} - {{- $content := .Page.Description -}} - {{- if $params.rssFullText -}} - {{- $content = dict "Content" .Page.Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}} - {{- else -}} - {{- with .Page.Summary -}} - {{- $content = dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}} - {{- end -}} - {{- end -}} - {{- $content | replaceRE `]*>.*` "" | replaceRE `]*( /)?>` "" | safeHTML -}} - {{- "]]>" | safeHTML -}} - - \ No newline at end of file diff --git a/themes/CodeIT/layouts/partials/scratch/script.html b/themes/CodeIT/layouts/partials/scratch/script.html deleted file mode 100644 index 480ad2f..0000000 --- a/themes/CodeIT/layouts/partials/scratch/script.html +++ /dev/null @@ -1,4 +0,0 @@ -{{- $this := .Scratch.Get "this" -}} -{{- $script := $this.script | default slice -}} -{{- $script = $script | append (slice .Data) -}} -{{- .Scratch.SetInMap "this" "script" $script -}} diff --git a/themes/CodeIT/layouts/partials/scratch/style.html b/themes/CodeIT/layouts/partials/scratch/style.html deleted file mode 100644 index 8989ce1..0000000 --- a/themes/CodeIT/layouts/partials/scratch/style.html +++ /dev/null @@ -1,4 +0,0 @@ -{{- $this := .Scratch.Get "this" -}} -{{- $style := $this.style | default slice -}} -{{- $style = $style | append (slice .Data) -}} -{{- .Scratch.SetInMap "this" "style" $style -}} diff --git a/themes/CodeIT/layouts/partials/single/footer.html b/themes/CodeIT/layouts/partials/single/footer.html deleted file mode 100644 index d0ec4ee..0000000 --- a/themes/CodeIT/layouts/partials/single/footer.html +++ /dev/null @@ -1,72 +0,0 @@ -{{- $params := .Scratch.Get "params" -}} - - -- cgit v1.2.3