diff options
Diffstat (limited to 'src/content')
8 files changed, 35 insertions, 13 deletions
diff --git a/src/content/dependencies/generateTrackSocialEmbed.js b/src/content/dependencies/generateTrackSocialEmbed.js index 94453f7d..63ba7ffa 100644 --- a/src/content/dependencies/generateTrackSocialEmbed.js +++ b/src/content/dependencies/generateTrackSocialEmbed.js @@ -19,6 +19,8 @@ export default { data.trackDirectory = track.directory; data.albumDirectory = album.directory; + data.albumStyle = album.style; + data.hasImage = track.hasUniqueCoverArt || album.hasCoverArt; if (track.hasUniqueCoverArt) { @@ -47,7 +49,9 @@ export default { }), headingLink: - absoluteTo('localized.album', data.albumDirectory), + (data.albumStyle === 'in-game vgm' + ? absoluteTo('localized.vgmAlbum', data.albumDirectory) + : absoluteTo('localized.album', data.albumDirectory)), imagePath: (data.hasImage diff --git a/src/content/dependencies/linkAlbum.js b/src/content/dependencies/linkAlbum.js index 085d5f62..24b14e85 100644 --- a/src/content/dependencies/linkAlbum.js +++ b/src/content/dependencies/linkAlbum.js @@ -3,6 +3,8 @@ export default { link: (album.style === 'single' ? relation('linkTrack', album.tracks[0]) + : album.style === 'in-game vgm' + ? relation('linkThing', 'localized.vgmAlbum', album) : relation('linkThing', 'localized.album', album)), }), diff --git a/src/content/dependencies/linkAlbumCommentary.js b/src/content/dependencies/linkAlbumCommentary.js index f1917345..431dd6ec 100644 --- a/src/content/dependencies/linkAlbumCommentary.js +++ b/src/content/dependencies/linkAlbumCommentary.js @@ -1,6 +1,10 @@ export default { - relations: (relation, album) => - ({link: relation('linkThing', 'localized.albumCommentary', album)}), + relations: (relation, album) => ({ + link: + (album.style === 'in-game vgm' + ? relation('linkThing', 'localized.vgmAlbumCommentary', album) + : relation('linkThing', 'localized.albumCommentary', album)), + }), generate: (relations) => relations.link, }; diff --git a/src/content/dependencies/linkAlbumDynamically.js b/src/content/dependencies/linkAlbumDynamically.js index ba572c8d..3801b218 100644 --- a/src/content/dependencies/linkAlbumDynamically.js +++ b/src/content/dependencies/linkAlbumDynamically.js @@ -31,7 +31,7 @@ export default { // When linking to an album *from* an album commentary page, // if the link is to the *same* album, then the effective target // of the link is really the album's commentary, so scroll to it. - (pagePath[0] === 'albumCommentary' && + (pagePath[0].match(/albumCommentary$/i) && pagePath[1] === data.albumDirectory && data.albumHasCommentary ? relations.infoLink.slots({ @@ -42,11 +42,11 @@ export default { // When linking to *another* album from an album commentary page, // the target is (by default) still just the album (its info page). // But this can be customized per-link! - : pagePath[0] === 'albumCommentary' && + : pagePath[0].match(/albumCommentary$/i) && slots.linkCommentaryPages ? relations.commentaryLink - : pagePath[0] === 'albumGallery' + : pagePath[0].match(/albumGallery$/i) ? relations.galleryLink : relations.infoLink), diff --git a/src/content/dependencies/linkAlbumGallery.js b/src/content/dependencies/linkAlbumGallery.js index efba66d1..b3d8fac0 100644 --- a/src/content/dependencies/linkAlbumGallery.js +++ b/src/content/dependencies/linkAlbumGallery.js @@ -1,6 +1,10 @@ export default { - relations: (relation, album) => - ({link: relation('linkThing', 'localized.albumGallery', album)}), + relations: (relation, album) => ({ + link: + (album.style === 'in-game vgm' + ? relation('linkThing', 'localized.vgmAlbumGallery', album) + : relation('linkThing', 'localized.albumGallery', album)), + }), generate: (relations) => relations.link, }; diff --git a/src/content/dependencies/linkAlbumReferencedArtworks.js b/src/content/dependencies/linkAlbumReferencedArtworks.js index 411bd2ab..c734f403 100644 --- a/src/content/dependencies/linkAlbumReferencedArtworks.js +++ b/src/content/dependencies/linkAlbumReferencedArtworks.js @@ -1,6 +1,10 @@ export default { - relations: (relation, album) => - ({link: relation('linkThing', 'localized.albumReferencedArtworks', album)}), + relations: (relation, album) => ({ + link: + (album.style === 'in-game vgm' + ? relation('linkThing', 'localized.vgmAlbumReferencedArtworks', album) + : relation('linkThing', 'localized.albumReferencedArtworks', album)), + }), generate: (relations) => relations.link, }; diff --git a/src/content/dependencies/linkAlbumReferencingArtworks.js b/src/content/dependencies/linkAlbumReferencingArtworks.js index 3aee9a4b..37fdadda 100644 --- a/src/content/dependencies/linkAlbumReferencingArtworks.js +++ b/src/content/dependencies/linkAlbumReferencingArtworks.js @@ -1,6 +1,10 @@ export default { - relations: (relation, album) => - ({link: relation('linkThing', 'localized.albumReferencingArtworks', album)}), + relations: (relation, album) => ({ + link: + (album.style === 'in-game vgm' + ? relation('linkThing', 'localized.vgmAlbumReferencingArtworks', album) + : relation('linkThing', 'localized.albumReferencingArtworks', album)), + }), generate: (relations) => relations.link, }; diff --git a/src/content/dependencies/linkTrackDynamically.js b/src/content/dependencies/linkTrackDynamically.js index 088bbe09..06c8a082 100644 --- a/src/content/dependencies/linkTrackDynamically.js +++ b/src/content/dependencies/linkTrackDynamically.js @@ -18,7 +18,7 @@ export default { generate(data, relations, {pagePath}) { if ( - pagePath[0] === 'albumCommentary' && + pagePath[0].match(/albumCommentary$/i) && pagePath[1] === data.albumDirectory && data.trackHasCommentary ) { |