From 6e8ecc4dbc8d8106b0e125cbc580d9e020bcf4aa Mon Sep 17 00:00:00 2001 From: JamesFlare1212 Date: Tue, 12 Mar 2024 05:35:51 -0400 Subject: [PATCH] remove comment-visitors and comment-count --- hugo.toml | 4 +- layouts/posts/single.html | 223 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+), 2 deletions(-) create mode 100644 layouts/posts/single.html diff --git a/hugo.toml b/hugo.toml index 3ae6899..676f759 100644 --- a/hugo.toml +++ b/hugo.toml @@ -817,7 +817,7 @@ defaultContentLanguageInSubdir = true editorTravel = true flatMode = "auto" # FixIt 0.2.17 | CHANGED enable lightgallery support - lightgallery = false + lightgallery = true locale = "" # FixIt 0.2.15 | NEW # FixIt 0.2.18 | NEW emoticons = "" @@ -1080,7 +1080,7 @@ defaultContentLanguageInSubdir = true # FixIt 0.2.18 | NEW Depends on the author's email, if the author's email is not set, the local avatar will be used enable = false # Gravatar host, default: "www.gravatar.com" - host = "www.gravatar.com" # ["cn.gravatar.com", "gravatar.loli.net", ...] + host = "gravatar.jamesflare.com" # ["cn.gravatar.com", "gravatar.loli.net", ...] style = "" # ["", "mp", "identicon", "monsterid", "wavatar", "retro", "blank", "robohash"] # FixIt 0.2.16 | NEW Back to top diff --git a/layouts/posts/single.html b/layouts/posts/single.html new file mode 100644 index 0000000..833e3bc --- /dev/null +++ b/layouts/posts/single.html @@ -0,0 +1,223 @@ +{{- define "title" -}} + {{- .Title -}} + {{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}} +{{- end -}} + +{{- define "content" -}} + {{- $params := .Scratch.Get "params" -}} + {{- $toc := .Scratch.Get "toc" -}} + {{- $tocEmpty := eq .TableOfContents `` -}} + + + +
+
+ {{- /* Title */ -}} +

+ {{- $repost := $params.repost | default dict -}} + {{- with $repost -}} + {{- if eq .Enable true -}} + {{- $icon := dict "Class" "fa-solid fa-share fa-fw" -}} + {{- $title := cond (hasPrefix .Url "http") (printf "%v -> %v" (T "single.repost") .Url ) (T "single.repost") -}} + {{- if hasPrefix .Url "http" -}} + {{ dict "Destination" .Url "Icon" $icon "Class" "icon-repost" "Title" $title | partial "plugin/link.html" -}} + {{- else -}} + {{- $icon | partial "plugin/icon.html" -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- .Title -}} +

+ + {{- /* Subtitle */ -}} + {{- with $params.subtitle -}}

{{ . }}

{{- end -}} +
+ + {{- /* Meta */ -}} + + + {{- /* Featured image */ -}} + {{- $image := $params.featuredimage -}} + {{- with .Resources.GetMatch "featured-image" -}} + {{- $image = .RelPermalink -}} + {{- end -}} + {{- with $image -}} + + {{- end -}} + + {{- /* Static TOC */ -}} + {{- if (ne $toc.enable false) | and (ne $tocEmpty true) -}} +
+
+ {{ T "single.contents" }} + {{ dict "Class" "details-icon fa-solid fa-angle-right" | partial "plugin/icon.html" }} +
+
+ {{- dict "Content" .TableOfContents "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}} +
+
+ {{- end -}} + + {{- /* Content */ -}} + {{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}} + {{- if $params.password -}} + {{- $saltLen := strings.RuneCount (trim $params.password "") -}} + {{- $saltLen = cond (eq (mod $saltLen 2) 0) (add $saltLen 1) $saltLen -}} + {{- $base64EncodeContent := $content | base64Encode -}} + {{- $content = printf "%v%v%v" + (substr $base64EncodeContent 0 $saltLen) + (substr (sha256 $params.password) $saltLen) + (substr $base64EncodeContent $saltLen) + -}} + {{- end -}} +
+ {{- if not $params.password -}} + {{- /* Expiration Reminder */ -}} + {{- partial "single/expiration-reminder.html" . -}} + {{- $content -}} + {{- end -}} +
+ + {{- /* Related Content */ -}} + {{- partial "single/related.html" . -}} + + {{- /* Reward before Footer */ -}} + {{- $reward := .Scratch.Get "reward" -}} + {{- if eq $reward.position "before" -}} + {{- partial "single/reward.html" . -}} + {{- end -}} + + {{- /* Collection Navigation */ -}} + {{- partial "single/collection-nav.html" . -}} + + {{- /* FixIt Decryptor */ -}} + {{- partial "single/fixit-decryptor.html" . -}} + + {{- /* Footer */ -}} + {{- partial "single/footer.html" . -}} + + {{- /* Reward after Footer */ -}} + {{- if eq $reward.position "after" -}} + {{- partial "single/reward.html" . -}} + {{- end -}} + + {{- /* Comment */ -}} + {{- partial "single/comment.html" . -}} +
+ + +{{- end -}}