« get me outta code hell

rework 90% all upd8 code to support localization - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/static
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2021-03-02 19:10:30 -0400
committer(quasar) nebula <towerofnix@gmail.com>2021-03-02 19:10:30 -0400
commitd0d324f34a9ca399f8e9e8380353abe45f6688ff (patch)
treed9812be0d96f34760994ac7420d32c3dabe9e9b6 /static
parent1370490d576ded35004b741bec1e07dc8187cfe5 (diff)
rework 90% all upd8 code to support localization
Diffstat (limited to 'static')
-rw-r--r--static/client.js8
-rw-r--r--static/site.css5
2 files changed, 7 insertions, 6 deletions
diff --git a/static/client.js b/static/client.js
index 83c82a29..9c0e621a 100644
--- a/static/client.js
+++ b/static/client.js
@@ -10,10 +10,10 @@ let officialAlbumData, fandomAlbumData, artistNames;
 
 let ready = false;
 
-function rebase(href) {
-    const relative = document.documentElement.dataset.rebase;
+function rebase(href, rebaseKey = 'rebaseLocalized') {
+    const relative = document.documentElement.dataset[rebaseKey];
     if (relative) {
-        return relative + "/" + href;
+        return relative + href;
     } else {
         return href;
     }
@@ -162,7 +162,7 @@ const elements2 = document.getElementsByClassName('js-show-once-data');
 
 for (const element of elements1) element.style.display = 'block';
 
-fetch(rebase('data.json')).then(data => data.json()).then(data => {
+fetch(rebase('data.json', 'rebaseShared')).then(data => data.json()).then(data => {
     albumData = data.albumData;
     artistData = data.artistData;
     flashData = data.flashData;
diff --git a/static/site.css b/static/site.css
index bf3303a3..3f66c9ea 100644
--- a/static/site.css
+++ b/static/site.css
@@ -94,8 +94,7 @@ a:hover {
     font-weight: normal;
 }
 
-#header > h2 a.current,
-#header > h2.highlight-last-link > a:last-of-type {
+#header > h2 a.current {
     font-weight: 800;
 }
 
@@ -462,6 +461,8 @@ h1 {
 .grid-actions > .grid-item {
     flex-basis: unset !important;
     margin: 5px;
+    --primary-color: inherit !important;
+    --dim-color: inherit !important;
 }
 
 .grid-item {