« get me outta code hell

data step: content function updates, relation syntax 2 - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/misc-templates.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-03-19 16:26:55 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-03-19 16:26:55 -0300
commit41c22a553d43fbcc04b7a17ec6f83583ed7f3443 (patch)
tree88f8c25b84a586c31529ea95f96e51d2f6d78553 /src/misc-templates.js
parent7411fe87dc667b25f265f5388b790c5d4bbc880d (diff)
data step: content function updates, relation syntax 2
* new: generateAlbumTrackListItem
* new: generateContributionLinks
Diffstat (limited to 'src/misc-templates.js')
-rw-r--r--src/misc-templates.js75
1 files changed, 0 insertions, 75 deletions
diff --git a/src/misc-templates.js b/src/misc-templates.js
index e912c12..3e6948c 100644
--- a/src/misc-templates.js
+++ b/src/misc-templates.js
@@ -18,10 +18,6 @@ import {
   sortChronologically,
 } from './util/wiki-data.js';
 
-import contentFunction from './util/content-function.js';
-
-import u_link from './util/link.js';
-
 const BANDCAMP_DOMAINS = ['bc.s3m.us', 'music.solatrux.com'];
 
 const MASTODON_DOMAINS = ['types.pl'];
@@ -80,77 +76,6 @@ function unbound_generateAdditionalFilesList(additionalFiles, {
     ]));
 }
 
-// Artist strings
-
-export const u_generateContributionLinks = contentFunction({
-  data: function(contributions, {
-    showContribution = false,
-    showIcons = false,
-  }) {
-    return {
-      showContribution,
-      showIcons,
-
-      contributionData:
-        contributions.map(({who, what}) => ({
-          artistLinkData: u_link.artist.data(who),
-
-          hasContributionPart: !!(showContribution && what),
-          hasExternalPart: !!(showIcons && !empty(who.urls)),
-
-          artistUrls: who.urls,
-          contribution: showContribution && what,
-        })),
-    };
-  },
-
-  generate: function generateContributionLinks(data, {
-    html,
-    iconifyURL,
-    language,
-    link,
-  }) {
-    return language.formatConjunctionList(
-      data.contributionData.map(({
-        artistLinkData,
-        hasContributionPart,
-        hasExternalPart,
-        artistUrls,
-        contribution,
-      }) => {
-        const artistLink = link.artist(artistLinkData);
-
-        const externalLinks = hasExternalPart &&
-          html.tag('span',
-            {[html.noEdgeWhitespace]: true, class: 'icons'},
-            language.formatUnitList(
-              artistUrls.map(url => iconifyURL(url, {language}))));
-
-        return (
-          (hasContributionPart
-            ? (hasExternalPart
-                ? language.$('misc.artistLink.withContribution.withExternalLinks', {
-                    artist: artistLink,
-                    contrib: contribution,
-                    links: externalLinks,
-                  })
-                : language.$('misc.artistLink.withContribution', {
-                    artist: artistLink,
-                    contrib: contribution,
-                  }))
-            : (hasExternalPart
-                ? language.$('misc.artistLink.withExternalLinks', {
-                    artist: artistLink,
-                    links: externalLinks,
-                  })
-                : language.$('misc.artistLink', {
-                    artist: artistLink,
-                  })))
-        );
-      }));
-  },
-});
-
 // Chronology links
 
 function unbound_generateChronologyLinks(currentThing, {