publication.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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-4">
  16. <div class="col-auto">
  17. <input type="search" class="filter-search" placeholder="{{ i18n "search_placeholder" }}" autocapitalize="off"
  18. autocomplete="off" autocorrect="off" role="textbox" spellcheck="false">
  19. </div>
  20. <div class="col-auto">
  21. <select class="pub-filters pubtype-select form-control form-control-sm" data-filter-group="pubtype">
  22. <option value="*">{{ i18n "publication_type" }}</option>
  23. {{ partial "pub_types.html" $ }}
  24. {{ range $index, $taxonomy := .Site.Taxonomies.publication_types }}
  25. <option value=".pubtype-{{ (int $index) }}">
  26. {{ $pub_types := $.Scratch.Get "pub_types" }}
  27. {{ index $pub_types (int $index) }}
  28. </option>
  29. {{ end }}
  30. </select>
  31. </div>
  32. <div class="col-auto">
  33. <select class="pub-filters form-control form-control-sm" data-filter-group="year">
  34. <option value="*">{{ i18n "date" }}</option>
  35. {{ $years_sorted := $.Scratch.GetSortedMapValues "years" }}
  36. {{ if $years_sorted }}
  37. {{ range $year := sort $years_sorted "" "desc" }}
  38. <option value=".year-{{ $year }}">
  39. {{ $year }}
  40. </option>
  41. {{ end }}
  42. {{ end }}
  43. </select>
  44. </div>
  45. </div>
  46. <div id="container-publications">
  47. {{ range .Pages.ByDate.Reverse }}
  48. {{ if .Params.publication_types }}
  49. {{ $.Scratch.Set "pubtype" (index .Params.publication_types 0) }}
  50. {{ else }}
  51. {{ $.Scratch.Set "pubtype" 0 }}
  52. {{ end }}
  53. <div class="grid-sizer col-lg-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}">
  54. {{ if eq $.Params.view 1 }}
  55. {{ partial "li_list" . }}
  56. {{ else if eq $.Params.view 3 }}
  57. {{ partial "publication_li_card" . }}
  58. {{ else if eq $.Params.view 4 }}
  59. {{ partial "publication_li_citation" . }}
  60. {{ else }}
  61. {{ partial "li_compact" . }}
  62. {{ end }}
  63. </div>
  64. {{ end }}
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. {{ partial "footer_container.html" . }}
  70. {{ partial "footer.html" . }}