-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassets.html
More file actions
161 lines (150 loc) · 3.92 KB
/
assets.html
File metadata and controls
161 lines (150 loc) · 3.92 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>LibreXLM Assets</title>
<style>
body {
background-color: #000;
color: #00ff66;
font-family: "Courier New", monospace;
margin: 20px;
}
h1 {
color: #66ccff;
text-align: center;
text-shadow: 0 0 8px #00ffff, 0 0 12px #003366;
margin-bottom: 10px;
}
p {
text-align: center;
color: #ccc;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
border: 2px solid magenta;
box-shadow: 0 0 12px magenta;
}
th {
background-color: #111;
color: #ffcc00;
padding: 10px;
text-align: left;
font-size: 14px;
border-bottom: 2px solid #ff00ff;
text-shadow: 0 0 5px #ff00ff;
}
td {
padding: 8px;
border-bottom: 1px dashed #333;
vertical-align: top;
}
tr:nth-child(even) {
background-color: #111;
}
.token a {
color: #00ffff;
font-weight: bold;
text-decoration: none;
text-shadow: 0 0 5px #00ffff;
}
.token a:hover {
color: #ff6699;
text-shadow: 0 0 8px #ff6699;
text-decoration: underline;
}
.issuer {
color: #888;
font-size: 12px;
word-break: break-all;
}
.supply {
text-align: right;
font-family: monospace;
color: #ffd966;
}
.back {
display: block;
text-align: center;
margin-top: 30px;
font-weight: bold;
}
.back a {
color: #ff00ff;
text-decoration: none;
}
.back a:hover {
color: #00ffff;
text-decoration: underline;
}
.marquee {
background: #111;
border: 1px solid #444;
padding: 6px;
margin: 15px 0;
font-weight: bold;
color: #ffccff;
box-shadow: 0 0 10px #ff00ff;
}
</style>
</head>
<body>
<h1>🌐 List of All Assets 🌐</h1>
<div class="marquee">
<marquee scrollamount="4">
🚀 LibreXLM Tokens ✦ Explore ✦ Trade ✦ Experiment ✦
</marquee>
</div>
<p>Each token links to its CleanShave detail page. Supply values are fetched live from the Stellar network.</p>
<table id="assetTable">
<tr>
<th>Token</th>
<th>Issuer</th>
<th>Total Supply</th>
</tr>
</table>
<!-- Asset-Liste -->
<script src="assets.js"></script>
<script>
const table = document.getElementById("assetTable");
function formatNumber(num) {
return Number(num).toLocaleString("en-US", { maximumFractionDigits: 2 });
}
assets.forEach(asset => {
const row = document.createElement("tr");
// Token (mit Link)
const tokenCell = document.createElement("td");
tokenCell.className = "token";
const link = document.createElement("a");
link.href = `https://cleanshave.org/tool/asset-detail.html?code=${asset.code}&issuer=${asset.issuer}`;
link.textContent = asset.code;
tokenCell.appendChild(link);
// Issuer
const issuerCell = document.createElement("td");
issuerCell.className = "issuer";
issuerCell.textContent = asset.issuer;
// Supply (live von Horizon)
const supplyCell = document.createElement("td");
supplyCell.className = "supply";
supplyCell.textContent = "Loading…";
fetch(`https://horizon.stellar.org/assets?asset_code=${asset.code}&asset_issuer=${asset.issuer}`)
.then(r => r.json())
.then(d => {
if (d._embedded.records.length > 0) {
supplyCell.textContent = formatNumber(d._embedded.records[0].amount);
} else {
supplyCell.textContent = "n/a";
}
})
.catch(() => { supplyCell.textContent = "error"; });
row.appendChild(tokenCell);
row.appendChild(issuerCell);
row.appendChild(supplyCell);
table.appendChild(row);
});
</script>
<p class="back"><a href="index.html">⬅ Back to Home</a></p>
</body>
</html>