|
50 | 50 | </div>
|
51 | 51 |
|
52 | 52 | <div id="container-publications">
|
53 |
| - {{ range .Pages.ByDate.Reverse }} |
| 53 | + {{ $grouped_by_year := .Pages.GroupByDate "2006" }} |
| 54 | + {{ range $grouped_by_year }} |
| 55 | + {{ $year := .Key }} |
| 56 | + <div class="grid-sizer col-lg-12 isotope-item"> |
| 57 | + <h2 style="font-weight: 600">{{ $year }}</h2> |
| 58 | + </div> |
| 59 | + {{ range .Pages }} |
| 60 | + {{ if .Params.publication_types }} |
| 61 | + {{ $.Scratch.Set "pubtype" (index .Params.publication_types 0) }} |
| 62 | + {{ else }} |
| 63 | + {{ $.Scratch.Set "pubtype" 0 }} |
| 64 | + {{ end }} |
54 | 65 |
|
55 |
| - {{ if .Params.publication_types }} |
56 |
| - {{ $.Scratch.Set "pubtype" (index .Params.publication_types 0) }} |
57 |
| - {{ else }} |
58 |
| - {{ $.Scratch.Set "pubtype" 0 }} |
59 |
| - {{ end }} |
| 66 | + <div class="grid-sizer col-lg-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}"> |
60 | 67 |
|
61 |
| - <div class="grid-sizer col-lg-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}"> |
62 |
| - {{ if eq $.Params.view 1 }} |
63 |
| - {{ partial "li_list" . }} |
64 |
| - {{ else if eq $.Params.view 3 }} |
65 |
| - {{ partial "li_card" . }} |
66 |
| - {{ else if eq $.Params.view 4 }} |
67 |
| - {{ partial "li_citation" . }} |
68 |
| - {{ else }} |
69 |
| - {{ partial "li_compact" . }} |
| 68 | + {{ if eq $.Params.view 1 }} |
| 69 | + {{ partial "li_list" . }} |
| 70 | + {{ else if eq $.Params.view 3 }} |
| 71 | + {{ partial "li_card" . }} |
| 72 | + {{ else if eq $.Params.view 4 }} |
| 73 | + {{ partial "li_citation" . }} |
| 74 | + {{ else }} |
| 75 | + {{ partial "li_compact" . }} |
| 76 | + {{ end }} |
| 77 | + </div> |
70 | 78 | {{ end }}
|
71 |
| - </div> |
72 |
| - |
73 | 79 | {{ end }}
|
74 | 80 | </div>
|
75 | 81 |
|
|
0 commit comments