diff options
| author | aethrvmn <me@aethrvmn.gr> | 2025-09-20 22:27:35 +0000 |
|---|---|---|
| committer | aethrvmn <me@aethrvmn.gr> | 2025-09-20 22:27:35 +0000 |
| commit | 9b5f3fad7068298265dbbc8a65077f7917a090a5 (patch) | |
| tree | 0905b29eb7c03d6bc6e16dd1ebcd1ec9b6b83320 /themes/hugo-book/layouts/shortcodes | |
| parent | super simple setup guide (diff) | |
updated hugo-book theme
Diffstat (limited to '')
| -rw-r--r-- | themes/hugo-book/layouts/_shortcodes/details.html (renamed from themes/hugo-book/layouts/shortcodes/details.html) | 0 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/_shortcodes/html.html (renamed from themes/hugo-book/layouts/shortcodes/html.html) | 0 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/_shortcodes/i18n.html (renamed from themes/hugo-book/layouts/shortcodes/i18n.html) | 0 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/_shortcodes/mermaid.html (renamed from themes/hugo-book/layouts/shortcodes/mermaid.html) | 6 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/_shortcodes/section.html (renamed from themes/hugo-book/layouts/shortcodes/section.html) | 0 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/_shortcodes/tab.html (renamed from themes/hugo-book/layouts/shortcodes/tab.html) | 0 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/_shortcodes/tabs.html (renamed from themes/hugo-book/layouts/shortcodes/tabs.html) | 0 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/shortcodes/button.html | 12 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/shortcodes/columns.html | 9 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/shortcodes/hint.html | 3 | ||||
| -rw-r--r-- | themes/hugo-book/layouts/shortcodes/katex.html | 13 |
11 files changed, 3 insertions, 40 deletions
diff --git a/themes/hugo-book/layouts/shortcodes/details.html b/themes/hugo-book/layouts/_shortcodes/details.html index a80209b..a80209b 100644 --- a/themes/hugo-book/layouts/shortcodes/details.html +++ b/themes/hugo-book/layouts/_shortcodes/details.html diff --git a/themes/hugo-book/layouts/shortcodes/html.html b/themes/hugo-book/layouts/_shortcodes/html.html index b447d45..b447d45 100644 --- a/themes/hugo-book/layouts/shortcodes/html.html +++ b/themes/hugo-book/layouts/_shortcodes/html.html diff --git a/themes/hugo-book/layouts/shortcodes/i18n.html b/themes/hugo-book/layouts/_shortcodes/i18n.html index b65f70a..b65f70a 100644 --- a/themes/hugo-book/layouts/shortcodes/i18n.html +++ b/themes/hugo-book/layouts/_shortcodes/i18n.html diff --git a/themes/hugo-book/layouts/shortcodes/mermaid.html b/themes/hugo-book/layouts/_shortcodes/mermaid.html index 07a3bfc..078d7d3 100644 --- a/themes/hugo-book/layouts/shortcodes/mermaid.html +++ b/themes/hugo-book/layouts/_shortcodes/mermaid.html @@ -1,12 +1,12 @@ -{{ if not (.Page.Scratch.Get "mermaid") }} +{{ if not (.Page.Store.Get "mermaid") }} <!-- Include mermaid only first time --> <script src="{{ "mermaid.min.js" | relURL }}"></script> {{ with resources.Get "mermaid.json" }} <script>mermaid.initialize({{ .Content | safeJS }})</script> {{ end }} -{{ .Page.Scratch.Set "mermaid" true }} +{{ .Page.Store.Set "mermaid" true }} {{ end }} <pre class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}"> - {{- .Inner -}} + {{- .Inner | htmlEscape | safeHTML -}} </pre> diff --git a/themes/hugo-book/layouts/shortcodes/section.html b/themes/hugo-book/layouts/_shortcodes/section.html index b700ec4..b700ec4 100644 --- a/themes/hugo-book/layouts/shortcodes/section.html +++ b/themes/hugo-book/layouts/_shortcodes/section.html diff --git a/themes/hugo-book/layouts/shortcodes/tab.html b/themes/hugo-book/layouts/_shortcodes/tab.html index b5a753d..b5a753d 100644 --- a/themes/hugo-book/layouts/shortcodes/tab.html +++ b/themes/hugo-book/layouts/_shortcodes/tab.html diff --git a/themes/hugo-book/layouts/shortcodes/tabs.html b/themes/hugo-book/layouts/_shortcodes/tabs.html index fecbbeb..fecbbeb 100644 --- a/themes/hugo-book/layouts/shortcodes/tabs.html +++ b/themes/hugo-book/layouts/_shortcodes/tabs.html diff --git a/themes/hugo-book/layouts/shortcodes/button.html b/themes/hugo-book/layouts/shortcodes/button.html deleted file mode 100644 index efae3e0..0000000 --- a/themes/hugo-book/layouts/shortcodes/button.html +++ /dev/null @@ -1,12 +0,0 @@ -{{- $ref := "" }} -{{- $target := "" -}} -{{- with .Get "href" -}} - {{- $ref = . -}} - {{- $target = "_blank" -}} -{{- end -}} -{{- with .Get "relref" -}} - {{- $ref = relref $ . -}} -{{- end -}} -<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}"> - {{- .InnerDeindent -}} -</a> diff --git a/themes/hugo-book/layouts/shortcodes/columns.html b/themes/hugo-book/layouts/shortcodes/columns.html deleted file mode 100644 index bb01da9..0000000 --- a/themes/hugo-book/layouts/shortcodes/columns.html +++ /dev/null @@ -1,9 +0,0 @@ -{{- $ratio := (split (.Get "ratio") ":") -}} -<div class="book-columns flex flex-wrap{{ with .Get "class" }} {{ . }}{{ end }}"> -{{ range $index, $content := split .InnerDeindent "<--->" }} - {{- $grow := default 1 (index $ratio $index) -}} - <div class="flex-even markdown-inner" style="flex-grow: {{ $grow }};"> - {{ $content | safeHTML }} - </div> -{{ end }} -</div> diff --git a/themes/hugo-book/layouts/shortcodes/hint.html b/themes/hugo-book/layouts/shortcodes/hint.html deleted file mode 100644 index 95e4f83..0000000 --- a/themes/hugo-book/layouts/shortcodes/hint.html +++ /dev/null @@ -1,3 +0,0 @@ -<blockquote class="book-hint {{ .Get 0 }}"> - {{ .Inner | safeHTML }} -</blockquote> diff --git a/themes/hugo-book/layouts/shortcodes/katex.html b/themes/hugo-book/layouts/shortcodes/katex.html deleted file mode 100644 index 4eafc35..0000000 --- a/themes/hugo-book/layouts/shortcodes/katex.html +++ /dev/null @@ -1,13 +0,0 @@ -{{- if not (.Page.Scratch.Get "katex") -}} -<!-- Include katex only first time --> -<link rel="stylesheet" href="{{ "katex/katex.min.css" | relURL }}" /> -<script defer src="{{ "katex/katex.min.js" | relURL }}"></script> -<script defer src="{{ "katex/auto-render.min.js" | relURL }}" onload="renderMathInElement(document.body);"></script> -{{- .Page.Scratch.Set "katex" true -}} -{{- end -}} - -<span {{- with .Get "class" }} class="{{ . }}"{{ end }}> - {{ with .Get "display" }}\[{{else}}\({{end}} - {{- .InnerDeindent -}} - {{ with .Get "display" }}\]{{else}}\){{end}} -</span> |
