diff options
author | it-gro <13005925+it-gro@users.noreply.github.com> | 2019-05-02 17:00:37 +0300 |
---|---|---|
committer | it-gro <13005925+it-gro@users.noreply.github.com> | 2019-05-02 17:00:37 +0300 |
commit | df00b60371334e1f308002b46b0c1ed632996721 (patch) | |
tree | 0ae2912a24f005469aa7fe717cdc58bb858e8d73 | |
parent | 623e973c9b13ccef6595bb605ade6955f9e1f9c3 (diff) |
wip
-rw-r--r-- | layouts/partials/main.taxonomy.current.html | 4 | ||||
-rw-r--r-- | layouts/shortcodes/html-tag-classes.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/res-gallery.html | 8 | ||||
-rw-r--r-- | layouts/shortcodes/toc.html | 1 |
4 files changed, 10 insertions, 5 deletions
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) }} {{ `<!-- partials/main.taxonomy.current.html -->` | safeHTML }} {{- end}} +{{- .Scratch.Set "empty" "1" -}} <div class="w3-right-align "> {{- if .Params.categories }} {{- if not (eq (len .Params.categories) 0) }} {{- if ne (index .Params.categories 0) `` }} + {{- .Scratch.Set "empty" "0" -}} <a href='{{ `/categories` | relURL }}{{ if $.Site.Params.uglyURLs }}{{$.Site.Params.uglyUrl}}{{ end }}' class="taxonomy-button w3-button"><i class="far fa-folder-open"></i></a> {{- range $name := .Params.categories }} {{ if $name }}<a href='{{ `/categories/` | relURL }}{{ $name | urlize }}{{ if $.Site.Params.uglyURLs }}{{$.Site.Params.uglyUrl}}{{ end }}' class="taxonomy-button w3-button">{{ $name }}</a>{{ 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" -}} <a href='{{ `/tags` | relURL }}{{ if $.Site.Params.uglyURLs }}{{$.Site.Params.uglyUrl}}{{ end }}' class="taxonomy-button w3-button"><i class="fas fa-tags"></i></a> {{- range $name := .Params.tags }} {{ if $name }}<a href='{{ `/tags/` | relURL }}{{ $name | urlize }}{{ if $.Site.Params.uglyURLs }}{{$.Site.Params.uglyUrl}}{{ end }}' class="taxonomy-button w3-button">{{ $name }}</a>{{ end }} @@ -23,3 +26,4 @@ {{- end }} {{- end }} </div> +{{- if eq "1" (.Scratch.Get "empty") }}<br>{{ 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 `</%s>` ($.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}} |