Skip to content

Commit

Permalink
feat(toggle): add the fill parameter, default to true
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Aug 28, 2023
1 parent 4cb3080 commit df8a070
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/partials/bootstrap/toggle.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
{{- if eq .Inner "" }}{{ end }}
{{- $name := "" }}
{{- $style := "tabs" }}
{{- $fill := true }}
{{- if .IsNamedParams }}
{{- $name = .Get "name" }}
{{- with .Get "style" }}{{ $style = . }}{{ end }}
{{- if isset .Params "fill" }}{{ $fill = .Get "fill" }}{{ end }}
{{- else }}
{{- $name = .Get 0 }}
{{- with .Get 1 }}{{ $style = . }}{{ end }}
Expand All @@ -13,7 +15,7 @@
{{- $items = sort $items "Weight" }}
<div class="toggle mb-3">
<ul
class="nav nav-{{ $style }} nav-fill mb-3"
class="nav nav-{{ $style }} mb-3{{ cond $fill ` nav-fill` `` }}"
id="toggle-{{ $name }}"
role="tablist">
{{- range $i, $item := $items }}
Expand Down

0 comments on commit df8a070

Please sign in to comment.