From 789a593987be88bc3e16b8ceb7357c24ef9e5aa2 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 14 Nov 2021 16:32:43 +0100 Subject: Optimized layout structure --- templates/base.html | 2 +- templates/layouts/categorized_list.html | 48 ++++++++++++++++----------------- templates/layouts/list.html | 30 ++++++++++----------- templates/layouts/page.html | 18 ++++++------- templates/layouts/redirect.html | 8 +++--- 5 files changed, 49 insertions(+), 57 deletions(-) (limited to 'templates') diff --git a/templates/base.html b/templates/base.html index 9f439ed..0cfec50 100644 --- a/templates/base.html +++ b/templates/base.html @@ -65,7 +65,7 @@ $endif$ -
+
$if(layout.is_categorized_list)$ ${layouts/categorized_list()} $elseif(layout.is_list)$ diff --git a/templates/layouts/categorized_list.html b/templates/layouts/categorized_list.html index 256e9de..20c0ee5 100644 --- a/templates/layouts/categorized_list.html +++ b/templates/layouts/categorized_list.html @@ -1,29 +1,27 @@ -
- -
- $for(list)$ -
-

- $it.title$ -

- $if(it.content)$ - $it.content$ - $endif$ -
- $if(it.grid)$ -
- $it.items:partials/grid_card()$ -
- $else$ -
- $it.items:partials/list_card()$ -
+
+ $for(list)$ +
+

+ $it.title$ +

+ $if(it.content)$ + $it.content$ $endif$ - $endfor$ -
-
+ + $if(it.grid)$ +
+ $it.items:partials/grid_card()$ +
+ $else$ +
+ $it.items:partials/list_card()$ +
+ $endif$ + $endfor$ + diff --git a/templates/layouts/list.html b/templates/layouts/list.html index 7a9d573..ff29314 100644 --- a/templates/layouts/list.html +++ b/templates/layouts/list.html @@ -1,21 +1,19 @@ -
- -
- $if(list_grid)$ -
- $list:partials/grid_card()$ -
- $else$ -
- $list:partials/list_card()$ -
- $endif$ -
-
+
+ $if(list_grid)$ +
+ $list:partials/grid_card()$ +
+ $else$ +
+ $list:partials/list_card()$ +
+ $endif$ +
diff --git a/templates/layouts/page.html b/templates/layouts/page.html index f1060ca..f6d3b53 100644 --- a/templates/layouts/page.html +++ b/templates/layouts/page.html @@ -1,13 +1,11 @@ -
- +$body$
diff --git a/templates/layouts/redirect.html b/templates/layouts/redirect.html index a51d47e..457b4fe 100644 --- a/templates/layouts/redirect.html +++ b/templates/layouts/redirect.html @@ -1,6 +1,4 @@ -
- + -- cgit v1.2.3-70-g09d2