diff options
author | vjeantet <valere.jeantet@gmail.com> | 2020-09-30 22:50:41 +0300 |
---|---|---|
committer | vjeantet <valere.jeantet@gmail.com> | 2020-09-30 22:50:41 +0300 |
commit | 46dd39d9e7723ec3a485b31d13e80fa8bc00e41e (patch) | |
tree | 3d2cc5c8fd07e3115cd88e62452512fb73ea2174 | |
parent | 2662ad4803420ea593050e9131b38e105301002c (diff) |
fix some shortcodes
-rw-r--r-- | layouts/shortcodes/alert.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/excerpt.html | 5 | ||||
-rw-r--r-- | layouts/shortcodes/expand.html | 15 |
3 files changed, 11 insertions, 11 deletions
diff --git a/layouts/shortcodes/alert.html b/layouts/shortcodes/alert.html index 0e1c417..66a4902 100644 --- a/layouts/shortcodes/alert.html +++ b/layouts/shortcodes/alert.html @@ -4,4 +4,4 @@ {{- with .Get "theme" -}}{{.}}{{- else -}}info{{- end -}} {{- else -}} {{- with .Get 0 -}}{{.}}{{- else -}}info{{- end -}} -{{- end -}} " role="alert">{{- .Inner | safeHTML -}}</div> +{{- end -}} " role="alert">{{- .Inner | safeHTML | markdownify -}}</div> diff --git a/layouts/shortcodes/excerpt.html b/layouts/shortcodes/excerpt.html index 7d0eb33..bc09f47 100644 --- a/layouts/shortcodes/excerpt.html +++ b/layouts/shortcodes/excerpt.html @@ -1,7 +1,8 @@ + {{with .Get "hidden"}} {{if eq . "false"}} - {{$.Inner}} + {{$.Inner | safeHTML}} {{end}} {{else}} - {{.Inner}} + {{.Inner | safeHTML}} {{end}}
\ No newline at end of file diff --git a/layouts/shortcodes/expand.html b/layouts/shortcodes/expand.html index 3a1e8a7..dd3007a 100644 --- a/layouts/shortcodes/expand.html +++ b/layouts/shortcodes/expand.html @@ -1,17 +1,16 @@ -{{ $_hugo_config := `{ "version": 1 }` }} <div class="expand"> <div class="expand-label" style="cursor: pointer;" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fas fa-chevron-down' : 'fas fa-chevron-right';});});"> <i style=";" class="fas fa-chevron-right"></i> <span> - {{$expandMessage := T "Expand-title"}} - {{ if .IsNamedParams }} - {{.Get "default" | default $expandMessage}} - {{else}} - {{.Get 0 | default $expandMessage}} - {{end}} + {{- $expandMessage := T "Expand-title" -}} + {{- if .IsNamedParams -}} + {{- .Get "default" | default $expandMessage -}} + {{- else -}} + {{- .Get 0 | default $expandMessage -}} + {{- end -}} </span> </div> <div class="expand-content" style="display: none;"> -{{- .Inner | safeHTML -}} +{{- .Inner | safeHTML | markdownify -}} </div> </div>
\ No newline at end of file |