24 lines
1.2 KiB
HTML
24 lines
1.2 KiB
HTML
|
{{define "page_nav"}}
|
||
|
<ul class="nav justify-content-center {{.NavClass}} {{if eq .IsVertical true}}flex-column{{end}}{{if eq .IsTab true}}nav-tabs{{end}}" {{if eq .IsTab true}}role="tablist"{{end}}>
|
||
|
{{range $item := .NavItems}}
|
||
|
|
||
|
{{if gt (len $item.ChildItems) 0}}
|
||
|
<li class="nav-item dropdown">
|
||
|
<a href="{{$item.Link}}" {{if eq .IsDisabled true}}disabled{{end}} data-bs-toggle="dropdown"
|
||
|
class="nav-link dropdown-toggle {{if eq .IsActive true}}active{{end}} {{if eq .IsDisabled true}}disabled{{end}}">{{$item.Text}}</a>
|
||
|
<ul class="dropdown-menu">
|
||
|
{{ range $item.ChildItems}}
|
||
|
{{template "form_dropdown_item" .}}
|
||
|
{{end}}
|
||
|
</ul>
|
||
|
</li>
|
||
|
{{else}}
|
||
|
<li class="nav-item"><a href="{{$item.Link}}" {{if eq .IsDisabled true}}disabled{{end}} class="nav-link {{if eq .IsActive true}}active{{end}} {{if eq .IsDisabled true}}disabled{{end}}">
|
||
|
{{$item.Text}}
|
||
|
</a></li>
|
||
|
{{end}}
|
||
|
|
||
|
{{end}}
|
||
|
</ul>
|
||
|
{{end}}
|