index.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!DOCTYPE html>
  2. <html lang="{{ .Site.Language.Lang }}">
  3. <head>
  4. <title>{{- .Site.Title -}}</title>
  5. {{ $siteDescription := .Site.Params.description }}
  6. {{ if (index .Site.Data .Site.Language.Lang).site }}
  7. {{ $siteConfig := (index .Site.Data .Site.Language.Lang).site }}
  8. {{ if $siteConfig.description }}
  9. {{ $siteDescription = $siteConfig.description }}
  10. {{ end }}
  11. {{ end }}
  12. <meta name="description" content="{{ $siteDescription }}" />
  13. <!-- import common headers -->
  14. {{- partial "header.html" . -}}
  15. {{- partial "opengraph.html" . -}}
  16. <!--================= add analytics if enabled =========================-->
  17. {{- partial "analytics.html" . -}}
  18. {{ with resources.Get "scripts/core/theme-scheme.js" | fingerprint }}
  19. <script integrity="{{.Data.Integrity}}">
  20. {{ .Content | safeJS }}
  21. </script>
  22. {{ end }}
  23. </head>
  24. <body data-bs-spy="scroll" data-bs-target="#top-navbar" data-bs-offset="100">
  25. <!--- NAVBAR ------------------------->
  26. {{- partial "navigators/navbar.html" . -}}
  27. <!--- ADD HOME SECTION ---------------->
  28. {{- partial "sections/home.html" . -}}
  29. <!--- ADD OPTIONAL SECTIONS ----------->
  30. {{ $sections:= site.Data.sections }}
  31. {{ if (index site.Data site.Language.Lang).sections }}
  32. {{ $sections = (index site.Data site.Language.Lang).sections }}
  33. {{ end }}
  34. {{ if $sections }}
  35. {{ $background:= "bg-primary"}}
  36. {{ range sort $sections "section.weight" }}
  37. {{ if .section.enable }}
  38. <div class="container-fluid section-holder d-flex {{ $background }}">
  39. {{ if .section.template }}
  40. {{- partial .section.template . -}}
  41. {{ else }}
  42. {{- partial (printf "sections/%s.html" (replace (lower .section.id) " " "-")) . -}}
  43. {{ end }}
  44. </div>
  45. <!--- alter background color for next section --->
  46. {{ if eq $background "bg-primary" }}
  47. {{ $background = "bg-secondary" }}
  48. {{ else }}
  49. {{ $background = "bg-primary" }}
  50. {{end}}
  51. {{ end }}
  52. {{ end }}
  53. {{ end }}
  54. <!--- ADD FOOTER ----------------------->
  55. {{ $footerTemplate:= site.Params.footer.template | default "footer.html" }}
  56. {{- partial $footerTemplate . -}}
  57. <!--- ADD COMMON SCRIPTS --------------->
  58. {{ partial "scripts.html" . }}
  59. <!------ ADD SUPPORT LINKS -------->
  60. {{- partial "misc/support.html" . -}}
  61. </body>
  62. </html>