commit aaa9d5bcab19e403732435a0bdda93ea2b875f3c Author: Zichao Lin Date: Fri Jul 18 19:17:11 2025 +0800 init diff --git a/data.json b/data.json new file mode 100644 index 0000000..203392b --- /dev/null +++ b/data.json @@ -0,0 +1,32 @@ +{ + "btc": { + "address": "bc1q84pgh0lcvt6mmcxuvwg6mudk5mdl7gpm6zsuqv", + "qr": "img/qr/btc.svg", + "icon": "img/icon/blockchain/btc.svg" + }, + "eth": { + "address": "0x75aa91c8a00966bac3a1a4371c8588d018dbd7c4", + "qr": "img/qr/eth.svg", + "icon": "img/icon/blockchain/eth.svg" + }, + "trx": { + "address": "TEMzQqABo7ttKioED8CVtTFkLz57cBSYc7", + "qr": "img/qr/trx.svg", + "icon": "img/icon/blockchain/trx.svg" + }, + "sol": { + "address": "BDL89QkYohoU1zdx2wZtw2zDkcx6xth1ecrV6bhPja2a", + "qr": "img/qr/sol.svg", + "icon": "img/icon/blockchain/sol.svg" + }, + "xmr": { + "address": "82qx7c1eNd4DDnF2w3r7nXEEEGbLK16ZJGc3mjviH6hUgnyYWo3jyPBcioEnydkf5uXeSqjqV6erEMNNBoYvR3z4EgU72Vy", + "qr": "img/qr/xmr.svg", + "icon": "img/icon/blockchain/xmr.svg" + }, + "sui": { + "address": "0x5592235ab1631255952582dc8471da97a54e2582253ed90adf10de4a16709ab1", + "qr": "img/qr/sui.svg", + "icon": "img/icon/blockchain/sui.svg" + } +} \ No newline at end of file diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..f0dbf82 Binary files /dev/null and b/favicon.ico differ diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..234d189 --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,14 @@ +{ + "title": "Donate Cryptocurrency", + "thankYou": "🎉Thank you for your support!🎉
Your support is the driving force for my progress!", + "copyAddress": "Copy Address", + "copyAddressSuccess": "Address Copied!", + "english": "English", + "chinese": "中文", + "trx": "Tron", + "eth": "Ethereum (All EVM)", + "btc": "Bitcoin", + "sol": "Solana", + "xmr": "Monero", + "sui": "Sui" +} \ No newline at end of file diff --git a/i18n/zh.json b/i18n/zh.json new file mode 100644 index 0000000..6f98d47 --- /dev/null +++ b/i18n/zh.json @@ -0,0 +1,14 @@ +{ + "title": "捐赠加密货币", + "thankYou": "🎉非常感谢您的支持!🎉
您的支持是我前进的最大动力!", + "copyAddress": "复制地址", + "copyAddressSuccess": "复制成功", + "english": "English", + "chinese": "中文", + "trx": "波场", + "eth": "以太坊(所有EVM网络)", + "btc": "比特币", + "sol": "Solana", + "xmr": "门罗币", + "sui": "Sui" +} \ No newline at end of file diff --git a/img/bg/12.png b/img/bg/12.png new file mode 100644 index 0000000..bafcec8 Binary files /dev/null and b/img/bg/12.png differ diff --git a/img/bg/13.png b/img/bg/13.png new file mode 100644 index 0000000..3716d3c Binary files /dev/null and b/img/bg/13.png differ diff --git a/img/bg/2.jpg b/img/bg/2.jpg new file mode 100644 index 0000000..834f644 Binary files /dev/null and b/img/bg/2.jpg differ diff --git a/img/bg/note.md b/img/bg/note.md new file mode 100644 index 0000000..509a6c6 --- /dev/null +++ b/img/bg/note.md @@ -0,0 +1 @@ +# Edit srcipt.js \ No newline at end of file diff --git a/img/icon/blockchain/btc.png b/img/icon/blockchain/btc.png new file mode 100644 index 0000000..1d14bc6 Binary files /dev/null and b/img/icon/blockchain/btc.png differ diff --git a/img/icon/blockchain/btc.svg b/img/icon/blockchain/btc.svg new file mode 100644 index 0000000..db8b6b2 --- /dev/null +++ b/img/icon/blockchain/btc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/img/icon/blockchain/eth.png b/img/icon/blockchain/eth.png new file mode 100644 index 0000000..c8ac5ec Binary files /dev/null and b/img/icon/blockchain/eth.png differ diff --git a/img/icon/blockchain/eth.svg b/img/icon/blockchain/eth.svg new file mode 100644 index 0000000..8f45f2b --- /dev/null +++ b/img/icon/blockchain/eth.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/icon/blockchain/sol.png b/img/icon/blockchain/sol.png new file mode 100644 index 0000000..bef8cfd Binary files /dev/null and b/img/icon/blockchain/sol.png differ diff --git a/img/icon/blockchain/sol.svg b/img/icon/blockchain/sol.svg new file mode 100644 index 0000000..58651f0 --- /dev/null +++ b/img/icon/blockchain/sol.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/icon/blockchain/sui.png b/img/icon/blockchain/sui.png new file mode 100644 index 0000000..8299d71 Binary files /dev/null and b/img/icon/blockchain/sui.png differ diff --git a/img/icon/blockchain/sui.svg b/img/icon/blockchain/sui.svg new file mode 100644 index 0000000..5d8aaf4 --- /dev/null +++ b/img/icon/blockchain/sui.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/img/icon/blockchain/trx.png b/img/icon/blockchain/trx.png new file mode 100644 index 0000000..8bd7214 Binary files /dev/null and b/img/icon/blockchain/trx.png differ diff --git a/img/icon/blockchain/trx.svg b/img/icon/blockchain/trx.svg new file mode 100644 index 0000000..fa87a1d --- /dev/null +++ b/img/icon/blockchain/trx.svg @@ -0,0 +1 @@ +tron \ No newline at end of file diff --git a/img/icon/blockchain/xmr.png b/img/icon/blockchain/xmr.png new file mode 100644 index 0000000..d1ebfc0 Binary files /dev/null and b/img/icon/blockchain/xmr.png differ diff --git a/img/icon/blockchain/xmr.svg b/img/icon/blockchain/xmr.svg new file mode 100644 index 0000000..e3ddac4 --- /dev/null +++ b/img/icon/blockchain/xmr.svg @@ -0,0 +1 @@ +monero \ No newline at end of file diff --git a/img/icon/social/email.svg b/img/icon/social/email.svg new file mode 100644 index 0000000..89ec974 --- /dev/null +++ b/img/icon/social/email.svg @@ -0,0 +1,25 @@ + + + + + + + + + + \ No newline at end of file diff --git a/img/icon/social/github.svg b/img/icon/social/github.svg new file mode 100644 index 0000000..25a4403 --- /dev/null +++ b/img/icon/social/github.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/img/icon/social/telegram.svg b/img/icon/social/telegram.svg new file mode 100644 index 0000000..7ef3524 --- /dev/null +++ b/img/icon/social/telegram.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/img/icon/social/twitter.svg b/img/icon/social/twitter.svg new file mode 100644 index 0000000..70b5288 --- /dev/null +++ b/img/icon/social/twitter.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/img/qr/btc.svg b/img/qr/btc.svg new file mode 100644 index 0000000..c599c41 --- /dev/null +++ b/img/qr/btc.svg @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/qr/eth.svg b/img/qr/eth.svg new file mode 100644 index 0000000..9f7247c --- /dev/null +++ b/img/qr/eth.svg @@ -0,0 +1,383 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/qr/note.md b/img/qr/note.md new file mode 100644 index 0000000..18d45d2 --- /dev/null +++ b/img/qr/note.md @@ -0,0 +1 @@ +# Remove background behind Logo, Logo size: 80% \ No newline at end of file diff --git a/img/qr/sol.svg b/img/qr/sol.svg new file mode 100644 index 0000000..0c01e52 --- /dev/null +++ b/img/qr/sol.svg @@ -0,0 +1,412 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/qr/sui.svg b/img/qr/sui.svg new file mode 100644 index 0000000..bae2316 --- /dev/null +++ b/img/qr/sui.svg @@ -0,0 +1,645 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/qr/trx.svg b/img/qr/trx.svg new file mode 100644 index 0000000..a0e464e --- /dev/null +++ b/img/qr/trx.svg @@ -0,0 +1,404 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/qr/xmr.svg b/img/qr/xmr.svg new file mode 100644 index 0000000..52c0ac6 --- /dev/null +++ b/img/qr/xmr.svg @@ -0,0 +1,1037 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/ui/copy-black.png b/img/ui/copy-black.png new file mode 100644 index 0000000..b19d7c1 Binary files /dev/null and b/img/ui/copy-black.png differ diff --git a/img/ui/copy-white.png b/img/ui/copy-white.png new file mode 100644 index 0000000..d23c4af Binary files /dev/null and b/img/ui/copy-white.png differ diff --git a/img/ui/logo.png b/img/ui/logo.png new file mode 100644 index 0000000..83eb018 Binary files /dev/null and b/img/ui/logo.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..02c7c65 --- /dev/null +++ b/index.html @@ -0,0 +1,90 @@ + + + + + + Donate to me 🥤 + + + + +
+
+

+ 捐赠加密货币 +

+
非常感谢您的支持!
您的支持是我前进的最大动力!
+
+
+ +
+ Blockchain Icon +
+
+
+ QR Code +

+ bc1pfx4a7n6fuyum4dv6rjmg9nsuj7t9wdepjjgsp67d6n8hsdp8w47qw228fy +

+ +
+
+
+ + + +
+ + + diff --git a/script.js b/script.js new file mode 100644 index 0000000..427941c --- /dev/null +++ b/script.js @@ -0,0 +1,83 @@ +let currentLang = "zh"; +let data, i18n; + +document.addEventListener("DOMContentLoaded", () => { + setRandomBackground(); + loadData("data.json", loadBlockchainOptions); + changeLanguage(currentLang); + updateCopyrightYear(); +}); + +function setRandomBackground() { + const images = ["2.jpg", "12.png", "13.png"]; + 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; + if (currentYear > 2024) { + copyrightText = `© 2024-${currentYear} earthjasonlin. All rights reserved.`; + } else { + copyrightText = `© 2024 earthjasonlin. All rights reserved.`; + } + document.getElementById("copyright-me").innerHTML = copyrightText; +} + +function loadData(url, callback) { + fetch(url) + .then((response) => response.json()) + .then((json) => { + data = json; + callback(); + }) + .catch((error) => console.error("Error loading JSON:", error)); +} + +function loadI18n(url, callback) { + fetch(url) + .then((response) => response.json()) + .then((json) => { + i18n = json; + callback(); + }) + .catch((error) => console.error("Error loading i18n JSON:", error)); +} + +function loadBlockchainOptions() { + const blockchainSelect = document.getElementById("blockchain"); + blockchainSelect.innerHTML = ""; + + for (const key in data) { + const option = document.createElement("option"); + option.value = key; + option.textContent = i18n[key]; + blockchainSelect.appendChild(option); + } + updateDonationInfo(); +} + +function changeLanguage(lang) { + loadI18n(`i18n/${lang}.json`, () => { + document.getElementById("thank-you").innerHTML = i18n.thankYou; + document.getElementById("title-text").textContent = i18n.title; + document.getElementById("copyAddress").textContent = i18n.copyAddress; + loadBlockchainOptions(); + }); +} + +function updateDonationInfo() { + const blockchain = document.getElementById("blockchain").value; + document.getElementById("qr-code").src = data[blockchain].qr; + document.getElementById("address").textContent = data[blockchain].address; + document.getElementById("blockchain-icon").src = data[blockchain].icon; +} + +function copyAddress() { + const address = document.getElementById("address").textContent; + navigator.clipboard.writeText(address).then(() => { + alert(i18n.copyAddressSuccess); + }); +} diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..ff627d6 --- /dev/null +++ b/styles.css @@ -0,0 +1,152 @@ +body { + font-family: Microsoft YaHei; + font-weight: bold; + background-size: cover; + background-position: center; + background-repeat: no-repeat; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; +} + +.container { + z-index: 1; + background-color: rgba(255, 255, 255, 0.5); + border-radius: 15px; + text-align: center; + padding: 20px; +} + +.card { + width: 300px; + border-radius: 15px; + padding: 20px; + margin-bottom: 20px; + transition: transform 0.3s ease-in-out; + word-wrap: break-word; +} + +h1 { + font-size: 20px; + margin-bottom: 20px; +} + +#title-icon { + width: 30px; + vertical-align: bottom; + margin-right: 8px; +} + +#thank-you { + font-size: 16px; + line-height: 1.5em; + margin-bottom: 20px; + color: rgb(197, 41, 2); +} + +.donation-card { + text-align: center; +} + +.select-wrapper { + display: flex; + align-items: center; + margin-bottom: 20px; +} + +select { + padding: 8px; + border-radius: 10px; + border: 1px solid #ddd; + font-size: 16px; + flex: 1; +} + +#icon-wrapper { + margin-left: 10px; +} + +#blockchain-icon { + width: 30px; + height: 30px; +} + +#qr-code { + width: 150px; +} + +#address { + font-family: consolas; + font-size: 14px; + border-radius: 10px; + margin-top: 0; + word-break: break-all; +} + +button { + background-color: #4caf50; + color: white; + padding: 10px 20px; + border: none; + border-radius: 10px; + cursor: pointer; + font-size: 16px; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: #45a049; +} + +#copyIcon { + width: 16px; + vertical-align: middle; + margin-right: 8px; +} + +.language-list { + display: flex; + justify-content: center; + margin: 20px 0; + list-style: none; + padding: 0; +} + +.language-list li { + margin: 0 10px; + cursor: pointer; + font-size: 16px; + color: #333; + transition: color 0.3s ease; +} + +.language-list li:hover { + color: #4caf50; +} + +.social-media { + display: flex; + justify-content: center; + margin-bottom: 20px; +} + +.social-media a { + margin: 0 10px; + transition: transform 0.3s ease; +} + +.social-media a:hover { + transform: scale(1.1); +} + +.social-icon { + width: 30px; +} + +footer { + font-size: 14px; + font-weight: normal; + color: #777; +}