mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🐛 Fix: collection nav and list can not show in posts that have password
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
{{- /* Collection List */ -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
|
||||
{{- if .Params.collections | and $params.collectionList | and (not $params.password) -}}
|
||||
{{- if .Params.collections | and $params.collectionList -}}
|
||||
{{- $collectionTerms := .GetTerms "collections" -}}
|
||||
{{- range $collectionTerms -}}
|
||||
{{- $pages := (where .Pages "Params.Weight" "!=" nil) | append (where .Pages "Params.Weight" "eq" nil).ByDate -}}
|
||||
{{- $open := eq (index $collectionTerms 0) . -}}
|
||||
{{- $currentKey := 0 -}}
|
||||
|
||||
<div class="details collection-details{{ if $open }} open{{ end }}">
|
||||
<div class="details collection-details{{ with $params.password }} encrypted-hidden{{ end }}{{ if $open }} open{{ end }}">
|
||||
<div class="details-summary collection-summary">
|
||||
{{ dict "Class" "fa-solid fa-layer-group fa-fw" | partial "plugin/icon.html" }}
|
||||
<span class="collection-name" data-collections="{{ T "collections" }}">{{ .LinkTitle }}</span>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{- /* Collection Navigation */ -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
|
||||
{{- if .Params.collections | and $params.collectionNavigation | and (not $params.password) -}}
|
||||
{{- if .Params.collections | and $params.collectionNavigation -}}
|
||||
{{- $collectionTerms := .GetTerms "collections" -}}
|
||||
{{- range $collectionTerms -}}
|
||||
{{- $termLink := printf `<a href="%v">%v <span>%v・%v</span></span></a>`
|
||||
@@ -10,7 +10,7 @@
|
||||
(T "collection")
|
||||
.LinkTitle
|
||||
-}}
|
||||
<div class="collection-card">
|
||||
<div class="collection-card{{ with $params.password }} encrypted-hidden{{ end }}">
|
||||
<div class="collection-title text-secondary">
|
||||
{{- dict "Collections" $termLink | T "single.includedIn.collections" | strings.FirstUpper | safeHTML }} {{ .Pages.Len -}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user