-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathairdrop.html
More file actions
73 lines (69 loc) · 2.13 KB
/
Copy pathairdrop.html
File metadata and controls
73 lines (69 loc) · 2.13 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Airdrop Details</title>
<link rel="stylesheet" href="styles/main.css" />
<style>
#airdropDetail {
max-width: 700px;
margin: 2rem auto;
padding: 1.5rem;
background: #f9f9f9;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
text-align: center;
}
#airdropDetail img {
max-width: 100%;
border-radius: 10px;
margin-bottom: 1rem;
}
.hero-btn {
display: inline-block;
padding: 0.8rem 1.5rem;
background-color: #007bff;
color: white;
border-radius: 8px;
text-decoration: none;
font-weight: bold;
margin-top: 1rem;
}
.back-link {
display: block;
margin-top: 2rem;
color: #555;
text-decoration: none;
}
</style>
</head>
<body>
<div id="airdropDetail">Loading...</div>
<script>
const params = new URLSearchParams(window.location.search);
const airdropId = params.get('id');
fetch('https://script.google.com/macros/s/AKfycbwxiw0R-XmhUUSpZ1PPrikXuzi6d6ikecqy4pkg5j1vCN19WjdmIGp4G5ZMBji9OHZ9/exec')
.then(res => res.json())
.then(data => {
const airdrop = data.find(item => item.id === airdropId);
const container = document.getElementById('airdropDetail');
if (!airdrop) {
container.innerHTML = "<p>Airdrop not found.</p>";
return;
}
container.innerHTML = `
<img src="${airdrop.image}" alt="${airdrop.name}" />
<h2>${airdrop.name}</h2>
<p>${airdrop.description.replace(/\n/g, "<br>")}</p>
<a href="${airdrop.refLink}" class="hero-btn" target="_blank">Join Airdrop</a>
<a href="index.html" class="back-link">← Back to Home</a>
`;
})
.catch(error => {
document.getElementById('airdropDetail').innerHTML = "<p>Error loading airdrop details.</p>";
console.error(error);
});
</script>
</body>
</html>