diff --git a/resources/bg/private/1.png b/resources/bg/private/1.png index eabb74f..cd8b6e9 100644 Binary files a/resources/bg/private/1.png and b/resources/bg/private/1.png differ diff --git a/resources/bg/server/1.png b/resources/bg/server/1.png index d44ab0c..33805af 100644 Binary files a/resources/bg/server/1.png and b/resources/bg/server/1.png differ diff --git a/resources/js/index.js b/resources/js/index.js index a26e7cc..1980b46 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -180,12 +180,18 @@ async function setBackgroundImage() { const privImages = (await filesystem.readDirectory(NL_CWD + '/resources/bg/private')).filter(file => file.type === 'FILE' && !file.entry.includes('default')) const privImage = privImages[Math.floor(Math.random() * privImages.length)].entry + + const servImages = (await filesystem.readDirectory(NL_CWD + '/resources/bg/server')).filter(file => file.type === 'FILE' && !file.entry.includes('default')) + const servImage = servImages[Math.floor(Math.random() * servImages.length)].entry // Set default image, it will change if the bg folder exists document.querySelector('#firstPanel').style.backgroundImage = `url("https://webstatic.hoyoverse.com/upload/event/2020/11/04/7fd661b5184e1734f91f628b6f89a31f_7367318474207189623.png")` // Set the private background image document.querySelector('#secondPanel').style.backgroundImage = `url("../bg/private/${privImage}")` + + // Set the server background image + document.querySelector('#thirdPanel').style.backgroundImage = `url("../bg/server/${servImage}")` return diff --git a/resources/style/index.css b/resources/style/index.css index 472ecab..b6cbf23 100644 --- a/resources/style/index.css +++ b/resources/style/index.css @@ -315,13 +315,16 @@ body { #firstPanel, #secondPanel { border-right: 6px solid #141414; +} + +#firstPanel { background-position: -340px; } /* Move the first official button to the position on the png */ #firstPanel button { position: relative; - transform: translate(140px, 500px); + /* transform: translate(140px, 500px); */ width: 300px; height: 60px; } @@ -356,11 +359,15 @@ body { /* Move the second private button the near-bottom */ #secondControlContainer { position: relative; - transform: translate(115px, 456px); + /* transform: translate(115px, 456px); */ width: 300px; height: 60px; } +#secondControlContainer, #firstPanel button, #thirdPanel button { + margin-top: 100%; +} + #serverInput input, #serverInput img{ display: inline-block; }