From 20c5ad5a7a737d721cb39b75852a79f20502da74 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 31 Jul 2022 10:00:03 +0200 Subject: Simplified "list" list layout code --- templates/partials/gallery_card.html | 34 +++++++++++++++++-------- templates/partials/grid_card.html | 40 ++++++++++++++++++++++-------- templates/partials/list_card.html | 48 +++++++++++------------------------- 3 files changed, 69 insertions(+), 53 deletions(-) (limited to 'templates/partials') diff --git a/templates/partials/gallery_card.html b/templates/partials/gallery_card.html index a340148..4728461 100644 --- a/templates/partials/gallery_card.html +++ b/templates/partials/gallery_card.html @@ -1,11 +1,12 @@ -$if(it.thumbnail)$ @@ -32,14 +33,24 @@ $if(it.thumbnail)$ $if(it.subtitle)$
$it.title$ - $if(it.draft)$Draft$endif$ + $if(it.draft)$ + Draft + $endif$
- $it.subtitle$ + + $it.subtitle$ + $elseif(it.category)$ - $it.category$ + + $it.category$ +
- $it.title$ - $if(it.draft)$Draft$endif$ + + $it.title$ + + $if(it.draft)$ + Draft + $endif$
$elseif(it.show_date)$ @@ -49,13 +60,17 @@ $if(it.thumbnail)$
$it.title$ - $if(it.draft)$Draft$endif$ + $if(it.draft)$ + Draft + $endif$
$else$ $it.title$ - $if(it.draft)$Draft$endif$ + $if(it.draft)$ + Draft + $endif$ $endif$ $if(it.post_icon)$ @@ -65,4 +80,3 @@ $if(it.thumbnail)$ $endif$
-$endif$ diff --git a/templates/partials/grid_card.html b/templates/partials/grid_card.html index 170f478..9a0b06e 100644 --- a/templates/partials/grid_card.html +++ b/templates/partials/grid_card.html @@ -4,7 +4,9 @@ itemprop="dataFeedElement" itemscope itemtype="https://schema.org/$it.schema_type$" - $if(it.rel)$rel="$it.rel$"$endif$ + $if(it.rel)$ + rel="$it.rel$" + $endif$ >
$if(it.indicator)$ @@ -18,15 +20,27 @@
$if(it.subtitle)$
- $it.title$ - $if(it.draft)$Draft$endif$ + + $it.title$ + + $if(it.draft)$ + Draft + $endif$
- $it.subtitle$ + + $it.subtitle$ + $elseif(it.category)$ - $it.category$ + + $it.category$ +
- $it.title$ - $if(it.draft)$Draft$endif$ + + $it.title$ + + $if(it.draft)$ + Draft + $endif$
$elseif(it.show_date)$ @@ -35,14 +49,20 @@
- $it.title$ - $if(it.draft)$Draft$endif$ + + $it.title$ + + $if(it.draft)$ + Draft + $endif$
$else$ $it.title$ - $if(it.draft)$Draft$endif$ + $if(it.draft)$ + Draft + $endif$ $endif$
$if(it.post_icon)$ diff --git a/templates/partials/list_card.html b/templates/partials/list_card.html index 24948a6..e12f62f 100644 --- a/templates/partials/list_card.html +++ b/templates/partials/list_card.html @@ -4,7 +4,9 @@ itemprop="dataFeedElement" itemscope itemtype="https://schema.org/$it.schema_type$" - $if(it.rel)$rel="$it.rel$"$endif$ + $if(it.rel)$ + rel="$it.rel$" + $endif$ >
$if(it.indicator)$ @@ -15,42 +17,22 @@ $endif$ -
- $if(it.subtitle)$ - $it.subtitle$ -
- $it.title$ - $if(it.draft)$Draft$endif$ -
- $elseif(it.category)$ - $it.category$ -
- $it.title$ - $if(it.draft)$Draft$endif$ -
- $elseif(it.last_update)$ - - - -
- $it.title$ - $if(it.draft)$Draft$endif$ -
- $else$ - - $it.title$ - - $if(it.draft)$Draft$endif$ +
+ + $it.title$ + + $if(it.draft)$ + Draft $endif$ -
-
- $it.title$ - $if(it.draft)$Draft$endif$
$if(it.subtitle)$ - $it.subtitle$ + + $it.subtitle$ + $elseif(it.category)$ - $it.category$ + + $it.category$ + $elseif(it.show_date)$