Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/chipzoller/hugo-clarity.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweru <fromweru@gmail.com>2022-05-14 22:03:13 +0300
committerweru <16350351+onweru@users.noreply.github.com>2022-05-17 02:38:18 +0300
commit1f4ee2e04305d638149da8dfe121b96644961658 (patch)
treea0980b98ac6e9a6b3381b883cc792b14245d980a
parent5e8b164ec9f762daea440a886ac954752c92d21f (diff)
modify partial arguments
Signed-off-by: weru <fromweru@gmail.com>
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/partials/func/getCodeBlockSettings.html4
2 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index d5bd6c4..76125f8 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,12 +1,12 @@
{{- $s := site.Params }}
{{- $p := .Params }}
+{{ $codeBlockConfig := partial "func/getCodeBlockSettings" . }}
<!DOCTYPE html>
<html lang="{{ .Lang }}" data-figures="{{ $p.figurePositionShow }}"{{ if .IsPage }} class="page"{{ end }}{{ if .IsHome }} class="home"{{ end }}{{ with $s.enforceLightMode }} data-mode="lit"{{ end }}{{ with $s.enforceDarkMode }} data-mode="dim"{{ end }}>
<head>
{{- partial "head" . }}
{{ partial "hooks/head-end.html" . }}
</head>
- {{ $codeBlockConfig := partial "func/getCodeBlockSettings" (dict "params" .Params) }}
<body data-code="{{ $codeBlockConfig.max }}" data-lines="{{ $codeBlockConfig.lines }}" id="documentTop">
{{- partial "header" . }}
<main>
diff --git a/layouts/partials/func/getCodeBlockSettings.html b/layouts/partials/func/getCodeBlockSettings.html
index 61e7079..c4fef58 100644
--- a/layouts/partials/func/getCodeBlockSettings.html
+++ b/layouts/partials/func/getCodeBlockSettings.html
@@ -1,5 +1,5 @@
-{{- $s := site.Params }}
-{{- $p := .params }}
+{{ $s := site.Params }}
+{{ $p := .Params }}
{{ $maxCodeLines := 100 }}
{{ with $s.codeMaxLines }}
{{ $maxCodeLines = . }}