From 943fb833240ae4e032be59f2c92df93f7ed60a6c Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Wed, 10 Nov 2021 21:46:07 -0600 Subject: [PATCH] Enable border by default on media --- layouts/partials/figure.html | 6 +++--- layouts/shortcodes/figure.html | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/layouts/partials/figure.html b/layouts/partials/figure.html index f9cdfc1..56f999a 100644 --- a/layouts/partials/figure.html +++ b/layouts/partials/figure.html @@ -1,9 +1,9 @@ {{ $hidecaption := index . "hidecaption" }} -{{ if index . "border" }} -
-{{ else }} +{{ if index . "noborder" }}
+{{ else }} +
{{ end }} {{ with index . "src" }} diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 5eb286d..8d8ff9b 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -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 }}

- {{ partial "figure.html" (dict "src" $resource "border" $border "hidecaption" $hidecaption) }} + {{ partial "figure.html" (dict "src" $resource "noborder" $noborder "hidecaption" $hidecaption) }}