-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdonation.html
167 lines (149 loc) · 5.2 KB
/
donation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!--donnation-page-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon"
href="https://github.com/berru-g/life-game/blob/main/src-img/hero/walk-perso-fixeD.png?raw=true" />
<title>Donation Page</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
text-align: center;
}
header {
background: white;
color: #0d3b66;
padding: 1rem;
text-align: center;
}
.donation-container {
display: flex;
flex-wrap: wrap;
/* Permet de passer en colonne si l'espace est insuffisant */
justify-content: center;
gap: 20px;
}
.donation-card {
border: 1px solid #ddd;
padding: 15px;
border-radius: 8px;
width: 300px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
text-align: center;
}
.donation-card:hover {
transform: translateY(-5px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
img {
max-width: 100%;
margin-bottom: 10px;
border-radius: 5px;
}
.address-container {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-top: 10px;
}
.address {
background-color: #f5f5f5;
padding: 5px 10px;
border-radius: 5px;
border: 1px solid #ddd;
font-family: monospace;
user-select: all;
max-width: 190px;
/* Limite la largeur */
white-space: nowrap;
/* Empêche le retour à la ligne */
overflow: hidden;
/* Cache le surplus */
text-overflow: ellipsis;
}
.copy-button {
background-color: #58a9f8;
color: white;
border: none;
padding: 5px 10px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
.copy-button:hover {
opacity: 0.6;
}
/* Responsiveness */
@media (max-width: 600px) {
.donation-container {
flex-direction: column;
/* Passe en colonne sur petits écrans */
align-items: center;
}
}
a {
color: #ee964b;
text-decoration: none;
}
</style>
</head>
<body>
<header>
</header>
<div class="donation-container">
<!-- USDC Donation -->
<div class="donation-card">
<img src="img/usdc.jpg" alt="QR Code USDC">
<p><strong>Adresse USDC :</strong></p>
<div class="address-container">
<span class="address" id="usdc-address">0x826b8c0480eab14a50a502c3b9ee73953fae3db7</span>
<button class="copy-button" data-target="usdc-address">Copier</button>
</div>
</div>
<!-- Bitcoin Donation -->
<div class="donation-card">
<img src="img/btc.jpg" alt="QR Code Bitcoin">
<p><strong>Adresse Bitcoin :</strong></p>
<div class="address-container">
<span class="address" id="btc-address">bc1qgxkfnze2kzueu4y0ft933yv0da5ydh9fyu7tjv</span>
<button class="copy-button" data-target="btc-address">Copier</button>
</div>
</div>
<!-- Paypal Donation -->
<div class="donation-card">
<img src="img/paypal.jpg" alt="QR Code paypal">
<p><strong></strong></p>
<p><strong>Don via Paypal</strong></p>
<div class="address-container">
<span class="address" id="paypal-address">gldeuxieme24@gmail.com</span>
<button class="copy-button" data-target="paypal-address">Copier</button>
</div>
</div>
</div>
<h2><a href="index.html">↩️</a></h2><br>
<p class="mention">Tous droits réservés © 2024 | <a href="https://github.com/berru-g/">berru-g</a></p>
<script>
// Ajout d'un événement pour chaque bouton Copier
document.querySelectorAll('.copy-button').forEach(button => {
button.addEventListener('click', function () {
const targetId = this.getAttribute('data-target');
const addressElement = document.getElementById(targetId);
const address = addressElement.textContent;
// Crée un élément temporaire pour copier le texte
const tempInput = document.createElement('input');
tempInput.value = address;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand('copy');
document.body.removeChild(tempInput);
// Optionnel : Feedback visuel
alert('Adresse copiée dans le presse-papiers : Merci pour votre geste 🙏' + address);
});
});
</script>
</body>
</html>