Enable border by default on media

This commit is contained in:
BBaoVanC 2021-11-10 21:46:07 -06:00
parent a75d49e8bc
commit 943fb83324
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 7 additions and 7 deletions

View File

@ -1,9 +1,9 @@
{{ $hidecaption := index . "hidecaption" }}
{{ if index . "border" }}
<figure class="border">
{{ else }}
{{ if index . "noborder" }}
<figure>
{{ else }}
<figure class="border">
{{ end }}
{{ with index . "src" }}

View File

@ -1,8 +1,8 @@
{{ $resource := $.Page.Resources.GetMatch (.Get "src") }}
{{ $border := false }}
{{ if .Get "border" }}
{{ $border = true }}
{{ $noborder := false }}
{{ if .Get "noborder" }}
{{ $noborder = true }}
{{ end }}
{{ $hidecaption := false }}
@ -11,5 +11,5 @@
{{ end }}
<p>
{{ partial "figure.html" (dict "src" $resource "border" $border "hidecaption" $hidecaption) }}
{{ partial "figure.html" (dict "src" $resource "noborder" $noborder "hidecaption" $hidecaption) }}
</p>