From 09a0ab6dd1b7cf3b0f97d820c443b3a4f4291c8f Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 18 Jul 2025 16:44:07 -0300 Subject: content: generateLyricsSection: first annotation part as cue --- src/content/dependencies/generateLyricsSection.js | 29 ++++++++++++++++------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/content/dependencies/generateLyricsSection.js b/src/content/dependencies/generateLyricsSection.js index f6b719a9..64676d3b 100644 --- a/src/content/dependencies/generateLyricsSection.js +++ b/src/content/dependencies/generateLyricsSection.js @@ -21,10 +21,10 @@ export default { entries .map(entry => relation('generateLyricsEntry', entry)), - annotations: + annotationParts: entries - .map(entry => entry.annotation) - .map(annotation => relation('transformContent', annotation)), + .map(entry => entry.annotationParts + .map(part => relation('transformContent', part))), }), data: (entries) => ({ @@ -54,11 +54,24 @@ export default { initialOptionIndex: 0, titles: - relations.annotations.map(annotation => - annotation.slots({ - mode: 'inline', - textOnly: true, - })), + relations.annotationParts + .map(([first, ...rest]) => + language.formatUnitList([ + html.tag('span', + {class: 'dot-switcher-interaction-cue'}, + {[html.onlyIfContent]: true}, + + first?.slots({ + mode: 'inline', + textOnly: true, + })), + + ...rest.map(part => + part.slots({ + mode: 'inline', + textOnly: true, + })), + ])), targetIDs: data.ids, -- cgit 1.3.0-6-gf8a5