aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/menu-bundle.html
blob: eced12efe3aefc588eca041bf67064c8bf4ca858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{ template "hrefhack" . }}
{{ with .Site.GetPage .Site.Params.BookMenuBundle }}
  {{- .Content -}}
{{ end }}

{{ define "hrefhack" }}
  {{ $attrEq := "$=" }}
  {{ $attrVal := .RelPermalink }}
  {{ if eq .RelPermalink "/" }}
    {{ $attrEq = "=" }}
    {{ $attrVal = .Permalink }}
  {{ end }}

  <style>
  nav ul a[href{{ $attrEq }}"{{ $attrVal }}"] {
    color: {{ default "#004ed0" .Site.Params.BookMenuBundleActiveLinkColor }};
  }
  </style>
{{ end }}