mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-25 07:48:54 +00:00
refactor: move the expiration reminder outside the content (#677)
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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 . -}}
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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 -}}
|
||||
<div class="content" id="content"{{ with $params.endFlag }} data-end-flag="{{ . }}"{{ end }}>
|
||||
{{- if not $params.password -}}
|
||||
{{- /* Expiration Reminder */ -}}
|
||||
{{- partial "single/expiration-reminder.html" . -}}
|
||||
{{- $content -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user