diff --git a/layouts/partials/assets/navbar-item.html b/layouts/partials/assets/navbar-item.html index 002e2f93..77677198 100644 --- a/layouts/partials/assets/navbar-item.html +++ b/layouts/partials/assets/navbar-item.html @@ -70,20 +70,29 @@ {{ if not $error }} - - - {{- with $menu.Pre }} - {{ if hasPrefix . "{{ if not $isIcon }}{{ $menu.Name }}{{ end }} - {{- with $menu.Post }}{{ . }}{{ end -}} - {{- if not $isIcon }} {{ $suffix }}{{ end -}} - + {{ if $menu.Params.button }} + {{ partial "assets/button.html" (dict + "title" $menu.Name + "icon" $menu.Pre + "href" $menuURL + "size" "sm" + )}} + {{ else }} + + + {{- with $menu.Pre }} + {{ if hasPrefix . "{{ if not $isIcon }}{{ $menu.Name }}{{ end }} + {{- with $menu.Post }}{{ . }}{{ end -}} + {{- if not $isIcon }} {{ $suffix }}{{ end -}} + + {{ end }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/assets/navbar.html b/layouts/partials/assets/navbar.html index a3e5d0b1..f3337b0b 100644 --- a/layouts/partials/assets/navbar.html +++ b/layouts/partials/assets/navbar.html @@ -164,6 +164,11 @@ {{- $contrast := false -}} {{- if in (slice "primary" "secondary" "success" "danger") $color }}{{ $contrast = true }}{{ end -}} +{{- $flex := false }} +{{ if gt (where $menus "Params.spacing" true | len) 0 }} + {{ $flex = true }} +{{ end }} +