mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 08:15:23 -04:00
Add missing closing tags for li in menu template example
Also: - "blank" -> "_blank" in target - Re-indent whole snippet for consistency - Do "{{ foo }}" instead of "{{foo}}" for consistency
This commit is contained in:
parent
f462b620f3
commit
000fed94e4
@ -37,24 +37,29 @@ The following is an example:
|
|||||||
{{ .Pre }}
|
{{ .Pre }}
|
||||||
<span>{{ .Name }}</span>
|
<span>{{ .Name }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
<ul class="sub-menu">
|
<ul class="sub-menu">
|
||||||
{{ range .Children }}
|
{{ range .Children }}
|
||||||
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
||||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{else}}
|
{{ else }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{.URL}}">
|
<a href="{{ .URL }}">
|
||||||
{{ .Pre }}
|
{{ .Pre }}
|
||||||
<span>{{ .Name }}</span>
|
<span>{{ .Name }}</span>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
</li>
|
||||||
{{end}}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
<li>
|
<li>
|
||||||
<a href="#" target="blank">Hardcoded Link 1</a>
|
<a href="#" target="_blank">Hardcoded Link 1</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#" target="blank">Hardcoded Link 2</a>
|
<a href="#" target="_blank">Hardcoded Link 2</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</aside>
|
</aside>
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user