« get me outta code hell

tracks featured in flashes/game listings - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/upd8.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2020-06-29 16:07:18 -0300
committerFlorrie <towerofnix@gmail.com>2020-06-29 16:07:18 -0300
commit371acf845486d2f9d699fae021ab2ae63b81fb10 (patch)
treefc4ead55510bb25596545390a4d67cb8359aaf4b /upd8.js
parent3e3cf5867ab1e6afff432a1daabf999d2eac246e (diff)
tracks featured in flashes/game listings
also get rid of a weird nbsp hack
Diffstat (limited to 'upd8.js')
-rw-r--r--upd8.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/upd8.js b/upd8.js
index 11c64e5a..7c0345a6 100644
--- a/upd8.js
+++ b/upd8.js
@@ -1407,6 +1407,13 @@ function writeListingPages() {
                     (${s(getTracksThatReference(track).length, 'time')} referenced)
                 </li>
             `)],
+        [['tracks', 'in-flashes', 'by-album'], `Tracks - in Flashes &amp; Games (by Album)`, albumChunkedList(
+            C.sortByDate(allTracks.slice()).filter(track => getFlashesThatFeature(track).length > 0),
+            track => `<li><a href="${C.TRACK_DIRECTORY}/${track.directory}/index.html" style="${getThemeString(track.album.theme)}">${track.name}</a></li>`)],
+        [['tracks', 'in-flashes', 'by-flash'], `Tracks - in Flashes &amp; Games (by First Feature)`,
+            Array.from(new Set(flashData.filter(flash => !flash.act8r8k).flatMap(flash => getTracksFeaturedByFlash(flash))))
+            .filter(Boolean)
+            .map(track => `<li><a href="${C.TRACK_DIRECTORY}/${track.directory}/index.html" style="${getThemeString(track.album.theme)}">${track.name}</a></li>`)],
         [['tracks', 'with-lyrics'], `Tracks - with Lyrics`, albumChunkedList(
             C.sortByDate(allTracks.slice())
             .filter(track => track.lyrics),
@@ -1698,10 +1705,10 @@ function getAlbumListTag(album) {
 }
 
 function fancifyURL(url, {album = false} = {}) {
-    return fixWS`<a href="${url}">${
+    return fixWS`<a href="${url}" class="nowrap">${
         url.includes('bandcamp.com') ? 'Bandcamp' :
         url.includes('youtu') ? (album ? (
-            url.includes('list=') ? 'YouTube (Playlist)' : 'YouTube (Full&nbsp;Album)'
+            url.includes('list=') ? 'YouTube (Playlist)' : 'YouTube (Full Album)'
         ) : 'YouTube') :
         url.includes('soundcloud') ? 'SoundCloud' :
         url.includes('tumblr.com') ? 'Tumblr' :