diff options
author | Volpeon <git@volpeon.ink> | 2022-07-31 10:00:03 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-07-31 10:00:03 +0200 |
commit | 20c5ad5a7a737d721cb39b75852a79f20502da74 (patch) | |
tree | 217a5cf991d73b482f39553ca1908f891b0611d7 /templates | |
parent | Update (diff) | |
download | volpeon.ink-20c5ad5a7a737d721cb39b75852a79f20502da74.tar.gz volpeon.ink-20c5ad5a7a737d721cb39b75852a79f20502da74.tar.bz2 volpeon.ink-20c5ad5a7a737d721cb39b75852a79f20502da74.zip |
Simplified "list" list layout code
Diffstat (limited to 'templates')
-rw-r--r-- | templates/layouts/categorized_list.html | 7 | ||||
-rw-r--r-- | templates/layouts/list.html | 7 | ||||
-rw-r--r-- | templates/layouts/page.html | 13 | ||||
-rw-r--r-- | templates/partials/gallery_card.html | 34 | ||||
-rw-r--r-- | templates/partials/grid_card.html | 40 | ||||
-rw-r--r-- | templates/partials/list_card.html | 48 |
6 files changed, 84 insertions, 65 deletions
diff --git a/templates/layouts/categorized_list.html b/templates/layouts/categorized_list.html index 1a1048a..67dc466 100644 --- a/templates/layouts/categorized_list.html +++ b/templates/layouts/categorized_list.html | |||
@@ -47,7 +47,12 @@ $body$ | |||
47 | $elseif(it.layout.is_gallery-3)$ | 47 | $elseif(it.layout.is_gallery-3)$ |
48 | $it.items:partials/gallery_card()$ | 48 | $it.items:partials/gallery_card()$ |
49 | $else$ | 49 | $else$ |
50 | $it.items:partials/list_card()$ | 50 | <div class="u-d-contents u-d-none@sm-lo"> |
51 | $it.items:partials/list_card()$ | ||
52 | </div> | ||
53 | <div class="u-d-contents u-d-none@sm-hi"> | ||
54 | $it.items:partials/grid_card()$ | ||
55 | </div> | ||
51 | $endif$ | 56 | $endif$ |
52 | </div> | 57 | </div> |
53 | $if(it.omitted)$ | 58 | $if(it.omitted)$ |
diff --git a/templates/layouts/list.html b/templates/layouts/list.html index 508ff4c..cf54c4b 100644 --- a/templates/layouts/list.html +++ b/templates/layouts/list.html | |||
@@ -24,7 +24,12 @@ $body$ | |||
24 | $elseif(list_layout.is_gallery-3)$ | 24 | $elseif(list_layout.is_gallery-3)$ |
25 | $list:partials/gallery_card()$ | 25 | $list:partials/gallery_card()$ |
26 | $else$ | 26 | $else$ |
27 | $list:partials/list_card()$ | 27 | <div class="u-d-contents u-d-none@sm-lo"> |
28 | $list:partials/list_card()$ | ||
29 | </div> | ||
30 | <div class="u-d-contents u-d-none@sm-hi"> | ||
31 | $list:partials/grid_card()$ | ||
32 | </div> | ||
28 | $endif$ | 33 | $endif$ |
29 | </div> | 34 | </div> |
30 | </div> | 35 | </div> |
diff --git a/templates/layouts/page.html b/templates/layouts/page.html index 3ba8d54..234e50e 100644 --- a/templates/layouts/page.html +++ b/templates/layouts/page.html | |||
@@ -6,22 +6,15 @@ | |||
6 | itemid="$url.full$" | 6 | itemid="$url.full$" |
7 | > | 7 | > |
8 | <article class="h-entry"> | 8 | <article class="h-entry"> |
9 | $if(date)$ | ||
10 | <time datetime="$date.yyyy_mm_dd$" class="o-badge u-mb-125 dt-published" itemprop="datePublished"> | ||
11 | $date.long$ | ||
12 | </time> | ||
13 | $endif$ | ||
14 | 9 | ||
15 | $if(was_updated)$ | 10 | $if(last_update)$ |
16 | <time datetime="$last_update.yyyy_mm_dd$" class="o-badge u-mb-125 dt-updated" itemprop="dateModified"> | 11 | <time datetime="$last_update.yyyy_mm_dd$" class="o-badge u-mb-125 dt-updated" itemprop="dateModified"> |
17 | Updated: $last_update.long$ | 12 | $last_update.long$ |
18 | </time> | 13 | </time> |
19 | $endif$ | 14 | $endif$ |
20 | 15 | ||
21 | $if(draft)$ | 16 | $if(draft)$ |
22 | <span class="o-badge u-mb-125"> | 17 | <span class="o-badge u-mb-125">Draft</span> |
23 | Draft | ||
24 | </span> | ||
25 | $endif$ | 18 | $endif$ |
26 | 19 | ||
27 | <h1 class="o-heading o-heading--xxl u-mt-0 p-name" itemprop="name headline"> | 20 | <h1 class="o-heading o-heading--xxl u-mt-0 p-name" itemprop="name headline"> |
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 @@ | |||
1 | $if(it.thumbnail)$ | ||
2 | <a | 1 | <a |
3 | href="$it.url.rel$" | 2 | href="$it.url.rel$" |
4 | class="l-card-list__card c-card t-raised h-entry" | 3 | class="l-card-list__card c-card t-raised h-entry" |
5 | itemprop="dataFeedElement" | 4 | itemprop="dataFeedElement" |
6 | itemscope | 5 | itemscope |
7 | itemtype="https://schema.org/$it.schema_type$" | 6 | itemtype="https://schema.org/$it.schema_type$" |
8 | $if(it.rel)$rel="$it.rel$"$endif$ | 7 | $if(it.rel)$ |
8 | rel="$it.rel$" | ||
9 | $endif$ | ||
9 | > | 10 | > |
10 | <link itemprop="thumbnailUrl" href="$it.thumbnail.full$" /> | 11 | <link itemprop="thumbnailUrl" href="$it.thumbnail.full$" /> |
11 | 12 | ||
@@ -32,14 +33,24 @@ $if(it.thumbnail)$ | |||
32 | $if(it.subtitle)$ | 33 | $if(it.subtitle)$ |
33 | <div> | 34 | <div> |
34 | <strong class="p-name" itemprop="name headline">$it.title$</strong> | 35 | <strong class="p-name" itemprop="name headline">$it.title$</strong> |
35 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | 36 | $if(it.draft)$ |
37 | <span class="o-badge u-ml-100">Draft</span> | ||
38 | $endif$ | ||
36 | </div> | 39 | </div> |
37 | <small class="u-d-block">$it.subtitle$</small> | 40 | <small class="u-d-block"> |
41 | $it.subtitle$ | ||
42 | </small> | ||
38 | $elseif(it.category)$ | 43 | $elseif(it.category)$ |
39 | <small class="u-d-block">$it.category$</small> | 44 | <small class="u-d-block"> |
45 | $it.category$ | ||
46 | </small> | ||
40 | <div> | 47 | <div> |
41 | <strong class="p-name" itemprop="name headline">$it.title$</strong> | 48 | <strong class="p-name" itemprop="name headline"> |
42 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | 49 | $it.title$ |
50 | </strong> | ||
51 | $if(it.draft)$ | ||
52 | <span class="o-badge u-ml-100">Draft</span> | ||
53 | $endif$ | ||
43 | </div> | 54 | </div> |
44 | $elseif(it.show_date)$ | 55 | $elseif(it.show_date)$ |
45 | <small class="u-d-block"> | 56 | <small class="u-d-block"> |
@@ -49,13 +60,17 @@ $if(it.thumbnail)$ | |||
49 | </small> | 60 | </small> |
50 | <div> | 61 | <div> |
51 | <strong class="p-name" itemprop="name headline">$it.title$</strong> | 62 | <strong class="p-name" itemprop="name headline">$it.title$</strong> |
52 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | 63 | $if(it.draft)$ |
64 | <span class="o-badge u-ml-100">Draft</span> | ||
65 | $endif$ | ||
53 | </div> | 66 | </div> |
54 | $else$ | 67 | $else$ |
55 | <span class="p-name" itemprop="name headline"> | 68 | <span class="p-name" itemprop="name headline"> |
56 | $it.title$ | 69 | $it.title$ |
57 | </span> | 70 | </span> |
58 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | 71 | $if(it.draft)$ |
72 | <span class="o-badge u-ml-100">Draft</span> | ||
73 | $endif$ | ||
59 | $endif$ | 74 | $endif$ |
60 | </div> | 75 | </div> |
61 | $if(it.post_icon)$ | 76 | $if(it.post_icon)$ |
@@ -65,4 +80,3 @@ $if(it.thumbnail)$ | |||
65 | $endif$ | 80 | $endif$ |
66 | </div> | 81 | </div> |
67 | </a> | 82 | </a> |
68 | $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 @@ | |||
4 | itemprop="dataFeedElement" | 4 | itemprop="dataFeedElement" |
5 | itemscope | 5 | itemscope |
6 | itemtype="https://schema.org/$it.schema_type$" | 6 | itemtype="https://schema.org/$it.schema_type$" |
7 | $if(it.rel)$rel="$it.rel$"$endif$ | 7 | $if(it.rel)$ |
8 | rel="$it.rel$" | ||
9 | $endif$ | ||
8 | > | 10 | > |
9 | <div class="c-card__row l-media"> | 11 | <div class="c-card__row l-media"> |
10 | $if(it.indicator)$ | 12 | $if(it.indicator)$ |
@@ -18,15 +20,27 @@ | |||
18 | <div class="l-media__block l-media__block--main"> | 20 | <div class="l-media__block l-media__block--main"> |
19 | $if(it.subtitle)$ | 21 | $if(it.subtitle)$ |
20 | <div> | 22 | <div> |
21 | <strong class="p-name" itemprop="name headline">$it.title$</strong> | 23 | <strong class="p-name" itemprop="name headline"> |
22 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | 24 | $it.title$ |
25 | </strong> | ||
26 | $if(it.draft)$ | ||
27 | <span class="o-badge u-ml-100">Draft</span> | ||
28 | $endif$ | ||
23 | </div> | 29 | </div> |
24 | <small class="u-d-block">$it.subtitle$</small> | 30 | <small class="u-d-block"> |
31 | $it.subtitle$ | ||
32 | </small> | ||
25 | $elseif(it.category)$ | 33 | $elseif(it.category)$ |
26 | <small class="u-d-block">$it.category$</small> | 34 | <small class="u-d-block"> |
35 | $it.category$ | ||
36 | </small> | ||
27 | <div> | 37 | <div> |
28 | <strong class="p-name" itemprop="name headline">$it.title$</strong> | 38 | <strong class="p-name" itemprop="name headline"> |
29 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | 39 | $it.title$ |
40 | </strong> | ||
41 | $if(it.draft)$ | ||
42 | <span class="o-badge u-ml-100">Draft</span> | ||
43 | $endif$ | ||
30 | </div> | 44 | </div> |
31 | $elseif(it.show_date)$ | 45 | $elseif(it.show_date)$ |
32 | <small class="u-d-block"> | 46 | <small class="u-d-block"> |
@@ -35,14 +49,20 @@ | |||
35 | </time> | 49 | </time> |
36 | </small> | 50 | </small> |
37 | <div> | 51 | <div> |
38 | <strong class="p-name" itemprop="name headline">$it.title$</strong> | 52 | <strong class="p-name" itemprop="name headline"> |
39 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | 53 | $it.title$ |
54 | </strong> | ||
55 | $if(it.draft)$ | ||
56 | <span class="o-badge u-ml-100">Draft</span> | ||
57 | $endif$ | ||
40 | </div> | 58 | </div> |
41 | $else$ | 59 | $else$ |
42 | <span class="p-name" itemprop="name headline"> | 60 | <span class="p-name" itemprop="name headline"> |
43 | $it.title$ | 61 | $it.title$ |
44 | </span> | 62 | </span> |
45 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | 63 | $if(it.draft)$ |
64 | <span class="o-badge u-ml-100">Draft</span> | ||
65 | $endif$ | ||
46 | $endif$ | 66 | $endif$ |
47 | </div> | 67 | </div> |
48 | $if(it.post_icon)$ | 68 | $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 @@ | |||
4 | itemprop="dataFeedElement" | 4 | itemprop="dataFeedElement" |
5 | itemscope | 5 | itemscope |
6 | itemtype="https://schema.org/$it.schema_type$" | 6 | itemtype="https://schema.org/$it.schema_type$" |
7 | $if(it.rel)$rel="$it.rel$"$endif$ | 7 | $if(it.rel)$ |
8 | rel="$it.rel$" | ||
9 | $endif$ | ||
8 | > | 10 | > |
9 | <div class="c-card__row l-media"> | 11 | <div class="c-card__row l-media"> |
10 | $if(it.indicator)$ | 12 | $if(it.indicator)$ |
@@ -15,42 +17,22 @@ | |||
15 | <use href="$assets.icons_svg$#$it.icon$"></use> | 17 | <use href="$assets.icons_svg$#$it.icon$"></use> |
16 | </svg> | 18 | </svg> |
17 | $endif$ | 19 | $endif$ |
18 | <div class="l-media__block l-media__block--main u-d-none@sm-hi"> | 20 | <div class="l-media__block l-media__block--main"> |
19 | $if(it.subtitle)$ | 21 | <span class="p-name" itemprop="name headline"> |
20 | <small class="u-d-block">$it.subtitle$</small> | 22 | $it.title$ |
21 | <div> | 23 | </span> |
22 | <strong>$it.title$</strong> | 24 | $if(it.draft)$ |
23 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | 25 | <span class="o-badge u-ml-100">Draft</span> |
24 | </div> | ||
25 | $elseif(it.category)$ | ||
26 | <small class="u-d-block">$it.category$</small> | ||
27 | <div> | ||
28 | <strong>$it.title$</strong> | ||
29 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | ||
30 | </div> | ||
31 | $elseif(it.last_update)$ | ||
32 | <small> | ||
33 | <time datetime="$it.last_update.yyyy_mm_dd$">$it.last_update.long$</time> | ||
34 | </small> | ||
35 | <div> | ||
36 | <strong>$it.title$</strong> | ||
37 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | ||
38 | </div> | ||
39 | $else$ | ||
40 | <span> | ||
41 | $it.title$ | ||
42 | </span> | ||
43 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | ||
44 | $endif$ | 26 | $endif$ |
45 | </div> | ||
46 | <div class="l-media__block l-media__block--main u-d-none@sm-lo"> | ||
47 | <span class="p-name" itemprop="name headline">$it.title$</span> | ||
48 | $if(it.draft)$<span class="o-badge u-ml-100">Draft</span>$endif$ | ||
49 | </div> | 27 | </div> |
50 | $if(it.subtitle)$ | 28 | $if(it.subtitle)$ |
51 | <small class="l-media__block u-d-none@sm-lo">$it.subtitle$</small> | 29 | <small class="l-media__block u-d-none@sm-lo"> |
30 | $it.subtitle$ | ||
31 | </small> | ||
52 | $elseif(it.category)$ | 32 | $elseif(it.category)$ |
53 | <small class="l-media__block u-d-none@sm-lo">$it.category$</small> | 33 | <small class="l-media__block u-d-none@sm-lo"> |
34 | $it.category$ | ||
35 | </small> | ||
54 | $elseif(it.show_date)$ | 36 | $elseif(it.show_date)$ |
55 | <small class="l-media__block u-d-none@sm-lo"> | 37 | <small class="l-media__block u-d-none@sm-lo"> |
56 | <time datetime="$it.last_update.yyyy_mm_dd$" class="dt-updated" itemprop="dateModified"> | 38 | <time datetime="$it.last_update.yyyy_mm_dd$" class="dt-updated" itemprop="dateModified"> |