diff options
| author | Volpeon <git@volpeon.ink> | 2022-06-16 13:48:07 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2022-06-16 13:48:07 +0200 |
| commit | 03c2acb3d2a7d41a6a44eb0b2ee266bf31dccda7 (patch) | |
| tree | b16b77c56b2051aba16efe2417727bc4577aab0f | |
| parent | WIP: Adding metadata (diff) | |
| download | volpeon.ink-03c2acb3d2a7d41a6a44eb0b2ee266bf31dccda7.tar.gz volpeon.ink-03c2acb3d2a7d41a6a44eb0b2ee266bf31dccda7.tar.bz2 volpeon.ink-03c2acb3d2a7d41a6a44eb0b2ee266bf31dccda7.zip | |
More metadata
| -rw-r--r-- | content/profiles/bandcamp.md | 1 | ||||
| -rw-r--r-- | content/profiles/email.md | 1 | ||||
| -rw-r--r-- | content/profiles/fediverse.md | 1 | ||||
| -rw-r--r-- | scripts/metadata_filter.lua | 2 | ||||
| -rw-r--r-- | templates/partials/gallery_card.html | 105 | ||||
| -rw-r--r-- | templates/partials/grid_card.html | 85 | ||||
| -rw-r--r-- | templates/partials/list_card.html | 93 |
7 files changed, 157 insertions, 131 deletions
diff --git a/content/profiles/bandcamp.md b/content/profiles/bandcamp.md index d3a5e2b..d55a3b8 100644 --- a/content/profiles/bandcamp.md +++ b/content/profiles/bandcamp.md | |||
| @@ -3,4 +3,5 @@ title: Bandcamp | |||
| 3 | subtitle: volpeon | 3 | subtitle: volpeon |
| 4 | icon: parallelogram | 4 | icon: parallelogram |
| 5 | url: https://bandcamp.com/volpeon | 5 | url: https://bandcamp.com/volpeon |
| 6 | rel: me | ||
| 6 | --- | 7 | --- |
diff --git a/content/profiles/email.md b/content/profiles/email.md index 657d620..99c3de1 100644 --- a/content/profiles/email.md +++ b/content/profiles/email.md | |||
| @@ -3,4 +3,5 @@ title: E-Mail | |||
| 3 | subtitle: me@volpeon.ink | 3 | subtitle: me@volpeon.ink |
| 4 | icon: envelope | 4 | icon: envelope |
| 5 | url: mailto:me@volpeon.ink | 5 | url: mailto:me@volpeon.ink |
| 6 | rel: me | ||
| 6 | --- | 7 | --- |
diff --git a/content/profiles/fediverse.md b/content/profiles/fediverse.md index d43b1fa..3bde3d4 100644 --- a/content/profiles/fediverse.md +++ b/content/profiles/fediverse.md | |||
| @@ -3,4 +3,5 @@ title: Fediverse | |||
| 3 | subtitle: "@volpeon@mk.vulpes.one" | 3 | subtitle: "@volpeon@mk.vulpes.one" |
| 4 | icon: graph | 4 | icon: graph |
| 5 | url: https://mk.vulpes.one/@volpeon | 5 | url: https://mk.vulpes.one/@volpeon |
| 6 | rel: me | ||
| 6 | --- | 7 | --- |
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 3fc6c66..2a6d076 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua | |||
| @@ -192,6 +192,7 @@ function d1_page_to_list_item(meta, p) | |||
| 192 | schema_type = p.schema_type, | 192 | schema_type = p.schema_type, |
| 193 | position = p.position, | 193 | position = p.position, |
| 194 | url = p.url, | 194 | url = p.url, |
| 195 | rel = p.rel, | ||
| 195 | slug = p.slug, | 196 | slug = p.slug, |
| 196 | thumbnail = p.thumbnail, | 197 | thumbnail = p.thumbnail, |
| 197 | icon = p.icon or meta.icon, | 198 | icon = p.icon or meta.icon, |
| @@ -210,6 +211,7 @@ function d2_page_to_list_item(meta, cat, p, set_cat_title) | |||
| 210 | schema_type = p.schema_type, | 211 | schema_type = p.schema_type, |
| 211 | position = p.position, | 212 | position = p.position, |
| 212 | url = p.url, | 213 | url = p.url, |
| 214 | rel = p.rel, | ||
| 213 | slug = p.slug, | 215 | slug = p.slug, |
| 214 | thumbnail = p.thumbnail, | 216 | thumbnail = p.thumbnail, |
| 215 | icon = p.icon or cat.icon, | 217 | icon = p.icon or cat.icon, |
diff --git a/templates/partials/gallery_card.html b/templates/partials/gallery_card.html index edc54b4..ea82412 100644 --- a/templates/partials/gallery_card.html +++ b/templates/partials/gallery_card.html | |||
| @@ -1,57 +1,64 @@ | |||
| 1 | $if(it.url)$ | 1 | $if(it.url)$ |
| 2 | $if(it.thumbnail)$ | 2 | $if(it.thumbnail)$ |
| 3 | <a href="$it.url.rel$" class="l-card-list__card c-card h-entry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/$it.schema_type$"> | 3 | <a |
| 4 | <link class="u-url" itemprop="url" href="$it.url.full$" /> | 4 | href="$it.url.rel$" |
| 5 | <link itemprop="thumbnailUrl" href="$it.thumbnail.full$" /> | 5 | class="l-card-list__card c-card h-entry" |
| 6 | itemprop="dataFeedElement" | ||
| 7 | itemscope | ||
| 8 | itemtype="https://schema.org/$it.schema_type$" | ||
| 9 | $if(it.rel)$rel="$it.rel$"$endif$ | ||
| 10 | > | ||
| 11 | <link class="u-url" itemprop="url" href="$it.url.full$" /> | ||
| 12 | <link itemprop="thumbnailUrl" href="$it.thumbnail.full$" /> | ||
| 6 | 13 | ||
| 7 | <div class="c-card__row l-media l-media--flush"> | 14 | <div class="c-card__row l-media l-media--flush"> |
| 8 | <div class="c-card__thumbnail"> | 15 | <div class="c-card__thumbnail"> |
| 9 | <img | 16 | <img |
| 10 | class="c-card__thumbnail-img" | 17 | class="c-card__thumbnail-img" |
| 11 | src="$it.thumbnail.rel$" | 18 | src="$it.thumbnail.rel$" |
| 12 | alt="Preview thumbnail of "$it.title$"" | 19 | alt="Preview thumbnail of "$it.title$"" |
| 13 | loading="lazy" | 20 | loading="lazy" |
| 14 | /> | 21 | /> |
| 15 | </div> | ||
| 16 | </div> | 22 | </div> |
| 17 | <div class="c-card__row l-media c-card__row--hidden"> | 23 | </div> |
| 18 | $if(it.indicator)$ | 24 | <div class="c-card__row l-media c-card__row--hidden"> |
| 19 | <div class="c-card__indicator l-media__block"></div> | 25 | $if(it.indicator)$ |
| 20 | $endif$ | 26 | <div class="c-card__indicator l-media__block"></div> |
| 21 | $if(it.icon)$ | 27 | $endif$ |
| 22 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> | 28 | $if(it.icon)$ |
| 23 | <use href="/icons.svg#$it.icon$"></use> | 29 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> |
| 24 | </svg> | 30 | <use href="/icons.svg#$it.icon$"></use> |
| 25 | $endif$ | 31 | </svg> |
| 26 | <div class="l-media__block l-media__block--main"> | 32 | $endif$ |
| 27 | $if(it.subtitle)$ | 33 | <div class="l-media__block l-media__block--main"> |
| 28 | <strong class="u-d-block u-elp" itemprop="name headline">$it.title$</strong> | 34 | $if(it.subtitle)$ |
| 29 | <small class="u-d-block u-elp p-name">$it.subtitle$</small> | 35 | <strong class="u-d-block u-elp" itemprop="name headline">$it.title$</strong> |
| 30 | $elseif(it.category)$ | 36 | <small class="u-d-block u-elp p-name">$it.subtitle$</small> |
| 31 | <small class="u-d-block u-elp">$it.category$</small> | 37 | $elseif(it.category)$ |
| 32 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> | 38 | <small class="u-d-block u-elp">$it.category$</small> |
| 33 | $elseif(it.date)$ | 39 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> |
| 34 | <time datetime="$it.date.yyyy_mm_dd$" itemprop="dateCreated"> | 40 | $elseif(it.date)$ |
| 35 | <small class="u-d-none@sm-hi"> | 41 | <time datetime="$it.date.yyyy_mm_dd$" itemprop="dateCreated"> |
| 36 | $it.date.short$ | 42 | <small class="u-d-none@sm-hi"> |
| 37 | </small> | 43 | $it.date.short$ |
| 38 | <small class="u-d-none@sm-lo"> | 44 | </small> |
| 39 | $it.date.long$ | 45 | <small class="u-d-none@sm-lo"> |
| 40 | </small> | 46 | $it.date.long$ |
| 41 | </time> | 47 | </small> |
| 42 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> | 48 | </time> |
| 43 | $else$ | 49 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> |
| 44 | <span class="p-name" itemprop="name headline"> | 50 | $else$ |
| 45 | $it.title$ | 51 | <span class="p-name" itemprop="name headline"> |
| 46 | </span> | 52 | $it.title$ |
| 47 | $endif$ | 53 | </span> |
| 48 | </div> | ||
| 49 | $if(it.post_icon)$ | ||
| 50 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> | ||
| 51 | <use href="/icons.svg#$it.post_icon$"></use> | ||
| 52 | </svg> | ||
| 53 | $endif$ | 54 | $endif$ |
| 54 | </div> | 55 | </div> |
| 55 | </a> | 56 | $if(it.post_icon)$ |
| 57 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> | ||
| 58 | <use href="/icons.svg#$it.post_icon$"></use> | ||
| 59 | </svg> | ||
| 60 | $endif$ | ||
| 61 | </div> | ||
| 62 | </a> | ||
| 56 | $endif$ | 63 | $endif$ |
| 57 | $endif$ | 64 | $endif$ |
diff --git a/templates/partials/grid_card.html b/templates/partials/grid_card.html index afbea1f..a1afead 100644 --- a/templates/partials/grid_card.html +++ b/templates/partials/grid_card.html | |||
| @@ -1,44 +1,51 @@ | |||
| 1 | $if(it.url)$ | 1 | $if(it.url)$ |
| 2 | <a href="$it.url.rel$" class="l-card-list__card c-card h-entry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/$it.schema_type$"> | 2 | <a |
| 3 | <link class="u-url" itemprop="url" href="$it.url.full$" /> | 3 | href="$it.url.rel$" |
| 4 | class="l-card-list__card c-card h-entry" | ||
| 5 | itemprop="dataFeedElement" | ||
| 6 | itemscope | ||
| 7 | itemtype="https://schema.org/$it.schema_type$" | ||
| 8 | $if(it.rel)$rel="$it.rel$"$endif$ | ||
| 9 | > | ||
| 10 | <link class="u-url" itemprop="url" href="$it.url.full$" /> | ||
| 4 | 11 | ||
| 5 | <div class="c-card__row l-media"> | 12 | <div class="c-card__row l-media"> |
| 6 | $if(it.indicator)$ | 13 | $if(it.indicator)$ |
| 7 | <div class="c-card__indicator l-media__block"></div> | 14 | <div class="c-card__indicator l-media__block"></div> |
| 8 | $endif$ | 15 | $endif$ |
| 9 | $if(it.icon)$ | 16 | $if(it.icon)$ |
| 10 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> | 17 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> |
| 11 | <use href="/icons.svg#$it.icon$"></use> | 18 | <use href="/icons.svg#$it.icon$"></use> |
| 12 | </svg> | 19 | </svg> |
| 13 | $endif$ | 20 | $endif$ |
| 14 | <div class="l-media__block l-media__block--main"> | 21 | <div class="l-media__block l-media__block--main"> |
| 15 | $if(it.subtitle)$ | 22 | $if(it.subtitle)$ |
| 16 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> | 23 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> |
| 17 | <small class="u-d-block u-elp">$it.subtitle$</small> | 24 | <small class="u-d-block u-elp">$it.subtitle$</small> |
| 18 | $elseif(it.category)$ | 25 | $elseif(it.category)$ |
| 19 | <small class="u-d-block u-elp">$it.category$</small> | 26 | <small class="u-d-block u-elp">$it.category$</small> |
| 20 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> | 27 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> |
| 21 | $elseif(it.date)$ | 28 | $elseif(it.date)$ |
| 22 | <time datetime="$it.date.yyyy_mm_dd$" itemprop="dateCreated"> | 29 | <time datetime="$it.date.yyyy_mm_dd$" itemprop="dateCreated"> |
| 23 | <small class="u-d-none@sm-hi"> | 30 | <small class="u-d-none@sm-hi"> |
| 24 | $it.date.short$ | 31 | $it.date.short$ |
| 25 | </small> | 32 | </small> |
| 26 | <small class="u-d-none@sm-lo"> | 33 | <small class="u-d-none@sm-lo"> |
| 27 | $it.date.long$ | 34 | $it.date.long$ |
| 28 | </small> | 35 | </small> |
| 29 | </time> | 36 | </time> |
| 30 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> | 37 | <strong class="u-d-block u-elp p-name" itemprop="name headline">$it.title$</strong> |
| 31 | $else$ | 38 | $else$ |
| 32 | <span class="p-name" itemprop="name headline"> | 39 | <span class="p-name" itemprop="name headline"> |
| 33 | $it.title$ | 40 | $it.title$ |
| 34 | </span> | 41 | </span> |
| 35 | $endif$ | ||
| 36 | </div> | ||
| 37 | $if(it.post_icon)$ | ||
| 38 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> | ||
| 39 | <use href="/icons.svg#$it.post_icon$"></use> | ||
| 40 | </svg> | ||
| 41 | $endif$ | 42 | $endif$ |
| 42 | </div> | 43 | </div> |
| 43 | </a> | 44 | $if(it.post_icon)$ |
| 45 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> | ||
| 46 | <use href="/icons.svg#$it.post_icon$"></use> | ||
| 47 | </svg> | ||
| 48 | $endif$ | ||
| 49 | </div> | ||
| 50 | </a> | ||
| 44 | $endif$ | 51 | $endif$ |
diff --git a/templates/partials/list_card.html b/templates/partials/list_card.html index 3f2b956..e7d1e05 100644 --- a/templates/partials/list_card.html +++ b/templates/partials/list_card.html | |||
| @@ -1,46 +1,53 @@ | |||
| 1 | $if(it.url)$ | 1 | $if(it.url)$ |
| 2 | <a href="$it.url.rel$" class="l-card-list__card c-card h-entry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/$it.schema_type$"> | 2 | <a |
| 3 | <link class="u-url" itemprop="url" href="$it.url.full$" /> | 3 | href="$it.url.rel$" |
| 4 | class="l-card-list__card c-card h-entry" | ||
| 5 | itemprop="dataFeedElement" | ||
| 6 | itemscope | ||
| 7 | itemtype="https://schema.org/$it.schema_type$" | ||
| 8 | $if(it.rel)$rel="$it.rel$"$endif$ | ||
| 9 | > | ||
| 10 | <link class="u-url" itemprop="url" href="$it.url.full$" /> | ||
| 4 | 11 | ||
| 5 | <div class="c-card__row l-media"> | 12 | <div class="c-card__row l-media"> |
| 6 | $if(it.indicator)$ | 13 | $if(it.indicator)$ |
| 7 | <div class="c-card__indicator l-media__block"></div> | 14 | <div class="c-card__indicator l-media__block"></div> |
| 8 | $endif$ | 15 | $endif$ |
| 9 | $if(it.icon)$ | 16 | $if(it.icon)$ |
| 10 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> | 17 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> |
| 11 | <use href="/icons.svg#$it.icon$"></use> | 18 | <use href="/icons.svg#$it.icon$"></use> |
| 12 | </svg> | 19 | </svg> |
| 13 | $endif$ | 20 | $endif$ |
| 14 | <div class="l-media__block l-media__block--main p-name" itemprop="name headline"> | 21 | <div class="l-media__block l-media__block--main p-name" itemprop="name headline"> |
| 15 | $it.title$ | 22 | $it.title$ |
| 16 | </div> | 23 | </div> |
| 17 | $if(it.subtitle)$ | 24 | $if(it.subtitle)$ |
| 18 | <div class="l-media__block u-fs0"> | 25 | <div class="l-media__block u-fs0"> |
| 19 | <small> | 26 | <small> |
| 20 | $it.subtitle$ | 27 | $it.subtitle$ |
| 21 | </small> | 28 | </small> |
| 22 | </div> | 29 | </div> |
| 23 | $elseif(it.category)$ | 30 | $elseif(it.category)$ |
| 24 | <div class="l-media__block u-fs0"> | 31 | <div class="l-media__block u-fs0"> |
| 25 | <small> | 32 | <small> |
| 26 | $it.category$ | 33 | $it.category$ |
| 27 | </small> | 34 | </small> |
| 28 | </div> | 35 | </div> |
| 29 | $elseif(it.date)$ | 36 | $elseif(it.date)$ |
| 30 | <time datetime="$it.date.yyyy_mm_dd$" class="l-media__block u-fs0" itemprop="dateCreated"> | 37 | <time datetime="$it.date.yyyy_mm_dd$" class="l-media__block u-fs0" itemprop="dateCreated"> |
| 31 | <small class="u-d-none@sm-hi"> | 38 | <small class="u-d-none@sm-hi"> |
| 32 | $it.date.short$ | 39 | $it.date.short$ |
| 33 | </small> | 40 | </small> |
| 34 | <small class="u-d-none@sm-lo"> | 41 | <small class="u-d-none@sm-lo"> |
| 35 | $it.date.long$ | 42 | $it.date.long$ |
| 36 | </small> | 43 | </small> |
| 37 | </time> | 44 | </time> |
| 38 | $endif$ | 45 | $endif$ |
| 39 | $if(it.post_icon)$ | 46 | $if(it.post_icon)$ |
| 40 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> | 47 | <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true"> |
| 41 | <use href="/icons.svg#$it.post_icon$"></use> | 48 | <use href="/icons.svg#$it.post_icon$"></use> |
| 42 | </svg> | 49 | </svg> |
| 43 | $endif$ | 50 | $endif$ |
| 44 | </div> | 51 | </div> |
| 45 | </a> | 52 | </a> |
| 46 | $endif$ | 53 | $endif$ |
