mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-25 12:01:37 +01:00
Make some page settings also configurable site wide (#182)
Adds **local** and **global** param to following front-matter vars: - hideMeta - ShowToc - TocOpen - comments Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
This commit is contained in:
parent
8222f2bd11
commit
2b3baf94bb
@ -8,7 +8,7 @@
|
|||||||
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||||
</svg>
|
</svg>
|
||||||
</h1>
|
</h1>
|
||||||
{{- if .Params.hideMeta }}{{ else }}
|
{{- if not (.Param "hideMeta") }}
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
{{- if .IsTranslated -}}
|
{{- if .IsTranslated -}}
|
||||||
<ul class="i18n_list">
|
<ul class="i18n_list">
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<div class="post-description">
|
<div class="post-description">
|
||||||
{{ .Description }}
|
{{ .Description }}
|
||||||
</div>
|
</div>
|
||||||
{{- if .Params.hideMeta }}{{ else }}
|
{{- if not (.Param "hideMeta") }}
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
{{- partial "post_meta.html" . -}}
|
{{- partial "post_meta.html" . -}}
|
||||||
{{- if .IsTranslated -}} |
|
{{- if .IsTranslated -}} |
|
||||||
@ -33,9 +33,9 @@
|
|||||||
</header>
|
</header>
|
||||||
{{- $isHidden := ((.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInSingle) | default .Params.cover.hidden )}}
|
{{- $isHidden := ((.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInSingle) | default .Params.cover.hidden )}}
|
||||||
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
|
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
|
||||||
{{- if .Params.ShowToc }}
|
{{- if (.Param "ShowToc") }}
|
||||||
<div class="toc">
|
<div class="toc">
|
||||||
<details {{if .Params.TocOpen }} open{{ end }}>
|
<details {{if (.Param "TocOpen") }} open{{ end }}>
|
||||||
<summary accesskey="c" title="(Alt + C)">
|
<summary accesskey="c" title="(Alt + C)">
|
||||||
<div class="details">{{- i18n "toc" | default "Table of Contents" }}</div>
|
<div class="details">{{- i18n "toc" | default "Table of Contents" }}</div>
|
||||||
</summary>
|
</summary>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{- if and ($.Site.Params.comments) (ne .Params.comments false) }}
|
{{- if (.Param "comments") }}
|
||||||
{{- partial "comments.html" . }}
|
{{- partial "comments.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</article>
|
</article>
|
||||||
|
Loading…
Reference in New Issue
Block a user