publication.html 2.6 KB

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