Add optional title and class to menu items.
This commit is contained in:
parent
9ef05f0c16
commit
0a10286c19
@ -9,8 +9,8 @@
|
||||
{{- $curr := . }}
|
||||
{{- range .Site.Menus.main }}
|
||||
{{- if .URL }}
|
||||
<li>
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
<li{{ with .Params.class }} class="{{ . }}"{{ end }}>
|
||||
<a href="{{ .URL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Name }}</a>
|
||||
</li>
|
||||
{{- else }}
|
||||
{{ .Name }}
|
||||
|
Reference in New Issue
Block a user