diff --git a/assets/css/_page/_single.scss b/assets/css/_page/_single.scss index fb8536bb..58d789a1 100644 --- a/assets/css/_page/_single.scss +++ b/assets/css/_page/_single.scss @@ -509,13 +509,12 @@ json-viewer[boxed] + json-viewer[boxed] { margin-top: 0.5rem; } - - @import '../_partials/_single/alert'; - @import '../_partials/_single/code'; - @import '../_partials/_single/diagram-copy-btn'; - @import '../_shortcodes'; } - + + @import '../_shortcodes'; + @import '../_partials/_single/alert'; + @import '../_partials/_single/code'; + @import '../_partials/_single/diagram-copy-btn'; @import '../_partials/_single/reward'; @import '../_partials/_single/footer'; @import '../_partials/_single/comment'; diff --git a/layouts/_partials/plugin/post-chat-ai.html b/layouts/_partials/plugin/post-chat-ai.html index a94b3f20..76fc232c 100644 --- a/layouts/_partials/plugin/post-chat-ai.html +++ b/layouts/_partials/plugin/post-chat-ai.html @@ -73,9 +73,9 @@ {{- if $chatConfig.enable -}} {{- $sourceOpts = dict "Attr" (printf "data-postChat_key=%q" $key) | merge $sourceOpts -}} {{- $blackDom := slice - ".expiration-reminder" "meting-js" ".lnt" + ".ln" -}} {{- with $chatConfig.blackDom -}} {{- $blackDom = $blackDom | append . -}} diff --git a/layouts/_partials/single/expiration-reminder.html b/layouts/_partials/single/expiration-reminder.html index 97a89eb7..910fe761 100644 --- a/layouts/_partials/single/expiration-reminder.html +++ b/layouts/_partials/single/expiration-reminder.html @@ -1,7 +1,8 @@ {{- $params := partial "function/params.html" -}} {{- $expirationReminder := $params.expirationReminder | default dict -}} +{{- $isEnabled := $expirationReminder.enable | and (not $params.password) -}} -{{- if $expirationReminder.enable -}} +{{- if $isEnabled -}} {{- $daysAgo := div (sub now.Unix .Lastmod.Unix) 86400 }} {{- $reminderThreshold := $expirationReminder.reminder | default 90 }} {{- $warningThreshold := $expirationReminder.warning | default 180 }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index eed22f46..ca32adfe 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -176,12 +176,13 @@ {{- /* Custom block before post content */ -}} {{- block "custom-post__content:before" . }}{{ end -}} + {{- /* Expiration Reminder */ -}} + {{- partial "single/expiration-reminder.html" . -}} + {{- /* Content */ -}} {{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- if not $params.password -}} - {{- /* Expiration Reminder */ -}} - {{- partial "single/expiration-reminder.html" . -}} {{- $content -}} {{- end -}}