From 354a0a958a801daab246951580a25ec2f3cc2f3b Mon Sep 17 00:00:00 2001 From: leafee98 Date: Tue, 24 Oct 2023 15:10:19 +0800 Subject: [PATCH] transform unhide_func from macro to included html --- template/hide.html | 28 ++++++++++++++++++++++++++++ template/index.html.njk | 34 +--------------------------------- 2 files changed, 29 insertions(+), 33 deletions(-) create mode 100644 template/hide.html diff --git a/template/hide.html b/template/hide.html new file mode 100644 index 0000000..76cdf95 --- /dev/null +++ b/template/hide.html @@ -0,0 +1,28 @@ + diff --git a/template/index.html.njk b/template/index.html.njk index 65b9772..41d7a5c 100644 --- a/template/index.html.njk +++ b/template/index.html.njk @@ -1,37 +1,5 @@ -{% macro unhide_func() %} - -{% endmacro %} - - {% macro render_item(item) %} {% set class_str = "item" %} @@ -84,7 +52,7 @@ - {{ unhide_func() }} + {% include "hide.html" %}