diff options
Diffstat (limited to 'src/content/dependencies')
6 files changed, 17 insertions, 29 deletions
diff --git a/src/content/dependencies/generateAlbumReleaseInfo.js b/src/content/dependencies/generateAlbumReleaseInfo.js index 5128fbac..6fc1375b 100644 --- a/src/content/dependencies/generateAlbumReleaseInfo.js +++ b/src/content/dependencies/generateAlbumReleaseInfo.js @@ -96,17 +96,14 @@ export default { language.formatDisjunctionList( relations.externalLinks .map(link => - link.slots({ - context: [ - 'album', - (data.numTracks === 0 - ? 'albumNoTracks' - : data.numTracks === 1 - ? 'albumOneTrack' - : 'albumMultipleTracks'), - ], - style: 'normal', - }))), + link.slot('context', [ + 'album', + (data.numTracks === 0 + ? 'albumNoTracks' + : data.numTracks === 1 + ? 'albumOneTrack' + : 'albumMultipleTracks'), + ]))), })), ]); }, diff --git a/src/content/dependencies/generateAlbumSidebarGroupBox.js b/src/content/dependencies/generateAlbumSidebarGroupBox.js index 5b7e2e45..93ebf5d4 100644 --- a/src/content/dependencies/generateAlbumSidebarGroupBox.js +++ b/src/content/dependencies/generateAlbumSidebarGroupBox.js @@ -89,10 +89,7 @@ export default { links: language.formatDisjunctionList( relations.externalLinks - .map(link => link.slots({ - context: 'group', - style: 'platform', - }))), + .map(link => link.slot('context', 'group'))), })), slots.mode === 'album' && diff --git a/src/content/dependencies/generateArtistInfoPage.js b/src/content/dependencies/generateArtistInfoPage.js index 1b85680f..ac9209a7 100644 --- a/src/content/dependencies/generateArtistInfoPage.js +++ b/src/content/dependencies/generateArtistInfoPage.js @@ -163,11 +163,8 @@ export default { language.$('releaseInfo.visitOn', { links: language.formatDisjunctionList( - sec.visit.externalLinks.map(link => - link.slots({ - context: 'artist', - style: 'platform', - }))), + sec.visit.externalLinks + .map(link => link.slot('context', 'artist'))), })), sec.artworks?.artistGalleryLink && diff --git a/src/content/dependencies/generateGroupInfoPage.js b/src/content/dependencies/generateGroupInfoPage.js index 5cae730b..2e1d1688 100644 --- a/src/content/dependencies/generateGroupInfoPage.js +++ b/src/content/dependencies/generateGroupInfoPage.js @@ -137,10 +137,7 @@ export default { links: language.formatDisjunctionList( sec.info.visitLinks - .map(link => link.slots({ - context: 'group', - style: 'platform', - }))), + .map(link => link.slot('context', 'group'))), })), html.tag('blockquote', diff --git a/src/content/dependencies/linkExternal.js b/src/content/dependencies/linkExternal.js index ba2dbf21..282fb76c 100644 --- a/src/content/dependencies/linkExternal.js +++ b/src/content/dependencies/linkExternal.js @@ -11,7 +11,7 @@ export default { // differentiate between a function that returns a validator (the usual // syntax) and a function that is itself a validator. validate: () => isExternalLinkStyle, - default: 'normal', + default: 'platform', }, context: { diff --git a/src/content/dependencies/linkExternalAsIcon.js b/src/content/dependencies/linkExternalAsIcon.js index 3eb355a9..c363ad90 100644 --- a/src/content/dependencies/linkExternalAsIcon.js +++ b/src/content/dependencies/linkExternalAsIcon.js @@ -21,8 +21,8 @@ export default { const format = style => language.formatExternalLink(data.url, {style, context: slots.context}); - const normalText = format('normal'); - const compactText = format('compact'); + const platformText = format('platform'); + const handleText = format('handle'); const iconId = format('icon-id'); return html.tag('a', {class: 'icon'}, @@ -34,7 +34,7 @@ export default { [ html.tag('svg', [ !slots.withText && - html.tag('title', normalText), + html.tag('title', platformText), html.tag('use', { href: to('shared.staticIcon', iconId), @@ -43,7 +43,7 @@ export default { slots.withText && html.tag('span', {class: 'icon-text'}, - compactText ?? normalText), + handleText ?? platformText), ]); }, }; |