🤐更点东西上去,因为服务器那边要紧急修复
BIN
src/resources/vanilla_resource/templates/img/bg1.jpg
Normal file
After Width: | Height: | Size: 4.2 MiB |
Before Width: | Height: | Size: 1.1 MiB |
BIN
src/resources/vanilla_resource/templates/img/bg2.jpg
Normal file
After Width: | Height: | Size: 9.0 MiB |
Before Width: | Height: | Size: 397 KiB |
BIN
src/resources/vanilla_resource/templates/img/bg3.jpg
Normal file
After Width: | Height: | Size: 4.3 MiB |
Before Width: | Height: | Size: 433 KiB |
BIN
src/resources/vanilla_resource/templates/img/bg4.jpg
Normal file
After Width: | Height: | Size: 5.1 MiB |
Before Width: | Height: | Size: 412 KiB |
BIN
src/resources/vanilla_resource/templates/img/bg5.jpg
Normal file
After Width: | Height: | Size: 6.2 MiB |
Before Width: | Height: | Size: 314 KiB |
BIN
src/resources/vanilla_resource/templates/img/bg6.jpg
Normal file
After Width: | Height: | Size: 5.7 MiB |
Before Width: | Height: | Size: 410 KiB |
BIN
src/resources/vanilla_resource/templates/img/bg7.jpg
Normal file
After Width: | Height: | Size: 5.0 MiB |
Before Width: | Height: | Size: 270 KiB |
@ -1,27 +1,38 @@
|
||||
const bgs = [
|
||||
"bg1.webp",
|
||||
"bg2.webp",
|
||||
"bg3.webp",
|
||||
"bg4.webp",
|
||||
"bg5.webp",
|
||||
"bg6.webp",
|
||||
"bg7.webp",
|
||||
]
|
||||
|
||||
|
||||
// 随机选择背景图片
|
||||
document.body.style.backgroundImage = `url(./img/${bgs[Math.floor(Math.random() * bgs.length)]})`;
|
||||
document.body.style.backgroundImage = `url(./img/bg${Math.floor(Math.random() * 7)}.jpg)`;
|
||||
// body后插入info-box id=description
|
||||
let descriptionDiv = document.createElement("div");
|
||||
descriptionDiv.className = 'info-box'
|
||||
descriptionDiv.id = 'author-description'
|
||||
// 添加一副头像且垂直居中
|
||||
let avatar = document.createElement("img");
|
||||
avatar.src = 'https://q.qlogo.cn/g?b=qq&nk=2751454815&s=640'
|
||||
avatar.style.height = '50px';
|
||||
avatar.style.borderRadius = '50%';
|
||||
|
||||
let text = document.createElement("div");
|
||||
text.id = 'author-text';
|
||||
text.innerText = 'Designed by SnowyKami';
|
||||
descriptionDiv.appendChild(avatar);
|
||||
descriptionDiv.appendChild(text);
|
||||
// 添加一副头像且垂直居中
|
||||
let avatar1 = document.createElement("img");
|
||||
avatar1.src = 'https://q.qlogo.cn/g?b=qq&nk=2751454815&s=640'
|
||||
avatar1.style.height = '50px';
|
||||
// avatar.style.borderRadius = '50%';
|
||||
|
||||
let avatar2 = document.createElement("img");
|
||||
avatar2.src = 'https://q.qlogo.cn/g?b=qq&nk=3657522512&s=640'
|
||||
avatar2.style.height = '50px';
|
||||
|
||||
let text1 = document.createElement("div");
|
||||
text1.id = 'author-text';
|
||||
text1.innerText = '该页样式由:';
|
||||
|
||||
let text2 = document.createElement("div");
|
||||
text2.id = 'author-text';
|
||||
text2.innerText = ' 神羽SnowyKami 设计;';
|
||||
|
||||
let text3 = document.createElement("div");
|
||||
text3.id = 'author-text';
|
||||
text3.innerText = ' 金羿Eilles 方角美化';
|
||||
|
||||
descriptionDiv.appendChild(text1);
|
||||
descriptionDiv.appendChild(avatar1);
|
||||
descriptionDiv.appendChild(text2);
|
||||
descriptionDiv.appendChild(avatar2);
|
||||
descriptionDiv.appendChild(text3);
|
||||
|
||||
document.body.appendChild(descriptionDiv);
|
||||
|