diff options
author | Volpeon <git@volpeon.ink> | 2021-11-14 10:28:18 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2021-11-14 10:28:18 +0100 |
commit | f9a74f5ca7c1e919bba46d99d65a7b3a893a7bd7 (patch) | |
tree | 14853441ca7cd8f7e283c93e871d801cd43db10a | |
parent | Generate special list metadata (diff) | |
download | volpeon.ink-f9a74f5ca7c1e919bba46d99d65a7b3a893a7bd7.tar.gz volpeon.ink-f9a74f5ca7c1e919bba46d99d65a7b3a893a7bd7.tar.bz2 volpeon.ink-f9a74f5ca7c1e919bba46d99d65a7b3a893a7bd7.zip |
List improvements
-rw-r--r-- | assets/css/components/_card-list.scss | 10 | ||||
-rw-r--r-- | content/profiles/bandcamp.md | 6 | ||||
-rw-r--r-- | content/profiles/bandcamp/index.md | 5 | ||||
-rw-r--r-- | content/profiles/bandcamp/main.md | 5 | ||||
-rw-r--r-- | content/profiles/email.md | 6 | ||||
-rw-r--r-- | content/profiles/email/index.md | 5 | ||||
-rw-r--r-- | content/profiles/email/main.md | 5 | ||||
-rw-r--r-- | content/profiles/fediverse.md | 6 | ||||
-rw-r--r-- | content/profiles/fediverse/index.md | 5 | ||||
-rw-r--r-- | content/profiles/fediverse/main.md | 5 | ||||
-rw-r--r-- | content/profiles/git.md | 6 | ||||
-rw-r--r-- | content/profiles/git/index.md | 5 | ||||
-rw-r--r-- | content/profiles/git/main.md | 5 | ||||
-rw-r--r-- | content/profiles/index.md | 7 | ||||
-rw-r--r-- | scripts/metadata_filter.lua | 13 | ||||
-rw-r--r-- | templates/layouts/categorized_list.html | 11 | ||||
-rw-r--r-- | templates/partials/grid_card.html | 3 | ||||
-rw-r--r-- | templates/partials/list_card.html | 6 |
18 files changed, 62 insertions, 52 deletions
diff --git a/assets/css/components/_card-list.scss b/assets/css/components/_card-list.scss index 2a2ae69..0f44b00 100644 --- a/assets/css/components/_card-list.scss +++ b/assets/css/components/_card-list.scss | |||
@@ -20,7 +20,9 @@ | |||
20 | @include element('category-header') { | 20 | @include element('category-header') { |
21 | margin-top: $line-height * 2rem; | 21 | margin-top: $line-height * 2rem; |
22 | color: prop(--colors --cat --fg); | 22 | color: prop(--colors --cat --fg); |
23 | } | ||
23 | 24 | ||
25 | @include element('category-title') { | ||
24 | :link, | 26 | :link, |
25 | :visited { | 27 | :visited { |
26 | text-decoration: none; | 28 | text-decoration: none; |
@@ -31,6 +33,14 @@ | |||
31 | } | 33 | } |
32 | } | 34 | } |
33 | 35 | ||
36 | @include element('category-subtitle') { | ||
37 | display: block; | ||
38 | |||
39 | p { | ||
40 | margin-top: $line-height * .25rem; | ||
41 | } | ||
42 | } | ||
43 | |||
34 | @include element('category-content') { | 44 | @include element('category-content') { |
35 | margin-top: $line-height * .5rem; | 45 | margin-top: $line-height * .5rem; |
36 | filter: drop-shadow(#{prop(--dims --obj-shadow, $global: true)} #{prop(--colors --obj-shadow, $global: true)}); | 46 | filter: drop-shadow(#{prop(--dims --obj-shadow, $global: true)} #{prop(--colors --obj-shadow, $global: true)}); |
diff --git a/content/profiles/bandcamp.md b/content/profiles/bandcamp.md new file mode 100644 index 0000000..d3a5e2b --- /dev/null +++ b/content/profiles/bandcamp.md | |||
@@ -0,0 +1,6 @@ | |||
1 | --- | ||
2 | title: Bandcamp | ||
3 | subtitle: volpeon | ||
4 | icon: parallelogram | ||
5 | url: https://bandcamp.com/volpeon | ||
6 | --- | ||
diff --git a/content/profiles/bandcamp/index.md b/content/profiles/bandcamp/index.md deleted file mode 100644 index 0a47469..0000000 --- a/content/profiles/bandcamp/index.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | --- | ||
2 | title: Bandcamp | ||
3 | icon: parallelogram | ||
4 | list_post_icon: icon-arrow-up-right | ||
5 | --- | ||
diff --git a/content/profiles/bandcamp/main.md b/content/profiles/bandcamp/main.md deleted file mode 100644 index f94213f..0000000 --- a/content/profiles/bandcamp/main.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | --- | ||
2 | title: volpeon | ||
3 | titlecase: false | ||
4 | url: https://bandcamp.com/volpeon | ||
5 | --- | ||
diff --git a/content/profiles/email.md b/content/profiles/email.md new file mode 100644 index 0000000..657d620 --- /dev/null +++ b/content/profiles/email.md | |||
@@ -0,0 +1,6 @@ | |||
1 | --- | ||
2 | title: E-Mail | ||
3 | subtitle: me@volpeon.ink | ||
4 | icon: envelope | ||
5 | url: mailto:me@volpeon.ink | ||
6 | --- | ||
diff --git a/content/profiles/email/index.md b/content/profiles/email/index.md deleted file mode 100644 index 6eef738..0000000 --- a/content/profiles/email/index.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | --- | ||
2 | title: E-Mail | ||
3 | icon: envelope | ||
4 | list_post_icon: icon-arrow-up-right | ||
5 | --- | ||
diff --git a/content/profiles/email/main.md b/content/profiles/email/main.md deleted file mode 100644 index 16f103a..0000000 --- a/content/profiles/email/main.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | --- | ||
2 | title: me@volpeon.ink | ||
3 | titlecase: false | ||
4 | url: "mailto:me@volpeon.ink" | ||
5 | --- | ||
diff --git a/content/profiles/fediverse.md b/content/profiles/fediverse.md new file mode 100644 index 0000000..d43b1fa --- /dev/null +++ b/content/profiles/fediverse.md | |||
@@ -0,0 +1,6 @@ | |||
1 | --- | ||
2 | title: Fediverse | ||
3 | subtitle: "@volpeon@mk.vulpes.one" | ||
4 | icon: graph | ||
5 | url: https://mk.vulpes.one/@volpeon | ||
6 | --- | ||
diff --git a/content/profiles/fediverse/index.md b/content/profiles/fediverse/index.md deleted file mode 100644 index 56eb848..0000000 --- a/content/profiles/fediverse/index.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | --- | ||
2 | title: Fediverse | ||
3 | icon: graph | ||
4 | list_post_icon: icon-arrow-up-right | ||
5 | --- | ||
diff --git a/content/profiles/fediverse/main.md b/content/profiles/fediverse/main.md deleted file mode 100644 index 70ee902..0000000 --- a/content/profiles/fediverse/main.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | --- | ||
2 | title: "@volpeon@mk.vulpes.one" | ||
3 | titlecase: false | ||
4 | url: "https://mk.vulpes.one/@volpeon" | ||
5 | --- | ||
diff --git a/content/profiles/git.md b/content/profiles/git.md new file mode 100644 index 0000000..63b1bfc --- /dev/null +++ b/content/profiles/git.md | |||
@@ -0,0 +1,6 @@ | |||
1 | --- | ||
2 | title: Git | ||
3 | subtitle: git.vulpes.one | ||
4 | icon: git-branch | ||
5 | url: https://git.vulpes.one/ | ||
6 | --- | ||
diff --git a/content/profiles/git/index.md b/content/profiles/git/index.md deleted file mode 100644 index 0d747a6..0000000 --- a/content/profiles/git/index.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | --- | ||
2 | title: Git | ||
3 | icon: git-branch | ||
4 | list_post_icon: icon-arrow-up-right | ||
5 | --- | ||
diff --git a/content/profiles/git/main.md b/content/profiles/git/main.md deleted file mode 100644 index fb25680..0000000 --- a/content/profiles/git/main.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | --- | ||
2 | title: "git.vulpes.one" | ||
3 | titlecase: false | ||
4 | url: "https://git.vulpes.one/" | ||
5 | --- | ||
diff --git a/content/profiles/index.md b/content/profiles/index.md index 6514367..265a23b 100644 --- a/content/profiles/index.md +++ b/content/profiles/index.md | |||
@@ -1,5 +1,6 @@ | |||
1 | --- | 1 | --- |
2 | title: Profiles | 2 | title: Profiles |
3 | position: 1 | 3 | position: 1 |
4 | list_grid: true | 4 | list_grid: true |
5 | list_post_icon: icon-arrow-up-right | ||
5 | --- | 6 | --- |
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index b16d472..b6df703 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua | |||
@@ -200,7 +200,7 @@ function generate_list(meta) | |||
200 | return meta.pages.all:map(function(cat) | 200 | return meta.pages.all:map(function(cat) |
201 | return { | 201 | return { |
202 | title = cat.title, | 202 | title = cat.title, |
203 | content = pandoc.utils.stringify(cat.content), | 203 | content = cat.content, |
204 | url = cat.url, | 204 | url = cat.url, |
205 | grid = cat.list_grid, | 205 | grid = cat.list_grid, |
206 | items = cat.pages.all:map(function(p) | 206 | items = cat.pages.all:map(function(p) |
@@ -220,7 +220,7 @@ function generate_list(meta) | |||
220 | return meta.pages.all:map(function(cat) | 220 | return meta.pages.all:map(function(cat) |
221 | return { | 221 | return { |
222 | title = cat.title, | 222 | title = cat.title, |
223 | content = pandoc.utils.stringify(cat.content), | 223 | content = cat.content, |
224 | url = cat.url, | 224 | url = cat.url, |
225 | grid = cat.list_grid, | 225 | grid = cat.list_grid, |
226 | items = cat.pages.all:flatMap(function(c) | 226 | items = cat.pages.all:flatMap(function(c) |
@@ -228,7 +228,8 @@ function generate_list(meta) | |||
228 | return c.pages.all:map(function(p) | 228 | return c.pages.all:map(function(p) |
229 | return { | 229 | return { |
230 | title = p.title, | 230 | title = p.title, |
231 | subtitle = p.subtitle or c.title, | 231 | subtitle = p.subtitle, |
232 | category = c.title, | ||
232 | url = p.url, | 233 | url = p.url, |
233 | icon = p.icon or c.icon, | 234 | icon = p.icon or c.icon, |
234 | post_icon = c.list_post_icon or cat.list_post_icon, | 235 | post_icon = c.list_post_icon or cat.list_post_icon, |
@@ -241,9 +242,9 @@ function generate_list(meta) | |||
241 | title = c.title, | 242 | title = c.title, |
242 | subtitle = c.subtitle, | 243 | subtitle = c.subtitle, |
243 | url = c.url, | 244 | url = c.url, |
244 | icon = c.icon or meta.icon, | 245 | icon = c.icon or cat.icon, |
245 | post_icon = meta.list_post_icon, | 246 | post_icon = cat.list_post_icon, |
246 | indicator = meta.list_read_indicators, | 247 | indicator = cat.list_read_indicators, |
247 | }) | 248 | }) |
248 | return l | 249 | return l |
249 | end | 250 | end |
diff --git a/templates/layouts/categorized_list.html b/templates/layouts/categorized_list.html index aea8863..256e9de 100644 --- a/templates/layouts/categorized_list.html +++ b/templates/layouts/categorized_list.html | |||
@@ -7,9 +7,14 @@ $body$ | |||
7 | 7 | ||
8 | <div class="c-card-list"> | 8 | <div class="c-card-list"> |
9 | $for(list)$ | 9 | $for(list)$ |
10 | <h2 class="c-card-list__category-header"> | 10 | <header class="c-card-list__category-header"> |
11 | <a href="$it.url.rel$">$it.title$</a> | 11 | <h2 class="c-card-list__category-title"> |
12 | </h2> | 12 | <a href="$it.url.rel$">$it.title$</a> |
13 | </h2> | ||
14 | $if(it.content)$ | ||
15 | <small class="c-card-list__category-subtitle">$it.content$</small> | ||
16 | $endif$ | ||
17 | </header> | ||
13 | $if(it.grid)$ | 18 | $if(it.grid)$ |
14 | <div class="c-card-list__category-content c-card-list__category-content--grid"> | 19 | <div class="c-card-list__category-content c-card-list__category-content--grid"> |
15 | $it.items:partials/grid_card()$ | 20 | $it.items:partials/grid_card()$ |
diff --git a/templates/partials/grid_card.html b/templates/partials/grid_card.html index 25c2271..4b24711 100644 --- a/templates/partials/grid_card.html +++ b/templates/partials/grid_card.html | |||
@@ -9,7 +9,10 @@ | |||
9 | $endif$ | 9 | $endif$ |
10 | <div class="c-card__block c-card__block--main"> | 10 | <div class="c-card__block c-card__block--main"> |
11 | $if(it.subtitle)$ | 11 | $if(it.subtitle)$ |
12 | <strong class="u-db">$it.title$</strong> | ||
12 | <small class="u-db">$it.subtitle$</small> | 13 | <small class="u-db">$it.subtitle$</small> |
14 | $elseif(it.category)$ | ||
15 | <small class="u-db">$it.category$</small> | ||
13 | <strong class="u-db">$it.title$</strong> | 16 | <strong class="u-db">$it.title$</strong> |
14 | $elseif(it.date)$ | 17 | $elseif(it.date)$ |
15 | <time datetime="$it.date.yyyy_mm_dd$"> | 18 | <time datetime="$it.date.yyyy_mm_dd$"> |
diff --git a/templates/partials/list_card.html b/templates/partials/list_card.html index 644e0d3..0ed6360 100644 --- a/templates/partials/list_card.html +++ b/templates/partials/list_card.html | |||
@@ -16,6 +16,12 @@ | |||
16 | $it.subtitle$ | 16 | $it.subtitle$ |
17 | </small> | 17 | </small> |
18 | </div> | 18 | </div> |
19 | $elseif(it.category)$ | ||
20 | <div class="c-card__block u-fs0"> | ||
21 | <small> | ||
22 | $it.category$ | ||
23 | </small> | ||
24 | </div> | ||
19 | $elseif(it.date)$ | 25 | $elseif(it.date)$ |
20 | <time datetime="$it.date.yyyy_mm_dd$" class="c-card__block u-fs0"> | 26 | <time datetime="$it.date.yyyy_mm_dd$" class="c-card__block u-fs0"> |
21 | <small class="u-dn@sm-hi"> | 27 | <small class="u-dn@sm-hi"> |