mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🐛 Fix: use function to get params replace of .Scatch (#420)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{{- /* Read the config and format */ -}}
|
||||
{{- $params := .Page.Scratch.Get "params" -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
{{- $h1Format := $params.heading.number.format.h1 | default "{title}" -}}
|
||||
{{- $h2Format := $params.heading.number.format.h2 | default "{h2} {title}" -}}
|
||||
{{- $h3Format := $params.heading.number.format.h3 | default "{h2}.{h3} {title}" -}}
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
</figcaption>
|
||||
</figure>
|
||||
{{- else -}}
|
||||
{{- $linked := (eq (.Page.Scratch.Get "params").lightgallery "force") | or (ne .Title "") -}}
|
||||
{{- $linked := (eq (partial "function/params.html").lightgallery "force") | or (ne .Title "") -}}
|
||||
{{- dict "Src" .Destination "Alt" .Text "Title" .Title "Linked" $linked "Responsive" true | partial "plugin/image.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<script>(window.localStorage?.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('{{ $theme }}' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : '{{ $theme }}' === 'dark')) && document.body.setAttribute('data-theme', 'dark');</script>
|
||||
|
||||
{{- /* Body wrapper */ -}}
|
||||
<div class="wrapper" data-page-style="{{ (.Scratch.Get `params`).pageStyle | default `normal` }}">
|
||||
<div class="wrapper" data-page-style="{{ (partial `function/params.html`).pageStyle | default `normal` }}">
|
||||
{{- partial "header.html" . -}}
|
||||
{{- partial "breadcrumb.html" . -}}
|
||||
{{- $toc := .Scratch.Get "toc" -}}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
{{- $params := .Scratch.Get "params" -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
<article class="page single special">
|
||||
<div class="header">
|
||||
{{- /* Title */ -}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- $params := .Scratch.Get "params" -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
{{- $author := .Store.Get "author" -}}
|
||||
# {{ .Title }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user