From 6363de3b499a171850d2c83d4dba7a0bff190e6f Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Thu, 18 Apr 2024 23:47:17 +0800 Subject: [PATCH] Move site layout macro back to layout page template --- src/_includes/macros/components.njk | 6 ------ src/changelogs/pages/layouts.njk | 15 ++++++++++----- 2 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 src/_includes/macros/components.njk diff --git a/src/_includes/macros/components.njk b/src/_includes/macros/components.njk deleted file mode 100644 index 02d6bbd4..00000000 --- a/src/_includes/macros/components.njk +++ /dev/null @@ -1,6 +0,0 @@ -{%- macro siteLayoutArchive(params) -%} -

{{ params.title }}

- {% for screenshot in params.screenshots %} - {{ screenshot.imgAlt }} - {% endfor %} -{%- endmacro -%} \ No newline at end of file diff --git a/src/changelogs/pages/layouts.njk b/src/changelogs/pages/layouts.njk index c729afea..ec2fd22e 100644 --- a/src/changelogs/pages/layouts.njk +++ b/src/changelogs/pages/layouts.njk @@ -9,9 +9,14 @@ eleventyNavigation: order: 1 --- -{%- from "macros/components.njk" import siteLayoutArchive -%} +{%- macro siteLayout(params) -%} +

{{ params.title }}

+ {% for screenshot in params.screenshots %} + {{ screenshot.imgAlt }} + {% endfor %} +{%- endmacro -%} -{{ siteLayoutArchive({ +{{ siteLayout({ title: "11 September 2023 Blog Layout", screenshots: [ { @@ -21,7 +26,7 @@ eleventyNavigation: ] }) }} -{{ siteLayoutArchive({ +{{ siteLayout({ title: "23 June 2023", screenshots: [ { @@ -31,7 +36,7 @@ eleventyNavigation: ] }) }} -{{ siteLayoutArchive({ +{{ siteLayout({ title: "26 January 2023", screenshots: [ { @@ -41,7 +46,7 @@ eleventyNavigation: ] }) }} -{{ siteLayoutArchive({ +{{ siteLayout({ title: "11 September 2022 (Site Launch)", screenshots: [ {