diff options
Diffstat (limited to 'src/content/dependencies/generateAlbumGalleryInfoLine.js')
-rw-r--r-- | src/content/dependencies/generateAlbumGalleryInfoLine.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/content/dependencies/generateAlbumGalleryInfoLine.js b/src/content/dependencies/generateAlbumGalleryInfoLine.js deleted file mode 100644 index d4bd4d75..00000000 --- a/src/content/dependencies/generateAlbumGalleryInfoLine.js +++ /dev/null @@ -1,38 +0,0 @@ -import {getTotalDuration} from '../../util/wiki-data.js'; - -export default { - extraDependencies: ['html', 'language'], - - data(album) { - return { - name: album.name, - date: album.date, - duration: getTotalDuration(album.tracks), - numTracks: album.tracks.length, - }; - }, - - generate(data, {html, language}) { - const parts = ['albumGalleryPage.infoLine']; - const options = {}; - - options.tracks = - html.tag('b', - language.countTracks(data.numTracks, {unit: true})); - - options.duration = - html.tag('b', - language.formatDuration(data.duration, {unit: true})); - - if (data.date) { - parts.push('withDate'); - options.date = - html.tag('b', - language.formatDate(data.date)); - } - - return ( - html.tag('p', {class: 'quick-info'}, - language.formatString(parts.join('.'), options))); - }, -}; |