Amplify.com / currency.html
Fazbeeer's picture
Promote version 3fd58c8 to main
2b838b9 verified
Raw
History Blame Contribute Delete
14.9 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Currency Converter - Amplify</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@400;600;700&display=swap');
.hero-gradient {
background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #3a0000 100%);
}
.glow-text {
text-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}
</style>
</head>
<body class="bg-black text-white font-['Montserrat']">
<!-- Vanta.js Background -->
<div id="vanta-bg" class="fixed top-0 left-0 w-full h-full z-0"></div>
<!-- Navigation -->
<nav class="relative z-10 bg-black bg-opacity-80 border-b border-gold-500">
<div class="container mx-auto px-6 py-4">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<i data-feather="zap" class="text-yellow-500"></i>
<span class="text-2xl font-bold font-['Bebas+Neue'] tracking-wider text-yellow-500">AMPLIFY</span>
</div>
<div class="hidden md:flex items-center space-x-8">
<a href="index.html" class="text-white hover:text-yellow-500 transition">Home</a>
<a href="index.html#features" class="text-white hover:text-yellow-500 transition">Features</a>
<a href="index.html#pricing" class="text-white hover:text-yellow-500 transition">Pricing</a>
<a href="about.html" class="text-white hover:text-yellow-500 transition">About</a>
<a href="currency.html" class="text-yellow-500 hover:text-yellow-400 transition">Currency</a>
<a href="events.html" class="text-white hover:text-yellow-500 transition">Events</a>
<a href="results.html" class="text-white hover:text-yellow-500 transition">Results</a>
</div>
<div class="flex items-center space-x-4">
<a href="login.html" class="bg-yellow-500 hover:bg-yellow-600 text-black font-bold px-4 py-2 rounded-lg transition flex items-center">
<i data-feather="user" class="mr-2"></i> Login
</a>
</div>
</div>
</div>
</nav>
<!-- Currency Converter Section -->
<section class="relative z-10 py-20 hero-gradient">
<div class="container mx-auto px-6">
<h1 class="text-4xl md:text-6xl font-bold text-center mb-12 font-['Bebas+Neue'] tracking-wider">
<span class="text-yellow-500 glow-text">CURRENCY</span> <span class="text-white">CONVERTER</span>
</h1>
<div class="max-w-2xl mx-auto bg-black bg-opacity-70 rounded-xl p-8 border border-yellow-500">
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8">
<div>
<label class="block text-gray-300 mb-2">Amount</label>
<input type="number" id="amount" class="w-full bg-gray-900 text-white border border-yellow-500 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-yellow-500" value="1">
</div>
<div>
<label class="block text-gray-300 mb-2">From</label>
<select id="from-currency" class="w-full bg-gray-900 text-white border border-yellow-500 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-yellow-500">
<option value="USD">USD - US Dollar</option>
<option value="EUR">EUR - Euro</option>
<option value="GBP">GBP - British Pound</option>
<option value="JPY">JPY - Japanese Yen</option>
<option value="CAD">CAD - Canadian Dollar</option>
<option value="AUD">AUD - Australian Dollar</option>
</select>
</div>
<div>
<label class="block text-gray-300 mb-2">To</label>
<select id="to-currency" class="w-full bg-gray-900 text-white border border-yellow-500 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-yellow-500">
<option value="EUR">EUR - Euro</option>
<option value="USD">USD - US Dollar</option>
<option value="GBP">GBP - British Pound</option>
<option value="JPY">JPY - Japanese Yen</option>
<option value="CAD">CAD - Canadian Dollar</option>
<option value="AUD">AUD - Australian Dollar</option>
</select>
</div>
</div>
<button id="convert-btn" class="w-full bg-yellow-500 hover:bg-yellow-600 text-black font-bold py-3 rounded-lg transition mb-6 flex items-center justify-center">
<i data-feather="refresh-cw" class="mr-2"></i> Convert
</button>
<div id="result" class="text-center py-6 px-4 bg-gray-900 rounded-lg border border-yellow-500 hidden">
<div class="text-4xl font-bold text-yellow-500 mb-2" id="converted-amount">0</div>
<div class="text-gray-300" id="conversion-text">1 USD = 0 EUR</div>
</div>
<div class="mt-8">
<h3 class="text-xl font-bold mb-4 text-yellow-500">Popular Conversions</h3>
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
<button class="quick-convert bg-gray-900 hover:bg-gray-800 text-white px-4 py-2 rounded-lg border border-gray-700" data-from="USD" data-to="EUR">
USD → EUR
</button>
<button class="quick-convert bg-gray-900 hover:bg-gray-800 text-white px-4 py-2 rounded-lg border border-gray-700" data-from="EUR" data-to="USD">
EUR → USD
</button>
<button class="quick-convert bg-gray-900 hover:bg-gray-800 text-white px-4 py-2 rounded-lg border border-gray-700" data-from="USD" data-to="GBP">
USD → GBP
</button>
<button class="quick-convert bg-gray-900 hover:bg-gray-800 text-white px-4 py-2 rounded-lg border border-gray-700" data-from="GBP" data-to="USD">
GBP → USD
</button>
<button class="quick-convert bg-gray-900 hover:bg-gray-800 text-white px-4 py-2 rounded-lg border border-gray-700" data-from="USD" data-to="JPY">
USD → JPY
</button>
<button class="quick-convert bg-gray-900 hover:bg-gray-800 text-white px-4 py-2 rounded-lg border border-gray-700" data-from="JPY" data-to="USD">
JPY → USD
</button>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="relative z-10 bg-black bg-opacity-90 border-t border-gray-800 py-12">
<div class="container mx-auto px-6">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<div class="flex items-center space-x-2 mb-4">
<i data-feather="zap" class="text-yellow-500"></i>
<span class="text-2xl font-bold font-['Bebas+Neue'] tracking-wider text-yellow-500">AMPLIFY</span>
</div>
<p class="text-gray-400 mb-4">
Mental performance technology for champions in sports, business, and life.
</p>
<div class="flex space-x-4">
<a href="#" class="text-gray-400 hover:text-yellow-500 transition">
<i data-feather="facebook"></i>
</a>
<a href="#" class="text-gray-400 hover:text-yellow-500 transition">
<i data-feather="twitter"></i>
</a>
<a href="#" class="text-gray-400 hover:text-yellow-500 transition">
<i data-feather="instagram"></i>
</a>
<a href="#" class="text-gray-400 hover:text-yellow-500 transition">
<i data-feather="linkedin"></i>
</a>
</div>
</div>
<div>
<h3 class="text-lg font-bold text-white mb-4">Products</h3>
<ul class="space-y-2">
<li><a href="index.html#features" class="text-gray-400 hover:text-yellow-500 transition">VR Training</a></li>
<li><a href="index.html#features" class="text-gray-400 hover:text-yellow-500 transition">AR Coaching</a></li>
<li><a href="index.html#features" class="text-gray-400 hover:text-yellow-500 transition">Biofeedback</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-bold text-white mb-4">Company</h3>
<ul class="space-y-2">
<li><a href="about.html" class="text-gray-400 hover:text-yellow-500 transition">About Us</a></li>
<li><a href="#" class="text-gray-400 hover:text-yellow-500 transition">Careers</a></li>
<li><a href="#" class="text-gray-400 hover:text-yellow-500 transition">Press</a></li>
<li><a href="#" class="text-gray-400 hover:text-yellow-500 transition">Contact</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-bold text-white mb-4">Resources</h3>
<ul class="space-y-2">
<li><a href="currency.html" class="text-yellow-500 hover:text-yellow-400 transition">Currency Converter</a></li>
<li><a href="#" class="text-gray-400 hover:text-yellow-500 transition">Blog</a></li>
<li><a href="#" class="text-gray-400 hover:text-yellow-500 transition">Help Center</a></li>
</ul>
</div>
</div>
<div class="border-t border-gray-800 mt-12 pt-8 flex flex-col md:flex-row justify-between items-center">
<p class="text-gray-500 mb-4 md:mb-0">
© 2025 Amplify Technologies. All rights reserved.
</p>
<div class="flex space-x-6">
<a href="#" class="text-gray-500 hover:text-yellow-500 transition">Privacy Policy</a>
<a href="#" class="text-gray-500 hover:text-yellow-500 transition">Terms of Service</a>
</div>
</div>
</div>
</footer>
<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: 0xb8860b,
backgroundColor: 0x0,
size: 0.8
});
// Currency Converter
document.addEventListener('DOMContentLoaded', function() {
feather.replace();
const convertBtn = document.getElementById('convert-btn');
const resultDiv = document.getElementById('result');
const quickConvertBtns = document.querySelectorAll('.quick-convert');
// Fetch exchange rates from API
async function fetchExchangeRate(from, to) {
try {
const response = await fetch(`https://api.exchangerate-api.com/v4/latest/${from}`);
const data = await response.json();
return data.rates[to];
} catch (error) {
console.error('Error fetching exchange rate:', error);
return null;
}
}
// Perform conversion
async function convertCurrency() {
const amount = parseFloat(document.getElementById('amount').value);
const fromCurrency = document.getElementById('from-currency').value;
const toCurrency = document.getElementById('to-currency').value;
if (isNaN(amount) || amount <= 0) {
alert('Please enter a valid amount');
return;
}
const rate = await fetchExchangeRate(fromCurrency, toCurrency);
if (rate) {
const convertedAmount = (amount * rate).toFixed(2);
document.getElementById('converted-amount').textContent = convertedAmount;
document.getElementById('conversion-text').textContent =
`${amount} ${fromCurrency} = ${convertedAmount} ${toCurrency}`;
resultDiv.classList.remove('hidden');
} else {
alert('Unable to get exchange rate. Please try again later.');
}
}
// Handle quick convert buttons
quickConvertBtns.forEach(btn => {
btn.addEventListener('click', function() {
const from = this.getAttribute('data-from');
const to = this.getAttribute('data-to');
document.getElementById('from-currency').value = from;
document.getElementById('to-currency').value = to;
convertCurrency();
});
});
// Event listeners
convertBtn.addEventListener('click', convertCurrency);
});
</script>
</body>
</html>