« get me outta code hell

content: encapsulate everything - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateChronologyLinksScopeSwitcher.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-06-14 22:10:12 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-18 22:56:12 -0300
commit99261a74b1f3298144d8c5c6d676d63ad27a1299 (patch)
tree953c14b248dbc1ead549d717369c6d6155d11f19 /src/content/dependencies/generateChronologyLinksScopeSwitcher.js
parent53b65bd2cbfb1001194d67f57780e92c6c8c5aaf (diff)
content: encapsulate everything
Diffstat (limited to 'src/content/dependencies/generateChronologyLinksScopeSwitcher.js')
-rw-r--r--src/content/dependencies/generateChronologyLinksScopeSwitcher.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/content/dependencies/generateChronologyLinksScopeSwitcher.js b/src/content/dependencies/generateChronologyLinksScopeSwitcher.js
index 23c44268..4a1b67a7 100644
--- a/src/content/dependencies/generateChronologyLinksScopeSwitcher.js
+++ b/src/content/dependencies/generateChronologyLinksScopeSwitcher.js
@@ -32,18 +32,19 @@ export default {
         {class: 'underline-white'},
 
         html.tag('span',
-          language.$('trackPage.nav.chronology.scope.title', {
-            scope:
-              slots.scopes.map((scope, index) =>
-                html.tag('a', {class: 'switcher-link'},
-                  {href: '#'},
+          language.encapsulate('trackPage.nav.chronology.scope', capsule =>
+            language.$(capsule, 'title', {
+              scope:
+                slots.scopes.map((scope, index) =>
+                  html.tag('a', {class: 'switcher-link'},
+                    {href: '#'},
 
-                  (index === 0
-                    ? {style: 'display: inline'}
-                    : {style: 'display: none'}),
+                    (index === 0
+                      ? {style: 'display: inline'}
+                      : {style: 'display: none'}),
 
-                  language.$('trackPage.nav.chronology.scope', scope))),
-          })));
+                    language.$(capsule, scope))),
+            }))));
 
     const scopeContents =
       stitchArrays({