diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-07-26 11:23:49 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-07-26 11:23:49 -0300 |
commit | 2d5e22df4b418d96a88afb4589ac326fb77b6e7a (patch) | |
tree | 5dcd9ded2e4be484e80e8fc01b9f9617947b5cad /src/content/dependencies/generateWikiHomeContentRow.js | |
parent | bdb4276ffae1c978ec1d1a6e462faf8c117e20a9 (diff) |
content: generateWikiHomeAlbumsRow + homepage content
Diffstat (limited to 'src/content/dependencies/generateWikiHomeContentRow.js')
-rw-r--r-- | src/content/dependencies/generateWikiHomeContentRow.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/content/dependencies/generateWikiHomeContentRow.js b/src/content/dependencies/generateWikiHomeContentRow.js new file mode 100644 index 00000000..90622801 --- /dev/null +++ b/src/content/dependencies/generateWikiHomeContentRow.js @@ -0,0 +1,34 @@ +export default { + contentDependencies: ['generateColorStyleVariables'], + extraDependencies: ['html'], + + relations(relation, row) { + return { + colorVariables: + relation('generateColorStyleVariables', row.color), + }; + }, + + data(row) { + return { + name: row.name, + }; + }, + + slots: { + content: {type: 'html'}, + }, + + generate(data, relations, slots, {html}) { + return ( + html.tag('section', + { + class: 'row', + style: [relations.colorVariables], + }, + [ + html.tag('h2', data.name), + slots.content, + ])); + }, +}; |