Add temporary workaround to higlight active linkn in menu bundle

This commit is contained in:
Alex Shpak 2019-02-11 23:06:48 +01:00
parent 4ce973a4e2
commit fa58475a37
2 changed files with 8 additions and 0 deletions

View file

@ -18,6 +18,9 @@ params:
# if not specified file structure and weights will be used # if not specified file structure and weights will be used
BookMenuBundle: /menu BookMenuBundle: /menu
# This value is duplicate of $link-color for making active link highlight in menu bundle mode
# BookMenuBundleActiveLinkColor: \#004ed0
# specify section of content to render as menu # specify section of content to render as menu
# if bookMenuBundle is not set, 'docs' is value by default # if bookMenuBundle is not set, 'docs' is value by default
BookSection: docs BookSection: docs

View file

@ -1,3 +1,8 @@
<style>
nav ul a[href="{{- .Permalink -}}"] {
color: {{ default .Site.Params.BookMenuBundleActiveLinkColor "#004ed0" }};
}
</style>
{{ with .Site.GetPage .Site.Params.BookMenuBundle }} {{ with .Site.GetPage .Site.Params.BookMenuBundle }}
{{- .Content -}} {{- .Content -}}
{{ end }} {{ end }}