diff --git a/html/logo-bg-0.jpg b/html/logo-bg-0.jpg new file mode 100644 index 000000000..ed9228b0c Binary files /dev/null and b/html/logo-bg-0.jpg differ diff --git a/html/logo-bg-1.jpg b/html/logo-bg-1.jpg index ed9228b0c..4acd348d1 100644 Binary files a/html/logo-bg-1.jpg and b/html/logo-bg-1.jpg differ diff --git a/html/logo-bg-9.jpg b/html/logo-bg-9.jpg index 2db099084..203f78b9f 100644 Binary files a/html/logo-bg-9.jpg and b/html/logo-bg-9.jpg differ diff --git a/javascript/loader.js b/javascript/loader.js index 2883a7f6a..3ff53183e 100644 --- a/javascript/loader.js +++ b/javascript/loader.js @@ -1,7 +1,7 @@ async function preloadImages() { const dark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; const imagePromises = []; - const num = Math.floor(Math.random() * 9) + 1; + const num = Math.floor(10 * Math.random()); const imageUrls = [ `file=html/logo-bg-${dark ? 'dark' : 'light'}.jpg`, `file=html/logo-bg-${num}.jpg`, @@ -23,16 +23,17 @@ async function preloadImages() { } async function createSplash() { - await preloadImages(); const dark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; + console.log('createSplash', { theme: dark ? 'dark' : 'light' }); const num = Math.floor(Math.random() * 7) + 1; const splash = `
-
`; document.body.insertAdjacentHTML('beforeend', splash); - console.log('createSplash', dark); + await preloadImages(); + const imgElement = `
`; + document.getElementById('splash').insertAdjacentHTML('afterbegin', imgElement); } async function removeSplash() { const splash = document.getElementById('splash'); diff --git a/wiki b/wiki index f249da6ea..f6877509d 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit f249da6eadb31ef98b36a184017ae3cb347cbe33 +Subproject commit f6877509db1421db1991eccbc6af125ee7cecad3