From df00b60371334e1f308002b46b0c1ed632996721 Mon Sep 17 00:00:00 2001 From: it-gro <13005925+it-gro@users.noreply.github.com> Date: Thu, 2 May 2019 16:00:37 +0200 Subject: wip --- layouts/partials/main.taxonomy.current.html | 4 ++++ layouts/shortcodes/html-tag-classes.html | 2 +- layouts/shortcodes/res-gallery.html | 8 ++++---- layouts/shortcodes/toc.html | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 layouts/shortcodes/toc.html diff --git a/layouts/partials/main.taxonomy.current.html b/layouts/partials/main.taxonomy.current.html index 626f9a5..6f72777 100644 --- a/layouts/partials/main.taxonomy.current.html +++ b/layouts/partials/main.taxonomy.current.html @@ -1,10 +1,12 @@ {{- if or $.Site.Params.debug (findRE `\bhtml-comment\b` $.Site.Params.traceFlags) }} {{ `` | safeHTML }} {{- end}} +{{- .Scratch.Set "empty" "1" -}}
{{- if .Params.categories }} {{- if not (eq (len .Params.categories) 0) }} {{- if ne (index .Params.categories 0) `` }} + {{- .Scratch.Set "empty" "0" -}} {{- range $name := .Params.categories }} {{ if $name }}{{ $name }}{{ end }} @@ -15,6 +17,7 @@ {{- if .Params.tags }} {{- if not (eq (len .Params.tags) 0) }} {{- if ne (index .Params.tags 0) `` }} + {{- .Scratch.Set "empty" "0" -}} {{- range $name := .Params.tags }} {{ if $name }}{{ $name }}{{ end }} @@ -23,3 +26,4 @@ {{- end }} {{- end }}
+{{- if eq "1" (.Scratch.Get "empty") }}
{{ end -}} diff --git a/layouts/shortcodes/html-tag-classes.html b/layouts/shortcodes/html-tag-classes.html index b5fbd66..3cbd5f8 100644 --- a/layouts/shortcodes/html-tag-classes.html +++ b/layouts/shortcodes/html-tag-classes.html @@ -13,5 +13,5 @@ {{- end }} {{- end }} {{- printf `'>` | safeHTML }} -{{- $.Inner }} +{{- markdownify $.Inner }} {{- printf `` ($.Get 0 ) | safeHTML }} diff --git a/layouts/shortcodes/res-gallery.html b/layouts/shortcodes/res-gallery.html index 4808f39..95780a3 100644 --- a/layouts/shortcodes/res-gallery.html +++ b/layouts/shortcodes/res-gallery.html @@ -20,10 +20,10 @@ Inspired by https://github.com/liwenyip/hugo-easy-gallery {{- $.Scratch.Set `theThumbCmdOpt` ( (.Get `thumbOpt` ) ) }} {{- $.Scratch.Set `theCaptionLong` ( (.Get `capLng` ) ) }} {{- $.Scratch.Set `theCaptionShort` ( (.Get `capSrt` ) ) }} -{{- $.Scratch.Set `theCapPos` ( (.Get `caption-position` ) | default `center` ) }} {{/* none top center bottom */}} -{{- $.Scratch.Set `theCapEff` ( (.Get `caption-effect` ) | default `appear` ) }} {{/* none fade appear slide */}} -{{- $.Scratch.Set `theHovEff` ( (.Get `hover-effect` ) | default `zoom` ) }} {{/* none grow shrink slidedown slideup zoom */}} -{{- $.Scratch.Set `theHovTra` ( (.Get `hover-transition` ) | default `` ) }} {{/* empty none */}} +{{- $.Scratch.Set `theCapPos` ( (.Get `caption-position` ) | default $.Site.Params.resGallery.defaultCaptionPosition | default `center` ) }} {{/* none top center bottom */}} +{{- $.Scratch.Set `theCapEff` ( (.Get `caption-effect` ) | default $.Site.Params.resGallery.defaultCaptionEffect | default `appear` ) }} {{/* none fade appear slide */}} +{{- $.Scratch.Set `theHovEff` ( (.Get `hover-effect` ) | default $.Site.Params.resGallery.defaultHoverEffect | default `zoom` ) }} {{/* none grow shrink slidedown slideup zoom */}} +{{- $.Scratch.Set `theHovTra` ( (.Get `hover-transition` ) | default $.Site.Params.resGallery.defaultHoverTransition | default `` ) }} {{/* empty none */}} {{- $myResPagePath := $.Scratch.Get `theResPagePath` }} {{- if eq $myResPagePath `.`}} diff --git a/layouts/shortcodes/toc.html b/layouts/shortcodes/toc.html new file mode 100644 index 0000000..3303672 --- /dev/null +++ b/layouts/shortcodes/toc.html @@ -0,0 +1 @@ +{{ .Page.TableOfContents}} -- cgit v1.2.3