widget_page.html 769 B

123456789101112131415161718192021222324252627
  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 .Data.Pages "Section" $section }}
  13. {{ $params := dict "root" $ "page" $page }}
  14. {{ $widget := printf "widgets/%s.html" ( or $page.Params.widget "custom" ) }}
  15. <section id="{{ $page.File.TranslationBaseName }}" class="home-section">
  16. <div class="container">
  17. {{ partial $widget $params }}
  18. </div>
  19. </section>
  20. {{ end }}
  21. <!-- Page Footer -->
  22. {{ partial "footer_container.html" . }}
  23. {{ partial "footer.html" . }}