blackbirdchess-docker-dev/docs/themes/hugo-material-docs/layouts/partials/nav_link.html
2017-02-22 14:59:06 -05:00

14 lines
391 B
HTML

{{ $currentMenuEntry := .Scratch.Get "currentMenuEntry" }}
{{ $isCurrent := eq .Permalink ($currentMenuEntry.URL | absURL | printf "%s") }}
<a {{ if $isCurrent }}class="current"{{ end }} title="{{ $currentMenuEntry.Name }}" href="{{ $currentMenuEntry.URL | relURL}}">
{{ $currentMenuEntry.Pre }}
{{ $currentMenuEntry.Name }}
</a>
{{ if $isCurrent }}
<ul id="scrollspy">
</ul>
{{ end }}