Explorar el Código

head: Enable scrollspy support for fixed table of contents

George Cushen hace 7 años
padre
commit
71feb4ed7e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      layouts/partials/header.html

+ 1 - 1
layouts/partials/header.html

@@ -122,4 +122,4 @@
   <title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
   <title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
 
 
 </head>
 </head>
-<body id="top" data-spy="scroll" data-target="#navbar-main" data-offset="71" {{ if not ($scr.Get "light") }}class="dark"{{ end }}>
+<body id="top" data-spy="scroll" data-target="{{ if or .IsHome .Params.widgets }}#navbar-main{{ else }}#toc{{ end }}" data-offset="71" {{ if not ($scr.Get "light") }}class="dark"{{ end }}>