From d0d324f34a9ca399f8e9e8380353abe45f6688ff Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 2 Mar 2021 19:10:30 -0400 Subject: rework 90% all upd8 code to support localization --- static/client.js | 8 ++++---- static/site.css | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'static') diff --git a/static/client.js b/static/client.js index 83c82a2..9c0e621 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 bf3303a..3f66c9e 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 { -- cgit 1.3.0-6-gf8a5