lucacadalora commited on
Commit
2a6f9d9
Β·
verified Β·
1 Parent(s): 08dfa29

make me modern crypto exchanger apps

Browse files
Files changed (4) hide show
  1. README.md +8 -5
  2. index.html +151 -19
  3. script.js +5 -0
  4. style.css +27 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Cryptoswap Galaxy
3
- emoji: πŸ”₯
4
- colorFrom: gray
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: CryptoSwap Galaxy πŸš€
3
+ colorFrom: purple
4
+ colorTo: red
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
index.html CHANGED
@@ -1,19 +1,151 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="dark">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CryptoSwap Galaxy | Modern Crypto Exchanger</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ </head>
12
+ <body class="bg-slate-900 text-slate-100 min-h-screen">
13
+ <crypto-header></crypto-header>
14
+
15
+ <main class="container mx-auto px-4 py-8">
16
+ <div class="max-w-4xl mx-auto grid grid-cols-1 lg:grid-cols-3 gap-8">
17
+ <!-- Crypto Converter -->
18
+ <div class="lg:col-span-2 bg-slate-800 rounded-2xl shadow-2xl p-6">
19
+ <div class="flex justify-between items-center mb-6">
20
+ <h2 class="text-2xl font-bold">Swap Cryptocurrencies</h2>
21
+ <button class="text-indigo-400 hover:text-indigo-300 transition">
22
+ <i data-feather="refresh-cw"></i>
23
+ </button>
24
+ </div>
25
+
26
+ <div class="space-y-6">
27
+ <!-- From Currency -->
28
+ <div class="bg-slate-700 rounded-xl p-4">
29
+ <div class="flex justify-between mb-2">
30
+ <label class="text-sm text-slate-400">From</label>
31
+ <span class="text-sm text-slate-400">Balance: 0.00</span>
32
+ </div>
33
+ <div class="flex items-center">
34
+ <input type="number" class="bg-transparent text-2xl w-full outline-none" placeholder="0.0">
35
+ <div class="dropdown relative">
36
+ <button class="flex items-center space-x-2 bg-slate-600 px-4 py-2 rounded-lg">
37
+ <img src="http://static.photos/technology/40x40/1" class="w-6 h-6 rounded-full" alt="BTC">
38
+ <span>BTC</span>
39
+ <i data-feather="chevron-down" class="w-4 h-4"></i>
40
+ </button>
41
+ </div>
42
+ </div>
43
+ </div>
44
+
45
+ <!-- Swap Button -->
46
+ <div class="flex justify-center">
47
+ <button class="bg-indigo-600 hover:bg-indigo-500 p-2 rounded-full shadow-lg transform transition hover:-translate-y-1">
48
+ <i data-feather="arrow-down" class="w-6 h-6"></i>
49
+ </button>
50
+ </div>
51
+
52
+ <!-- To Currency -->
53
+ <div class="bg-slate-700 rounded-xl p-4">
54
+ <div class="flex justify-between mb-2">
55
+ <label class="text-sm text-slate-400">To</label>
56
+ <span class="text-sm text-slate-400">Balance: 0.00</span>
57
+ </div>
58
+ <div class="flex items-center">
59
+ <input type="number" class="bg-transparent text-2xl w-full outline-none" placeholder="0.0">
60
+ <div class="dropdown relative">
61
+ <button class="flex items-center space-x-2 bg-slate-600 px-4 py-2 rounded-lg">
62
+ <img src="http://static.photos/technology/40x40/2" class="w-6 h-6 rounded-full" alt="ETH">
63
+ <span>ETH</span>
64
+ <i data-feather="chevron-down" class="w-4 h-4"></i>
65
+ </button>
66
+ </div>
67
+ </div>
68
+ </div>
69
+
70
+ <!-- Price Info -->
71
+ <div class="bg-slate-700 rounded-xl p-4 text-sm">
72
+ <div class="flex justify-between">
73
+ <span class="text-slate-400">Price</span>
74
+ <span>1 BTC = 14.32 ETH</span>
75
+ </div>
76
+ <div class="flex justify-between">
77
+ <span class="text-slate-400">Slippage tolerance</span>
78
+ <span>0.5%</span>
79
+ </div>
80
+ </div>
81
+
82
+ <!-- Connect Wallet Button -->
83
+ <button class="w-full bg-indigo-600 hover:bg-indigo-500 py-3 px-6 rounded-xl font-medium transition">
84
+ Connect Wallet
85
+ </button>
86
+ </div>
87
+ </div>
88
+
89
+ <!-- Market Data -->
90
+ <div class="bg-slate-800 rounded-2xl shadow-2xl p-6">
91
+ <h2 class="text-2xl font-bold mb-6">Market Overview</h2>
92
+
93
+ <div class="space-y-4">
94
+ <div class="flex justify-between items-center p-3 hover:bg-slate-700 rounded-lg cursor-pointer transition">
95
+ <div class="flex items-center space-x-3">
96
+ <img src="http://static.photos/technology/40x40/3" class="w-8 h-8 rounded-full" alt="BTC">
97
+ <span class="font-medium">Bitcoin</span>
98
+ </div>
99
+ <div class="text-right">
100
+ <div class="font-medium">$42,856</div>
101
+ <div class="text-green-400 text-xs">+3.42%</div>
102
+ </div>
103
+ </div>
104
+
105
+ <div class="flex justify-between items-center p-3 hover:bg-slate-700 rounded-lg cursor-pointer transition">
106
+ <div class="flex items-center space-x-3">
107
+ <img src="http://static.photos/technology/40x40/4" class="w-8 h-8 rounded-full" alt="ETH">
108
+ <span class="font-medium">Ethereum</span>
109
+ </div>
110
+ <div class="text-right">
111
+ <div class="font-medium">$2,985</div>
112
+ <div class="text-green-400 text-xs">+1.76%</div>
113
+ </div>
114
+ </div>
115
+
116
+ <div class="flex justify-between items-center p-3 hover:bg-slate-700 rounded-lg cursor-pointer transition">
117
+ <div class="flex items-center space-x-3">
118
+ <img src="http://static.photos/technology/40x40/5" class="w-8 h-8 rounded-full" alt="SOL">
119
+ <span class="font-medium">Solana</span>
120
+ </div>
121
+ <div class="text-right">
122
+ <div class="font-medium">$112.64</div>
123
+ <div class="text-green-400 text-xs">+5.23%</div>
124
+ </div>
125
+ </div>
126
+
127
+ <div class="flex justify-between items-center p-3 hover:bg-slate-700 rounded-lg cursor-pointer transition">
128
+ <div class="flex items-center space-x-3">
129
+ <img src="http://static.photos/technology/40x40/6" class="w-8 h-8 rounded-full" alt="ADA">
130
+ <span class="font-medium">Cardano</span>
131
+ </div>
132
+ <div class="text-right">
133
+ <div class="font-medium">$0.58</div>
134
+ <div class="text-red-400 text-xs">-2.14%</div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+ <button class="w-full mt-6 border border-indigo-500 text-indigo-400 hover:bg-indigo-900/50 py-2 px-4 rounded-lg font-medium transition">
140
+ View All Markets
141
+ </button>
142
+ </div>
143
+ </div>
144
+ </main>
145
+
146
+ <script src="components/header.js"></script>
147
+ <script src="script.js"></script>
148
+ <script>feather.replace();</script>
149
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
150
+ </body>
151
+ </html>
script.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ // Main application script
2
+ document.addEventListener('DOMContentLoaded', () => {
3
+ // Fetch crypto prices from CoinGecko API
4
+ async function fetchCryptoPrices() {
5
+ try
style.css CHANGED
@@ -1,28 +1,36 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
 
 
 
28
  }
 
 
 
 
 
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ /* Custom scrollbar */
6
+ ::-webkit-scrollbar {
7
+ width: 8px;
8
+ height: 8px;
9
  }
10
 
11
+ ::-webkit-scrollbar-track {
12
+ background: #1e293b;
 
13
  }
14
 
15
+ ::-webkit-scrollbar-thumb {
16
+ background: #4f46e5;
17
+ border-radius: 4px;
 
 
18
  }
19
 
20
+ ::-webkit-scrollbar-thumb:hover {
21
+ background: #6366f1;
 
 
 
 
22
  }
23
 
24
+ /* Animation for crypto cards */
25
+ @keyframes float {
26
+ 0%, 100% {
27
+ transform: translateY(0);
28
+ }
29
+ 50% {
30
+ transform: translateY(-8px);
31
+ }
32
  }
33
+
34
+ .crypto-card:hover {
35
+ animation: float 2s ease-in-out infinite;
36
+ }