Duoling bug report and further improvements

This commit is contained in:
2022-06-07 23:31:36 +00:00
parent 9859c9e5ba
commit 64621d4375
11 changed files with 118 additions and 39 deletions

View File

@@ -0,0 +1,20 @@
{{ $currentPage := . }}
{{ if .HasChildren }}
<li class='{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}'>
<a href='#'>{{ .Pre }}<span>{{ .Name }}</span></a>
</li>
<ul class='sub-menu'>
{{ range .Children }}
<li class='{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}'>
<a href='{{ .URL }}'>{{ .Name }}</a>
</li>
{{ end }}
</ul>
{{ else }}
<li>
<a href='{{ .URL }}'>
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}