diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-03-11 19:33:55 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-07-11 08:09:30 -0300 |
commit | df8ddccb30f86f1f67f8099ca5368783bea47088 (patch) | |
tree | 19fefff1e5f1041f74c3ec80c105ed30bca64668 /src | |
parent | bd891dd04c340a716c86b24556008c4ecfe3f224 (diff) |
content: generateCoverGrid: nicer attributes handling
2025-07-11: this commit is now funkier with an extant 'classes' attribute besides...
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/generateCoverGrid.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/content/dependencies/generateCoverGrid.js b/src/content/dependencies/generateCoverGrid.js index e4dfd905..e1f13af3 100644 --- a/src/content/dependencies/generateCoverGrid.js +++ b/src/content/dependencies/generateCoverGrid.js @@ -11,6 +11,8 @@ export default { }, slots: { + attributes: {type: 'attributes', mutable: false}, + images: {validate: v => v.strictArrayOf(v.isHTML)}, links: {validate: v => v.strictArrayOf(v.isHTML)}, names: {validate: v => v.strictArrayOf(v.isHTML)}, @@ -36,6 +38,7 @@ export default { generate: (relations, slots, {html, language}) => html.tag('div', {class: 'grid-listing'}, + slots.attributes, {[html.onlyIfContent]: true}, [ @@ -59,6 +62,8 @@ export default { }, index) => link.slots({ attributes: [ + link.getSlotValue('attributes'), + {class: ['grid-item', 'box']}, (classes |