diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-12-28 17:34:46 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-12-28 17:34:46 -0400 |
commit | 4431905279d30f2f987cea1e40805ffdd7d61b5b (patch) | |
tree | 4dda196a4103586ab4095420f05b17335bdd7736 | |
parent | 5e156be05f4a2a0519e48eb970d0f05a6a12d46e (diff) |
sticky heading layout fixes
-rw-r--r-- | src/page/news.js | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/page/news.js b/src/page/news.js index 5312371c..61a52dc0 100644 --- a/src/page/news.js +++ b/src/page/news.js @@ -23,21 +23,23 @@ export function write(entry, {wikiData}) { title: language.$('newsEntryPage.title', {entry: entry.name}), main: { - content: - html.tag('div', {class: 'long-content'}, [ - generateStickyHeadingContainer({ - title: language.$('newsEntryPage.title', { - entry: entry.name, - }), + content: [ + generateStickyHeadingContainer({ + class: ['long-content'], + title: language.$('newsEntryPage.title', { + entry: entry.name, }), + }), + html.tag('div', {class: 'long-content'}, [ html.tag('p', language.$('newsEntryPage.published', { date: language.formatDate(entry.date), })), - transformMultiline(entry.content) + transformMultiline(entry.content), ]), + ], }, nav: generateNewsEntryNav(entry, { @@ -69,13 +71,15 @@ export function writeTargetless({wikiData}) { title: language.$('newsIndex.title'), main: { - content: + content: [ + generateStickyHeadingContainer({ + class: ['long-content'], + title: language.$('newsIndex.title'), + }), + html.tag('div', {class: ['long-content', 'news-index']}, [ - generateStickyHeadingContainer( - language.$('newsIndex.title')), - ...newsData.map(entry => html.tag('article', {id: entry.directory}, @@ -97,6 +101,7 @@ export function writeTargetless({wikiData}) { })), ])), ]), + ], }, nav: {simple: true}, |