From aa15025ba0e8de1641a3977ac1fded9fe999c84c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 27 Jun 2022 09:14:24 +0200 Subject: [PATCH] fix button class handling (#444) --- layouts/shortcodes/button.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html index fb87840..7c000a3 100644 --- a/layouts/shortcodes/button.html +++ b/layouts/shortcodes/button.html @@ -1,5 +1,5 @@ {{- $ref := "" }} -{{- $target := "" }} +{{- $class := "" }} {{- $size := default "regular" (.Get "size" | lower) }} {{- if not (in (slice "regular" "large") $size) }} @@ -8,19 +8,21 @@ {{- with .Get "href" }} {{- $ref = . }} - {{- $target = "_blank" }} {{- end }} {{- with .Get "relref" }} {{- $ref = relref $ . }} {{- end }} +{{- with .Get "class" }} + {{- $class = . }} +{{- end }} - + + {{ $.Inner }}