fix: navbar active link highlighting and scrolling

Fixes edge case caused due to responsive navbar height. More
specifically, a possible race condition between Scrollspy init and
updating its offset.

Fix #1199
This commit is contained in:
George Cushen committed 2019-07-13 00:55:22 +01:00
1 parent c56020be63
commit 64cceae099
1 file changed
+1 -2
+1 -2
View File
@@ -2,8 +2,7 @@
<html lang="{{ site.LanguageCode | default "en-us" }}">
{{ partial "site_head.html" . }}
<body id="top" data-spy="scroll" data-target="{{ if or .IsHome (eq .Type "widget_page") }}#navbar-main{{else}}#TableOfContents{{end}}" {{ if not (.Scratch.Get "light") }}class="dark"{{end}}>
<body id="top" data-spy="scroll" data-offset="70" data-target="{{ if or .IsHome (eq .Type "widget_page") }}#navbar-main{{else}}#TableOfContents{{end}}" {{ if not (.Scratch.Get "light") }}class="dark"{{end}}>
{{ partial "search" . }}