Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>NEON TRADER 2077</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;500;700&display=swap'); | |
:root { | |
--neon-pink: #ff2a6d; | |
--neon-blue: #05d9e8; | |
--neon-purple: #d300c5; | |
--neon-green: #00ff9d; | |
--dark-bg: #0d0221; | |
--darker-bg: #02010a; | |
--grid-color: rgba(5, 217, 232, 0.1); | |
} | |
body { | |
font-family: 'Rajdhani', sans-serif; | |
background-color: var(--dark-bg); | |
color: white; | |
overflow-x: hidden; | |
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><circle cx="8" cy="8" r="7" fill="none" stroke="%2305d9e8" stroke-width="1"/><circle cx="8" cy="8" r="3" fill="%2305d9e8"/></svg>'), auto; | |
} | |
h1, h2, h3, .font-orbitron { | |
font-family: 'Orbitron', sans-serif; | |
letter-spacing: 1px; | |
} | |
.neon-text-pink { | |
color: var(--neon-pink); | |
text-shadow: 0 0 5px var(--neon-pink), 0 0 10px var(--neon-pink); | |
} | |
.neon-text-blue { | |
color: var(--neon-blue); | |
text-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue); | |
} | |
.neon-text-green { | |
color: var(--neon-green); | |
text-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green); | |
} | |
.neon-border-pink { | |
border: 2px solid var(--neon-pink); | |
box-shadow: 0 0 10px var(--neon-pink), inset 0 0 10px var(--neon-pink); | |
} | |
.neon-border-blue { | |
border: 2px solid var(--neon-blue); | |
box-shadow: 0 0 10px var(--neon-blue), inset 0 0 10px var(--neon-blue); | |
} | |
.glow-pink { | |
animation: glow-pink 1.5s infinite alternate; | |
} | |
.glow-blue { | |
animation: glow-blue 1.5s infinite alternate; | |
} | |
.glow-green { | |
animation: glow-green 1.5s infinite alternate; | |
} | |
@keyframes glow-pink { | |
from { | |
box-shadow: 0 0 5px var(--neon-pink); | |
} | |
to { | |
box-shadow: 0 0 20px var(--neon-pink), 0 0 30px var(--neon-pink); | |
} | |
} | |
@keyframes glow-blue { | |
from { | |
box-shadow: 0 0 5px var(--neon-blue); | |
} | |
to { | |
box-shadow: 0 0 20px var(--neon-blue), 0 0 30px var(--neon-blue); | |
} | |
} | |
@keyframes glow-green { | |
from { | |
box-shadow: 0 0 5px var(--neon-green); | |
} | |
to { | |
box-shadow: 0 0 20px var(--neon-green), 0 0 30px var(--neon-green); | |
} | |
} | |
.scanline { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background: linear-gradient( | |
to bottom, | |
rgba(255, 255, 255, 0) 0%, | |
rgba(255, 255, 255, 0.03) 50%, | |
rgba(255, 255, 255, 0) 100% | |
); | |
background-size: 100% 8px; | |
pointer-events: none; | |
animation: scanline 8s linear infinite; | |
} | |
@keyframes scanline { | |
0% { | |
background-position: 0 0; | |
} | |
100% { | |
background-position: 0 100vh; | |
} | |
} | |
.flicker { | |
animation: flicker 5s infinite alternate, color-shift 10s infinite alternate; | |
} | |
@keyframes flicker { | |
0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { | |
opacity: 1; | |
} | |
20%, 22%, 24%, 55% { | |
opacity: 0.7; | |
} | |
} | |
@keyframes color-shift { | |
0%, 100% { | |
filter: hue-rotate(0deg); | |
} | |
50% { | |
filter: hue-rotate(10deg); | |
} | |
} | |
.stock-up { | |
color: var(--neon-green); | |
text-shadow: 0 0 5px var(--neon-green); | |
} | |
.stock-down { | |
color: #ff0000; | |
text-shadow: 0 0 5px #ff0000; | |
} | |
.terminal-text { | |
font-family: 'Courier New', monospace; | |
color: var(--neon-blue); | |
text-shadow: 0 0 5px var(--neon-blue); | |
} | |
.grid-bg { | |
position: relative; | |
background-image: | |
linear-gradient(var(--grid-color) 1px, transparent 1px), | |
linear-gradient(90deg, var(--grid-color) 1px, transparent 1px); | |
background-size: 20px 20px; | |
overflow: hidden; | |
} | |
.grid-bg::before { | |
content: ''; | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
background: radial-gradient(circle at center, transparent 0%, var(--dark-bg) 70%); | |
pointer-events: none; | |
} | |
.cyber-button { | |
transition: all 0.3s; | |
position: relative; | |
overflow: hidden; | |
z-index: 1; | |
} | |
.cyber-button:hover { | |
transform: translateY(-2px); | |
box-shadow: 0 0 15px currentColor; | |
} | |
.cyber-button::before { | |
content: ''; | |
position: absolute; | |
top: 0; | |
left: -100%; | |
width: 100%; | |
height: 100%; | |
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); | |
transition: all 0.5s; | |
z-index: -1; | |
} | |
.cyber-button:hover::before { | |
left: 100%; | |
} | |
.pulse { | |
animation: pulse 2s infinite; | |
} | |
@keyframes pulse { | |
0% { | |
opacity: 0.7; | |
} | |
50% { | |
opacity: 1; | |
} | |
100% { | |
opacity: 0.7; | |
} | |
} | |
.matrix-rain { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
pointer-events: none; | |
opacity: 0.1; | |
z-index: 0; | |
} | |
.cyber-glitch { | |
position: relative; | |
} | |
.cyber-glitch::before, .cyber-glitch::after { | |
content: attr(data-text); | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background: var(--dark-bg); | |
} | |
.cyber-glitch::before { | |
left: 2px; | |
text-shadow: -2px 0 var(--neon-blue); | |
clip: rect(44px, 450px, 56px, 0); | |
animation: glitch-anim-1 2s infinite linear alternate-reverse; | |
} | |
.cyber-glitch::after { | |
left: -2px; | |
text-shadow: -2px 0 var(--neon-pink); | |
clip: rect(44px, 450px, 56px, 0); | |
animation: glitch-anim-2 2s infinite linear alternate-reverse; | |
} | |
@keyframes glitch-anim-1 { | |
0% { clip: rect(32px, 9999px, 78px, 0); } | |
20% { clip: rect(8px, 9999px, 23px, 0); } | |
40% { clip: rect(45px, 9999px, 99px, 0); } | |
60% { clip: rect(3px, 9999px, 92px, 0); } | |
80% { clip: rect(54px, 9999px, 72px, 0); } | |
100% { clip: rect(18px, 9999px, 3px, 0); } | |
} | |
@keyframes glitch-anim-2 { | |
0% { clip: rect(91px, 9999px, 53px, 0); } | |
20% { clip: rect(92px, 9999px, 98px, 0); } | |
40% { clip: rect(23px, 9999px, 12px, 0); } | |
60% { clip: rect(86px, 9999px, 6px, 0); } | |
80% { clip: rect(1px, 9999px, 23px, 0); } | |
100% { clip: rect(9px, 9999px, 99px, 0); } | |
} | |
.holographic { | |
background: linear-gradient(135deg, rgba(5, 217, 232, 0.2) 0%, rgba(255, 42, 109, 0.2) 50%, rgba(211, 0, 197, 0.2) 100%); | |
box-shadow: 0 0 20px rgba(5, 217, 232, 0.3); | |
position: relative; | |
overflow: hidden; | |
} | |
.holographic::before { | |
content: ''; | |
position: absolute; | |
top: -50%; | |
left: -50%; | |
width: 200%; | |
height: 200%; | |
background: linear-gradient( | |
to bottom right, | |
rgba(5, 217, 232, 0) 0%, | |
rgba(5, 217, 232, 0.1) 50%, | |
rgba(255, 42, 109, 0.1) 100% | |
); | |
transform: rotate(30deg); | |
animation: hologram 6s linear infinite; | |
} | |
@keyframes hologram { | |
0% { transform: rotate(30deg) translate(-10%, -10%); } | |
100% { transform: rotate(30deg) translate(10%, 10%); } | |
} | |
.cyber-input { | |
background: rgba(0, 0, 0, 0.5); | |
border: 1px solid rgba(5, 217, 232, 0.3); | |
transition: all 0.3s; | |
position: relative; | |
} | |
.cyber-input:focus { | |
outline: none; | |
border-color: var(--neon-blue); | |
box-shadow: 0 0 10px var(--neon-blue); | |
} | |
.cyber-input::placeholder { | |
color: rgba(5, 217, 232, 0.5); | |
} | |
.particles { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
pointer-events: none; | |
z-index: 0; | |
} | |
.particle { | |
position: absolute; | |
background-color: var(--neon-blue); | |
border-radius: 50%; | |
pointer-events: none; | |
} | |
.cyber-loader { | |
width: 40px; | |
height: 40px; | |
border: 3px solid var(--neon-blue); | |
border-radius: 50%; | |
border-top-color: transparent; | |
animation: spin 1s linear infinite; | |
position: relative; | |
} | |
.cyber-loader::before { | |
content: ''; | |
position: absolute; | |
top: -5px; | |
left: -5px; | |
right: -5px; | |
bottom: -5px; | |
border: 3px solid var(--neon-pink); | |
border-radius: 50%; | |
border-top-color: transparent; | |
animation: spin 1.5s linear infinite reverse; | |
} | |
@keyframes spin { | |
0% { transform: rotate(0deg); } | |
100% { transform: rotate(360deg); } | |
} | |
.cyber-tooltip { | |
position: relative; | |
} | |
.cyber-tooltip:hover::after { | |
content: attr(data-tooltip); | |
position: absolute; | |
bottom: 100%; | |
left: 50%; | |
transform: translateX(-50%); | |
background: rgba(0, 0, 0, 0.8); | |
color: var(--neon-blue); | |
padding: 5px 10px; | |
border-radius: 4px; | |
font-size: 12px; | |
white-space: nowrap; | |
border: 1px solid var(--neon-blue); | |
box-shadow: 0 0 10px var(--neon-blue); | |
z-index: 100; | |
} | |
.cyber-badge { | |
display: inline-block; | |
padding: 2px 6px; | |
font-size: 10px; | |
font-weight: bold; | |
border-radius: 3px; | |
animation: pulse 2s infinite; | |
} | |
.cyber-badge.new { | |
background-color: var(--neon-pink); | |
color: black; | |
} | |
.cyber-badge.hot { | |
background-color: var(--neon-green); | |
color: black; | |
} | |
.cyber-badge.alert { | |
background-color: #ff0000; | |
color: white; | |
} | |
.cyber-tabs { | |
display: flex; | |
border-bottom: 1px solid rgba(5, 217, 232, 0.3); | |
} | |
.cyber-tab { | |
padding: 8px 16px; | |
cursor: pointer; | |
position: relative; | |
} | |
.cyber-tab.active { | |
color: var(--neon-blue); | |
} | |
.cyber-tab.active::after { | |
content: ''; | |
position: absolute; | |
bottom: -1px; | |
left: 0; | |
right: 0; | |
height: 2px; | |
background-color: var(--neon-blue); | |
box-shadow: 0 0 10px var(--neon-blue); | |
} | |
.cyber-tab:hover { | |
background-color: rgba(5, 217, 232, 0.1); | |
} | |
.cyber-dropdown { | |
position: relative; | |
} | |
.cyber-dropdown-content { | |
display: none; | |
position: absolute; | |
background-color: rgba(0, 0, 0, 0.9); | |
min-width: 160px; | |
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); | |
z-index: 1; | |
border: 1px solid var(--neon-blue); | |
} | |
.cyber-dropdown:hover .cyber-dropdown-content { | |
display: block; | |
animation: fadeIn 0.3s; | |
} | |
@keyframes fadeIn { | |
from { opacity: 0; transform: translateY(-10px); } | |
to { opacity: 1; transform: translateY(0); } | |
} | |
.cyber-modal { | |
display: none; | |
position: fixed; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
background-color: rgba(0, 0, 0, 0.8); | |
z-index: 1000; | |
align-items: center; | |
justify-content: center; | |
} | |
.cyber-modal-content { | |
background-color: var(--dark-bg); | |
border: 2px solid var(--neon-blue); | |
box-shadow: 0 0 30px var(--neon-blue); | |
padding: 20px; | |
max-width: 600px; | |
width: 90%; | |
position: relative; | |
animation: modalAppear 0.5s; | |
} | |
@keyframes modalAppear { | |
from { opacity: 0; transform: scale(0.8); } | |
to { opacity: 1; transform: scale(1); } | |
} | |
.cyber-close { | |
position: absolute; | |
top: 10px; | |
right: 10px; | |
color: var(--neon-blue); | |
font-size: 20px; | |
cursor: pointer; | |
} | |
.cyber-notification { | |
position: fixed; | |
bottom: 20px; | |
right: 20px; | |
background-color: rgba(0, 0, 0, 0.9); | |
border: 1px solid var(--neon-pink); | |
box-shadow: 0 0 20px var(--neon-pink); | |
padding: 15px; | |
max-width: 300px; | |
transform: translateX(150%); | |
transition: transform 0.5s; | |
z-index: 1000; | |
} | |
.cyber-notification.show { | |
transform: translateX(0); | |
} | |
.cyber-progress { | |
height: 5px; | |
background-color: rgba(5, 217, 232, 0.2); | |
border-radius: 3px; | |
overflow: hidden; | |
position: relative; | |
} | |
.cyber-progress-bar { | |
height: 100%; | |
background-color: var(--neon-blue); | |
width: 0; | |
transition: width 0.5s; | |
position: relative; | |
} | |
.cyber-progress-bar::after { | |
content: ''; | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent); | |
animation: progressShine 2s infinite; | |
} | |
@keyframes progressShine { | |
0% { transform: translateX(-100%); } | |
100% { transform: translateX(100%); } | |
} | |
.cyber-countdown { | |
font-family: 'Orbitron', sans-serif; | |
font-size: 24px; | |
color: var(--neon-pink); | |
text-shadow: 0 0 5px var(--neon-pink); | |
} | |
.cyber-countdown.separator { | |
margin: 0 5px; | |
} | |
.cyber-countdown.danger { | |
color: #ff0000; | |
text-shadow: 0 0 5px #ff0000; | |
} | |
.cyber-carousel { | |
position: relative; | |
overflow: hidden; | |
} | |
.cyber-carousel-slide { | |
display: none; | |
animation: fadeIn 0.5s; | |
} | |
.cyber-carousel-slide.active { | |
display: block; | |
} | |
.cyber-carousel-nav { | |
position: absolute; | |
bottom: 10px; | |
left: 0; | |
right: 0; | |
display: flex; | |
justify-content: center; | |
gap: 10px; | |
} | |
.cyber-carousel-dot { | |
width: 10px; | |
height: 10px; | |
border-radius: 50%; | |
background-color: rgba(5, 217, 232, 0.5); | |
cursor: pointer; | |
} | |
.cyber-carousel-dot.active { | |
background-color: var(--neon-blue); | |
box-shadow: 0 0 5px var(--neon-blue); | |
} | |
</style> | |
</head> | |
<body class="min-h-screen grid-bg"> | |
<div class="scanline"></div> | |
<div class="matrix-rain" id="matrixRain"></div> | |
<div class="particles" id="particles"></div> | |
<!-- Cyber Noise Overlay --> | |
<div class="fixed inset-0 pointer-events-none opacity-5" id="noiseOverlay" style="background-image: url('data:image/svg+xml;utf8,<svg viewBox=\"0 0 200 200\" xmlns=\"http://www.w3.org/2000/svg\"><filter id=\"noise\"><feTurbulence type=\"fractalNoise\" baseFrequency=\"0.65\" numOctaves=\"3\" stitchTiles=\"stitch\"/></filter><rect width=\"100%\" height=\"100%\" filter=\"url(%23noise)\"/></svg>');"></div> | |
<!-- Header with glitch effect --> | |
<header class="bg-black bg-opacity-80 border-b border-neon-blue py-4 px-6 flex justify-between items-center neon-border-blue relative"> | |
<div class="flex items-center space-x-4"> | |
<div class="w-12 h-12 bg-neon-pink rounded-full glow-pink flex items-center justify-center"> | |
<i class="fas fa-chart-line text-xl text-white"></i> | |
</div> | |
<h1 class="text-3xl font-bold neon-text-pink flicker cyber-glitch" data-text="NEON TRADER 2077">NEON TRADER 2077</h1> | |
</div> | |
<div class="flex items-center space-x-6"> | |
<div class="text-center"> | |
<p class="text-xs text-gray-400">CRYPTO TIME</p> | |
<p id="current-time" class="text-xl neon-text-blue font-orbitron">23:59:45</p> | |
</div> | |
<div class="text-center"> | |
<p class="text-xs text-gray-400">NET WORTH</p> | |
<p class="text-xl neon-text-pink font-orbitron">₡ <span id="net-worth">1,245,890</span></p> | |
</div> | |
<div class="cyber-dropdown"> | |
<div class="w-10 h-10 rounded-full bg-neon-blue bg-opacity-30 flex items-center justify-center neon-border-blue cursor-pointer hover:bg-opacity-50 transition cyber-tooltip" data-tooltip="User Profile"> | |
<i class="fas fa-user neon-text-blue"></i> | |
</div> | |
<div class="cyber-dropdown-content"> | |
<div class="p-3 border-b border-gray-800"> | |
<p class="text-sm neon-text-blue">Logged in as: <span class="text-white">Corp_Trader_42</span></p> | |
</div> | |
<div class="p-2"> | |
<a href="#" class="block px-3 py-2 text-sm hover:bg-gray-800">Dashboard</a> | |
<a href="#" class="block px-3 py-2 text-sm hover:bg-gray-800">Settings</a> | |
<a href="#" class="block px-3 py-2 text-sm hover:bg-gray-800">Logout</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Connection status indicator --> | |
<div class="absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-neon-blue via-neon-pink to-neon-green" id="connectionIndicator"></div> | |
</header> | |
<main class="container mx-auto px-4 py-6 relative z-10"> | |
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6"> | |
<!-- Left sidebar --> | |
<div class="lg:col-span-1 space-y-6"> | |
<!-- Portfolio Summary with holographic effect --> | |
<div class="bg-black bg-opacity-70 p-4 rounded-lg neon-border-pink holographic"> | |
<div class="relative"> | |
<h2 class="text-xl neon-text-pink font-orbitron mb-4 flex items-center"> | |
<span>PORTFOLIO</span> | |
<span class="cyber-badge new ml-2">NEW</span> | |
</h2> | |
<div class="space-y-3"> | |
<div class="flex justify-between items-center"> | |
<span class="text-gray-400">Total Value:</span> | |
<span class="neon-text-blue font-bold">₡ <span id="portfolio-total">1,245,890</span></span> | |
</div> | |
<div class="flex justify-between items-center"> | |
<span class="text-gray-400">Day Change:</span> | |
<span class="text-green-400 font-bold">+₡ <span id="day-change">24,560</span> (<span id="day-change-percent">+2.01%</span>)</span> | |
</div> | |
<div class="flex justify-between items-center"> | |
<span class="text-gray-400">Buying Power:</span> | |
<span class="neon-text-blue font-bold">₡ <span id="buying-power">245,890</span></span> | |
</div> | |
</div> | |
<div class="mt-6"> | |
<h3 class="text-sm text-gray-400 mb-2">ASSET DISTRIBUTION</h3> | |
<div class="cyber-progress mb-2"> | |
<div class="cyber-progress-bar" id="asset-progress" style="width: 65%;"></div> | |
</div> | |
<div class="flex justify-between text-xs"> | |
<span class="neon-text-pink">Stocks (65%)</span> | |
<span class="neon-text-blue">Crypto (35%)</span> | |
</div> | |
</div> | |
<!-- Mini chart animation --> | |
<div class="mt-4 h-16 relative"> | |
<canvas id="miniChart" class="w-full h-full"></canvas> | |
<div class="absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-neon-pink via-neon-blue to-neon-green"></div> | |
</div> | |
</div> | |
</div> | |
<!-- Quick Actions with enhanced buttons --> | |
<div class="bg-black bg-opacity-70 p-4 rounded-lg neon-border-blue"> | |
<h2 class="text-xl neon-text-blue font-orbitron mb-4">QUICK ACTIONS</h2> | |
<div class="grid grid-cols-2 gap-3"> | |
<button class="cyber-button bg-neon-pink bg-opacity-20 text-white py-2 px-3 rounded-md neon-border-pink neon-text-pink hover:bg-opacity-30 cyber-tooltip" data-tooltip="Buy Assets"> | |
<i class="fas fa-arrow-up mr-2"></i> Buy | |
</button> | |
<button class="cyber-button bg-red-500 bg-opacity-20 text-white py-2 px-3 rounded-md border border-red-500 text-red-400 hover:bg-opacity-30 cyber-tooltip" data-tooltip="Sell Assets"> | |
<i class="fas fa-arrow-down mr-2"></i> Sell | |
</button> | |
<button class="cyber-button bg-neon-blue bg-opacity-20 text-white py-2 px-3 rounded-md neon-border-blue neon-text-blue hover:bg-opacity-30 cyber-tooltip" data-tooltip="Trade Pairs"> | |
<i class="fas fa-exchange-alt mr-2"></i> Trade | |
</button> | |
<button class="cyber-button bg-purple-500 bg-opacity-20 text-white py-2 px-3 rounded-md border border-purple-500 text-purple-400 hover:bg-opacity-30 cyber-tooltip" data-tooltip="Crypto Markets"> | |
<i class="fas fa-coins mr-2"></i> Crypto | |
</button> | |
</div> | |
<!-- Quick transfer form --> | |
<div class="mt-4"> | |
<h3 class="text-sm neon-text-green mb-2">QUICK TRANSFER</h3> | |
<div class="flex space-x-2"> | |
<input type="text" class="cyber-input flex-1 text-sm py-1 px-2 rounded" placeholder="Amount ₡"> | |
<button class="cyber-button bg-neon-green bg-opacity-20 text-neon-green text-sm py-1 px-3 rounded border border-neon-green cyber-tooltip" data-tooltip="Transfer Funds"> | |
<i class="fas fa-paper-plane"></i> | |
</button> | |
</div> | |
</div> | |
</div> | |
<!-- News Feed with carousel --> | |
<div class="bg-black bg-opacity-70 p-4 rounded-lg neon-border-pink"> | |
<div class="flex justify-between items-center mb-4"> | |
<h2 class="text-xl neon-text-pink font-orbitron">CYBER NEWS</h2> | |
<div class="flex items-center"> | |
<span class="text-xs text-gray-400 mr-2">AUTO</span> | |
<label class="relative inline-flex items-center cursor-pointer"> | |
<input type="checkbox" value="" class="sr-only peer" id="newsAutoScroll" checked> | |
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-neon-pink"></div> | |
</label> | |
</div> | |
</div> | |
<div class="cyber-carousel" id="newsCarousel"> | |
<div class="cyber-carousel-slide active"> | |
<div class="border-b border-gray-800 pb-3"> | |
<p class="text-xs text-gray-400">10:45 AM</p> | |
<p class="text-sm neon-text-blue">Arasaka Corp announces breakthrough in neural interface tech</p> | |
</div> | |
<div class="border-b border-gray-800 pb-3"> | |
<p class="text-xs text-gray-400">09:30 AM</p> | |
<p class="text-sm neon-text-blue">Militech wins major defense contract</p> | |
</div> | |
<div class="border-b border-gray-800 pb-3"> | |
<p class="text-xs text-gray-400">08:15 AM</p> | |
<p class="text-sm neon-text-blue">NetWatch reports surge in rogue AIs</p> | |
</div> | |
</div> | |
<div class="cyber-carousel-slide"> | |
<div class="border-b border-gray-800 pb-3"> | |
<p class="text-xs text-gray-400">07:00 AM</p> | |
<p class="text-sm neon-text-blue">Night City stock exchange hits record high</p> | |
</div> | |
<div class="border-b border-gray-800 pb-3"> | |
<p class="text-xs text-gray-400">06:30 AM</p> | |
<p class="text-sm neon-text-blue">New cyberware regulations announced</p> | |
</div> | |
<div class="border-b border-gray-800 pb-3"> | |
<p class="text-xs text-gray-400">05:45 AM</p> | |
<p class="text-sm neon-text-blue">Crypto market volatility expected</p> | |
</div> | |
</div> | |
<div class="cyber-carousel-slide"> | |
<div class="border-b border-gray-800 pb-3"> | |
<p class="text-xs text-gray-400">04:30 AM</p> | |
<p class="text-sm neon-text-blue">Biotechnica patents new synthetic food</p> | |
</div> | |
<div class="border-b border-gray-800 pb-3"> | |
<p class="text-xs text-gray-400">03:15 AM</p> | |
<p class="text-sm neon-text-blue">Trauma Team IPO oversubscribed</p> | |
</div> | |
<div class="border-b border-gray-800 pb-3"> | |
<p class="text-xs text-gray-400">02:00 AM</p> | |
<p class="text-sm neon-text-blue">Zetatech unveils new cyberdeck</p> | |
</div> | |
</div> | |
<div class="cyber-carousel-nav"> | |
<div class="cyber-carousel-dot active" data-slide="0"></div> | |
<div class="cyber-carousel-dot" data-slide="1"></div> | |
<div class="cyber-carousel-dot" data-slide="2"></div> | |
</div> | |
</div> | |
<div class="mt-3 text-center"> | |
<button id="refreshNews" class="text-xs text-gray-400 hover:text-neon-blue"> | |
<i class="fas fa-sync-alt mr-1"></i> Refresh Feed | |
</button> | |
</div> | |
</div> | |
<!-- Countdown to market close --> | |
<div class="bg-black bg-opacity-70 p-4 rounded-lg neon-border-blue text-center"> | |
<h3 class="text-sm text-gray-400 mb-1">MARKET CLOSES IN</h3> | |
<div class="cyber-countdown flex justify-center items-center"> | |
<span id="countdown-hours">05</span> | |
<span class="cyber-countdown separator">:</span> | |
<span id="countdown-minutes">43</span> | |
<span class="cyber-countdown separator">:</span> | |
<span id="countdown-seconds">22</span> | |
</div> | |
</div> | |
</div> | |
<!-- Main Content --> | |
<div class="lg:col-span-3 space-y-6"> | |
<!-- Market Overview with tabs --> | |
<div class="bg-black bg-opacity-70 p-4 rounded-lg neon-border-blue"> | |
<div class="flex justify-between items-center mb-4"> | |
<h2 class="text-xl neon-text-blue font-orbitron">MARKET OVERVIEW</h2> | |
<div class="cyber-tabs"> | |
<div class="cyber-tab active" data-tab="stocks">STOCKS</div> | |
<div class="cyber-tab" data-tab="crypto">CRYPTO</div> | |
<div class="cyber-tab" data-tab="futures">FUTURES</div> | |
</div> | |
</div> | |
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6" id="market-metrics"> | |
<div class="bg-gray-900 bg-opacity-50 p-3 rounded-lg border border-gray-800 hover:border-neon-blue transition"> | |
<p class="text-xs text-gray-400">NIGHT CITY INDEX</p> | |
<p class="text-xl neon-text-blue font-orbitron">4,328.76</p> | |
<p class="text-sm text-green-400">+42.18 (0.98%)</p> | |
</div> | |
<div class="bg-gray-900 bg-opacity-50 p-3 rounded-lg border border-gray-800 hover:border-neon-pink transition"> | |
<p class="text-xs text-gray-400">TECH SECTOR</p> | |
<p class="text-xl neon-text-pink font-orbitron">1,845.32</p> | |
<p class="text-sm text-green-400">+28.45 (1.56%)</p> | |
</div> | |
<div class="bg-gray-900 bg-opacity-50 p-3 rounded-lg border border-gray-800 hover:border-neon-blue transition"> | |
<p class="text-xs text-gray-400">BTC/USD</p> | |
<p class="text-xl neon-text-blue font-orbitron">₡ 42,876</p> | |
<p class="text-sm text-red-400">-1,245.76 (2.82%)</p> | |
</div> | |
<div class="bg-gray-900 bg-opacity-50 p-3 rounded-lg border border-gray-800 hover:border-neon-pink transition"> | |
<p class="text-xs text-gray-400">ETH/USD</p> | |
<p class="text-xl neon-text-pink font-orbitron">₡ 2,876</p> | |
<p class="text-sm text-green-400">+45.32 (1.60%)</p> | |
</div> | |
</div> | |
<!-- Stock Chart with interactive controls --> | |
<div class="h-64 bg-gray-900 bg-opacity-50 rounded-lg mb-4 relative overflow-hidden" id="mainChartContainer"> | |
<div class="absolute top-2 left-2 z-10 flex space-x-1"> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-2 rounded cyber-tooltip" data-tooltip="Line Chart"> | |
<i class="fas fa-chart-line"></i> | |
</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-2 rounded cyber-tooltip" data-tooltip="Candlestick"> | |
<i class="fas fa-chart-bar"></i> | |
</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-2 rounded cyber-tooltip" data-tooltip="Area Chart"> | |
<i class="fas fa-chart-area"></i> | |
</button> | |
</div> | |
<canvas id="mainChart" class="w-full h-full"></canvas> | |
<div class="absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-neon-pink via-neon-blue to-neon-green"></div> | |
<div class="absolute bottom-2 right-2 z-10 flex space-x-1"> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-2 rounded cyber-tooltip" data-tooltip="Draw Tools"> | |
<i class="fas fa-pencil-alt"></i> | |
</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-2 rounded cyber-tooltip" data-tooltip="Indicators"> | |
<i class="fas fa-wave-square"></i> | |
</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-2 rounded cyber-tooltip" data-tooltip="Fullscreen"> | |
<i class="fas fa-expand"></i> | |
</button> | |
</div> | |
</div> | |
<div class="flex justify-between items-center"> | |
<div class="flex space-x-2"> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-3 rounded-md">1D</button> | |
<button class="cyber-button bg-neon-blue bg-opacity-20 text-white text-xs py-1 px-3 rounded-md neon-border-blue">1W</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-3 rounded-md">1M</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-3 rounded-md">1Y</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-3 rounded-md">ALL</button> | |
</div> | |
<div class="text-xs text-gray-400"> | |
<span class="neon-text-blue cursor-pointer hover:underline">ARAS</span> | | |
<span class="neon-text-pink cursor-pointer hover:underline">MILT</span> | | |
<span class="neon-text-blue cursor-pointer hover:underline">KANG</span> | | |
<span class="neon-text-pink cursor-pointer hover:underline">NETW</span> | | |
<span class="neon-text-green cursor-pointer hover:underline">+5</span> | |
</div> | |
</div> | |
</div> | |
<!-- Watchlist with enhanced features --> | |
<div class="bg-black bg-opacity-70 p-4 rounded-lg neon-border-pink"> | |
<div class="flex justify-between items-center mb-4"> | |
<div class="flex items-center space-x-4"> | |
<h2 class="text-xl neon-text-pink font-orbitron">WATCHLIST</h2> | |
<div class="cyber-dropdown"> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-3 rounded flex items-center"> | |
<span>MY LIST</span> | |
<i class="fas fa-caret-down ml-1"></i> | |
</button> | |
<div class="cyber-dropdown-content"> | |
<div class="p-2"> | |
<a href="#" class="block px-3 py-2 text-sm hover:bg-gray-800">MY LIST</a> | |
<a href="#" class="block px-3 py-2 text-sm hover:bg-gray-800">TOP GAINERS</a> | |
<a href="#" class="block px-3 py-2 text-sm hover:bg-gray-800">TOP LOSERS</a> | |
<a href="#" class="block px-3 py-2 text-sm hover:bg-gray-800">MOST ACTIVE</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="relative flex items-center"> | |
<input type="text" placeholder="Search assets..." class="cyber-input bg-gray-900 bg-opacity-50 text-white text-sm py-1 px-3 pr-8 rounded-md border border-gray-800 focus:outline-none"> | |
<i class="fas fa-search absolute right-3 text-gray-500"></i> | |
<button class="cyber-button bg-neon-pink bg-opacity-20 text-neon-pink text-sm py-1 px-2 rounded-md ml-2 neon-border-pink cyber-tooltip" data-tooltip="Add Asset"> | |
<i class="fas fa-plus"></i> | |
</button> | |
</div> | |
</div> | |
<div class="overflow-x-auto"> | |
<table class="w-full"> | |
<thead> | |
<tr class="text-left text-sm text-gray-400 border-b border-gray-800"> | |
<th class="pb-2">SYMBOL</th> | |
<th class="pb-2">PRICE</th> | |
<th class="pb-2">CHANGE</th> | |
<th class="pb-2">% CHANGE</th> | |
<th class="pb-2">VOLUME</th> | |
<th class="pb-2">CHART</th> | |
<th class="pb-2">ACTIONS</th> | |
</tr> | |
</thead> | |
<tbody id="stock-table"> | |
<!-- Stock data will be inserted here by JavaScript --> | |
</tbody> | |
</table> | |
</div> | |
<div class="mt-4 flex justify-between items-center"> | |
<div class="text-xs text-gray-400"> | |
Showing <span class="text-white">1-9</span> of <span class="text-white">24</span> assets | |
</div> | |
<div class="flex space-x-2"> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-3 rounded-md"> | |
<i class="fas fa-chevron-left"></i> | |
</button> | |
<button class="cyber-button bg-neon-blue bg-opacity-20 text-white text-xs py-1 px-3 rounded-md neon-border-blue"> | |
1 | |
</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-3 rounded-md"> | |
2 | |
</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-3 rounded-md"> | |
3 | |
</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-3 rounded-md"> | |
<i class="fas fa-chevron-right"></i> | |
</button> | |
</div> | |
</div> | |
</div> | |
<!-- Recent Transactions --> | |
<div class="bg-black bg-opacity-70 p-4 rounded-lg neon-border-blue"> | |
<div class="flex justify-between items-center mb-4"> | |
<h2 class="text-xl neon-text-blue font-orbitron">RECENT TRANSACTIONS</h2> | |
<button class="cyber-button bg-neon-blue bg-opacity-20 text-white text-xs py-1 px-3 rounded-md neon-border-blue cyber-tooltip" data-tooltip="View All Transactions"> | |
VIEW ALL | |
</button> | |
</div> | |
<div class="space-y-3"> | |
<div class="flex justify-between items-center p-2 hover:bg-gray-900 rounded"> | |
<div class="flex items-center"> | |
<div class="w-8 h-8 rounded-full bg-neon-pink bg-opacity-20 flex items-center justify-center neon-border-pink mr-3"> | |
<i class="fas fa-arrow-up text-xs text-neon-pink"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">BUY ARAS</p> | |
<p class="text-xs text-gray-400">Today, 10:23 AM</p> | |
</div> | |
</div> | |
<div class="text-right"> | |
<p class="text-sm">10 shares @ ₡245.67</p> | |
<p class="text-xs text-green-400">Completed</p> | |
</div> | |
</div> | |
<div class="flex justify-between items-center p-2 hover:bg-gray-900 rounded"> | |
<div class="flex items-center"> | |
<div class="w-8 h-8 rounded-full bg-red-500 bg-opacity-20 flex items-center justify-center border border-red-500 mr-3"> | |
<i class="fas fa-arrow-down text-xs text-red-400"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">SELL MILT</p> | |
<p class="text-xs text-gray-400">Today, 09:45 AM</p> | |
</div> | |
</div> | |
<div class="text-right"> | |
<p class="text-sm">5 shares @ ₡187.32</p> | |
<p class="text-xs text-green-400">Completed</p> | |
</div> | |
</div> | |
<div class="flex justify-between items-center p-2 hover:bg-gray-900 rounded"> | |
<div class="flex items-center"> | |
<div class="w-8 h-8 rounded-full bg-neon-blue bg-opacity-20 flex items-center justify-center neon-border-blue mr-3"> | |
<i class="fas fa-exchange-alt text-xs text-neon-blue"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">TRADE BTC/ETH</p> | |
<p class="text-xs text-gray-400">Today, 08:30 AM</p> | |
</div> | |
</div> | |
<div class="text-right"> | |
<p class="text-sm">0.5 BTC @ ₡42,876</p> | |
<p class="text-xs text-yellow-400">Pending</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</main> | |
<!-- Footer with connection status --> | |
<footer class="bg-black bg-opacity-80 border-t border-neon-blue py-3 px-6 neon-border-blue mt-6"> | |
<div class="flex justify-between items-center"> | |
<div class="flex items-center space-x-4"> | |
<div class="flex items-center space-x-1"> | |
<div class="w-2 h-2 rounded-full bg-green-500 pulse" id="connectionStatus"></div> | |
<span class="text-xs text-gray-400">CONNECTED</span> | |
</div> | |
<span class="text-xs text-gray-400">LATENCY: <span class="neon-text-blue" id="latencyIndicator">28ms</span></span> | |
<span class="text-xs text-gray-400">API: <span class="neon-text-pink">v3.2.7</span></span> | |
<span class="text-xs text-gray-400">DATA CENTER: <span class="neon-text-green">NC-42</span></span> | |
</div> | |
<div class="text-xs text-gray-400"> | |
<span class="neon-text-blue">NEON TRADER 2077</span> | SECURE TRADING TERMINAL | <span class="neon-text-pink">ENCRYPTED</span> | <span class="neon-text-green">HIGH FREQUENCY</span> | |
</div> | |
</div> | |
</footer> | |
<!-- Cyber Modal --> | |
<div class="cyber-modal" id="assetModal"> | |
<div class="cyber-modal-content"> | |
<span class="cyber-close" id="closeModal">×</span> | |
<h2 class="text-xl neon-text-blue font-orbitron mb-4">ASSET DETAILS</h2> | |
<div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
<div> | |
<h3 class="text-lg neon-text-pink font-orbitron mb-2" id="modalAssetName">Arasaka Corp (ARAS)</h3> | |
<div class="flex items-center mb-4"> | |
<div class="text-3xl font-bold mr-4" id="modalAssetPrice">₡ 245.67</div> | |
<div class="text-sm stock-up" id="modalAssetChange">+3.45 (1.42%)</div> | |
</div> | |
<div class="h-48 bg-gray-900 rounded mb-4" id="modalChartContainer"> | |
<canvas id="modalChart"></canvas> | |
</div> | |
</div> | |
<div> | |
<div class="mb-4"> | |
<h4 class="text-sm text-gray-400 mb-2">MARKET DATA</h4> | |
<div class="grid grid-cols-2 gap-2 text-sm"> | |
<div>Open: <span class="neon-text-blue">₡ 242.22</span></div> | |
<div>High: <span class="neon-text-green">₡ 246.78</span></div> | |
<div>Low: <span class="neon-text-pink">₡ 241.05</span></div> | |
<div>Volume: <span>4.5M</span></div> | |
<div>Market Cap: <span>₡ 245.6B</span></div> | |
<div>P/E: <span>28.76</span></div> | |
</div> | |
</div> | |
<div class="mb-4"> | |
<h4 class="text-sm text-gray-400 mb-2">TRADE</h4> | |
<div class="grid grid-cols-2 gap-3 mb-3"> | |
<button class="cyber-button bg-green-900 bg-opacity-20 text-green-400 py-1 px-3 rounded border border-green-500"> | |
<i class="fas fa-arrow-up mr-1"></i> Buy | |
</button> | |
<button class="cyber-button bg-red-900 bg-opacity-20 text-red-400 py-1 px-3 rounded border border-red-500"> | |
<i class="fas fa-arrow-down mr-1"></i> Sell | |
</button> | |
</div> | |
<div class="flex space-x-2"> | |
<input type="text" class="cyber-input flex-1 text-sm py-1 px-2 rounded" placeholder="Shares"> | |
<select class="cyber-input text-sm py-1 px-2 rounded bg-gray-900"> | |
<option>Market</option> | |
<option>Limit</option> | |
<option>Stop</option> | |
</select> | |
</div> | |
</div> | |
<button class="w-full cyber-button bg-neon-blue bg-opacity-20 text-white py-2 rounded-md neon-border-blue"> | |
PLACE ORDER | |
</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Cyber Notification --> | |
<div class="cyber-notification" id="notification"> | |
<div class="flex items-start"> | |
<div class="w-6 h-6 rounded-full bg-neon-blue flex items-center justify-center mr-3 mt-1"> | |
<i class="fas fa-bell text-xs text-black"></i> | |
</div> | |
<div> | |
<h3 class="text-sm font-bold neon-text-blue mb-1" id="notificationTitle">Market Update</h3> | |
<p class="text-xs" id="notificationMessage">Arasaka Corp stock has increased by 1.42%</p> | |
</div> | |
</div> | |
</div> | |
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
<script> | |
// Update current time | |
function updateTime() { | |
const now = new Date(); | |
const timeString = now.toLocaleTimeString('en-US', {hour12: false}); | |
document.getElementById('current-time').textContent = timeString; | |
} | |
setInterval(updateTime, 1000); | |
updateTime(); | |
// Update countdown to market close | |
function updateCountdown() { | |
const now = new Date(); | |
const closeTime = new Date(); | |
closeTime.setHours(16, 0, 0, 0); // Market closes at 4 PM | |
if (now > closeTime) { | |
closeTime.setDate(closeTime.getDate() + 1); // Set to next day if already past close | |
} | |
const diff = closeTime - now; | |
const hours = Math.floor(diff / (1000 * 60 * 60)); | |
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); | |
const seconds = Math.floor((diff % (1000 * 60)) / 1000); | |
document.getElementById('countdown-hours').textContent = hours.toString().padStart(2, '0'); | |
document.getElementById('countdown-minutes').textContent = minutes.toString().padStart(2, '0'); | |
document.getElementById('countdown-seconds').textContent = seconds.toString().padStart(2, '0'); | |
// Change color to red when less than 1 hour remains | |
if (hours === 0) { | |
document.getElementById('countdown-hours').classList.add('cyber-countdown', 'danger'); | |
document.getElementById('countdown-minutes').classList.add('cyber-countdown', 'danger'); | |
document.getElementById('countdown-seconds').classList.add('cyber-countdown', 'danger'); | |
} else { | |
document.getElementById('countdown-hours').classList.remove('danger'); | |
document.getElementById('countdown-minutes').classList.remove('danger'); | |
document.getElementById('countdown-seconds').classList.remove('danger'); | |
} | |
} | |
setInterval(updateCountdown, 1000); | |
updateCountdown(); | |
// Sample stock data | |
const stocks = [ | |
{ symbol: 'ARAS', name: 'Arasaka Corp', price: 245.67, change: 3.45, percentChange: 1.42, volume: '4.5M', chartData: [240, 242, 243, 244, 245, 246, 245, 244, 245, 246, 245, 244, 245, 246, 245] }, | |
{ symbol: 'MILT', name: 'Militech Intl', price: 187.32, change: -2.34, percentChange: -1.23, volume: '3.2M', chartData: [190, 189, 188, 187, 186, 187, 186, 187, 188, 187, 186, 187, 188, 187, 186] }, | |
{ symbol: 'KANG', name: 'Kang Tao Arms', price: 92.45, change: 1.87, percentChange: 2.06, volume: '1.8M', chartData: [90, 91, 92, 91, 92, 93, 92, 91, 92, 93, 92, 91, 92, 93, 92] }, | |
{ symbol: 'NETW', name: 'NetWatch', price: 156.78, change: 5.67, percentChange: 3.75, volume: '2.7M', chartData: [150, 152, 154, 155, 156, 157, 156, 155, 156, 157, 156, 155, 156, 157, 156] }, | |
{ symbol: 'BIOT', name: 'Biotechnica', price: 78.23, change: -0.45, percentChange: -0.57, volume: '1.2M', chartData: [78, 79, 78, 77, 78, 79, 78, 77, 78, 79, 78, 77, 78, 79, 78] }, | |
{ symbol: 'TRAU', name: 'Trauma Team', price: 134.56, change: 2.34, percentChange: 1.77, volume: '2.1M', chartData: [132, 133, 134, 133, 134, 135, 134, 133, 134, 135, 134, 133, 134, 135, 134] }, | |
{ symbol: 'ZETT', name: 'Zetatech', price: 67.89, change: -1.23, percentChange: -1.78, volume: '3.5M', chartData: [69, 68, 67, 68, 69, 68, 67, 68, 69, 68, 67, 68, 69, 68, 67] }, | |
{ symbol: 'BTC', name: 'Bitcoin', price: 42876, change: -1245, percentChange: -2.82, volume: '24.5K', chartData: [44000, 43500, 43000, 42500, 43000, 42500, 43000, 42500, 43000, 42500, 43000, 42500, 43000, 42500, 43000] }, | |
{ symbol: 'ETH', name: 'Ethereum', price: 2876, change: 45, percentChange: 1.60, volume: '18.7K', chartData: [2800, 2820, 2840, 2860, 2880, 2860, 2840, 2860, 2880, 2860, 2840, 2860, 2880, 2860, 2840] } | |
]; | |
// Render stock table | |
function renderStockTable() { | |
const tableBody = document.getElementById('stock-table'); | |
tableBody.innerHTML = ''; | |
stocks.forEach(stock => { | |
const isCrypto = stock.symbol === 'BTC' || stock.symbol === 'ETH'; | |
const row = document.createElement('tr'); | |
row.className = 'border-b border-gray-800 hover:bg-gray-900 hover:bg-opacity-50'; | |
const changeClass = stock.change >= 0 ? 'stock-up' : 'stock-down'; | |
const changeSymbol = stock.change >= 0 ? '+' : ''; | |
// Create mini sparkline chart | |
const canvas = document.createElement('canvas'); | |
canvas.width = 80; | |
canvas.height = 30; | |
canvas.className = 'sparkline-chart'; | |
const ctx = canvas.getContext('2d'); | |
drawSparkline(ctx, stock.chartData, changeClass.includes('up') ? '#00ff9d' : '#ff0000'); | |
row.innerHTML = ` | |
<td class="py-3"> | |
<div class="font-bold ${isCrypto ? 'neon-text-blue' : 'neon-text-pink'}">${stock.symbol}</div> | |
<div class="text-xs text-gray-400">${stock.name}</div> | |
</td> | |
<td class="py-3 font-orbitron">₡ ${stock.price.toLocaleString()}</td> | |
<td class="py-3 font-orbitron ${changeClass}">${changeSymbol}${stock.change}</td> | |
<td class="py-3 font-orbitron ${changeClass}">${changeSymbol}${stock.percentChange}%</td> | |
<td class="py-3 text-gray-400">${stock.volume}</td> | |
<td class="py-3"> | |
<div class="w-20 h-8">${canvas.outerHTML}</div> | |
</td> | |
<td class="py-3"> | |
<div class="flex space-x-2"> | |
<button class="cyber-button bg-green-900 bg-opacity-20 text-green-400 text-xs py-1 px-2 rounded border border-green-500 cyber-tooltip" data-tooltip="Buy ${stock.symbol}"> | |
<i class="fas fa-arrow-up mr-1"></i> | |
</button> | |
<button class="cyber-button bg-red-900 bg-opacity-20 text-red-400 text-xs py-1 px-2 rounded border border-red-500 cyber-tooltip" data-tooltip="Sell ${stock.symbol}"> | |
<i class="fas fa-arrow-down mr-1"></i> | |
</button> | |
<button class="cyber-button bg-gray-800 text-white text-xs py-1 px-2 rounded cyber-tooltip view-details" data-tooltip="View Details" data-symbol="${stock.symbol}"> | |
<i class="fas fa-chart-bar"></i> | |
</button> | |
</div> | |
</td> | |
`; | |
tableBody.appendChild(row); | |
}); | |
// Add event listeners to view details buttons | |
document.querySelectorAll('.view-details').forEach(button => { | |
button.addEventListener('click', () => { | |
const symbol = button.getAttribute('data-symbol'); | |
showAssetModal(symbol); | |
}); | |
}); | |
} | |
// Draw sparkline chart | |
function drawSparkline(ctx, data, color) { | |
const width = ctx.canvas.width; | |
const height = ctx.canvas.height; | |
const min = Math.min(...data); | |
const max = Math.max(...data); | |
const range = max - min; | |
const step = width / (data.length - 1); | |
ctx.beginPath(); | |
data.forEach((value, index) => { | |
const x = index * step; | |
const y = height - ((value - min) / range) * height; | |
if (index === 0) { | |
ctx.moveTo(x, y); | |
} else { | |
ctx.lineTo(x, y); | |
} | |
}); | |
ctx.strokeStyle = color; | |
ctx.lineWidth = 1; | |
ctx.stroke(); | |
} | |
// Initialize charts | |
function initCharts() { | |
// Mini chart | |
const miniCtx = document.getElementById('miniChart').getContext('2d'); | |
const miniChart = new Chart(miniCtx, { | |
type: 'line', | |
data: { | |
labels: Array.from({length: 15}, (_, i) => i + 1), | |
datasets: [{ | |
data: [240, 242, 243, 244, 245, 246, 245, 244, 245, 246, 245, 244, 245, 246, 245], | |
borderColor: '#05d9e8', | |
borderWidth: 1, | |
pointRadius: 0, | |
fill: false, | |
tension: 0.4 | |
}] | |
}, | |
options: { | |
responsive: true, | |
maintainAspectRatio: false, | |
plugins: { | |
legend: { | |
display: false | |
} | |
}, | |
scales: { | |
x: { | |
display: false | |
}, | |
y: { | |
display: false | |
} | |
} | |
} | |
}); | |
// Main chart | |
const mainCtx = document.getElementById('mainChart').getContext('2d'); | |
const mainChart = new Chart(mainCtx, { | |
type: 'line', | |
data: { | |
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], | |
datasets: [ | |
{ | |
label: 'Arasaka Corp', | |
data: [210, 215, 220, 218, 225, 230, 235, 240, 238, 242, 245, 250], | |
borderColor: '#ff2a6d', | |
borderWidth: 2, | |
pointRadius: 0, | |
fill: false, | |
tension: 0.4 | |
}, | |
{ | |
label: 'Night City Index', | |
data: [4000, 4100, 4150, 4200, 4250, 4300, 4280, 4320, 4300, 4350, 4320, 4400], | |
borderColor: '#05d9e8', | |
borderWidth: 2, | |
pointRadius: 0, | |
fill: false, | |
tension: 0.4 | |
} | |
] | |
}, | |
options: { | |
responsive: true, | |
maintainAspectRatio: false, | |
plugins: { | |
legend: { | |
display: false | |
} | |
}, | |
scales: { | |
x: { | |
grid: { | |
color: 'rgba(255, 255, 255, 0.1)' | |
}, | |
ticks: { | |
color: 'rgba(255, 255, 255, 0.5)' | |
} | |
}, | |
y: { | |
grid: { | |
color: 'rgba(255, 255, 255, 0.1)' | |
}, | |
ticks: { | |
color: 'rgba(255, 255, 255, 0.5)' | |
} | |
} | |
} | |
} | |
}); | |
} | |
// Show asset modal | |
function showAssetModal(symbol) { | |
const asset = stocks.find(s => s.symbol === symbol); | |
if (!asset) return; | |
document.getElementById('modalAssetName').textContent = `${asset.name} (${asset.symbol})`; | |
document.getElementById('modalAssetPrice').textContent = `₡ ${asset.price.toLocaleString()}`; | |
const changeClass = asset.change >= 0 ? 'stock-up' : 'stock-down'; | |
const changeSymbol = asset.change >= 0 ? '+' : ''; | |
document.getElementById('modalAssetChange').textContent = `${changeSymbol}${asset.change} (${changeSymbol}${asset.percentChange}%)`; | |
document.getElementById('modalAssetChange').className = `text-sm ${changeClass}`; | |
// Update modal chart | |
const modalCtx = document.getElementById('modalChart').getContext('2d'); | |
if (window.modalChart) { | |
window.modalChart.destroy(); | |
} | |
window.modalChart = new Chart(modalCtx, { | |
type: 'line', | |
data: { | |
labels: Array.from({length: asset.chartData.length}, (_, i) => i + 1), | |
datasets: [{ | |
data: asset.chartData, | |
borderColor: changeClass.includes('up') ? '#00ff9d' : '#ff0000', | |
borderWidth: 2, | |
pointRadius: 0, | |
fill: false, | |
tension: 0.4 | |
}] | |
}, | |
options: { | |
responsive: true, | |
maintainAspectRatio: false, | |
plugins: { | |
legend: { | |
display: false | |
} | |
}, | |
scales: { | |
x: { | |
display: false | |
}, | |
y: { | |
display: false | |
} | |
} | |
} | |
}); | |
document.getElementById('assetModal').style.display = 'flex'; | |
} | |
// Close modal | |
document.getElementById('closeModal').addEventListener('click', () => { | |
document.getElementById('assetModal').style.display = 'none'; | |
}); | |
// Simulate stock price changes | |
function simulateMarket() { | |
// Randomly update some metrics | |
const randomMetric = Math.floor(Math.random() * 4); | |
const metricElement = document.querySelectorAll('#market-metrics > div')[randomMetric]; | |
metricElement.classList.add('glow-blue'); | |
setTimeout(() => metricElement.classList.remove('glow-blue'), 1000); | |
// Update stocks | |
stocks.forEach(stock => { | |
// Random price change between -2% and +2% | |
const changePercent = (Math.random() * 4 - 2) / 100; | |
const newPrice = stock.price * (1 + changePercent); | |
const change = newPrice - stock.price; | |
const percentChange = (change / stock.price) * 100; | |
stock.price = parseFloat(newPrice.toFixed(2)); | |
stock.change = parseFloat(change.toFixed(2)); | |
stock.percentChange = parseFloat(percentChange.toFixed(2)); | |
// Update chart data | |
stock.chartData.shift(); | |
stock.chartData.push(newPrice); | |
// Random volume change | |
const volumeNum = parseFloat(stock.volume.replace(/[MK]/g, '')); | |
const volumeChange = Math.random() * 0.2 - 0.1; // -10% to +10% | |
let newVolume = volumeNum * (1 + volumeChange); | |
if (stock.volume.includes('M')) { | |
newVolume = newVolume.toFixed(1) + 'M'; | |
} else { | |
newVolume = Math.round(newVolume) + 'K'; | |
} | |
stock.volume = newVolume; | |
}); | |
// Randomly show notification for significant changes | |
if (Math.random() > 0.7) { | |
const randomStock = stocks[Math.floor(Math.random() * stocks.length)]; | |
if (Math.abs(randomStock.percentChange) > | |
</html> |