Remove navbar from menu
This commit is contained in:
@@ -28,39 +28,35 @@
|
||||
{{ end }}
|
||||
|
||||
{{ with site.Menus.main }}
|
||||
<nav class="justify-content-center navbar navbar-expand-{{ $breakpoint }}" id="paige-menu">
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#paige-menu-toggler" aria-controls="paige-menu-toggler" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse justify-content-center mt-3 mt-{{ $breakpoint }}-0 navbar-collapse" id="paige-menu-toggler">
|
||||
<ul class="align-items-center flex-column flex-{{ $breakpoint }}-row justify-content-center nav {{ if $pills }} nav-pills {{ else if $tabs }} nav-tabs {{ else if $underline }} nav-underline {{ end }}">
|
||||
{{ range . }}
|
||||
{{ $menupath := strings.TrimPrefix $basepath .URL }}
|
||||
{{ $home := and (eq $menupath "/") (eq $pagepath "/") }}
|
||||
{{ $menuprefix := and (ne $menupath "/") (hasPrefix $pagepath $menupath) }}
|
||||
{{ $sectionprefix := and (ne $menupath "/") (hasPrefix $menupath (printf "/%s/" $page.Section)) }}
|
||||
{{ $active := or $home $menuprefix $sectionprefix }}
|
||||
<nav>
|
||||
<ul class="align-items-center justify-content-center nav {{ if $pills }} nav-pills {{ else if $tabs }} nav-tabs {{ else if $underline }} nav-underline {{ end }}">
|
||||
{{ range . }}
|
||||
{{ $menupath := strings.TrimPrefix $basepath .URL }}
|
||||
{{ $home := and (eq $menupath "/") (eq $pagepath "/") }}
|
||||
{{ $menuprefix := and (ne $menupath "/") (hasPrefix $pagepath $menupath) }}
|
||||
{{ $sectionprefix := and (ne $menupath "/") (hasPrefix $menupath (printf "/%s/" $page.Section)) }}
|
||||
{{ $active := or $home $menuprefix $sectionprefix }}
|
||||
|
||||
<li class="nav-item {{ if .Children }} dropdown {{ end }}">
|
||||
<a {{ if $active }} aria-current="page" {{ end }} {{ if .Children }} aria-expanded="false" {{ end }} class="{{ if $active }} active {{ end }} {{ if .Params.paige.disabled }} disabled {{ end }} nav-link {{ if .Children }} dropdown-toggle {{ end }}" {{ if .Children }} data-bs-toggle="dropdown" {{ end }} href="{{ if .Children -}} # {{- else -}} {{ .URL | safeURL }} {{- end }}" {{ if .Children }} role="button" {{ end }}>{{ .Name }}</a>
|
||||
<li class="nav-item {{ if .Children }} dropdown {{ end }}">
|
||||
<a {{ if $active }} aria-current="page" {{ end }} {{ if .Children }} aria-expanded="false" {{ end }} class="{{ if $active }} active {{ end }} {{ if .Params.paige.disabled }} disabled {{ end }} nav-link {{ if .Children }} dropdown-toggle {{ end }}" {{ if .Children }} data-bs-toggle="dropdown" {{ end }} href="{{ if .Children -}} # {{- else -}} {{ .URL | safeURL }} {{- end }}" {{ if .Children }} role="button" {{ end }}>{{ .Name }}</a>
|
||||
|
||||
{{ with .Children }}
|
||||
<ul class="dropdown-menu">
|
||||
{{ range . }}
|
||||
{{ with .Children }}
|
||||
<ul class="dropdown-menu">
|
||||
{{ range . }}
|
||||
<li>
|
||||
<a class="{{ if .Params.paige.disabled }} disabled {{ end }} dropdown-item" href="{{ .URL | safeURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
|
||||
{{ if .Params.paige.divider_below }}
|
||||
<li>
|
||||
<a class="{{ if .Params.paige.disabled }} disabled {{ end }} dropdown-item" href="{{ .URL | safeURL }}">{{ .Name }}</a>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
{{ if .Params.paige.divider_below }}
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user