From dd0f7f7a5e70652616720b72ccc95426db699508 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Wed, 20 Feb 2019 00:28:16 +0100 Subject: [PATCH] #24: Add JS script to keep menu on same position on reload --- layouts/partials/docs/menu-bundle.html | 3 +++ layouts/partials/docs/shared.html | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/layouts/partials/docs/menu-bundle.html b/layouts/partials/docs/menu-bundle.html index dbece6c..5d90bbf 100644 --- a/layouts/partials/docs/menu-bundle.html +++ b/layouts/partials/docs/menu-bundle.html @@ -1,4 +1,7 @@ {{- template "hrefhack" . -}} {{ with .Site.GetPage .Site.Params.BookMenuBundle }} {{- .Content -}} +{{ end }} +{{ if .Site.Params.BookEnableJS }} + {{- template "jsmenu" . -}} {{ end }} \ No newline at end of file diff --git a/layouts/partials/docs/shared.html b/layouts/partials/docs/shared.html index 8354e6a..923545a 100644 --- a/layouts/partials/docs/shared.html +++ b/layouts/partials/docs/shared.html @@ -23,4 +23,17 @@ color: {{ default "#004ed0" .Site.Params.BookMenuBundleActiveLinkColor }}; } +{{ end }} + +{{ define "jsmenu" }} + {{ end }} \ No newline at end of file