baseof.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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="page-wrapper {{ 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. <div class="page-header">
  22. {{ partial "navbar" . }}
  23. </div>
  24. <div class="page-body">
  25. {{ block "main" . }}{{ end }}
  26. </div>
  27. <div class="page-footer">
  28. {{/* Docs and Updates layouts include the site footer in a different location. */}}
  29. {{ if not (in (slice "book" "docs" "updates") .Type) }}
  30. <div class="container">
  31. {{ partial "site_footer" . }}
  32. </div>
  33. {{ end }}
  34. </div>
  35. {{ partial "citation" . }}
  36. {{ partial "site_js" . }}
  37. </body>
  38. </html>