publication.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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.view 1 }}
  54. {{ partial "publication_li_list" . }}
  55. {{ else if eq $.Params.view 3 }}
  56. {{ partial "publication_li_card" . }}
  57. {{ else if eq $.Params.view 4 }}
  58. {{ partial "publication_li_citation" . }}
  59. {{ else }}
  60. {{ partial "publication_li_compact" . }}
  61. {{ end }}
  62. </div>
  63. {{ end }}
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. {{ partial "footer_container.html" . }}
  69. {{ partial "footer.html" . }}