writing: new partial to filter essays by year
This commit is contained in:
parent
4f78613498
commit
5207ecca45
6
layouts/partials/essay-accordion.html
Normal file
6
layouts/partials/essay-accordion.html
Normal file
@ -0,0 +1,6 @@
|
||||
<h2>{{ .year }}</h2>
|
||||
{{ range where .essays "year" .year }}
|
||||
<div class="writing-item">
|
||||
<p>{{ .year }}. <a href={{ .url }}><strong>{{ .title }}</strong></a>, <em>{{ .publication }}</em>, {{ .date }}.</p>
|
||||
</div>
|
||||
{{ end }}
|
@ -2,12 +2,19 @@
|
||||
<div id="content" class="section writing">
|
||||
<div>
|
||||
<div class="writing-section">
|
||||
<div class="thead">ESSAYS</div>
|
||||
{{ range .Params.Essays }}
|
||||
<div class="writing-item">
|
||||
<p>{{ .year }}. <a href={{ .url }}><strong>{{ .title }}</strong></a>, <em>{{ .publication }}</em>, {{ .date }}.</p>
|
||||
<div class="columns">
|
||||
<div class="column is-one-fifth" >
|
||||
<div class="thead">ESSAYS</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="column">
|
||||
{{ partial "essay-accordion" (dict "essays" .Params.Essays "year" 2022)}}
|
||||
{{ partial "essay-accordion" (dict "essays" .Params.Essays "year" 2021)}}
|
||||
{{ partial "essay-accordion" (dict "essays" .Params.Essays "year" 2020)}}
|
||||
{{ partial "essay-accordion" (dict "essays" .Params.Essays "year" 2019)}}
|
||||
{{ partial "essay-accordion" (dict "essays" .Params.Essays "year" 2018)}}
|
||||
{{ partial "essay-accordion" (dict "essays" .Params.Essays "year" 2017)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-row-books">
|
||||
<div class="thead">BOOKS</div>
|
||||
|
Loading…
Reference in New Issue
Block a user