diff --git a/src/resources/vanilla_resource/templates/img/bg1.jpg b/src/resources/vanilla_resource/templates/img/bg1.jpg new file mode 100644 index 0000000..3e3849f Binary files /dev/null and b/src/resources/vanilla_resource/templates/img/bg1.jpg differ diff --git a/src/resources/vanilla_resource/templates/img/bg1.webp b/src/resources/vanilla_resource/templates/img/bg1.webp deleted file mode 100644 index 6c3d925..0000000 Binary files a/src/resources/vanilla_resource/templates/img/bg1.webp and /dev/null differ diff --git a/src/resources/vanilla_resource/templates/img/bg2.jpg b/src/resources/vanilla_resource/templates/img/bg2.jpg new file mode 100644 index 0000000..a45530f Binary files /dev/null and b/src/resources/vanilla_resource/templates/img/bg2.jpg differ diff --git a/src/resources/vanilla_resource/templates/img/bg2.webp b/src/resources/vanilla_resource/templates/img/bg2.webp deleted file mode 100644 index 8edbe4b..0000000 Binary files a/src/resources/vanilla_resource/templates/img/bg2.webp and /dev/null differ diff --git a/src/resources/vanilla_resource/templates/img/bg3.jpg b/src/resources/vanilla_resource/templates/img/bg3.jpg new file mode 100644 index 0000000..2bdc5f1 Binary files /dev/null and b/src/resources/vanilla_resource/templates/img/bg3.jpg differ diff --git a/src/resources/vanilla_resource/templates/img/bg3.webp b/src/resources/vanilla_resource/templates/img/bg3.webp deleted file mode 100644 index c3330c9..0000000 Binary files a/src/resources/vanilla_resource/templates/img/bg3.webp and /dev/null differ diff --git a/src/resources/vanilla_resource/templates/img/bg4.jpg b/src/resources/vanilla_resource/templates/img/bg4.jpg new file mode 100644 index 0000000..5a33aa7 Binary files /dev/null and b/src/resources/vanilla_resource/templates/img/bg4.jpg differ diff --git a/src/resources/vanilla_resource/templates/img/bg4.webp b/src/resources/vanilla_resource/templates/img/bg4.webp deleted file mode 100644 index a3b098a..0000000 Binary files a/src/resources/vanilla_resource/templates/img/bg4.webp and /dev/null differ diff --git a/src/resources/vanilla_resource/templates/img/bg5.jpg b/src/resources/vanilla_resource/templates/img/bg5.jpg new file mode 100644 index 0000000..ca06617 Binary files /dev/null and b/src/resources/vanilla_resource/templates/img/bg5.jpg differ diff --git a/src/resources/vanilla_resource/templates/img/bg5.webp b/src/resources/vanilla_resource/templates/img/bg5.webp deleted file mode 100644 index ab254e4..0000000 Binary files a/src/resources/vanilla_resource/templates/img/bg5.webp and /dev/null differ diff --git a/src/resources/vanilla_resource/templates/img/bg6.jpg b/src/resources/vanilla_resource/templates/img/bg6.jpg new file mode 100644 index 0000000..76ba3b2 Binary files /dev/null and b/src/resources/vanilla_resource/templates/img/bg6.jpg differ diff --git a/src/resources/vanilla_resource/templates/img/bg6.webp b/src/resources/vanilla_resource/templates/img/bg6.webp deleted file mode 100644 index 035d5bf..0000000 Binary files a/src/resources/vanilla_resource/templates/img/bg6.webp and /dev/null differ diff --git a/src/resources/vanilla_resource/templates/img/bg7.jpg b/src/resources/vanilla_resource/templates/img/bg7.jpg new file mode 100644 index 0000000..05e57dc Binary files /dev/null and b/src/resources/vanilla_resource/templates/img/bg7.jpg differ diff --git a/src/resources/vanilla_resource/templates/img/bg7.webp b/src/resources/vanilla_resource/templates/img/bg7.webp deleted file mode 100644 index a1754bb..0000000 Binary files a/src/resources/vanilla_resource/templates/img/bg7.webp and /dev/null differ diff --git a/src/resources/vanilla_resource/templates/js/card.js b/src/resources/vanilla_resource/templates/js/card.js index e7bfb75..8ad9ce3 100644 --- a/src/resources/vanilla_resource/templates/js/card.js +++ b/src/resources/vanilla_resource/templates/js/card.js @@ -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);