+
+
+ {{- /* Meta */ -}}
+
+
+ {{- partial "single/post-author.html" . -}}
+ {{- partial "single/post-included-in.html" . -}}
+
+ {{- /* TODO add disclaimer or space between meta and content */ -}}
+
+ {{- with .PublishDate | dateFormat (.Site.Params.dateformat | default "2006-01-02") -}}
+
+ {{- dict "Class" "fa-solid fa-calendar-days fa-fw me-1" | partial "plugin/icon.html" -}}
+ {{- printf `` . . | safeHTML -}}
+
+ {{- end -}}
+ {{- if ne .Lastmod.Unix .PublishDate.Unix }}
+ {{- with .Lastmod | dateFormat (.Site.Params.dateformat | default "2006-01-02") -}}
+
+ {{- dict "Class" "fa-regular fa-calendar-check fa-fw me-1" | partial "plugin/icon.html" -}}
+ {{- printf `` . . | safeHTML -}}
+
+ {{- end -}}
+ {{- end -}}
+ {{- if $params.wordCount -}}
+
+ {{- dict "Class" "fa-solid fa-pencil-alt fa-fw me-1" | partial "plugin/icon.html" -}}
+ {{- T "single.fuzzyWordCount" .FuzzyWordCount -}}
+
+ {{- end -}}
+ {{- if $params.readingTime -}}
+
+ {{- dict "Class" "fa-regular fa-clock fa-fw me-1" | partial "plugin/icon.html" -}}
+ {{- T "single.readingTime" .ReadingTime -}}
+
+ {{- end -}}
+
+ {{- /* If the article expires, close the comment or not */ -}}
+ {{- $expirationReminder := $params.expirationReminder | default dict -}}
+ {{- if
+ $expirationReminder.enable
+ | and (gt (div (sub now.Unix .Lastmod.Unix) 86400) ($expirationReminder.warning | default 180))
+ | and $expirationReminder.closeComment -}}
+ {{- .Scratch.Set "commentExpired" true -}}
+ {{- end -}}
+
+
+
+
+ {{- /* Featured image */ -}}
+ {{- $image := $params.featuredimage -}}
+ {{- with .Resources.GetMatch "featured-image" -}}
+ {{- $image = .RelPermalink -}}
+ {{- end -}}
+ {{- with $image -}}
+
+ {{- dict "Src" . "Title" $.Description | partial "plugin/image.html" -}}
+
+ {{- 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" . -}}
+
+
+