baseof.html 1.6 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="page-wrapper {{ if not (.Scratch.Get "light") }}dark{{end}} {{ if not $show_navbar }}no-navbar{{end}}">
  8. {{/* Initialise theme variation. */}}
  9. {{ $wcDarkLightEnabled := site.Params.day_night | default false }}
  10. {{ $wcIsSiteThemeDark := not (.Scratch.Get "light") | default false }}
  11. {{ $js_params := dict "wcDarkLightEnabled" $wcDarkLightEnabled "wcIsSiteThemeDark" $wcIsSiteThemeDark }}
  12. {{ $js_file := resources.Get "js/wowchemy-init.js" | js.Build (dict "params" $js_params) }}
  13. <script src="{{ $js_file.RelPermalink }}"></script>
  14. {{ partial "search" . }}
  15. <div class="page-header">
  16. {{ partial "navbar" . }}
  17. </div>
  18. <div class="page-body">
  19. {{ block "main" . }}{{ end }}
  20. </div>
  21. <div class="page-footer">
  22. {{/* Docs and Updates layouts include the site footer in a different location. */}}
  23. {{ if not (in (slice "book" "docs" "updates") .Type) }}
  24. <div class="container">
  25. {{ partial "site_footer" . }}
  26. </div>
  27. {{ end }}
  28. </div>
  29. {{ partial "citation" . }}
  30. {{ partial "site_js" . }}
  31. </body>
  32. </html>