publication.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {{ partial "header.html" . }}
  2. {{ partial "navbar.html" . }}
  3. {{ partial "header_image.html" . }}
  4. <div class="container">
  5. <div class="row">
  6. <div class="col-md-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. <p>
  17. {{ i18n "filter_by_type" }}:
  18. <select class="pub-filters pubtype-select" data-filter-group="pubtype">
  19. <option value="*">{{ i18n "filter_all" }}</option>
  20. {{ range $index, $taxonomy := .Site.Taxonomies.publication_types }}
  21. <option value=".pubtype-{{ (int $index) }}">
  22. {{ index $.Site.Params.publication_types (int $index) }}
  23. </option>
  24. {{ end }}
  25. </select>
  26. <select class="pub-filters" data-filter-group="year">
  27. <option value="*">{{ i18n "filter_all" }}</option>
  28. {{ $years_sorted := $.Scratch.GetSortedMapValues "years" }}
  29. {{ range $year := sort $years_sorted "" "desc" }}
  30. <option value=".year-{{ $year }}">
  31. {{ $year }}
  32. </option>
  33. {{ end }}
  34. </select>
  35. </p>
  36. <div id="container-publications">
  37. {{ range .Pages.ByDate.Reverse }}
  38. {{ if .Params.publication_types }}
  39. {{ $.Scratch.Set "pubtype" (index .Params.publication_types 0) }}
  40. {{ else }}
  41. {{ $.Scratch.Set "pubtype" 0 }}
  42. {{ end }}
  43. <div class="grid-sizer col-md-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}">
  44. {{ if eq $.Params.list_format 1 }}
  45. {{ partial "publication_li_detailed" . }}
  46. {{ else if eq $.Params.list_format 2 }}
  47. {{ partial "publication_li_apa" . }}
  48. {{ else if eq $.Params.list_format 3 }}
  49. {{ partial "publication_li_mla" . }}
  50. {{ else }}
  51. {{ partial "publication_li_simple" . }}
  52. {{ end }}
  53. </div>
  54. {{ end }}
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. {{ partial "footer_container.html" . }}
  60. {{ partial "footer.html" . }}