« get me outta code hell

content: generateSecondaryNavParentSiblingsPart: better dynamics - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-10-19 22:03:08 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-11-02 22:25:46 -0300
commit5fd6da3e598a0bd6c480964234629c944c791a60 (patch)
tree3aa722e114aae7071aed825970088becc23139c4 /src/content/dependencies
parentdf1d07633d344e278b4e5d10a2f1629ccb8ef7df (diff)
content: generateSecondaryNavParentSiblingsPart: better dynamics
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateSecondaryNavParentSiblingsPart.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/content/dependencies/generateSecondaryNavParentSiblingsPart.js b/src/content/dependencies/generateSecondaryNavParentSiblingsPart.js
index c5f1df84..82b5d151 100644
--- a/src/content/dependencies/generateSecondaryNavParentSiblingsPart.js
+++ b/src/content/dependencies/generateSecondaryNavParentSiblingsPart.js
@@ -63,6 +63,8 @@ export default {
 
   generate: (relations, slots, {html, language}) =>
     html.tag('span',
+      {[html.onlyIfContent]: true},
+
       slots.attributes,
 
       !html.isBlank(slots.colorStyle) &&
@@ -70,11 +72,15 @@ export default {
           .slot('context', 'primary-only'),
 
       language.encapsulate(slots.stringsKey, workingCapsule => {
-        const workingOptions = {};
+        const workingOptions = {
+          [language.onlyIfOptions]: [slots.mainLinkOption],
+        };
 
         workingOptions[slots.mainLinkOption] =
-          slots.mainLink
-            .slot('color', false);
+          (html.isBlank(slots.mainLink)
+            ? null
+            : slots.mainLink
+                .slot('color', false));
 
         if (slots.mode === 'album') addPreviousNext: {
           if (html.isBlank(slots.previousLink) && html.isBlank(slots.nextLink)) {