Remove BookMenuBundleActiveLinkColor parameter

This commit is contained in:
Alex Shpak 2019-10-08 23:17:30 +02:00
parent 394b54f76b
commit 00988ceee1
7 changed files with 5 additions and 28 deletions

View file

@ -144,9 +144,6 @@ disableKinds = ['taxonomy', 'taxonomyTerm']
# You can also set value to "*" to render all sections to menu
BookSection = 'docs'
# (Optional) This value is duplicate of $link-color for making active link highlight in menu bundle mode
# BookMenuBundleActiveLinkColor = '\#05b'
# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
BookRepo = 'https://github.com/alex-shpak/hugo-book'

View file

@ -156,6 +156,7 @@ ul.pagination {
border-radius: $padding-4;
background: $gray-100;
color: $body-font-color;
&:required + .book-search-spinner {
display: block;

View file

@ -32,9 +32,6 @@ pygmentsCodeFences = true
# You can also set value to '*' to render all sections to menu
BookSection = 'docs'
# (Optional) This value is duplicate of $link-color for making active link highlight in menu bundle mode
# BookMenuBundleActiveLinkColor = '\#05b'
# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
BookRepo = 'https://github.com/alex-shpak/hugo-book'

View file

@ -32,9 +32,6 @@ params:
# You can also set value to '*' to render all sections to menu
BookSection: docs
# (Optional) This value is duplicate of $link-color for making active link highlight in menu bundle mode
# BookMenuBundleActiveLinkColor: "\#05b"
# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
BookRepo: https://github.com/alex-shpak/hugo-book

View file

@ -1 +1 @@
{"Target":"book.min.4e5c3d92718456dab80c87ced0c4c63d3984fb3a742f718957ca25c01c6dcdb6.css","MediaType":"text/css","Data":{"Integrity":"sha256-Tlw9knGEVtq4DIfO0MTGPTmE+zp0L3GJV8olwBxtzbY="}}
{"Target":"book.min.0ff68478dc11e28fc277189da0da67c6f39e056233a7854326a1822af251be29.css","MediaType":"text/css","Data":{"Integrity":"sha256-D/aEeNwR4o/CdxidoNpnxvOeBWIzp4VDJqGCKvJRvik="}}

View file

@ -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 }}