From d941ba897875f4153c9b8c4dbba3f7467970e967 Mon Sep 17 00:00:00 2001 From: razonyang Date: Tue, 19 Sep 2023 12:05:13 +0800 Subject: [PATCH] feat(icon-grid): add the alignment parameter, available options: start, center or end --- layouts/partials/bootstrap/icon-grid.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layouts/partials/bootstrap/icon-grid.html b/layouts/partials/bootstrap/icon-grid.html index 5922c9a..12c03cf 100644 --- a/layouts/partials/bootstrap/icon-grid.html +++ b/layouts/partials/bootstrap/icon-grid.html @@ -6,10 +6,12 @@ "className" "ms-1") }} {{- $border := true }} +{{- $alignment := "start" }} {{- if .IsNamedParams }} {{- $key = .Get "data" }} {{- if isset .Params "linkText" }}{{ $linkText = .Get "linkText" }}{{ end }} {{- if isset .Params "border" }}{{ $border = .Get "border" }}{{ end }} + {{- with .Get "alignment" }}{{ $alignment = . }}{{ end }} {{- else }} {{- $key = .Get 0 }} {{- end }} @@ -46,10 +48,10 @@ {{- end }} {{- if and $link (eq $linkText "") }} -
+
{{- $icon -}}{{- .title -}}

@@ -57,8 +59,8 @@

{{ else }} -
-
+
+
{{- $icon -}}{{- .title -}}