« get me outta code hell

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:
Diffstat (limited to 'src/listing-spec.js')
-rw-r--r--src/listing-spec.js28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js
index e9be40cd..844d241d 100644
--- a/src/listing-spec.js
+++ b/src/listing-spec.js
@@ -53,33 +53,7 @@ listingSpec.push({
 listingSpec.push({
   directory: 'albums/by-date-added',
   stringsKey: 'listAlbums.byDateAdded',
-
-  data: ({wikiData: {albumData}}) =>
-    chunkByProperties(
-      sortAlphabetically(albumData.filter(a => a.dateAddedToWiki))
-        .sort((a, b) => {
-          if (a.dateAddedToWiki < b.dateAddedToWiki) return -1;
-          if (a.dateAddedToWiki > b.dateAddedToWiki) return 1;
-        }),
-      ['dateAddedToWiki']),
-
-  html: (data, {html, language, link}) =>
-    html.tag('dl',
-      data.flatMap(({dateAddedToWiki, chunk: albums}) => [
-        html.tag('dt',
-          {class: ['content-heading']},
-          language.$('listingPage.listAlbums.byDateAdded.date', {
-            date: language.formatDate(dateAddedToWiki),
-          })),
-
-        html.tag('dd',
-          html.tag('ul',
-            albums.map((album) =>
-              html.tag('li',
-                language.$('listingPage.listAlbums.byDateAdded.album', {
-                  album: link.album(album),
-                }))))),
-      ])),
+  contentFunction: 'listAlbumsByDateAdded',
 });
 
 listingSpec.push({