publications_featured.html 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. {{ $ := .root }}
  2. {{ $page := .page }}
  3. <!-- Featured Publications widget -->
  4. <div class="row">
  5. <div class="col-12 col-lg-4 section-heading">
  6. <h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
  7. {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
  8. </div>
  9. <div class="col-12 col-lg-8">
  10. {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
  11. {{ if and ($page.Params.publication_type) (ne $page.Params.publication_type "-1") }}
  12. {{ $.Scratch.Set "sel_pubs" (where (where (where $.Site.RegularPages "Type" "publication") ".Params.featured" true) ".Params.publication_types" "intersect" (slice $page.Params.publication_type)) }}
  13. {{ else }}
  14. {{ $.Scratch.Set "sel_pubs" (where (where $.Site.RegularPages "Type" "publication") ".Params.featured" true) }}
  15. {{ end }}
  16. {{ $sel_pubs := $.Scratch.Get "sel_pubs" }}
  17. {{ range $sel_pubs }}
  18. {{ if eq $page.Params.view 1 }}
  19. {{ partial "publication_li_list" . }}
  20. {{ else if eq $page.Params.view 3 }}
  21. {{ partial "publication_li_card" . }}
  22. {{ else if eq $page.Params.view 4 }}
  23. {{ partial "publication_li_citation" . }}
  24. {{ else }}
  25. {{ partial "publication_li_compact" . }}
  26. {{ end }}
  27. {{ end }}
  28. </div>
  29. </div>