File size: 11,622 Bytes
06e3b21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Analytics | CryptoGlass</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
        
        body {
            font-family: 'Inter', sans-serif;
            background-color: #0F0F23;
            color: #F9FAFB;
        }
        
        .glass-card {
            background: rgba(139, 92, 246, 0.08);
            backdrop-filter: blur(24px);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
    </style>
</head>
<body class="min-h-screen">
    <div id="vanta-bg" class="fixed inset-0 -z-10"></div>
    
    <!-- Header Navigation -->
    <header class="glass-card sticky top-0 z-50">
        <div class="container mx-auto px-4 py-3">
            <div class="flex items-center justify-between">
                <div class="flex items-center space-x-2">
                    <div class="w-8 h-8 rounded-full bg-gradient-to-br from-primary-500 to-secondary-500 flex items-center justify-center">
                        <i data-feather="dollar-sign" class="text-white"></i>
                    </div>
                    <h1 class="text-xl font-bold bg-gradient-to-r from-primary-500 to-secondary-500 bg-clip-text text-transparent">CryptoGlass</h1>
                </div>
                
                <nav class="hidden md:flex items-center space-x-6">
                    <a href="index.html" class="text-gray-400 font-medium hover:text-white transition-colors relative group">
                        Dashboard
                        <span class="absolute bottom-0 left-0 w-full h-0.5 bg-primary-500 scale-x-0 group-hover:scale-x-100 transition-transform origin-left"></span>
                    </a>
                    <a href="journal.html" class="text-gray-400 font-medium hover:text-white transition-colors relative group">
                        Journal
                        <span class="absolute bottom-0 left-0 w-full h-0.5 bg-primary-500 scale-x-0 group-hover:scale-x-100 transition-transform origin-left"></span>
                    </a>
                    <a href="calculator.html" class="text-gray-400 font-medium hover:text-white transition-colors relative group">
                        Calculator
                        <span class="absolute bottom-0 left-0 w-full h-0.5 bg-primary-500 scale-x-0 group-hover:scale-x-100 transition-transform origin-left"></span>
                    </a>
                    <a href="analytics.html" class="text-white font-medium hover:text-primary-400 transition-colors relative group">
                        Analytics
                        <span class="absolute bottom-0 left-0 w-full h-0.5 bg-primary-500 scale-x-0 group-hover:scale-x-100 transition-transform origin-left"></span>
                    </a>
                </nav>
                
                <div class="flex items-center space-x-4">
                    <button class="p-2 rounded-full hover:bg-white/10 transition-colors">
                        <i data-feather="bell"></i>
                    </button>
                    <div class="w-8 h-8 rounded-full bg-gradient-to-br from-primary-500 to-secondary-500 flex items-center justify-center">
                        <i data-feather="user"></i>
                    </div>
                </div>
            </div>
        </div>
    </header>
    
    <main class="container mx-auto px-4 py-8">
        <div class="glass-card rounded-xl p-6 mb-6">
            <h2 class="text-2xl font-bold mb-6">Trading Analytics</h2>
            <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                <div>
                    <h3 class="text-lg font-semibold mb-4">Win Rate by Asset</h3>
                    <canvas id="assetChart" height="250"></canvas>
                </div>
                <div>
                    <h3 class="text-lg font-semibold mb-4">Profit Distribution</h3>
                    <canvas id="profitChart" height="250"></canvas>
                </div>
            </div>
            <div>
                <h3 class="text-lg font-semibold mb-4">Monthly Performance</h3>
                <canvas id="monthlyChart" height="300"></canvas>
            </div>
        </div>
    </main>
    
    <!-- Mobile Bottom Navigation -->
    <div class="md:hidden fixed bottom-0 left-0 right-0 glass-card border-t border-gray-800">
        <div class="flex justify-around py-3">
            <a href="index.html" class="flex flex-col items-center text-gray-400 hover:text-white">
                <i data-feather="home" class="w-5 h-5"></i>
                <span class="text-xs mt-1">Dashboard</span>
            </a>
            <a href="journal.html" class="flex flex-col items-center text-gray-400 hover:text-white">
                <i data-feather="file-text" class="w-5 h-5"></i>
                <span class="text-xs mt-1">Journal</span>
            </a>
            <a href="calculator.html" class="flex flex-col items-center text-gray-400 hover:text-white">
                <i data-feather="calculator" class="w-5 h-5"></i>
                <span class="text-xs mt-1">Calculator</span>
            </a>
            <a href="analytics.html" class="flex flex-col items-center text-primary-500">
                <i data-feather="bar-chart-2" class="w-5 h-5"></i>
                <span class="text-xs mt-1">Analytics</span>
            </a>
        </div>
    </div>
    
    <script>
        // Initialize Vanta.js background
        VANTA.GLOBE({
            el: "#vanta-bg",
            mouseControls: true,
            touchControls: true,
            gyroControls: false,
            minHeight: 200.00,
            minWidth: 200.00,
            scale: 1.00,
            scaleMobile: 1.00,
            color: 0x8b5cf6,
            backgroundColor: 0x0f0f23,
            size: 0.8
        });
        
        document.addEventListener('DOMContentLoaded', function() {
            feather.replace();
            
            // Asset Win Rate Chart
            const assetCtx = document.getElementById('assetChart').getContext('2d');
            new Chart(assetCtx, {
                type: 'bar',
                data: {
                    labels: ['BTC', 'ETH', 'SOL', 'ADA', 'DOT'],
                    datasets: [{
                        label: 'Win Rate %',
                        data: [72, 65, 68, 60, 55],
                        backgroundColor: [
                            'rgba(139, 92, 246, 0.7)',
                            'rgba(16, 185, 129, 0.7)',
                            'rgba(234, 179, 8, 0.7)',
                            'rgba(59, 130, 246, 0.7)',
                            'rgba(244, 63, 94, 0.7)'
                        ],
                        borderColor: [
                            'rgba(139, 92, 246, 1)',
                            'rgba(16, 185, 129, 1)',
                            'rgba(234, 179, 8, 1)',
                            'rgba(59, 130, 246, 1)',
                            'rgba(244, 63, 94, 1)'
                        ],
                        borderWidth: 1
                    }]
                },
                options: {
                    responsive: true,
                    plugins: {
                        legend: {
                            display: false
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: true,
                            max: 100,
                            grid: {
                                color: 'rgba(255, 255, 255, 0.1)'
                            },
                            ticks: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        },
                        x: {
                            grid: {
                                display: false
                            },
                            ticks: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        }
                    }
                }
            });
            
            // Profit Distribution Chart
            const profitCtx = document.getElementById('profitChart').getContext('2d');
            new Chart(profitCtx, {
                type: 'doughnut',
                data: {
                    labels: ['BTC', 'ETH', 'SOL', 'Other'],
                    datasets: [{
                        data: [45, 30, 15, 10],
                        backgroundColor: [
                            'rgba(139, 92, 246, 0.7)',
                            'rgba(16, 185, 129, 0.7)',
                            'rgba(234, 179, 8, 0.7)',
                            'rgba(59, 130, 246, 0.7)'
                        ],
                        borderColor: 'rgba(31, 41, 55, 0.5)',
                        borderWidth: 1
                    }]
                },
                options: {
                    responsive: true,
                    plugins: {
                        legend: {
                            position: 'right',
                            labels: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        }
                    }
                }
            });
            
            // Monthly Performance Chart
            const monthlyCtx = document.getElementById('monthlyChart').getContext('2d');
            new Chart(monthlyCtx, {
                type: 'line',
                data: {
                    labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug'],
                    datasets: [{
                        label: 'Monthly P&L ($)',
                        data: [320, 450, 280, 510, 620, 490, 730, 680],
                        backgroundColor: 'rgba(139, 92, 246, 0.2)',
                        borderColor: 'rgba(139, 92, 246, 1)',
                        borderWidth: 2,
                        tension: 0.4,
                        fill: true
                    }]
                },
                options: {
                    responsive: true,
                    plugins: {
                        legend: {
                            labels: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        }
                    },
                    scales: {
                        y: {
                            grid: {
                                color: 'rgba(255, 255, 255, 0.1)'
                            },
                            ticks: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        },
                        x: {
                            grid: {
                                color: 'rgba(255, 255, 255, 0.1)'
                            },
                            ticks: {
                                color: 'rgba(255, 255, 255, 0.7)'
                            }
                        }
                    }
                }
            });
        });
    </script>
</body>
</html>