talks.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {{ $ := .root }}
  2. {{ $page := .page }}
  3. {{ $count := len (where $.Site.RegularPages "Type" "talk") }}
  4. <!-- Talks widget -->
  5. <div class="row">
  6. <div class="col-12 col-lg-4 section-heading">
  7. <h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
  8. {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
  9. </div>
  10. <div class="col-12 col-lg-8">
  11. {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
  12. {{ $talks := where $.Site.RegularPages "Type" "talk" }}
  13. {{/* Exclude talks shown in Featured Talks widget? */}}
  14. {{ if $page.Params.exclude_featured }}
  15. {{ $talks = (where $talks ".Params.featured" "!=" true) }}
  16. {{ end }}
  17. {{ range first $page.Params.count (sort $talks ".Params.time_start" "desc") }}
  18. {{ if eq $page.Params.view 1 }}
  19. {{ partial "talk_li_list" . }}
  20. {{ else if eq $page.Params.view 3 }}
  21. {{ partial "talk_li_card" . }}
  22. {{ else }}
  23. {{ partial "talk_li_compact" . }}
  24. {{ end }}
  25. {{ end }}
  26. {{ if gt $count $page.Params.count }}
  27. <div class="see-all">
  28. <a href="{{ ($.Site.GetPage "section" "talk").RelPermalink }}">
  29. {{ i18n "more_talks" | markdownify }}
  30. <i class="fas fa-angle-right"></i>
  31. </a>
  32. </div>
  33. {{ end }}
  34. </div>
  35. </div>