From 4431905279d30f2f987cea1e40805ffdd7d61b5b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 28 Dec 2022 17:34:46 -0400 Subject: sticky heading layout fixes --- src/page/news.js | 27 ++++++++++++++++----------- 1 file 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}, -- cgit 1.3.0-6-gf8a5