widget_page.html 979 B

12345678910111213141516171819202122232425262728293031
  1. {{ partial "header.html" . }}
  2. {{ partial "navbar.html" . }}
  3. <!-- Flag for jQuery -->
  4. <span id="homepage" style="display: none"></span>
  5. {{ if .IsHome }}
  6. {{ .Scratch.Set "section" "home" }}
  7. {{ else }}
  8. {{ .Scratch.Set "section" .Section }}
  9. {{ end }}
  10. {{ $section := .Scratch.Get "section" }}
  11. <!-- Widgets -->
  12. {{ range $index, $page := where (where .Data.Pages "Section" $section) ".Params.active" "!=" false }}
  13. {{ $params := dict "root" $ "page" $page }}
  14. {{ $widget := printf "widgets/%s.html" ( or $page.Params.widget "custom" ) }}
  15. {{ if in (slice "hero" "hero_carousel") $page.Params.widget }}
  16. {{ partial $widget $params }}
  17. {{ else }}
  18. <section id="{{ $page.File.TranslationBaseName }}" class="home-section{{ with $page.Params.css_class }} {{ . }}{{ end }}">
  19. <div class="container">
  20. {{ partial $widget $params }}
  21. </div>
  22. </section>
  23. {{ end }}
  24. {{ end }}
  25. <!-- Page Footer -->
  26. {{ partial "footer_container.html" . }}
  27. {{ partial "footer.html" . }}