writing: add accordion functionality

This commit is contained in:
desmukh
2022-12-27 12:19:29 +05:00
parent 5207ecca45
commit 9135a41cd6
4 changed files with 62 additions and 6 deletions

View File

@ -1,6 +1,8 @@
<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 }}
<button class="accordion">{{ .year }}</button>
<div class="acc-panel">
{{ range where .essays "year" .year }}
<div class="writing-item">
<p><a href={{ .url }}><strong>{{ .title }}</strong></a>, <em>{{ .publication }}</em>, {{ .date }}.</p>
</div>
{{ end }}
</div>