From 1ca227186a495eebde4da73b9ccd8860593f1c21 Mon Sep 17 00:00:00 2001 From: desmukh Date: Tue, 27 Dec 2022 12:23:24 +0500 Subject: [PATCH] writing: refactor essay section as partial --- layouts/partials/essay-section.html | 16 ++++++++++++++++ layouts/writing/list.html | 17 +---------------- 2 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 layouts/partials/essay-section.html diff --git a/layouts/partials/essay-section.html b/layouts/partials/essay-section.html new file mode 100644 index 0000000..d0a8072 --- /dev/null +++ b/layouts/partials/essay-section.html @@ -0,0 +1,16 @@ +
+
+
+
ESSAYS
+
+
+ {{ 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"}} +
+
+
\ No newline at end of file diff --git a/layouts/writing/list.html b/layouts/writing/list.html index 9a57e6a..dd1f8da 100644 --- a/layouts/writing/list.html +++ b/layouts/writing/list.html @@ -1,22 +1,7 @@ {{ define "main"}}
-
-
-
-
ESSAYS
-
-
- {{ 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"}} -
-
-
+ {{ partial "essay-section" . }}
BOOKS
{{ range .Params.Books }}