publication.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {{ partial "header.html" . }}
  2. {{ partial "navbar.html" . }}
  3. {{ partial "page_header.html" . }}
  4. <div class="universal-wrapper">
  5. <div class="row">
  6. <div class="col-lg-12">
  7. {{ with .Content }}
  8. <div class="article-style" itemprop="articleBody">{{ . }}</div>
  9. {{ end }}
  10. {{/* Array of distinct years. */}}
  11. {{ range .Pages.ByDate.Reverse }}
  12. {{ $year := print (.Date.Format "2006") }}
  13. {{ $.Scratch.SetInMap "years" $year $year }}
  14. {{ end }}
  15. <div class="form-row mb-3">
  16. <div class="col-auto">
  17. {{ i18n "filter_by_type" }}:
  18. </div>
  19. <div class="col-auto">
  20. <select class="pub-filters pubtype-select form-control form-control-sm" data-filter-group="pubtype">
  21. <option value="*">{{ i18n "filter_all" }}</option>
  22. {{ partial "pub_types.html" $ }}
  23. {{ range $index, $taxonomy := .Site.Taxonomies.publication_types }}
  24. <option value=".pubtype-{{ (int $index) }}">
  25. {{ $pub_types := $.Scratch.Get "pub_types" }}
  26. {{ index $pub_types (int $index) }}
  27. </option>
  28. {{ end }}
  29. </select>
  30. </div>
  31. <div class="col-auto">
  32. <select class="pub-filters form-control form-control-sm" data-filter-group="year">
  33. <option value="*">{{ i18n "filter_all" }}</option>
  34. {{ $years_sorted := $.Scratch.GetSortedMapValues "years" }}
  35. {{ if $years_sorted }}
  36. {{ range $year := sort $years_sorted "" "desc" }}
  37. <option value=".year-{{ $year }}">
  38. {{ $year }}
  39. </option>
  40. {{ end }}
  41. {{ end }}
  42. </select>
  43. </div>
  44. </div>
  45. <div id="container-publications">
  46. {{ range .Pages.ByDate.Reverse }}
  47. {{ if .Params.publication_types }}
  48. {{ $.Scratch.Set "pubtype" (index .Params.publication_types 0) }}
  49. {{ else }}
  50. {{ $.Scratch.Set "pubtype" 0 }}
  51. {{ end }}
  52. <div class="grid-sizer col-lg-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}">
  53. {{ if eq $.Params.list_format 1 }}
  54. {{ partial "publication_li_detailed" . }}
  55. {{ else if eq $.Params.list_format 2 }}
  56. {{ partial "publication_li_apa" . }}
  57. {{ else if eq $.Params.list_format 3 }}
  58. {{ partial "publication_li_mla" . }}
  59. {{ else if eq $.Params.list_format 4 }}
  60. {{ partial "publication_li_stream" . }}
  61. {{ else }}
  62. {{ partial "publication_li_simple" . }}
  63. {{ end }}
  64. </div>
  65. {{ end }}
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. {{ partial "footer_container.html" . }}
  71. {{ partial "footer.html" . }}