Compare commits

...

2 Commits

Author SHA1 Message Date
9c581ce346
refactor: project structure 2024-08-23 12:40:26 +08:00
1d47d34518
feat: add bg image and random select bg 2024-08-23 12:35:48 +08:00
24 changed files with 26 additions and 19 deletions

@ -1,27 +1,27 @@
{
"monero": {
"address": "85z2KvhGAsqP3CqB4PngKZCPYRrSX6pMBEcfzhZpVb8n1bzo8NvwhxbaagjPJpnDfJPXL5WQQ8aMBTDwWTH2hfqbCvMcnxS",
"qr": "qr/xmr-1.png",
"icon": "icons/xmr.png"
"qr": "img/qr/xmr-1.png",
"icon": "img/icon/blockchain/xmr.png"
},
"bitcoin": {
"address": "bc1pfx4a7n6fuyum4dv6rjmg9nsuj7t9wdepjjgsp67d6n8hsdp8w47qw228fy",
"qr": "qr/btc-taproot.png",
"icon": "icons/btc.png"
"qr": "img/qr/btc-taproot.png",
"icon": "img/icon/blockchain/btc.png"
},
"eth": {
"address": "0x75aa91c8a00966bAc3a1a4371C8588D018Dbd7c4",
"qr": "qr/eth.png",
"icon": "icons/eth.png"
"qr": "img/qr/eth.png",
"icon": "img/icon/blockchain/eth.png"
},
"tron": {
"address": "TEMzQqABo7ttKioED8CVtTFkLz57cBSYc7",
"qr": "qr/trx.png",
"icon": "icons/trx.png"
"qr": "img/qr/trx.png",
"icon": "img/icon/blockchain/trx.png"
},
"solana": {
"address": "BDL89QkYohoU1zdx2wZtw2zDkcx6xth1ecrV6bhPja2a",
"qr": "qr/sol.png",
"icon": "icons/sol.png"
"qr": "img/qr/sol.png",
"icon": "img/icon/blockchain/sol.png"
}
}

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
img/bg/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 277 KiB

After

Width:  |  Height:  |  Size: 277 KiB

Before

Width:  |  Height:  |  Size: 258 KiB

After

Width:  |  Height:  |  Size: 258 KiB

Before

Width:  |  Height:  |  Size: 233 KiB

After

Width:  |  Height:  |  Size: 233 KiB

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 284 KiB

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

@ -11,7 +11,7 @@
<div class="container">
<div class="card">
<h1>
<img id="title-icon" src="logo.png" alt="" /><span id="title-text"
<img id="title-icon" src="img/ui/logo.png" alt="" /><span id="title-text"
>捐赠加密货币</span
>
</h1>
@ -20,16 +20,16 @@
<div class="select-wrapper">
<select id="blockchain" onchange="updateDonationInfo()"></select>
<div id="icon-wrapper">
<img id="blockchain-icon" src="icons/btc.png" alt="Blockchain Icon" />
<img id="blockchain-icon" src="img/icon/blockchain/btc.png" alt="Blockchain Icon" />
</div>
</div>
<div id="donation-info">
<img id="qr-code" src="qr/btc-taproot.png" alt="QR Code" />
<img id="qr-code" src="img/qr/btc-taproot.png" alt="QR Code" />
<p id="address">
bc1pfx4a7n6fuyum4dv6rjmg9nsuj7t9wdepjjgsp67d6n8hsdp8w47qw228fy
</p>
<button onclick="copyAddress()">
<img id="copyIcon" src="img/copy-white.png" alt="" /><span
<img id="copyIcon" src="img/ui/copy-white.png" alt="" /><span
id="copyAddress"
>复制地址</span
>
@ -45,25 +45,25 @@
<a href="https://github.com/earthjasonlin" target="_blank"
><img
class="social-icon"
src="img/social/github.svg"
src="img/icon/social/github.svg"
alt="GitHub"
/></a>
<a href="https://x.com/earthjasonlin" target="_blank"
><img
class="social-icon"
src="img/social/twitter.svg"
src="img/icon/social/twitter.svg"
alt="X"
/></a>
<a href="https://t.me/zcl1103" target="_blank"
><img
class="social-icon"
src="img/social/telegram.svg"
src="img/icon/social/telegram.svg"
alt="Telegram"
/></a>
<a href="mailto:earthjasonlin@126.com" target="_blank"
><img
class="social-icon"
src="img/social/email.svg"
src="img/icon/social/email.svg"
alt="e-Mail"
/></a>
</div>

@ -2,11 +2,19 @@ let currentLang = "zh";
let data, i18n;
document.addEventListener("DOMContentLoaded", () => {
setRandomBackground();
loadData("data.json", loadBlockchainOptions);
changeLanguage(currentLang);
updateCopyrightYear();
});
function setRandomBackground() {
const images = ['1.jpg', '2.jpg'];
const randomIndex = Math.floor(Math.random() * images.length);
const selectedImage = images[randomIndex];
document.body.style.backgroundImage = `url('img/bg/${selectedImage}')`;
}
function updateCopyrightYear() {
const currentYear = new Date().getFullYear();
let copyrightText;

@ -1,7 +1,6 @@
body {
font-family: Microsoft YaHei;
font-weight: bold;
background-image: url("img/bg.jpg");
background-size: cover;
background-position: center;
background-repeat: no-repeat;