writing: refactor essay section as partial

This commit is contained in:
desmukh 2022-12-27 12:23:24 +05:00
parent eede62d12d
commit 1ca227186a
2 changed files with 17 additions and 16 deletions

View File

@ -0,0 +1,16 @@
<div class="writing-section">
<div class="columns">
<div class="column is-one-fifth" >
<div class="thead">ESSAYS</div>
</div>
<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)}}
{{ partial "accordion-script"}}
</div>
</div>
</div>

View File

@ -1,22 +1,7 @@
{{ define "main"}}
<div id="writing-page" class="section writing">
<div>
<div class="writing-section">
<div class="columns">
<div class="column is-one-fifth" >
<div class="thead">ESSAYS</div>
</div>
<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)}}
{{ partial "accordion-script"}}
</div>
</div>
</div>
{{ partial "essay-section" . }}
<div class="flex-row-books">
<div class="thead">BOOKS</div>
{{ range .Params.Books }}