Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Aquapod - Bell Economy</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=Inter:wght@300;400;600;700&display=swap'); | |
body { | |
font-family: 'Inter', sans-serif; | |
background-color: #f8fafc; | |
color: #1e293b; | |
} | |
.bell-animation { | |
animation: ring 2s ease-in-out infinite; | |
transform-origin: top center; | |
} | |
@keyframes ring { | |
0% { transform: rotate(0deg); } | |
25% { transform: rotate(5deg); } | |
50% { transform: rotate(-5deg); } | |
75% { transform: rotate(2deg); } | |
100% { transform: rotate(0deg); } | |
} | |
.floating-panel { | |
transition: all 0.3s ease; | |
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); | |
} | |
.floating-panel.closed { | |
transform: translateY(100%); | |
opacity: 0; | |
pointer-events: none; | |
} | |
.bell-tone { | |
position: absolute; | |
width: 0; | |
height: 0; | |
opacity: 0; | |
} | |
.bell-badge { | |
position: absolute; | |
top: -5px; | |
right: -5px; | |
background-color: #ef4444; | |
color: white; | |
border-radius: 50%; | |
width: 24px; | |
height: 24px; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
font-size: 12px; | |
font-weight: bold; | |
} | |
.recording { | |
animation: pulse 1.5s infinite; | |
} | |
@keyframes pulse { | |
0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } | |
70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } | |
100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } | |
} | |
</style> | |
</head> | |
<body class="min-h-screen"> | |
<!-- Floating Action Buttons --> | |
<div class="fixed bottom-6 right-6 space-y-3 z-50"> | |
<div class="relative"> | |
<button id="services-btn" class="w-14 h-14 bg-blue-600 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-blue-700 transition"> | |
<i class="fas fa-bell text-xl"></i> | |
</button> | |
<div id="bell-badge" class="bell-badge">1</div> | |
</div> | |
<div class="relative"> | |
<button id="defi-btn" class="w-14 h-14 bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-green-700 transition"> | |
<i class="fas fa-coins text-xl"></i> | |
</button> | |
<div class="bell-badge" style="background-color: #f59e0b;">1:4</div> | |
</div> | |
<button id="broadcast-btn" class="w-14 h-14 bg-purple-600 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-purple-700 transition"> | |
<i class="fas fa-microphone text-xl"></i> | |
</button> | |
</div> | |
<!-- Current Time Bell Display --> | |
<div class="container mx-auto px-4 py-8"> | |
<div class="flex flex-col items-center justify-center min-h-[60vh]"> | |
<div class="relative mb-8"> | |
<div id="current-bell" class="bg-blue-100 rounded-full p-8 shadow-lg"> | |
<i class="fas fa-bell text-blue-600 text-6xl bell-animation"></i> | |
</div> | |
<div id="bell-count" class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full w-12 h-12 flex items-center justify-center font-bold text-xl">1</div> | |
</div> | |
<h1 id="bell-time" class="text-4xl font-bold text-center mb-2">12:30 PM</h1> | |
<p id="bell-duration" class="text-xl text-gray-600 mb-6">1 Bell (1:30 Hours)</p> | |
<div class="bg-white rounded-lg shadow-md p-6 max-w-md w-full text-center"> | |
<h3 class="text-xl font-semibold mb-2">Current Service Cost</h3> | |
<p class="text-gray-700 mb-4">Based on the current bell time</p> | |
<div class="p-3 bg-blue-50 rounded-lg"> | |
<p class="text-blue-700 font-medium text-lg">10 <span class="text-blue-900">AQUAPOD</span></p> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Floating Panels --> | |
<div id="services-panel" class="fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl p-6 floating-panel closed transition-all duration-300 z-40" style="height: 70vh;"> | |
<div class="flex justify-between items-center mb-6"> | |
<h2 class="text-2xl font-bold">Bell Schedule</h2> | |
<button id="close-services" class="text-gray-500 hover:text-gray-700"> | |
<i class="fas fa-times text-xl"></i> | |
</button> | |
</div> | |
<div class="overflow-y-auto h-[calc(70vh-80px)] space-y-4"> | |
<div class="bg-gray-50 p-4 rounded-lg"> | |
<h3 class="font-semibold mb-3 text-center">Current Bell Periods</h3> | |
<div class="grid grid-cols-2 gap-3"> | |
<div class="bg-blue-100 p-3 rounded-lg text-center"> | |
<div class="text-blue-800 font-bold">1 Bell</div> | |
<div class="text-sm text-blue-600">1:30 Hours</div> | |
</div> | |
<div class="bg-blue-100 p-3 rounded-lg text-center"> | |
<div class="text-blue-800 font-bold">2 Bells</div> | |
<div class="text-sm text-blue-600">2:00 Hours</div> | |
</div> | |
<div class="bg-blue-100 p-3 rounded-lg text-center"> | |
<div class="text-blue-800 font-bold">3 Bells</div> | |
<div class="text-sm text-blue-600">2:30 Hours</div> | |
</div> | |
<div class="bg-blue-100 p-3 rounded-lg text-center"> | |
<div class="text-blue-800 font-bold">4 Bells</div> | |
<div class="text-sm text-blue-600">3:00 Hours</div> | |
</div> | |
<div class="bg-blue-100 p-3 rounded-lg text-center"> | |
<div class="text-blue-800 font-bold">5 Bells</div> | |
<div class="text-sm text-blue-600">3:30 Hours</div> | |
</div> | |
<div class="bg-blue-100 p-3 rounded-lg text-center"> | |
<div class="text-blue-800 font-bold">6 Bells</div> | |
<div class="text-sm text-blue-600">4:00 Hours</div> | |
</div> | |
<div class="bg-blue-100 p-3 rounded-lg text-center"> | |
<div class="text-blue-800 font-bold">7 Bells</div> | |
<div class="text-sm text-blue-600">4:30 Hours</div> | |
</div> | |
<div class="bg-blue-100 p-3 rounded-lg text-center"> | |
<div class="text-blue-800 font-bold">8 Bells</div> | |
<div class="text-sm text-blue-600">5:00 Hours</div> | |
</div> | |
</div> | |
</div> | |
<div class="bg-white border border-gray-200 rounded-lg p-4"> | |
<h3 class="font-semibold mb-2">Current Bell Costs</h3> | |
<div class="space-y-2"> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">1 Bell:</span> | |
<span class="font-medium">10 AQUAPOD</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">2 Bells:</span> | |
<span class="font-medium">15 AQUAPOD</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">3 Bells:</span> | |
<span class="font-medium">20 AQUAPOD</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">4 Bells:</span> | |
<span class="font-medium">25 AQUAPOD</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">5 Bells:</span> | |
<span class="font-medium">30 AQUAPOD</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">6 Bells:</span> | |
<span class="font-medium">35 AQUAPOD</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">7 Bells:</span> | |
<span class="font-medium">40 AQUAPOD</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">8 Bells:</span> | |
<span class="font-medium">45 AQUAPOD</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="defi-panel" class="fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl p-6 floating-panel closed transition-all duration-300 z-40" style="height: 70vh;"> | |
<div class="flex justify-between items-center mb-6"> | |
<h2 class="text-2xl font-bold">DeFi Exchange Rates</h2> | |
<button id="close-defi" class="text-gray-500 hover:text-gray-700"> | |
<i class="fas fa-times text-xl"></i> | |
</button> | |
</div> | |
<div class="overflow-y-auto h-[calc(70vh-80px)] space-y-6"> | |
<div class="bg-white border border-gray-200 rounded-lg shadow-sm p-6"> | |
<div class="mb-4"> | |
<label class="block text-gray-700 mb-2">From</label> | |
<div class="flex border border-gray-300 rounded-lg overflow-hidden"> | |
<input type="number" class="flex-grow p-3 outline-none" placeholder="Amount" value="100"> | |
<select class="bg-gray-100 p-3 border-l"> | |
<option>AQUAPOD</option> | |
</select> | |
</div> | |
</div> | |
<div class="flex justify-center my-4"> | |
<button class="bg-gray-200 p-2 rounded-full text-gray-700"> | |
<i class="fas fa-exchange-alt"></i> | |
</button> | |
</div> | |
<div class="mb-4"> | |
<label class="block text-gray-700 mb-2">To</label> | |
<div class="flex border border-gray-300 rounded-lg overflow-hidden"> | |
<input type="number" class="flex-grow p-3 outline-none" placeholder="Amount" value="25"> | |
<select class="bg-gray-100 p-3 border-l"> | |
<option>XLM</option> | |
<option>BCH</option> | |
</select> | |
</div> | |
</div> | |
<button class="w-full bg-green-600 text-white py-3 rounded-lg font-semibold hover:bg-green-700 transition"> | |
Exchange Now | |
</button> | |
</div> | |
<div class="bg-gray-50 p-4 rounded-lg"> | |
<h3 class="font-semibold mb-2">Current Rates</h3> | |
<div class="space-y-2"> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">1 AQUAPOD =</span> | |
<span class="font-medium">0.25 XLM</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">1 AQUAPOD =</span> | |
<span class="font-medium">0.00015 BCH</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">1 XLM =</span> | |
<span class="font-medium">4 AQUAPOD</span> | |
</div> | |
<div class="flex justify-between"> | |
<span class="text-gray-600">1 BCH =</span> | |
<span class="font-medium">6666.67 AQUAPOD</span> | |
</div> | |
</div> | |
</div> | |
<div class="bg-blue-50 p-4 rounded-lg"> | |
<h3 class="font-semibold mb-2 text-blue-800">Pegged Stability</h3> | |
<p class="text-blue-700 text-sm">AQUAPOD is pegged to XLM and BCH for stable exchange rates and liquidity.</p> | |
</div> | |
</div> | |
</div> | |
<div id="broadcast-panel" class="fixed bottom-0 left-0 right-0 bg-white rounded-t-3xl p-6 floating-panel closed transition-all duration-300 z-40" style="height: 70vh;"> | |
<div class="flex justify-between items-center mb-6"> | |
<h2 class="text-2xl font-bold">Community Broadcast</h2> | |
<button id="close-broadcast" class="text-gray-500 hover:text-gray-700"> | |
<i class="fas fa-times text-xl"></i> | |
</button> | |
</div> | |
<div class="overflow-y-auto h-[calc(70vh-80px)] space-y-4"> | |
<div class="bg-gray-50 p-4 rounded-lg text-center"> | |
<p class="text-gray-600 mb-4">Record a message that will be transmitted to the community support line:</p> | |
<p class="font-semibold text-blue-600 mb-2"><i class="fas fa-phone-alt mr-2"></i>+1 (555) 123-4567</p> | |
<div id="recording-status" class="hidden bg-red-100 text-red-800 p-2 rounded-lg mb-4"> | |
<i class="fas fa-circle mr-2"></i> Recording in progress... | |
</div> | |
<div id="transcription-result" class="hidden bg-blue-50 p-4 rounded-lg mb-4 text-left"> | |
<h4 class="font-semibold mb-2">Your message:</h4> | |
<p id="transcription-text" class="text-gray-700"></p> | |
</div> | |
<button id="record-btn" class="w-20 h-20 bg-red-500 text-white rounded-full flex items-center justify-center shadow-lg mx-auto mb-4 hover:bg-red-600 transition"> | |
<i class="fas fa-microphone text-2xl"></i> | |
</button> | |
<p class="text-sm text-gray-500">Press and hold to record your message</p> | |
<div class="mt-6"> | |
<button id="send-btn" class="w-full bg-purple-600 text-white py-3 rounded-lg font-semibold hover:bg-purple-700 transition disabled:opacity-50" disabled> | |
Send Broadcast Message | |
</button> | |
</div> | |
</div> | |
<div class="bg-white border border-gray-200 rounded-lg p-4"> | |
<h3 class="font-semibold mb-2">Recent Broadcasts</h3> | |
<div class="space-y-3"> | |
<div class="border-b border-gray-100 pb-3"> | |
<div class="flex justify-between text-sm text-gray-500 mb-1"> | |
<span>Yesterday, 3:42 PM</span> | |
<span>Sent to +1 (555) 123-4567</span> | |
</div> | |
<p class="text-gray-700">"Need assistance with water filtration system on pod #42"</p> | |
</div> | |
<div class="border-b border-gray-100 pb-3"> | |
<div class="flex justify-between text-sm text-gray-500 mb-1"> | |
<span>Today, 10:15 AM</span> | |
<span>Sent to +1 (555) 123-4567</span> | |
</div> | |
<p class="text-gray-700">"Reporting a leak in the communal area near docking station 3"</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Bell sound (hidden) --> | |
<audio id="bell-sound" class="bell-tone" src="https://assets.mixkit.co/sfx/preview/mixkit-bell-notification-933.mp3" preload="auto"></audio> | |
<script> | |
// Bell system data | |
const bellSchedule = [ | |
{ time: "00:00", bells: 8, duration: "5:00 Hours" }, | |
{ time: "04:00", bells: 8, duration: "5:00 Hours" }, | |
{ time: "08:00", bells: 8, duration: "5:00 Hours" }, | |
{ time: "12:30", bells: 1, duration: "1:30 Hours" }, | |
{ time: "13:00", bells: 2, duration: "2:00 Hours" }, | |
{ time: "13:30", bells: 3, duration: "2:30 Hours" }, | |
{ time: "14:00", bells: 4, duration: "3:00 Hours" }, | |
{ time: "14:30", bells: 5, duration: "3:30 Hours" }, | |
{ time: "15:00", bells: 6, duration: "4:00 Hours" }, | |
{ time: "15:30", bells: 7, duration: "4:30 Hours" }, | |
{ time: "16:00", bells: 8, duration: "5:00 Hours" }, | |
{ time: "16:30", bells: 1, duration: "1:30 Hours" }, | |
{ time: "17:00", bells: 2, duration: "2:00 Hours" }, | |
{ time: "17:30", bells: 3, duration: "2:30 Hours" }, | |
{ time: "18:00", bells: 4, duration: "3:00 Hours" }, | |
{ time: "18:30", bells: 5, duration: "3:30 Hours" }, | |
{ time: "19:00", bells: 6, duration: "4:00 Hours" }, | |
{ time: "19:30", bells: 7, duration: "4:30 Hours" }, | |
{ time: "20:00", bells: 8, duration: "5:00 Hours" }, | |
{ time: "20:30", bells: 1, duration: "1:30 Hours" }, | |
{ time: "21:00", bells: 2, duration: "2:00 Hours" }, | |
{ time: "21:30", bells: 3, duration: "2:30 Hours" }, | |
{ time: "22:00", bells: 4, duration: "3:00 Hours" }, | |
{ time: "22:30", bells: 5, duration: "3:30 Hours" }, | |
{ time: "23:00", bells: 6, duration: "4:00 Hours" }, | |
{ time: "23:30", bells: 7, duration: "4:30 Hours" } | |
]; | |
const bellCosts = { | |
1: 10, | |
2: 15, | |
3: 20, | |
4: 25, | |
5: 30, | |
6: 35, | |
7: 40, | |
8: 45 | |
}; | |
// Update bell display based on current time | |
function updateBellDisplay() { | |
const now = new Date(); | |
const hours = String(now.getHours()).padStart(2, '0'); | |
const minutes = String(now.getMinutes()).padStart(2, '0'); | |
const currentTime = `${hours}:${minutes}`; | |
// Find the current or next bell period | |
let currentBell = bellSchedule[0]; | |
for (const bell of bellSchedule) { | |
if (bell.time <= currentTime) { | |
currentBell = bell; | |
} else { | |
break; | |
} | |
} | |
// Update UI | |
document.getElementById('bell-count').textContent = currentBell.bells; | |
document.getElementById('bell-badge').textContent = currentBell.bells; | |
document.getElementById('bell-time').textContent = formatTime(currentBell.time); | |
document.getElementById('bell-duration').textContent = `${currentBell.bells} Bell${currentBell.bells > 1 ? 's' : ''} (${currentBell.duration})`; | |
// Calculate cost | |
const cost = bellCosts[currentBell.bells]; | |
document.querySelector('#current-bell + div + div + div .text-blue-900').textContent = `${cost} AQUAPOD`; | |
// Add animation class if it's exactly a bell time | |
const bellElement = document.getElementById('current-bell'); | |
const bellSound = document.getElementById('bell-sound'); | |
if (currentTime === currentBell.time) { | |
bellElement.classList.add('bell-animation'); | |
bellSound.play(); | |
// Remove animation after 2 seconds | |
setTimeout(() => { | |
bellElement.classList.remove('bell-animation'); | |
}, 2000); | |
} | |
} | |
// Format time as 12-hour with AM/PM | |
function formatTime(time24) { | |
const [hours, minutes] = time24.split(':'); | |
const period = hours >= 12 ? 'PM' : 'AM'; | |
const hours12 = hours % 12 || 12; | |
return `${hours12}:${minutes} ${period}`; | |
} | |
// Initialize bell display | |
updateBellDisplay(); | |
// Update every minute | |
setInterval(updateBellDisplay, 60000); | |
// Floating panel controls | |
const servicesBtn = document.getElementById('services-btn'); | |
const defiBtn = document.getElementById('defi-btn'); | |
const broadcastBtn = document.getElementById('broadcast-btn'); | |
const servicesPanel = document.getElementById('services-panel'); | |
const defiPanel = document.getElementById('defi-panel'); | |
const broadcastPanel = document.getElementById('broadcast-panel'); | |
const closeServices = document.getElementById('close-services'); | |
const closeDefi = document.getElementById('close-defi'); | |
const closeBroadcast = document.getElementById('close-broadcast'); | |
// Toggle panels | |
servicesBtn.addEventListener('click', () => { | |
servicesPanel.classList.remove('closed'); | |
defiPanel.classList.add('closed'); | |
broadcastPanel.classList.add('closed'); | |
}); | |
defiBtn.addEventListener('click', () => { | |
defiPanel.classList.remove('closed'); | |
servicesPanel.classList.add('closed'); | |
broadcastPanel.classList.add('closed'); | |
}); | |
broadcastBtn.addEventListener('click', () => { | |
broadcastPanel.classList.remove('closed'); | |
servicesPanel.classList.add('closed'); | |
defiPanel.classList.add('closed'); | |
}); | |
// Close panels | |
closeServices.addEventListener('click', () => { | |
servicesPanel.classList.add('closed'); | |
}); | |
closeDefi.addEventListener('click', () => { | |
defiPanel.classList.add('closed'); | |
}); | |
closeBroadcast.addEventListener('click', () => { | |
broadcastPanel.classList.add('closed'); | |
}); | |
// Close panels when clicking outside | |
document.addEventListener('click', (e) => { | |
if (!servicesPanel.contains(e.target) && e.target !== servicesBtn) { | |
servicesPanel.classList.add('closed'); | |
} | |
if (!defiPanel.contains(e.target) && e.target !== defiBtn) { | |
defiPanel.classList.add('closed'); | |
} | |
if (!broadcastPanel.contains(e.target) && e.target !== broadcastBtn) { | |
broadcastPanel.classList.add('closed'); | |
} | |
}); | |
// Broadcast recording functionality | |
const recordBtn = document.getElementById('record-btn'); | |
const recordingStatus = document.getElementById('recording-status'); | |
const transcriptionResult = document.getElementById('transcription-result'); | |
const transcriptionText = document.getElementById('transcription-text'); | |
const sendBtn = document.getElementById('send-btn'); | |
let isRecording = false; | |
let recordingTimeout; | |
let recordedMessage = ""; | |
recordBtn.addEventListener('mousedown', startRecording); | |
recordBtn.addEventListener('touchstart', startRecording); | |
recordBtn.addEventListener('mouseup', stopRecording); | |
recordBtn.addEventListener('touchend', stopRecording); | |
recordBtn.addEventListener('mouseleave', stopRecording); | |
function startRecording(e) { | |
e.preventDefault(); | |
if (!isRecording) { | |
isRecording = true; | |
recordBtn.classList.add('recording'); | |
recordingStatus.classList.remove('hidden'); | |
transcriptionResult.classList.add('hidden'); | |
sendBtn.disabled = true; | |
// Simulate recording for 3 seconds | |
recordingTimeout = setTimeout(() => { | |
stopRecording(e); | |
// Simulate transcription result | |
recordedMessage = "This is a simulated transcription of your recorded message about the Aquapod community."; | |
transcriptionText.textContent = recordedMessage; | |
transcriptionResult.classList.remove('hidden'); | |
sendBtn.disabled = false; | |
}, 3000); | |
} | |
} | |
function stopRecording(e) { | |
e.preventDefault(); | |
if (isRecording) { | |
isRecording = false; | |
clearTimeout(recordingTimeout); | |
recordBtn.classList.remove('recording'); | |
recordingStatus.classList.add('hidden'); | |
} | |
} | |
sendBtn.addEventListener('click', () => { | |
if (recordedMessage) { | |
alert(`Message sent to community support: "${recordedMessage}"`); | |
sendBtn.disabled = true; | |
// Add to recent broadcasts | |
const now = new Date(); | |
const timeString = now.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}); | |
const recentBroadcasts = document.querySelector('#broadcast-panel .bg-white.border'); | |
const newBroadcast = document.createElement('div'); | |
newBroadcast.className = 'border-b border-gray-100 pb-3'; | |
newBroadcast.innerHTML = ` | |
<div class="flex justify-between text-sm text-gray-500 mb-1"> | |
<span>Just now</span> | |
<span>Sent to +1 (555) 123-4567</span> | |
</div> | |
<p class="text-gray-700">"${recordedMessage}"</p> | |
`; | |
recentBroadcasts.insertBefore(newBroadcast, recentBroadcasts.firstChild); | |
} | |
}); | |
</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=privateuserh/aqu-bells" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
</html> |