baseof.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. {{- $language_code := site.LanguageCode | default "en-us" -}}
  3. <html lang="{{$language_code}}" {{ if in site.Data.i18n.rtl.rtl $language_code }}dir="rtl"{{end}}>
  4. {{ partial "site_head" . }}
  5. {{ $show_navbar := site.Params.main_menu.enable | default true }}
  6. {{- $highlight_active_link := site.Params.main_menu.highlight_active_link | default true -}}
  7. <body id="top" data-spy="scroll" {{ if $show_navbar }}data-offset="70"{{end}} data-target="{{ if or .IsHome (eq .Type "widget_page") | and $highlight_active_link }}#navbar-main{{else}}#TableOfContents{{end}}" class="{{ if not (.Scratch.Get "light") }}dark{{end}} {{ if not $show_navbar }}no-navbar{{end}}">
  8. {{/* Load day/night theme. */}}
  9. {{/* Initialise default theme. */}}
  10. {{ if site.Params.day_night }}
  11. <script>window.wcDarkLightEnabled = true;</script>
  12. {{ end }}
  13. {{ if eq (.Scratch.Get "light") true }}
  14. <script>const isSiteThemeDark = false;</script>
  15. {{ else }}
  16. <script>const isSiteThemeDark = true;</script>
  17. {{ end }}
  18. {{ $load_theme := resources.Get "js/load-theme.js" }}
  19. <script src="{{ $load_theme.RelPermalink }}"></script>
  20. {{ partial "search" . }}
  21. {{ partial "navbar" . }}
  22. {{ block "main" . }}{{ end }}
  23. {{ partial "site_js" . }}
  24. {{/* Docs and Updates layouts include the site footer in a different location. */}}
  25. {{ if not (in (slice "book" "docs" "updates") .Type) }}
  26. <div class="container">
  27. {{ partial "site_footer" . }}
  28. </div>
  29. {{ end }}
  30. {{ partial "citation" . }}
  31. </body>
  32. </html>