publications.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {{ $ := .root }}
  2. {{ $page := .page }}
  3. {{ $pubs_selected_len := .pubs_selected_len }}
  4. {{ $pubs_len := len (where $.Data.Pages "Type" "publication") }}
  5. {{ if gt $pubs_len 0 }}
  6. <!-- Publications widget -->
  7. <section {{ if eq $pubs_selected_len 0 }}id="publications" {{ end }}class="home-section">
  8. <div class="container">
  9. <div class="row">
  10. <div class="col-xs-12 col-md-4 section-heading">
  11. <h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
  12. {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
  13. {{ if gt $pubs_len $page.Params.count }}
  14. <p class="view-all">
  15. <a href="{{ $.Site.BaseURL }}publication/">
  16. {{ with $page.Params.str_all }}{{ . | markdownify }}{{ end }}
  17. <i class="fa fa-angle-double-right"></i>
  18. </a>
  19. </p>
  20. {{ end }}
  21. </div>
  22. <div class="col-xs-12 col-md-8">
  23. {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
  24. {{ if $page.Params.detailed_list }}
  25. {{ range first $page.Params.count (where $.Data.Pages "Type" "publication") }}
  26. {{ partial "publication_li_detailed" . }}
  27. {{ end }}
  28. {{ else }}
  29. <ul class="fa-ul">
  30. {{ range first $page.Params.count (where $.Data.Pages "Type" "publication") }}
  31. {{ partial "publication_li_simple" . }}
  32. {{ end }}
  33. </ul>
  34. {{ end }}
  35. </div>
  36. </div>
  37. </div>
  38. </section>
  39. {{ end }}