aura-demo / index.html
Demo310's picture
Add 2 files
f0747f0 verified
Raw History Blame Contribute Delete
41.3 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aura.HQ - LoFi Render Engine</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">
<script src="https://cdn.jsdelivr.net/npm/web3@1.5.2/dist/web3.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
:root {
--primary: #6366f1;
--secondary: #8b5cf6;
--dark: #1e293b;
--light: #f8fafc;
--accent: #f43f5e;
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--dark);
color: var(--light);
overflow-x: hidden;
}
.font-space {
font-family: 'Space Grotesk', sans-serif;
}
.gradient-text {
background: linear-gradient(90deg, var(--primary), var(--secondary));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.gradient-bg {
background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.lofi-scene {
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.window {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.rain-effect {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 10;
}
.rain-drop {
position: absolute;
width: 1px;
height: 20px;
background: linear-gradient(transparent, rgba(255, 255, 255, 0.6));
animation: rain 1s linear infinite;
}
@keyframes rain {
0% {
transform: translateY(-20px);
}
100% {
transform: translateY(100vh);
}
}
.fade-in {
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
}
70% {
box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
}
}
.nft-card {
transition: all 0.3s ease;
}
.nft-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(139, 92, 246, 0.3), 0 10px 10px -5px rgba(139, 92, 246, 0.1);
}
.typing-indicator::after {
content: '...';
animation: typing 1.5s infinite;
}
@keyframes typing {
0% { content: '.'; }
33% { content: '..'; }
66% { content: '...'; }
}
</style>
</head>
<body class="min-h-screen">
<!-- Web3 Connection Modal -->
<div id="web3Modal" class="fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-50">
<div class="bg-slate-800 rounded-xl p-8 max-w-md w-full mx-4 window fade-in">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold gradient-text">Connect Wallet</h2>
<button onclick="closeModal('web3Modal')" class="text-slate-400 hover:text-white">
<i class="fas fa-times"></i>
</button>
</div>
<p class="text-slate-300 mb-6">Connect your Web3 wallet to access Aura.HQ and your digital environment.</p>
<div class="space-y-4">
<button onclick="connectWallet('metamask')" class="w-full flex items-center justify-between p-4 bg-slate-700 hover:bg-slate-600 rounded-lg transition">
<div class="flex items-center">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/36/MetaMask_Fox.svg" alt="MetaMask" class="w-8 h-8 mr-3">
<span>MetaMask</span>
</div>
<i class="fas fa-chevron-right text-slate-400"></i>
</button>
<button onclick="connectWallet('walletconnect')" class="w-full flex items-center justify-between p-4 bg-slate-700 hover:bg-slate-600 rounded-lg transition">
<div class="flex items-center">
<img src="https://walletconnect.com/walletconnect-logo.svg" alt="WalletConnect" class="w-8 h-8 mr-3">
<span>WalletConnect</span>
</div>
<i class="fas fa-chevron-right text-slate-400"></i>
</button>
<button onclick="connectWallet('lens')" class="w-full flex items-center justify-between p-4 bg-slate-700 hover:bg-slate-600 rounded-lg transition">
<div class="flex items-center">
<img src="https://lens.xyz/logo.svg" alt="Lens Protocol" class="w-8 h-8 mr-3">
<span>Lens Protocol</span>
</div>
<i class="fas fa-chevron-right text-slate-400"></i>
</button>
</div>
</div>
</div>
<!-- AI Assistant Modal -->
<div id="aiModal" class="fixed inset-0 bg-black bg-opacity-80 flex items-end justify-center z-50 hidden">
<div class="bg-slate-800 rounded-t-xl p-6 w-full max-w-md mx-4 window fade-in">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-bold gradient-text">Aura Assistant</h2>
<button onclick="closeModal('aiModal')" class="text-slate-400 hover:text-white">
<i class="fas fa-times"></i>
</button>
</div>
<div id="aiChat" class="h-64 overflow-y-auto mb-4 space-y-3">
<div class="flex items-start">
<div class="bg-slate-700 p-3 rounded-lg max-w-xs">
<p class="text-sm">Hi there! I'm your Aura assistant. How can I help customize your environment today?</p>
</div>
</div>
</div>
<div class="flex">
<input id="aiInput" type="text" placeholder="Ask me anything..." class="flex-1 bg-slate-700 text-white px-4 py-2 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
<button onclick="sendAIMessage()" class="bg-indigo-600 hover:bg-indigo-700 px-4 py-2 rounded-r-lg transition">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
</div>
<!-- NFT Marketplace Modal -->
<div id="marketModal" class="fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-50 hidden overflow-y-auto">
<div class="bg-slate-800 rounded-xl p-6 w-full max-w-4xl mx-4 window fade-in my-8">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold gradient-text">Meta Market</h2>
<button onclick="closeModal('marketModal')" class="text-slate-400 hover:text-white">
<i class="fas fa-times"></i>
</button>
</div>
<div class="flex mb-6">
<div class="flex-1 relative">
<input type="text" placeholder="Search items..." class="w-full bg-slate-700 text-white px-4 py-2 pl-10 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
<i class="fas fa-search absolute left-3 top-3 text-slate-400"></i>
</div>
<select class="ml-2 bg-slate-700 text-white px-3 py-2 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
<option>All Categories</option>
<option>Furniture</option>
<option>Decorations</option>
<option>Characters</option>
<option>Music</option>
</select>
<select class="ml-2 bg-slate-700 text-white px-3 py-2 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
<option>All Rarities</option>
<option>Common</option>
<option>Uncommon</option>
<option>Rare</option>
<option>Legendary</option>
</select>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
<!-- NFT Item 1 -->
<div class="nft-card bg-slate-700 rounded-xl overflow-hidden transition cursor-pointer">
<div class="relative">
<img src="https://i.imgur.com/JQlJD5O.png" alt="LoFi Vinyl Player" class="w-full h-48 object-cover">
<div class="absolute top-2 right-2 bg-indigo-600 text-white text-xs px-2 py-1 rounded-full">Rare</div>
</div>
<div class="p-4">
<h3 class="font-bold">LoFi Vinyl Player</h3>
<p class="text-slate-300 text-sm mt-1">Plays smooth jazz beats</p>
<div class="flex justify-between items-center mt-3">
<span class="text-indigo-400 font-bold">0.05 ETH</span>
<button class="text-xs bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full transition">Buy</button>
</div>
</div>
</div>
<!-- NFT Item 2 -->
<div class="nft-card bg-slate-700 rounded-xl overflow-hidden transition cursor-pointer">
<div class="relative">
<img src="https://i.imgur.com/8zGjV3P.png" alt="Cyber Neon Sign" class="w-full h-48 object-cover">
<div class="absolute top-2 right-2 bg-purple-600 text-white text-xs px-2 py-1 rounded-full">Legendary</div>
</div>
<div class="p-4">
<h3 class="font-bold">Cyber Neon Sign</h3>
<p class="text-slate-300 text-sm mt-1">Glows in the dark</p>
<div class="flex justify-between items-center mt-3">
<span class="text-indigo-400 font-bold">0.2 ETH</span>
<button class="text-xs bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full transition">Buy</button>
</div>
</div>
</div>
<!-- NFT Item 3 -->
<div class="nft-card bg-slate-700 rounded-xl overflow-hidden transition cursor-pointer">
<div class="relative">
<img src="https://i.imgur.com/3qNQZ1x.png" alt="Study Desk" class="w-full h-48 object-cover">
<div class="absolute top-2 right-2 bg-green-600 text-white text-xs px-2 py-1 rounded-full">Uncommon</div>
</div>
<div class="p-4">
<h3 class="font-bold">Study Desk</h3>
<p class="text-slate-300 text-sm mt-1">Perfect for focus sessions</p>
<div class="flex justify-between items-center mt-3">
<span class="text-indigo-400 font-bold">0.03 ETH</span>
<button class="text-xs bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full transition">Buy</button>
</div>
</div>
</div>
<!-- NFT Item 4 -->
<div class="nft-card bg-slate-700 rounded-xl overflow-hidden transition cursor-pointer">
<div class="relative">
<img src="https://i.imgur.com/5tKvJzW.png" alt="Rainy Window" class="w-full h-48 object-cover">
<div class="absolute top-2 right-2 bg-blue-600 text-white text-xs px-2 py-1 rounded-full">Rare</div>
</div>
<div class="p-4">
<h3 class="font-bold">Rainy Window</h3>
<p class="text-slate-300 text-sm mt-1">Creates cozy atmosphere</p>
<div class="flex justify-between items-center mt-3">
<span class="text-indigo-400 font-bold">0.08 ETH</span>
<button class="text-xs bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full transition">Buy</button>
</div>
</div>
</div>
<!-- NFT Item 5 -->
<div class="nft-card bg-slate-700 rounded-xl overflow-hidden transition cursor-pointer">
<div class="relative">
<img src="https://i.imgur.com/7VJk9fL.png" alt="LoFi Cat" class="w-full h-48 object-cover">
<div class="absolute top-2 right-2 bg-yellow-600 text-white text-xs px-2 py-1 rounded-full">Common</div>
</div>
<div class="p-4">
<h3 class="font-bold">LoFi Cat</h3>
<p class="text-slate-300 text-sm mt-1">Chill companion</p>
<div class="flex justify-between items-center mt-3">
<span class="text-indigo-400 font-bold">0.01 ETH</span>
<button class="text-xs bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full transition">Buy</button>
</div>
</div>
</div>
<!-- NFT Item 6 -->
<div class="nft-card bg-slate-700 rounded-xl overflow-hidden transition cursor-pointer">
<div class="relative">
<img src="https://i.imgur.com/9zH3JqT.png" alt="City Skyline" class="w-full h-48 object-cover">
<div class="absolute top-2 right-2 bg-purple-600 text-white text-xs px-2 py-1 rounded-full">Legendary</div>
</div>
<div class="p-4">
<h3 class="font-bold">City Skyline</h3>
<p class="text-slate-300 text-sm mt-1">Dynamic day/night cycle</p>
<div class="flex justify-between items-center mt-3">
<span class="text-indigo-400 font-bold">0.25 ETH</span>
<button class="text-xs bg-indigo-600 hover:bg-indigo-700 px-3 py-1 rounded-full transition">Buy</button>
</div>
</div>
</div>
</div>
<div class="flex justify-center mt-6">
<button class="bg-indigo-600 hover:bg-indigo-700 px-6 py-2 rounded-full transition">
Load More
</button>
</div>
</div>
</div>
<!-- Screencast Modal -->
<div id="castModal" class="fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-50 hidden">
<div class="bg-slate-800 rounded-xl p-6 max-w-md w-full mx-4 window fade-in">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold gradient-text">Cast to Screen</h2>
<button onclick="closeModal('castModal')" class="text-slate-400 hover:text-white">
<i class="fas fa-times"></i>
</button>
</div>
<p class="text-slate-300 mb-6">Select a device to cast your Aura environment to:</p>
<div class="space-y-3">
<button class="w-full flex items-center justify-between p-3 bg-slate-700 hover:bg-slate-600 rounded-lg transition">
<div class="flex items-center">
<i class="fas fa-tv text-indigo-400 mr-3"></i>
<span>Living Room TV</span>
</div>
<span class="text-xs text-slate-400">AirPlay</span>
</button>
<button class="w-full flex items-center justify-between p-3 bg-slate-700 hover:bg-slate-600 rounded-lg transition">
<div class="flex items-center">
<i class="fas fa-chromecast text-indigo-400 mr-3"></i>
<span>Bedroom Chromecast</span>
</div>
<span class="text-xs text-slate-400">Google Cast</span>
</button>
<button class="w-full flex items-center justify-between p-3 bg-slate-700 hover:bg-slate-600 rounded-lg transition">
<div class="flex items-center">
<i class="fas fa-tv text-indigo-400 mr-3"></i>
<span>Office Display</span>
</div>
<span class="text-xs text-slate-400">Miracast</span>
</button>
<button class="w-full flex items-center justify-between p-3 bg-slate-700 hover:bg-slate-600 rounded-lg transition">
<div class="flex items-center">
<i class="fas fa-network-wired text-indigo-400 mr-3"></i>
<span>Search for devices...</span>
</div>
</button>
</div>
</div>
</div>
<!-- Main App Container -->
<div class="min-h-screen flex flex-col">
<!-- Header -->
<header class="bg-slate-900 bg-opacity-80 backdrop-filter backdrop-blur-lg border-b border-slate-700 z-40">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center">
<div class="gradient-bg w-8 h-8 rounded-lg flex items-center justify-center mr-2">
<i class="fas fa-headphones text-white"></i>
</div>
<h1 class="text-xl font-bold font-space gradient-text">Aura.HQ</h1>
</div>
<div class="flex items-center space-x-4">
<button id="weatherBtn" class="text-slate-300 hover:text-white transition">
<i class="fas fa-cloud-sun"></i>
</button>
<button id="timeBtn" class="text-slate-300 hover:text-white transition">
<i class="fas fa-clock"></i>
</button>
<button id="castBtn" onclick="openModal('castModal')" class="text-slate-300 hover:text-white transition">
<i class="fas fa-tv"></i>
</button>
<button id="marketBtn" onclick="openModal('marketModal')" class="text-slate-300 hover:text-white transition">
<i class="fas fa-store"></i>
</button>
<button id="aiBtn" onclick="openModal('aiModal')" class="text-slate-300 hover:text-white transition">
<i class="fas fa-robot"></i>
</button>
<button id="connectBtn" onclick="openModal('web3Modal')" class="bg-indigo-600 hover:bg-indigo-700 px-4 py-1 rounded-full text-sm transition pulse">
Connect Wallet
</button>
</div>
</div>
</header>
<!-- Main Content -->
<main class="flex-1 flex flex-col md:flex-row">
<!-- Sidebar -->
<aside class="w-full md:w-64 bg-slate-800 border-r border-slate-700 p-4 hidden md:block">
<div class="mb-6">
<h3 class="text-sm uppercase font-bold text-slate-400 mb-3">My Environments</h3>
<div class="space-y-2">
<button class="w-full text-left px-3 py-2 bg-indigo-600 rounded-lg text-sm flex items-center">
<i class="fas fa-headphones mr-2"></i>
<span>LoFi Study</span>
</button>
<button class="w-full text-left px-3 py-2 bg-slate-700 hover:bg-slate-600 rounded-lg text-sm flex items-center">
<i class="fas fa-city mr-2"></i>
<span>Cyberpunk</span>
</button>
<button class="w-full text-left px-3 py-2 bg-slate-700 hover:bg-slate-600 rounded-lg text-sm flex items-center">
<i class="fas fa-leaf mr-2"></i>
<span>Solarpunk</span>
</button>
<button class="w-full text-left px-3 py-2 bg-slate-700 hover:bg-slate-600 rounded-lg text-sm flex items-center">
<i class="fas fa-plus mr-2"></i>
<span>Create New</span>
</button>
</div>
</div>
<div class="mb-6">
<h3 class="text-sm uppercase font-bold text-slate-400 mb-3">My Items</h3>
<div class="grid grid-cols-2 gap-2">
<div class="bg-slate-700 rounded-lg p-2 flex flex-col items-center cursor-pointer hover:bg-slate-600 transition">
<img src="https://i.imgur.com/JQlJD5O.png" alt="Vinyl Player" class="w-10 h-10 object-cover rounded">
<span class="text-xs mt-1 text-center">Vinyl Player</span>
</div>
<div class="bg-slate-700 rounded-lg p-2 flex flex-col items-center cursor-pointer hover:bg-slate-600 transition">
<img src="https://i.imgur.com/5tKvJzW.png" alt="Rainy Window" class="w-10 h-10 object-cover rounded">
<span class="text-xs mt-1 text-center">Rainy Window</span>
</div>
<div class="bg-slate-700 rounded-lg p-2 flex flex-col items-center cursor-pointer hover:bg-slate-600 transition">
<img src="https://i.imgur.com/7VJk9fL.png" alt="LoFi Cat" class="w-10 h-10 object-cover rounded">
<span class="text-xs mt-1 text-center">LoFi Cat</span>
</div>
<div class="bg-slate-700 rounded-lg p-2 flex flex-col items-center cursor-pointer hover:bg-slate-600 transition">
<img src="https://i.imgur.com/9zH3JqT.png" alt="City Skyline" class="w-10 h-10 object-cover rounded">
<span class="text-xs mt-1 text-center">City Skyline</span>
</div>
</div>
</div>
<div>
<h3 class="text-sm uppercase font-bold text-slate-400 mb-3">Music</h3>
<div class="bg-slate-700 rounded-lg p-3">
<div class="flex items-center mb-3">
<img src="https://i.imgur.com/JQlJD5O.png" alt="Album Cover" class="w-12 h-12 rounded">
<div class="ml-3">
<h4 class="text-sm font-medium">LoFi Beats</h4>
<p class="text-xs text-slate-300">Chillhop Essentials</p>
</div>
</div>
<div class="flex justify-between items-center">
<button class="text-slate-300 hover:text-white">
<i class="fas fa-backward"></i>
</button>
<button class="text-slate-300 hover:text-white">
<i class="fas fa-pause"></i>
</button>
<button class="text-slate-300 hover:text-white">
<i class="fas fa-forward"></i>
</button>
</div>
<div class="mt-2">
<div class="h-1 bg-slate-600 rounded-full">
<div class="h-1 bg-indigo-500 rounded-full w-1/3"></div>
</div>
<div class="flex justify-between text-xs text-slate-400 mt-1">
<span>1:23</span>
<span>3:45</span>
</div>
</div>
</div>
</div>
</aside>
<!-- LoFi Scene -->
<div class="flex-1 relative overflow-hidden">
<div id="lofiScene" class="lofi-scene w-full h-full relative">
<!-- Rain Effect (can be toggled) -->
<div id="rainEffect" class="rain-effect hidden"></div>
<!-- Scene Elements -->
<div class="absolute bottom-0 left-0 right-0 h-1/3 bg-gradient-to-t from-slate-900 to-transparent"></div>
<!-- Window with city view -->
<div class="absolute top-1/4 left-1/4 w-1/2 h-1/3 window rounded-lg">
<div class="absolute inset-0 flex items-center justify-center">
<img id="windowView" src="https://i.imgur.com/9zH3JqT.png" alt="City View" class="w-full h-full object-cover opacity-70">
</div>
<div class="absolute bottom-0 left-0 right-0 h-8 bg-slate-900 bg-opacity-50 flex items-center px-3">
<div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
<div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
<div class="w-3 h-3 rounded-full bg-green-500"></div>
</div>
</div>
<!-- Desk with items -->
<div class="absolute bottom-20 left-0 right-0 flex justify-center">
<div class="relative">
<!-- Vinyl Player -->
<div class="absolute -top-20 left-1/2 transform -translate-x-1/2 w-24 h-24">
<img src="https://i.imgur.com/JQlJD5O.png" alt="Vinyl Player" class="w-full h-full object-contain">
<div class="absolute top-1/2 left-1/2 w-16 h-16 bg-slate-800 rounded-full transform -translate-x-1/2 -translate-y-1/2 flex items-center justify-center">
<div class="w-4 h-4 bg-indigo-500 rounded-full"></div>
</div>
<div class="absolute top-1/2 left-1/2 w-1 h-8 bg-indigo-500 transform origin-bottom -translate-x-1/2 -translate-y-full animate-spin" style="animation-duration: 2s;"></div>
</div>
<!-- Desk -->
<div class="w-64 h-8 bg-slate-700 rounded-lg"></div>
<!-- Cat -->
<div class="absolute -top-12 left-1/4 w-16 h-16">
<img src="https://i.imgur.com/7VJk9fL.png" alt="LoFi Cat" class="w-full h-full object-contain">
<div class="absolute top-0 right-0 w-2 h-2 bg-white rounded-full"></div>
<div class="absolute top-0 right-0 w-2 h-2 bg-white rounded-full animate-ping" style="animation-duration: 2s;"></div>
</div>
<!-- Plant -->
<div class="absolute -top-16 right-1/4 w-12 h-16">
<img src="https://i.imgur.com/3qNQZ1x.png" alt="Plant" class="w-full h-full object-contain">
</div>
</div>
</div>
<!-- Floating UI Elements -->
<div class="absolute top-4 right-4 bg-slate-800 bg-opacity-70 rounded-lg p-3 window">
<div class="flex items-center">
<i class="fas fa-cloud-sun text-indigo-400 mr-2"></i>
<span id="weatherDisplay" class="text-sm">Sunny, 72°F</span>
</div>
<div class="flex items-center mt-1">
<i class="fas fa-clock text-indigo-400 mr-2"></i>
<span id="timeDisplay" class="text-sm">3:45 PM</span>
</div>
</div>
<!-- Bottom Controls -->
<div class="absolute bottom-4 left-0 right-0 flex justify-center">
<div class="bg-slate-800 bg-opacity-70 rounded-full p-2 flex space-x-2 window">
<button id="themeBtn" class="w-10 h-10 rounded-full bg-slate-700 hover:bg-slate-600 flex items-center justify-center transition">
<i class="fas fa-palette text-indigo-400"></i>
</button>
<button id="itemsBtn" class="w-10 h-10 rounded-full bg-slate-700 hover:bg-slate-600 flex items-center justify-center transition">
<i class="fas fa-couch text-indigo-400"></i>
</button>
<button id="weatherToggle" class="w-10 h-10 rounded-full bg-slate-700 hover:bg-slate-600 flex items-center justify-center transition">
<i class="fas fa-cloud-rain text-indigo-400"></i>
</button>
<button id="dayNightToggle" class="w-10 h-10 rounded-full bg-slate-700 hover:bg-slate-600 flex items-center justify-center transition">
<i class="fas fa-moon text-indigo-400"></i>
</button>
</div>
</div>
</div>
</div>
</main>
</div>
<script>
// Initialize Web3
let web3;
// Modal functions
function openModal(modalId) {
document.getElementById(modalId).classList.remove('hidden');
}
function closeModal(modalId) {
document.getElementById(modalId).classList.add('hidden');
}
// Wallet connection
async function connectWallet(walletType) {
const connectBtn = document.getElementById('connectBtn');
try {
if (walletType === 'metamask') {
if (window.ethereum) {
web3 = new Web3(window.ethereum);
await window.ethereum.request({ method: 'eth_requestAccounts' });
const accounts = await web3.eth.getAccounts();
connectBtn.innerHTML = `<i class="fas fa-wallet mr-1"></i> ${accounts[0].slice(0, 6)}...${accounts[0].slice(-4)}`;
connectBtn.classList.remove('pulse');
closeModal('web3Modal');
// Show welcome message in AI chat
const aiChat = document.getElementById('aiChat');
const welcomeMsg = document.createElement('div');
welcomeMsg.className = 'flex items-start';
welcomeMsg.innerHTML = `
<div class="bg-slate-700 p-3 rounded-lg max-w-xs">
<p class="text-sm">Welcome back! Your wallet is connected. Would you like me to suggest some environment customizations based on your NFT collection?</p>
</div>
`;
aiChat.appendChild(welcomeMsg);
aiChat.scrollTop = aiChat.scrollHeight;
} else {
alert('Please install MetaMask to connect!');
}
} else {
// Simulate other wallet connections
connectBtn.innerHTML = `<i class="fas fa-wallet mr-1"></i> Connected`;
connectBtn.classList.remove('pulse');
closeModal('web3Modal');
// Show welcome message in AI chat
const aiChat = document.getElementById('aiChat');
const welcomeMsg = document.createElement('div');
welcomeMsg.className = 'flex items-start';
welcomeMsg.innerHTML = `
<div class="bg-slate-700 p-3 rounded-lg max-w-xs">
<p class="text-sm">Welcome to Aura.HQ! Let's customize your perfect digital environment.</p>
</div>
`;
aiChat.appendChild(welcomeMsg);
aiChat.scrollTop = aiChat.scrollHeight;
}
} catch (error) {
console.error('Error connecting wallet:', error);
alert('Error connecting wallet. Please try again.');
}
}
// AI Chat functionality
function sendAIMessage() {
const input = document.getElementById('aiInput');
const message = input.value.trim();
if (!message) return;
const aiChat = document.getElementById('aiChat');
// Add user message
const userMsg = document.createElement('div');
userMsg.className = 'flex items-start justify-end';
userMsg.innerHTML = `
<div class="bg-indigo-600 p-3 rounded-lg max-w-xs">
<p class="text-sm">${message}</p>
</div>
`;
aiChat.appendChild(userMsg);
// Clear input
input.value = '';
// Add typing indicator
const typingIndicator = document.createElement('div');
typingIndicator.className = 'flex items-start';
typingIndicator.innerHTML = `
<div class="bg-slate-700 p-3 rounded-lg max-w-xs">
<p class="text-sm typing-indicator"></p>
</div>
`;
aiChat.appendChild(typingIndicator);
aiChat.scrollTop = aiChat.scrollHeight;
// Simulate AI response after delay
setTimeout(() => {
// Remove typing indicator
aiChat.removeChild(typingIndicator);
// Add AI response
const aiResponses = [
"I can help you change your environment to a cyberpunk theme. Would you like that?",
"Based on your NFT collection, I suggest adding the rainy window effect for a cozier atmosphere.",
"I notice you have the LoFi Cat NFT. Would you like to place it in your scene?",
"You can purchase new items from the Meta Market to customize your space further.",
"The current time is reflected in your scene. Would you like to adjust the day/night cycle?"
];
const randomResponse = aiResponses[Math.floor(Math.random() * aiResponses.length)];
const aiMsg = document.createElement('div');
aiMsg.className = 'flex items-start';
aiMsg.innerHTML = `
<div class="bg-slate-700 p-3 rounded-lg max-w-xs">
<p class="text-sm">${randomResponse}</p>
</div>
`;
aiChat.appendChild(aiMsg);
aiChat.scrollTop = aiChat.scrollHeight;
}, 1500);
}
// Weather toggle
document.getElementById('weatherToggle').addEventListener('click', function() {
const rainEffect = document.getElementById('rainEffect');
const weatherDisplay = document.getElementById('weatherDisplay');
if (rainEffect.classList.contains('hidden')) {
rainEffect.classList.remove('hidden');
weatherDisplay.textContent = 'Rainy, 65°F';
// Create rain drops
rainEffect.innerHTML = '';
for (let i = 0; i < 100; i++) {
const drop = document.createElement('div');
drop.className = 'rain-drop';
drop.style.left = `${Math.random() * 100}%`;
drop.style.animationDuration = `${0.5 + Math.random() * 0.5}s`;
drop.style.animationDelay = `${Math.random() * 2}s`;
rainEffect.appendChild(drop);
}
} else {
rainEffect.classList.add('hidden');
weatherDisplay.textContent = 'Sunny, 72°F';
}
});
// Day/Night toggle
document.getElementById('dayNightToggle').addEventListener('click', function() {
const scene = document.getElementById('lofiScene');
const windowView = document.getElementById('windowView');
const timeDisplay = document.getElementById('timeDisplay');
const icon = this.querySelector('i');
if (icon.classList.contains('fa-moon')) {
// Switch to night
icon.classList.remove('fa-moon');
icon.classList.add('fa-sun');
scene.style.background = 'linear-gradient(135deg, #0f172a 0%, #020617 100%)';
windowView.src = 'https://i.imgur.com/9zH3JqT_night.png';
timeDisplay.textContent = '9:30 PM';
} else {
// Switch to day
icon.classList.remove('fa-sun');
icon.classList.add('fa-moon');
scene.style.background = 'linear-gradient(135deg, #1e293b 0%, #0f172a 100%)';
windowView.src = 'https://i.imgur.com/9zH3JqT.png';
timeDisplay.textContent = '3:45 PM';
}
});
// Update time display
function updateTime() {
const now = new Date();
let hours = now.getHours();
const minutes = now.getMinutes().toString().padStart(2, '0');
const ampm = hours >= 12 ? 'PM' : 'AM';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
document.getElementById('timeDisplay').textContent = `${hours}:${minutes} ${ampm}`;
}
// Initialize
updateTime();
setInterval(updateTime, 60000); // Update every minute
// Allow pressing Enter in AI input
document.getElementById('aiInput').addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
sendAIMessage();
}
});
</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=Demo310/aura-demo" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>