ldy-cry / index.html
binqing's picture
Add 3 files
6454f01 verified
Raw History Blame Contribute Delete
24.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CryptoBrilliant - Real-time Cryptocurrency Prices</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>
.gradient-bg {
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.price-up {
color: #10b981;
animation: pulseGreen 2s infinite;
}
.price-down {
color: #ef4444;
animation: pulseRed 2s infinite;
}
@keyframes pulseGreen {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
@keyframes pulseRed {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.coin-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.glow {
text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
</style>
</head>
<body class="gradient-bg text-white min-h-screen">
<!-- Navigation -->
<nav class="container mx-auto px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-2">
<i class="fas fa-coins text-2xl text-yellow-400"></i>
<span class="text-2xl font-bold glow">Crypto<span class="text-blue-400">Brilliant</span></span>
</div>
<div class="hidden md:flex items-center space-x-8">
<a href="#market" class="hover:text-blue-400 transition">Market</a>
<a href="#features" class="hover:text-blue-400 transition">Features</a>
<a href="#about" class="hover:text-blue-400 transition">About</a>
<a href="#contact" class="hover:text-blue-400 transition">Contact</a>
</div>
<button class="md:hidden text-xl">
<i class="fas fa-bars"></i>
</button>
</div>
</nav>
<!-- Hero Section -->
<section class="container mx-auto px-6 py-20 text-center">
<h1 class="text-4xl md:text-6xl font-bold mb-6">Track <span class="text-blue-400">Real-time</span> Crypto Prices</h1>
<p class="text-xl md:text-2xl text-gray-300 mb-10 max-w-3xl mx-auto">
Stay ahead of the market with CryptoBrilliant's live cryptocurrency price tracking and analytics.
</p>
<div class="flex flex-col md:flex-row justify-center space-y-4 md:space-y-0 md:space-x-6">
<button class="bg-blue-600 hover:bg-blue-700 text-white px-8 py-4 rounded-full font-bold transition transform hover:scale-105">
Get Started <i class="fas fa-arrow-right ml-2"></i>
</button>
<button class="border border-blue-400 text-blue-400 hover:bg-blue-900 hover:bg-opacity-20 px-8 py-4 rounded-full font-bold transition transform hover:scale-105">
<i class="fas fa-play-circle mr-2"></i> Watch Demo
</button>
</div>
</section>
<!-- Market Data Section -->
<section id="market" class="container mx-auto px-6 py-12">
<div class="text-center mb-12">
<h2 class="text-3xl md:text-4xl font-bold mb-4">Live Cryptocurrency Prices</h2>
<p class="text-gray-400 max-w-2xl mx-auto">Real-time data updated every 60 seconds. Prices in USD.</p>
</div>
<div class="mb-8 flex justify-between items-center">
<h3 class="text-xl font-semibold">Top Cryptocurrencies</h3>
<div class="flex items-center">
<span class="mr-2">Last updated:</span>
<span id="last-updated" class="font-mono">Loading...</span>
<button id="refresh-btn" class="ml-4 p-2 rounded-full hover:bg-gray-800 transition">
<i class="fas fa-sync-alt"></i>
</button>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12">
<!-- These will be populated by JavaScript -->
<div id="btc-card" class="coin-card bg-gray-800 bg-opacity-50 rounded-xl p-6 transition duration-300">
<div class="flex items-center mb-4">
<img src="https://cryptologos.cc/logos/bitcoin-btc-logo.png" alt="Bitcoin" class="w-10 h-10 mr-3">
<div>
<h4 class="font-bold">Bitcoin</h4>
<span class="text-gray-400 text-sm">BTC</span>
</div>
</div>
<div class="text-2xl font-bold mb-2" id="btc-price">$--.--</div>
<div class="flex justify-between items-center">
<span id="btc-change" class="text-sm">--.--%</span>
<span id="btc-updated" class="text-xs text-gray-500">--:--:--</span>
</div>
</div>
<div id="eth-card" class="coin-card bg-gray-800 bg-opacity-50 rounded-xl p-6 transition duration-300">
<div class="flex items-center mb-4">
<img src="https://cryptologos.cc/logos/ethereum-eth-logo.png" alt="Ethereum" class="w-10 h-10 mr-3">
<div>
<h4 class="font-bold">Ethereum</h4>
<span class="text-gray-400 text-sm">ETH</span>
</div>
</div>
<div class="text-2xl font-bold mb-2" id="eth-price">$--.--</div>
<div class="flex justify-between items-center">
<span id="eth-change" class="text-sm">--.--%</span>
<span id="eth-updated" class="text-xs text-gray-500">--:--:--</span>
</div>
</div>
<div id="bnb-card" class="coin-card bg-gray-800 bg-opacity-50 rounded-xl p-6 transition duration-300">
<div class="flex items-center mb-4">
<img src="https://cryptologos.cc/logos/bnb-bnb-logo.png" alt="BNB" class="w-10 h-10 mr-3">
<div>
<h4 class="font-bold">BNB</h4>
<span class="text-gray-400 text-sm">BNB</span>
</div>
</div>
<div class="text-2xl font-bold mb-2" id="bnb-price">$--.--</div>
<div class="flex justify-between items-center">
<span id="bnb-change" class="text-sm">--.--%</span>
<span id="bnb-updated" class="text-xs text-gray-500">--:--:--</span>
</div>
</div>
<div id="sol-card" class="coin-card bg-gray-800 bg-opacity-50 rounded-xl p-6 transition duration-300">
<div class="flex items-center mb-4">
<img src="https://cryptologos.cc/logos/solana-sol-logo.png" alt="Solana" class="w-10 h-10 mr-3">
<div>
<h4 class="font-bold">Solana</h4>
<span class="text-gray-400 text-sm">SOL</span>
</div>
</div>
<div class="text-2xl font-bold mb-2" id="sol-price">$--.--</div>
<div class="flex justify-between items-center">
<span id="sol-change" class="text-sm">--.--%</span>
<span id="sol-updated" class="text-xs text-gray-500">--:--:--</span>
</div>
</div>
</div>
<div class="text-center">
<button class="border border-blue-400 text-blue-400 hover:bg-blue-900 hover:bg-opacity-20 px-6 py-3 rounded-full font-bold transition">
View All 100+ Coins <i class="fas fa-chevron-down ml-2"></i>
</button>
</div>
</section>
<!-- Features Section -->
<section id="features" class="bg-gray-900 bg-opacity-50 py-16">
<div class="container mx-auto px-6">
<div class="text-center mb-16">
<h2 class="text-3xl md:text-4xl font-bold mb-4">Why Choose CryptoBrilliant?</h2>
<p class="text-gray-400 max-w-2xl mx-auto">Powerful tools to help you navigate the cryptocurrency market.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="bg-gray-800 bg-opacity-50 rounded-xl p-8 hover:bg-opacity-70 transition">
<div class="w-14 h-14 bg-blue-900 bg-opacity-30 rounded-full flex items-center justify-center mb-6">
<i class="fas fa-bolt text-blue-400 text-2xl"></i>
</div>
<h3 class="text-xl font-bold mb-3">Real-time Data</h3>
<p class="text-gray-400">Get instant price updates with our lightning-fast API integration. Never miss a market movement.</p>
</div>
<div class="bg-gray-800 bg-opacity-50 rounded-xl p-8 hover:bg-opacity-70 transition">
<div class="w-14 h-14 bg-purple-900 bg-opacity-30 rounded-full flex items-center justify-center mb-6">
<i class="fas fa-chart-line text-purple-400 text-2xl"></i>
</div>
<h3 class="text-xl font-bold mb-3">Advanced Charts</h3>
<p class="text-gray-400">Interactive charts with technical indicators to help you make informed trading decisions.</p>
</div>
<div class="bg-gray-800 bg-opacity-50 rounded-xl p-8 hover:bg-opacity-70 transition">
<div class="w-14 h-14 bg-green-900 bg-opacity-30 rounded-full flex items-center justify-center mb-6">
<i class="fas fa-bell text-green-400 text-2xl"></i>
</div>
<h3 class="text-xl font-bold mb-3">Price Alerts</h3>
<p class="text-gray-400">Set custom price alerts and get notified when your targets are hit, even when you're away.</p>
</div>
</div>
</div>
</section>
<!-- About Section -->
<section id="about" class="container mx-auto px-6 py-16">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0 md:pr-10">
<h2 class="text-3xl md:text-4xl font-bold mb-6">About CryptoBrilliant</h2>
<p class="text-gray-400 mb-6">
CryptoBrilliant was founded in 2022 with a mission to democratize access to cryptocurrency market data.
Our platform provides retail investors with institutional-grade tools and analytics.
</p>
<p class="text-gray-400 mb-6">
We aggregate data from multiple exchanges to give you the most accurate and up-to-date pricing information.
</p>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-full font-bold transition">
Learn More <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
<div class="md:w-1/2">
<div class="bg-gray-800 bg-opacity-50 rounded-xl p-8">
<div class="flex items-center mb-6">
<div class="w-16 h-16 bg-blue-900 bg-opacity-30 rounded-full flex items-center justify-center mr-4">
<i class="fas fa-users text-blue-400 text-2xl"></i>
</div>
<div>
<div class="text-3xl font-bold">250K+</div>
<div class="text-gray-400">Active Users</div>
</div>
</div>
<div class="flex items-center mb-6">
<div class="w-16 h-16 bg-purple-900 bg-opacity-30 rounded-full flex items-center justify-center mr-4">
<i class="fas fa-coins text-purple-400 text-2xl"></i>
</div>
<div>
<div class="text-3xl font-bold">120+</div>
<div class="text-gray-400">Cryptocurrencies</div>
</div>
</div>
<div class="flex items-center">
<div class="w-16 h-16 bg-green-900 bg-opacity-30 rounded-full flex items-center justify-center mr-4">
<i class="fas fa-exchange-alt text-green-400 text-2xl"></i>
</div>
<div>
<div class="text-3xl font-bold">15+</div>
<div class="text-gray-400">Exchanges</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Newsletter Section -->
<section class="bg-gray-900 bg-opacity-50 py-16">
<div class="container mx-auto px-6 text-center">
<h2 class="text-3xl md:text-4xl font-bold mb-6">Stay Updated</h2>
<p class="text-gray-400 max-w-2xl mx-auto mb-8">
Subscribe to our newsletter for weekly market insights, new feature announcements, and exclusive content.
</p>
<div class="max-w-md mx-auto flex">
<input type="email" placeholder="Your email address" class="flex-grow px-4 py-3 rounded-l-full bg-gray-800 text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
<button class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-r-full font-bold transition">
Subscribe <i class="fas fa-paper-plane ml-2"></i>
</button>
</div>
</div>
</section>
<!-- Footer -->
<footer id="contact" class="container mx-auto px-6 py-12">
<div class="border-t border-gray-800 pt-12">
<div class="flex flex-col md:flex-row justify-between">
<div class="mb-8 md:mb-0">
<div class="flex items-center space-x-2 mb-4">
<i class="fas fa-coins text-2xl text-yellow-400"></i>
<span class="text-2xl font-bold">Crypto<span class="text-blue-400">Brilliant</span></span>
</div>
<p class="text-gray-400 max-w-xs">
The most comprehensive cryptocurrency price tracking platform.
</p>
</div>
<div class="grid grid-cols-2 md:grid-cols-3 gap-8">
<div>
<h4 class="text-lg font-bold mb-4">Product</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Features</a></li>
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Pricing</a></li>
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">API</a></li>
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Integrations</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4">Company</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">About</a></li>
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Blog</a></li>
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Careers</a></li>
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Press</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-bold mb-4">Support</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Help Center</a></li>
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Contact Us</a></li>
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Status</a></li>
<li><a href="#" class="text-gray-400 hover:text-blue-400 transition">Feedback</a></li>
</ul>
</div>
</div>
</div>
<div class="border-t border-gray-800 mt-12 pt-8 flex flex-col md:flex-row justify-between items-center">
<div class="text-gray-400 mb-4 md:mb-0">
&copy; 2023 CryptoBrilliant. All rights reserved.
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-400 hover:text-blue-400 transition"><i class="fab fa-twitter text-xl"></i></a>
<a href="#" class="text-gray-400 hover:text-blue-400 transition"><i class="fab fa-telegram text-xl"></i></a>
<a href="#" class="text-gray-400 hover:text-blue-400 transition"><i class="fab fa-discord text-xl"></i></a>
<a href="#" class="text-gray-400 hover:text-blue-400 transition"><i class="fab fa-github text-xl"></i></a>
</div>
</div>
</div>
</footer>
<script>
// API Configuration
const API_URL = 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,binancecoin,solana&vs_currencies=usd&include_24hr_change=true';
// DOM Elements
const lastUpdatedEl = document.getElementById('last-updated');
const refreshBtn = document.getElementById('refresh-btn');
// Coin elements
const coins = [
{
id: 'bitcoin',
symbol: 'btc',
name: 'Bitcoin',
priceEl: document.getElementById('btc-price'),
changeEl: document.getElementById('btc-change'),
updatedEl: document.getElementById('btc-updated'),
cardEl: document.getElementById('btc-card')
},
{
id: 'ethereum',
symbol: 'eth',
name: 'Ethereum',
priceEl: document.getElementById('eth-price'),
changeEl: document.getElementById('eth-change'),
updatedEl: document.getElementById('eth-updated'),
cardEl: document.getElementById('eth-card')
},
{
id: 'binancecoin',
symbol: 'bnb',
name: 'BNB',
priceEl: document.getElementById('bnb-price'),
changeEl: document.getElementById('bnb-change'),
updatedEl: document.getElementById('bnb-updated'),
cardEl: document.getElementById('bnb-card')
},
{
id: 'solana',
symbol: 'sol',
name: 'Solana',
priceEl: document.getElementById('sol-price'),
changeEl: document.getElementById('sol-change'),
updatedEl: document.getElementById('sol-updated'),
cardEl: document.getElementById('sol-card')
}
];
// Format price with commas
function formatPrice(price) {
return '$' + price.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}
// Format percentage change
function formatChange(change) {
return change.toFixed(2) + '%';
}
// Get current time in HH:MM:SS format
function getCurrentTime() {
const now = new Date();
return now.toLocaleTimeString();
}
// Update coin data
function updateCoinData(coin, data) {
const price = data[coin.id].usd;
const change = data[coin.id].usd_24h_change;
const time = getCurrentTime();
coin.priceEl.textContent = formatPrice(price);
coin.changeEl.textContent = formatChange(change);
coin.updatedEl.textContent = time;
// Set color based on price change
if (change > 0) {
coin.changeEl.classList.add('price-up');
coin.changeEl.classList.remove('price-down');
} else {
coin.changeEl.classList.add('price-down');
coin.changeEl.classList.remove('price-up');
}
// Add pulse animation to card
coin.cardEl.classList.add('ring-2');
if (change > 0) {
coin.cardEl.classList.add('ring-green-500');
coin.cardEl.classList.remove('ring-red-500');
} else {
coin.cardEl.classList.add('ring-red-500');
coin.cardEl.classList.remove('ring-green-500');
}
// Remove animation after 2 seconds
setTimeout(() => {
coin.cardEl.classList.remove('ring-2', 'ring-green-500', 'ring-red-500');
}, 2000);
}
// Fetch data from API
async function fetchData() {
try {
const response = await fetch(API_URL);
const data = await response.json();
// Update last updated time
const now = new Date();
lastUpdatedEl.textContent = now.toLocaleTimeString();
// Update each coin's data
coins.forEach(coin => {
updateCoinData(coin, data);
});
return true;
} catch (error) {
console.error('Error fetching data:', error);
lastUpdatedEl.textContent = 'Error updating';
return false;
}
}
// Initial fetch
fetchData();
// Set up auto-refresh every 60 seconds
setInterval(fetchData, 60000);
// Manual refresh button
refreshBtn.addEventListener('click', () => {
refreshBtn.classList.add('animate-spin');
fetchData().then(success => {
setTimeout(() => {
refreshBtn.classList.remove('animate-spin');
}, 1000);
});
});
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=binqing/ldy-cry" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>