diff options
-rw-r--r-- | src/content/dependencies/generateCommentarySection.js | 15 | ||||
-rw-r--r-- | src/static/css/site.css | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/content/dependencies/generateCommentarySection.js b/src/content/dependencies/generateCommentarySection.js index c7f6fa6a..39727360 100644 --- a/src/content/dependencies/generateCommentarySection.js +++ b/src/content/dependencies/generateCommentarySection.js @@ -16,12 +16,23 @@ export default { relation('generateCommentaryEntry', entry)), }), - generate: (relations, {html, language}) => + data: (entries) => ({ + firstEntryIsDated: + (entries[0] + ? !!entries[0].date + : null), + }), + + generate: (data, relations, {html, language}) => html.tags([ relations.heading .slots({ - attributes: {id: 'artist-commentary'}, title: language.$('misc.artistCommentary'), + attributes: [ + {id: 'artist-commentary'}, + data.firstEntryIsDated && + {class: 'first-entry-is-dated'}, + ], }), relations.entries, diff --git a/src/static/css/site.css b/src/static/css/site.css index a1c7509f..9d574bb5 100644 --- a/src/static/css/site.css +++ b/src/static/css/site.css @@ -1096,6 +1096,10 @@ ul.image-details li { content: " \00b7 "; } +#artist-commentary.first-entry-is-dated { + clear: right; +} + .commentary-entry-heading { margin-left: 15px; padding-left: 5px; |