diff options
-rw-r--r-- | src/listing-spec.js | 3 | ||||
-rw-r--r-- | src/page/album-commentary.js | 1 | ||||
-rw-r--r-- | src/page/album.js | 18 | ||||
-rw-r--r-- | src/page/flash.js | 20 | ||||
-rw-r--r-- | src/strings-default.json | 5 | ||||
-rw-r--r-- | src/write/page-template.js | 15 |
6 files changed, 46 insertions, 16 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js index 721d81ab..08799f2f 100644 --- a/src/listing-spec.js +++ b/src/listing-spec.js @@ -943,7 +943,8 @@ function listAdditionalFilesInProperty(property, { link, }) => data.flatMap(({album, tracks}) => [ - html.tag('h3', link.album(album)), + html.tag('h3', {class: 'content-heading'}, + link.album(album)), html.tag('dl', tracks.flatMap(track => [ // No hash here since the full list of additional files is already visible diff --git a/src/page/album-commentary.js b/src/page/album-commentary.js index ebfb0ba9..eb462d9a 100644 --- a/src/page/album-commentary.js +++ b/src/page/album-commentary.js @@ -51,6 +51,7 @@ export function write(album) { html.tag('h3', {class: ['content-heading']}, language.$('albumCommentaryPage.entry.title.albumCommentary')), + html.tag('blockquote', transformMultiline(album.commentary)), ]), diff --git a/src/page/album.js b/src/page/album.js index 24033b1d..9ee57c09 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -132,6 +132,7 @@ export function write(album, {wikiData}) { generateAdditionalFilesShortcut, generateAdditionalFilesList, generateChronologyLinks, + generateContentHeading, generateNavigationLinks, getAlbumCover, getAlbumStylesheet, @@ -339,13 +340,14 @@ export function write(album, {wikiData}) { ...html.fragment( hasAdditionalFiles && [ - html.tag('p', - {id: 'additional-files', class: ['content-heading']}, - language.$('releaseInfo.additionalFiles.heading', { + generateContentHeading({ + id: 'additional-files', + title: language.$('releaseInfo.additionalFiles.heading', { additionalFiles: language.countAdditionalFiles(numAdditionalFiles, { unit: true, }), - })), + }), + }), generateAlbumAdditionalFilesList(album, album.additionalFiles, { generateAdditionalFilesList, @@ -357,9 +359,11 @@ export function write(album, {wikiData}) { ...html.fragment( album.commentary && [ - html.tag('p', - {class: ['content-heading']}, - language.$('releaseInfo.artistCommentary')), + generateContentHeading({ + id: 'artist-commentary', + title: language.$('releaseInfo.artistCommentary'), + }), + html.tag('blockquote', transformMultiline(album.commentary)), ]), ], diff --git a/src/page/flash.js b/src/page/flash.js index a9ce053d..c116479a 100644 --- a/src/page/flash.js +++ b/src/page/flash.js @@ -20,6 +20,7 @@ export function write(flash, {wikiData}) { page: ({ fancifyFlashURL, generateChronologyLinks, + generateContentHeading, generateNavigationLinks, getArtistString, getFlashCover, @@ -65,11 +66,13 @@ export function write(flash, {wikiData}) { ...html.fragment( !empty(flash.featuredTracks) && [ - html.tag('p', - {class: ['content-heading']}, - language.$('releaseInfo.tracksFeatured', { - flash: html.tag('i', flash.name), - })), + generateContentHeading({ + id: 'features', + title: + language.$('releaseInfo.tracksFeatured', { + flash: html.tag('i', flash.name), + }), + }), html.tag('ul', flash.featuredTracks.map(track => @@ -85,9 +88,10 @@ export function write(flash, {wikiData}) { ...html.fragment( !empty(flash.contributorContribs) && [ - html.tag('p', - {class: ['content-heading']}, - language.$('releaseInfo.contributors')), + generateContentHeading({ + id: 'contributors', + title: language.$('releaseInfo.contributors'), + }), html.tag('ul', flash.contributorContribs.map(contrib => diff --git a/src/strings-default.json b/src/strings-default.json index 7f29c133..1c0d87f4 100644 --- a/src/strings-default.json +++ b/src/strings-default.json @@ -192,16 +192,21 @@ "misc.skippers.sidebar.right": "Sidebar (right)", "misc.skippers.header": "Header", "misc.skippers.footer": "Footer", + "misc.skippers.tracks": "Tracks", + "misc.skippers.art": "Artworks", + "misc.skippers.flashes": "Flashes & Games", "misc.skippers.contributors": "Contributors", "misc.skippers.references": "References...", "misc.skippers.referencedBy": "Referenced by...", "misc.skippers.samples": "Samples...", "misc.skippers.sampledBy": "Sampled by...", + "misc.skippers.features": "Features...", "misc.skippers.featuredIn": "Featured in...", "misc.skippers.lyrics": "Lyrics", "misc.skippers.sheetMusicFiles": "Sheet music files", "misc.skippers.midiProjectFiles": "MIDI/project files", "misc.skippers.additionalFiles": "Additional files", + "misc.skippers.commentary": "Commentary", "misc.skippers.artistCommentary": "Commentary", "misc.socialEmbed.heading": "{WIKI_NAME} | {HEADING}", "misc.jumpTo": "Jump to:", diff --git a/src/write/page-template.js b/src/write/page-template.js index 663c1d90..8a3b44e8 100644 --- a/src/write/page-template.js +++ b/src/write/page-template.js @@ -414,16 +414,21 @@ export function generateDocumentHTML(pageInfo, { // Hilariously jank. Sorry! const hasID = id => mainHTML.includes(`id="${id}"`); + const hasTracks = hasID('tracks'); + const hasArt = hasID('art'); + const hasFlashes = hasID('flashes'); const hasContributors = hasID('contributors'); const hasReferences = hasID('references'); const hasReferencedBy = hasID('referenced-by'); const hasSamples = hasID('samples'); const hasSampledBy = hasID('sampled-by'); + const hasFeatures = hasID('features'); const hasFeaturedIn = hasID('featured-in'); const hasLyrics = hasID('lyrics'); const hasSheetMusicFiles = hasID('sheet-music-files'); const hasMidiProjectFiles = hasID('midi-project-files'); const hasAdditionalFiles = hasID('additional-files'); + const hasCommentary = hasID('commentary'); const hasArtistCommentary = hasID('artist-commentary'); const skippersHTML = @@ -459,6 +464,12 @@ export function generateDocumentHTML(pageInfo, { class: 'skipper-list' }, processSkippers([ + hasTracks && + ['#tracks', 'tracks'], + hasArt && + ['#art', 'art'], + hasFlashes && + ['#flashes', 'flashes'], hasContributors && ['#contributors', 'contributors'], hasReferences && @@ -469,6 +480,8 @@ export function generateDocumentHTML(pageInfo, { ['#samples', 'samples'], hasSampledBy && ['#sampled-by', 'sampledBy'], + hasFeatures && + ['#features', 'features'], hasFeaturedIn && ['#featured-in', 'featuredIn'], hasLyrics && @@ -479,6 +492,8 @@ export function generateDocumentHTML(pageInfo, { ['#midi-project-files', 'midiProjectFiles'], hasAdditionalFiles && ['#additional-files', 'additionalFiles'], + hasCommentary && + ['#commentary', 'commentary'], hasArtistCommentary && ['#artist-commentary', 'artistCommentary'], ])), |