aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-10-08 23:17:30 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-10-08 23:17:30 +0200
commit00988ceee114705f04fadb339b4eed964408064f (patch)
tree13fea866327fff3b4553bb811a5ea326b3247c70 /layouts
parent394b54f76bbe6ef51b1c0bcce9edb53c220b7b84 (diff)
Remove BookMenuBundleActiveLinkColor parameter
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/docs/menu-bundle.html19
1 files changed, 2 insertions, 17 deletions
diff --git a/layouts/partials/docs/menu-bundle.html b/layouts/partials/docs/menu-bundle.html
index eced12e..ddaac52 100644
--- a/layouts/partials/docs/menu-bundle.html
+++ b/layouts/partials/docs/menu-bundle.html
@@ -1,19 +1,4 @@
-{{ 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>
+ {{- $href := printf "href=\"%s\"" $.RelPermalink -}}
+ {{- replace .Content $href (print $href "class=active") | safeHTML -}}
{{ end }}