fix jumping navbar

This commit is contained in:
matcornic 2017-08-20 18:19:36 +02:00
parent aff3307ff5
commit 2bbbf604a9

View file

@ -41,36 +41,38 @@
<div id="overlay"></div> <div id="overlay"></div>
<div class="padding highlightable sticky-parent"> <div class="padding highlightable sticky-parent">
{{if not .IsHome}} {{if not .IsHome}}
<div id="top-bar"> <div class="sticky-spacer">
{{ if and (or .IsPage .IsSection) .Site.Params.editURL }} <div id="top-bar">
{{ $File := .File }} {{ if and (or .IsPage .IsSection) .Site.Params.editURL }}
{{ $Site := .Site }} {{ $File := .File }}
{{with $File.Path }} {{ $Site := .Site }}
<div id="top-github-link"> {{with $File.Path }}
<a class="github-link" href="{{ $Site.Params.editURL }}{{ replace $File.Dir "\\" "/" }}{{ $File.LogicalName }}" target="blank"> <div id="top-github-link">
<i class="fa fa-code-fork"></i> <a class="github-link" href="{{ $Site.Params.editURL }}{{ replace $File.Dir "\\" "/" }}{{ $File.LogicalName }}" target="blank">
{{T "Edit-this-page"}} <i class="fa fa-code-fork"></i>
</a> {{T "Edit-this-page"}}
</div> </a>
</div>
{{ end }}
{{ end }} {{ end }}
{{ end }} {{$toc := (and (not .Params.disableToc) (not .Params.chapter))}}
{{$toc := (and (not .Params.disableToc) (not .Params.chapter))}} <div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
<div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"> <span id="sidebar-toggle-span">
<span id="sidebar-toggle-span"> <a href="#" id="sidebar-toggle" data-sidebar-toggle="">
<a href="#" id="sidebar-toggle" data-sidebar-toggle=""> <i class="fa fa-bars"></i>
<i class="fa fa-bars"></i> </a>
</a> </span>
{{ if $toc }}
<span id="toc-menu"><i class="fa fa-list-alt"></i></span>
{{ end }}
<span class="links">
{{ template "breadcrumb" dict "page" . "value" .Title }}
</span> </span>
</div>
{{ if $toc }} {{ if $toc }}
<span id="toc-menu"><i class="fa fa-list-alt"></i></span> {{ partial "toc.html" . }}
{{ end }} {{ end }}
<span class="links">
{{ template "breadcrumb" dict "page" . "value" .Title }}
</span>
</div> </div>
{{ if $toc }}
{{ partial "toc.html" . }}
{{ end }}
</div> </div>
{{ end }} {{ end }}