mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 04:45:34 +00:00
button fixes
This commit is contained in:
parent
aebf621a47
commit
ef44855597
Binary file not shown.
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 221 KiB |
@ -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
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user