« get me outta code hell

content: avoid boilerplate around listings, make spec relevant again - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/listing-spec.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-07-01 14:14:38 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-07-01 14:14:38 -0300
commit34a1115df603aff44f354abe9f15d24d53f7a5ac (patch)
tree09726c8bbfff8c2eec2c189a18841a10827e1ff5 /src/listing-spec.js
parent28514381d7c4639608786151dc94e5a1b22f85fe (diff)
content: avoid boilerplate around listings, make spec relevant again
Diffstat (limited to 'src/listing-spec.js')
-rw-r--r--src/listing-spec.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js
index 36637ee..c81c086 100644
--- a/src/listing-spec.js
+++ b/src/listing-spec.js
@@ -20,19 +20,11 @@ const listingSpec = [];
 listingSpec.push({
   directory: 'albums/by-name',
   stringsKey: 'listAlbums.byName',
+  contentFunction: 'listAlbumsByName',
 
   seeAlso: [
     'tracks/by-album',
   ],
-
-  data: ({wikiData: {albumData}}) =>
-    sortAlphabetically(albumData.slice()),
-
-  row: (album, {language, link}) =>
-    language.$('listingPage.listAlbums.byName.item', {
-      album: link.album(album),
-      tracks: language.countTracks(album.tracks.length, {unit: true}),
-    }),
 });
 
 listingSpec.push({