baseof.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!DOCTYPE html>
  2. <html lang="{{ .Site.Language.Lang }}">
  3. <head>
  4. <title>{{ .Page.Title }}</title>
  5. <!------ ADD COMMON HEADERS -------->
  6. {{- partial "header.html" . -}}
  7. {{ template "_internal/opengraph.html" . }}
  8. {{ template "_internal/twitter_cards.html" . }}
  9. <!------ ADD PAGE SPECIFIC HEADERS ------->
  10. {{ block "header" . }} {{ end }}
  11. <!--================= add analytics if enabled =========================-->
  12. {{- partial "analytics.html" . -}}
  13. <script>
  14. theme = localStorage.getItem('theme-scheme') || localStorage.getItem('darkmode:color-scheme') || 'light';
  15. if (theme == 'system') {
  16. if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
  17. theme = 'dark';
  18. } else {
  19. theme = 'light';
  20. }
  21. }
  22. document.documentElement.setAttribute('data-theme', theme);
  23. </script>
  24. </head>
  25. <body class="type-{{ .Page.Type }} kind-{{ .Page.Kind }}" data-bs-spy="scroll" data-bs-target="#TableOfContents" data-bs-offset="80">
  26. <div class="container-fluid bg-secondary wrapper">
  27. <!----- ADD NAVBAR --------------->
  28. {{ block "navbar" . }} {{ end }}
  29. <!----- ADD SIDEBAR --------------->
  30. {{ block "sidebar" . }} {{ end }}
  31. <!----- ADD PAGE CONTENT --------->
  32. {{ block "content" . }} {{ end }}
  33. <!----- ADD TABLE OF CONTENTS ----------->
  34. {{ block "toc" . }} {{ end }}
  35. </div>
  36. <!------- ADD FOOTER ------------>
  37. {{ $footerTemplate:= site.Params.footer.template | default "footer.html" }}
  38. {{- partial $footerTemplate . -}}
  39. <!------- ADD COMMON SCRIPTS ------->
  40. {{ partial "scripts.html" . }}
  41. <!------- ADD PAGE SPECIFIC SCRIPTS ------>
  42. {{ block "scripts" . }} {{ end }}
  43. <!------ IF WANTED, ADD SUPPORT LINKS -------->
  44. {{- partial "misc/support.html" . -}}
  45. </body>
  46. </html>