cryptoglass-trader-pro / analytics.html
yourgymbro's picture
none of the buttons work..make it owkring
06e3b21 verified
Raw
History Blame Contribute Delete
11.6 kB
<!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>