Skip to content

Commit

Permalink
feat(icon-grid): add the gap parameter, default to 4 (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Jan 14, 2024
1 parent 8ab31c0 commit 3707afa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/partials/bootstrap/icon-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
}}
{{- $border := true }}
{{- $alignment := "start" }}
{{- $gap := 4 }}
{{- $itemAttrs := slice }}
{{- 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 }}
{{- with .Get "gap" }}{{ $gap = . }}{{ end }}
{{- $itemAttrs = partial "bootstrap/functions/attributes" (dict "Params" .Params "Prefix" "item-attr") }}
{{- else }}
{{- $key = .Get 0 }}
{{- end }}
{{- $data := partialCached "bootstrap/functions/data" (dict "key" $key "page" .Page) .Page $key }}
{{- with $data }}
<div class="bs-icon-grid row g-4 row-cols-1 row-cols-md-2 row-cols-lg-3 mb-5">
<div class="bs-icon-grid row g-{{ $gap }} row-cols-1 row-cols-md-2 row-cols-lg-3 mb-5">
{{- range sort . "weight" }}
<div class="col">
{{- $icon := "" }}
Expand Down

0 comments on commit 3707afa

Please sign in to comment.