index.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. </head>
  19. <body data-spy="scroll" data-target="#top-navbar" data-offset="100">
  20. <!--- NAVBAR ------------------------->
  21. {{- partial "navigators/navbar.html" . -}}
  22. <!--- ADD HOME SECTION ---------------->
  23. {{- partial "sections/home.html" . -}}
  24. <!--- ADD OPTIONAL SECTIONS ----------->
  25. {{ $sections:= site.Data.sections }}
  26. {{ if (index site.Data site.Language.Lang).sections }}
  27. {{ $sections = (index site.Data site.Language.Lang).sections }}
  28. {{ end }}
  29. {{ if $sections }}
  30. {{ $background:= "bg-white"}}
  31. {{ range sort $sections "section.weight" }}
  32. {{ if .section.enable }}
  33. <div class="container-fluid section-holder d-flex {{ $background }}">
  34. {{ if .section.template }}
  35. {{- partial .section.template . -}}
  36. {{ else }}
  37. {{- partial (printf "sections/%s.html" (replace (lower .section.id) " " "-")) . -}}
  38. {{ end }}
  39. </div>
  40. <!--- alter background color for next section --->
  41. {{ if eq $background "bg-white" }}
  42. {{ $background = "bg-dimmed" }}
  43. {{ else }}
  44. {{ $background = "bg-white" }}
  45. {{end}}
  46. {{ end }}
  47. {{ end }}
  48. {{ end }}
  49. <!--- ADD FOOTER ----------------------->
  50. {{ $footerTemplate:= site.Params.footer.template | default "footer.html" }}
  51. {{- partial $footerTemplate . -}}
  52. <!--- ADD COMMON SCRIPTS --------------->
  53. {{ partial "scripts.html" . }}
  54. <!------ ADD SUPPORT LINKS -------->
  55. {{- partial "misc/support.html" . -}}
  56. </body>
  57. </html>