forked from tsc-vfl/hugo-page
Create initial version
This commit is contained in:
29
themes/tsc_vfl/layouts/partials/left_menu.html
Normal file
29
themes/tsc_vfl/layouts/partials/left_menu.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{{ $currentPage := .Page }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
|
||||
{{ if .HasChildren }}
|
||||
{{ range .Children }}
|
||||
{{ $submenu := "" }}
|
||||
{{ if $currentPage.IsMenuCurrent "main" . }}
|
||||
{{ $submenu = " active"}}
|
||||
{{ end }}
|
||||
<a href="{{ .URL }}" class="{{ $submenu }}">
|
||||
{{ print .Name | safeHTML }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!--<a class="nav-link" href="{{ .URL }}">
|
||||
{{/*{{ if .Pre }}
|
||||
{{ $icon := printf "<i data-feather=\"%s\"></i> " .Pre | safeHTML }}
|
||||
{{ $icon }}
|
||||
{{ end }}*/}}
|
||||
{{ $text := print .Name | safeHTML }}
|
||||
{{ $text }}
|
||||
</a>
|
||||
{{ if .HasChildren }}
|
||||
{{ range .Children }}
|
||||
{{ .Name }}
|
||||
{{ end }}
|
||||
{{ end }} -->
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user