Design a modern, stylish, animated web app interface with the following features:
Browse files🎨 General Style:
- Sleek, futuristic UI with smooth animations and glowing accent colors (neon blues/purples).
- Responsive layout that works on desktop and mobile.
- Rounded panels, glassmorphism or subtle gradients for a polished look.
- Smooth hover effects and transitions.
⚙️ Top Navigation:
- Place a small **settings icon (gear)** in the top-right corner.
- Clicking it opens a **settings panel** (slide-in or modal).
- Inside settings: allow user to **enter an API key** (from any API provider).
💬 Chat Section:
- At the bottom of the screen, create a **chat input bar**.
- Users can type text, press enter to send.
- Allow **image import** (upload button) so the AI can "see" pictures.
- AI can also **generate and return images** inline with chat.
📂 Tabs Above Chat Input (bottom-right corner):
- Add **3 buttons** that pop up panels:
1. **Stats Tab** → shows player stats (health, strength, magic, etc.).
2. **Inventory Tab** → shows collected items with icons/images.
3. **Adventure Log / Story Tab** → shows ongoing narrative or quest log.
🧩 Inventory System:
- AI can **create new items** dynamically:
- Each item has: **name, image, description, stat effects** (buffs/debuffs).
- Clicking an item in inventory **selects it** for use in chat.
- When selected, any text input is contextualized with that item.
🎮 Realism Toggle:
- Add a **toggle switch** labeled "Realistic Mode."
- When ON: AI only allows actions that are possible given:
- Current stats
- Items actually owned
- NPCs present in the current location
- When OFF: AI can allow more imaginative/fantastical actions.
🛠️ Developer Tab:
- Add a **Dev Tools button** (bottom-left or in settings).
- Opens a panel where user can:
- Create custom **items** (name, image, effects, location found).
- Create custom **NPCs** (name, description, location they appear).
- Create custom **locations** (name, description, connected NPCs/items).
- Edit stats manually if desired.
✨ Animations:
- Smooth panel slide-ins for tabs.
- Button hover glow effects.
- Chat messages fade in with slight motion.
- Inventory items pop with a bounce animation when added.
Overall Goal:
A **game-like AI chat interface** where the user can talk, manage stats/inventory, and expand the world with custom content. The design should feel immersive, fun, and interactive.
- README.md +8 -5
- index.html +401 -18
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: NeonLore RPG Chat Interface
|
| 3 |
+
colorFrom: gray
|
| 4 |
+
colorTo: yellow
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://deepsite.hf.co).
|
|
@@ -1,19 +1,402 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>NeonLore RPG</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
theme: {
|
| 12 |
+
extend: {
|
| 13 |
+
colors: {
|
| 14 |
+
primary: '#6366f1',
|
| 15 |
+
secondary: '#a855f7',
|
| 16 |
+
dark: '#1e1e2d',
|
| 17 |
+
darker: '#12121a'
|
| 18 |
+
},
|
| 19 |
+
animation: {
|
| 20 |
+
'fade-in': 'fadeIn 0.3s ease-in-out',
|
| 21 |
+
'slide-up': 'slideUp 0.3s ease-out',
|
| 22 |
+
'bounce-in': 'bounceIn 0.4s ease-out'
|
| 23 |
+
},
|
| 24 |
+
keyframes: {
|
| 25 |
+
fadeIn: {
|
| 26 |
+
'0%': { opacity: '0' },
|
| 27 |
+
'100%': { opacity: '1' }
|
| 28 |
+
},
|
| 29 |
+
slideUp: {
|
| 30 |
+
'0%': { transform: 'translateY(20px)', opacity: '0' },
|
| 31 |
+
'100%': { transform: 'translateY(0)', opacity: '1' }
|
| 32 |
+
},
|
| 33 |
+
bounceIn: {
|
| 34 |
+
'0%': { transform: 'scale(0.8)', opacity: '0' },
|
| 35 |
+
'50%': { transform: 'scale(1.1)', opacity: '1' },
|
| 36 |
+
'100%': { transform: 'scale(1)', opacity: '1' }
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
</script>
|
| 43 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 44 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 45 |
+
<script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js"></script>
|
| 46 |
+
<style>
|
| 47 |
+
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap');
|
| 48 |
+
body {
|
| 49 |
+
font-family: 'Inter', sans-serif;
|
| 50 |
+
background-color: #12121a;
|
| 51 |
+
color: white;
|
| 52 |
+
}
|
| 53 |
+
.font-orbitron {
|
| 54 |
+
font-family: 'Orbitron', sans-serif;
|
| 55 |
+
}
|
| 56 |
+
.glass-effect {
|
| 57 |
+
background: rgba(30, 30, 45, 0.7);
|
| 58 |
+
backdrop-filter: blur(10px);
|
| 59 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 60 |
+
}
|
| 61 |
+
.glow:hover {
|
| 62 |
+
filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.7));
|
| 63 |
+
}
|
| 64 |
+
.message-enter {
|
| 65 |
+
animation: fadeIn 0.3s, slideUp 0.3s;
|
| 66 |
+
}
|
| 67 |
+
.item-added {
|
| 68 |
+
animation: bounceIn 0.4s;
|
| 69 |
+
}
|
| 70 |
+
.switch {
|
| 71 |
+
position: relative;
|
| 72 |
+
display: inline-block;
|
| 73 |
+
width: 50px;
|
| 74 |
+
height: 24px;
|
| 75 |
+
}
|
| 76 |
+
.switch input {
|
| 77 |
+
opacity: 0;
|
| 78 |
+
width: 0;
|
| 79 |
+
height: 0;
|
| 80 |
+
}
|
| 81 |
+
.slider {
|
| 82 |
+
position: absolute;
|
| 83 |
+
cursor: pointer;
|
| 84 |
+
top: 0;
|
| 85 |
+
left: 0;
|
| 86 |
+
right: 0;
|
| 87 |
+
bottom: 0;
|
| 88 |
+
background-color: #4b5563;
|
| 89 |
+
transition: .4s;
|
| 90 |
+
border-radius: 24px;
|
| 91 |
+
}
|
| 92 |
+
.slider:before {
|
| 93 |
+
position: absolute;
|
| 94 |
+
content: "";
|
| 95 |
+
height: 16px;
|
| 96 |
+
width: 16px;
|
| 97 |
+
left: 4px;
|
| 98 |
+
bottom: 4px;
|
| 99 |
+
background-color: white;
|
| 100 |
+
transition: .4s;
|
| 101 |
+
border-radius: 50%;
|
| 102 |
+
}
|
| 103 |
+
input:checked + .slider {
|
| 104 |
+
background-color: #6366f1;
|
| 105 |
+
}
|
| 106 |
+
input:checked + .slider:before {
|
| 107 |
+
transform: translateX(26px);
|
| 108 |
+
}
|
| 109 |
+
.tab-content {
|
| 110 |
+
display: none;
|
| 111 |
+
}
|
| 112 |
+
.tab-content.active {
|
| 113 |
+
display: block;
|
| 114 |
+
}
|
| 115 |
+
</style>
|
| 116 |
+
</head>
|
| 117 |
+
<body class="min-h-screen flex flex-col">
|
| 118 |
+
<!-- Main Container -->
|
| 119 |
+
<div class="flex flex-col h-screen">
|
| 120 |
+
<!-- Top Navigation -->
|
| 121 |
+
<header class="flex justify-between items-center p-4 glass-effect border-b border-gray-800">
|
| 122 |
+
<div class="font-orbitron text-xl text-primary tracking-wider">NEONLORE</div>
|
| 123 |
+
<button id="settingsBtn" class="p-2 rounded-full glow hover:bg-gray-800 transition-all">
|
| 124 |
+
<i data-feather="settings"></i>
|
| 125 |
+
</button>
|
| 126 |
+
</header>
|
| 127 |
+
|
| 128 |
+
<!-- Main Content Area -->
|
| 129 |
+
<div class="flex-1 overflow-y-auto p-4 space-y-4" id="chatContainer">
|
| 130 |
+
<!-- Welcome Message -->
|
| 131 |
+
<div class="message-enter glass-effect rounded-lg p-4 max-w-3xl mx-auto">
|
| 132 |
+
<div class="font-bold text-primary mb-2">Game Master</div>
|
| 133 |
+
<p>Welcome to NeonLore! The neon-lit streets pulse with energy as you step into this cyber-fantasy world. What will you do first?</p>
|
| 134 |
+
</div>
|
| 135 |
+
</div>
|
| 136 |
+
|
| 137 |
+
<!-- Bottom Navigation -->
|
| 138 |
+
<div class="glass-effect border-t border-gray-800 p-4">
|
| 139 |
+
<!-- Tabs Navigation -->
|
| 140 |
+
<div class="flex justify-between mb-4">
|
| 141 |
+
<div class="flex space-x-2">
|
| 142 |
+
<button class="tab-btn glow px-4 py-2 rounded-lg bg-primary text-white" data-tab="stats">Stats</button>
|
| 143 |
+
<button class="tab-btn glow px-4 py-2 rounded-lg bg-gray-700 hover:bg-gray-600" data-tab="inventory">Inventory</button>
|
| 144 |
+
<button class="tab-btn glow px-4 py-2 rounded-lg bg-gray-700 hover:bg-gray-600" data-tab="log">Log</button>
|
| 145 |
+
</div>
|
| 146 |
+
<div class="flex items-center space-x-2">
|
| 147 |
+
<span class="text-sm">Realistic Mode</span>
|
| 148 |
+
<label class="switch">
|
| 149 |
+
<input type="checkbox" id="realismToggle">
|
| 150 |
+
<span class="slider"></span>
|
| 151 |
+
</label>
|
| 152 |
+
</div>
|
| 153 |
+
</div>
|
| 154 |
+
|
| 155 |
+
<!-- Tab Content -->
|
| 156 |
+
<div class="glass-effect rounded-lg p-4 mb-4 h-48 overflow-y-auto" id="tabContent">
|
| 157 |
+
<div id="stats" class="tab-content active">
|
| 158 |
+
<h3 class="font-orbitron text-lg mb-2">Character Stats</h3>
|
| 159 |
+
<div class="grid grid-cols-2 gap-2">
|
| 160 |
+
<div class="bg-gray-800 rounded p-2">
|
| 161 |
+
<div class="text-xs text-gray-400">Health</div>
|
| 162 |
+
<div class="text-primary">100/100</div>
|
| 163 |
+
</div>
|
| 164 |
+
<div class="bg-gray-800 rounded p-2">
|
| 165 |
+
<div class="text-xs text-gray-400">Strength</div>
|
| 166 |
+
<div class="text-primary">12</div>
|
| 167 |
+
</div>
|
| 168 |
+
<div class="bg-gray-800 rounded p-2">
|
| 169 |
+
<div class="text-xs text-gray-400">Magic</div>
|
| 170 |
+
<div class="text-primary">8</div>
|
| 171 |
+
</div>
|
| 172 |
+
<div class="bg-gray-800 rounded p-2">
|
| 173 |
+
<div class="text-xs text-gray-400">Agility</div>
|
| 174 |
+
<div class="text-primary">15</div>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
</div>
|
| 178 |
+
<div id="inventory" class="tab-content">
|
| 179 |
+
<h3 class="font-orbitron text-lg mb-2">Inventory</h3>
|
| 180 |
+
<div class="grid grid-cols-3 gap-2" id="inventoryItems">
|
| 181 |
+
<div class="item-added bg-gray-800 rounded p-2 text-center">
|
| 182 |
+
<img src="http://static.photos/technology/200x200/1" class="w-12 h-12 mx-auto rounded mb-1">
|
| 183 |
+
<div class="text-xs truncate">Neon Dagger</div>
|
| 184 |
+
</div>
|
| 185 |
+
</div>
|
| 186 |
+
</div>
|
| 187 |
+
<div id="log" class="tab-content">
|
| 188 |
+
<h3 class="font-orbitron text-lg mb-2">Adventure Log</h3>
|
| 189 |
+
<div class="text-sm space-y-1">
|
| 190 |
+
<p>> Entered the Neon District</p>
|
| 191 |
+
<p>> Received quest: Find the missing hacker</p>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
|
| 196 |
+
<!-- Chat Input -->
|
| 197 |
+
<div class="flex space-x-2">
|
| 198 |
+
<div class="flex-1 relative">
|
| 199 |
+
<input type="text" id="chatInput" placeholder="What will you do?"
|
| 200 |
+
class="w-full bg-gray-800 rounded-full py-3 px-4 pr-12 focus:outline-none focus:ring-2 focus:ring-primary">
|
| 201 |
+
<button id="imageUploadBtn" class="absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-primary">
|
| 202 |
+
<i data-feather="image"></i>
|
| 203 |
+
</button>
|
| 204 |
+
</div>
|
| 205 |
+
<button id="sendBtn" class="glow bg-primary rounded-full p-3 hover:bg-indigo-500 transition-all">
|
| 206 |
+
<i data-feather="send"></i>
|
| 207 |
+
</button>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
|
| 211 |
+
<!-- Dev Tools Button -->
|
| 212 |
+
<button id="devToolsBtn" class="fixed bottom-20 left-4 bg-gray-800 rounded-full p-3 glow hover:bg-gray-700">
|
| 213 |
+
<i data-feather="code"></i>
|
| 214 |
+
</button>
|
| 215 |
+
</div>
|
| 216 |
+
|
| 217 |
+
<!-- Settings Modal -->
|
| 218 |
+
<div id="settingsModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center">
|
| 219 |
+
<div class="glass-effect rounded-lg p-6 w-full max-w-md animate-slide-up">
|
| 220 |
+
<div class="flex justify-between items-center mb-4">
|
| 221 |
+
<h3 class="font-orbitron text-lg">Settings</h3>
|
| 222 |
+
<button id="closeSettingsBtn" class="text-gray-400 hover:text-white">
|
| 223 |
+
<i data-feather="x"></i>
|
| 224 |
+
</button>
|
| 225 |
+
</div>
|
| 226 |
+
<div class="space-y-4">
|
| 227 |
+
<div>
|
| 228 |
+
<label class="block text-sm mb-1">API Key</label>
|
| 229 |
+
<input type="text" class="w-full bg-gray-800 rounded p-2 focus:outline-none focus:ring-1 focus:ring-primary">
|
| 230 |
+
</div>
|
| 231 |
+
<button class="w-full bg-primary rounded py-2 hover:bg-indigo-500 transition-all">Save Settings</button>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
</div>
|
| 235 |
+
|
| 236 |
+
<!-- Dev Tools Modal -->
|
| 237 |
+
<div id="devToolsModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center">
|
| 238 |
+
<div class="glass-effect rounded-lg p-6 w-full max-w-2xl max-h-[80vh] overflow-y-auto animate-slide-up">
|
| 239 |
+
<div class="flex justify-between items-center mb-4">
|
| 240 |
+
<h3 class="font-orbitron text-lg">Developer Tools</h3>
|
| 241 |
+
<button id="closeDevToolsBtn" class="text-gray-400 hover:text-white">
|
| 242 |
+
<i data-feather="x"></i>
|
| 243 |
+
</button>
|
| 244 |
+
</div>
|
| 245 |
+
<div class="space-y-6">
|
| 246 |
+
<!-- Item Creator -->
|
| 247 |
+
<div>
|
| 248 |
+
<h4 class="font-medium mb-2">Create Item</h4>
|
| 249 |
+
<div class="space-y-3">
|
| 250 |
+
<input type="text" placeholder="Item Name" class="w-full bg-gray-800 rounded p-2">
|
| 251 |
+
<input type="text" placeholder="Description" class="w-full bg-gray-800 rounded p-2">
|
| 252 |
+
<div class="grid grid-cols-3 gap-2">
|
| 253 |
+
<input type="text" placeholder="Health Effect" class="bg-gray-800 rounded p-2">
|
| 254 |
+
<input type="text" placeholder="Strength Effect" class="bg-gray-800 rounded p-2">
|
| 255 |
+
<input type="text" placeholder="Magic Effect" class="bg-gray-800 rounded p-2">
|
| 256 |
+
</div>
|
| 257 |
+
<button class="bg-primary rounded py-2 px-4 hover:bg-indigo-500">Add Item</button>
|
| 258 |
+
</div>
|
| 259 |
+
</div>
|
| 260 |
+
|
| 261 |
+
<!-- NPC Creator -->
|
| 262 |
+
<div>
|
| 263 |
+
<h4 class="font-medium mb-2">Create NPC</h4>
|
| 264 |
+
<div class="space-y-3">
|
| 265 |
+
<input type="text" placeholder="NPC Name" class="w-full bg-gray-800 rounded p-2">
|
| 266 |
+
<textarea placeholder="Description" class="w-full bg-gray-800 rounded p-2 h-20"></textarea>
|
| 267 |
+
<input type="text" placeholder="Location" class="w-full bg-gray-800 rounded p-2">
|
| 268 |
+
<button class="bg-primary rounded py-2 px-4 hover:bg-indigo-500">Add NPC</button>
|
| 269 |
+
</div>
|
| 270 |
+
</div>
|
| 271 |
+
|
| 272 |
+
<!-- Location Creator -->
|
| 273 |
+
<div>
|
| 274 |
+
<h4 class="font-medium mb-2">Create Location</h4>
|
| 275 |
+
<div class="space-y-3">
|
| 276 |
+
<input type="text" placeholder="Location Name" class="w-full bg-gray-800 rounded p-2">
|
| 277 |
+
<textarea placeholder="Description" class="w-full bg-gray-800 rounded p-2 h-20"></textarea>
|
| 278 |
+
<button class="bg-primary rounded py-2 px-4 hover:bg-indigo-500">Add Location</button>
|
| 279 |
+
</div>
|
| 280 |
+
</div>
|
| 281 |
+
</div>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<script>
|
| 286 |
+
// Initialize Feather Icons
|
| 287 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 288 |
+
feather.replace();
|
| 289 |
+
|
| 290 |
+
// Tab Switching
|
| 291 |
+
const tabBtns = document.querySelectorAll('.tab-btn');
|
| 292 |
+
const tabContents = document.querySelectorAll('.tab-content');
|
| 293 |
+
|
| 294 |
+
tabBtns.forEach(btn => {
|
| 295 |
+
btn.addEventListener('click', function() {
|
| 296 |
+
const tabId = this.getAttribute('data-tab');
|
| 297 |
+
|
| 298 |
+
// Update active tab button
|
| 299 |
+
tabBtns.forEach(b => b.classList.remove('bg-primary', 'text-white'));
|
| 300 |
+
tabBtns.forEach(b => b.classList.add('bg-gray-700', 'hover:bg-gray-600'));
|
| 301 |
+
this.classList.remove('bg-gray-700', 'hover:bg-gray-600');
|
| 302 |
+
this.classList.add('bg-primary', 'text-white');
|
| 303 |
+
|
| 304 |
+
// Update active tab content
|
| 305 |
+
tabContents.forEach(content => content.classList.remove('active'));
|
| 306 |
+
document.getElementById(tabId).classList.add('active');
|
| 307 |
+
});
|
| 308 |
+
});
|
| 309 |
+
|
| 310 |
+
// Settings Modal
|
| 311 |
+
const settingsBtn = document.getElementById('settingsBtn');
|
| 312 |
+
const closeSettingsBtn = document.getElementById('closeSettingsBtn');
|
| 313 |
+
const settingsModal = document.getElementById('settingsModal');
|
| 314 |
+
|
| 315 |
+
settingsBtn.addEventListener('click', function() {
|
| 316 |
+
settingsModal.classList.remove('hidden');
|
| 317 |
+
});
|
| 318 |
+
|
| 319 |
+
closeSettingsBtn.addEventListener('click', function() {
|
| 320 |
+
settingsModal.classList.add('hidden');
|
| 321 |
+
});
|
| 322 |
+
|
| 323 |
+
// Dev Tools Modal
|
| 324 |
+
const devToolsBtn = document.getElementById('devToolsBtn');
|
| 325 |
+
const closeDevToolsBtn = document.getElementById('closeDevToolsBtn');
|
| 326 |
+
const devToolsModal = document.getElementById('devToolsModal');
|
| 327 |
+
|
| 328 |
+
devToolsBtn.addEventListener('click', function() {
|
| 329 |
+
devToolsModal.classList.remove('hidden');
|
| 330 |
+
});
|
| 331 |
+
|
| 332 |
+
closeDevToolsBtn.addEventListener('click', function() {
|
| 333 |
+
devToolsModal.classList.add('hidden');
|
| 334 |
+
});
|
| 335 |
+
|
| 336 |
+
// Chat Functionality
|
| 337 |
+
const chatInput = document.getElementById('chatInput');
|
| 338 |
+
const sendBtn = document.getElementById('sendBtn');
|
| 339 |
+
const chatContainer = document.getElementById('chatContainer');
|
| 340 |
+
|
| 341 |
+
function addMessage(message, isUser = false) {
|
| 342 |
+
const messageDiv = document.createElement('div');
|
| 343 |
+
messageDiv.className = `message-enter glass-effect rounded-lg p-4 max-w-3xl mx-auto ${isUser ? 'ml-auto bg-primary bg-opacity-20' : ''}`;
|
| 344 |
+
|
| 345 |
+
if (isUser) {
|
| 346 |
+
messageDiv.innerHTML = `<div class="font-bold text-right mb-2">You</div><p class="text-right">${message}</p>`;
|
| 347 |
+
} else {
|
| 348 |
+
messageDiv.innerHTML = `<div class="font-bold text-primary mb-2">Game Master</div><p>${message}</p>`;
|
| 349 |
+
}
|
| 350 |
+
|
| 351 |
+
chatContainer.appendChild(messageDiv);
|
| 352 |
+
chatContainer.scrollTop = chatContainer.scrollHeight;
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
function sendMessage() {
|
| 356 |
+
const message = chatInput.value.trim();
|
| 357 |
+
if (message) {
|
| 358 |
+
addMessage(message, true);
|
| 359 |
+
chatInput.value = '';
|
| 360 |
+
|
| 361 |
+
// Simulate AI response (in a real app, this would be an API call)
|
| 362 |
+
setTimeout(() => {
|
| 363 |
+
const responses = [
|
| 364 |
+
"The neon lights flicker as you consider your next move.",
|
| 365 |
+
"A mysterious figure watches you from the shadows.",
|
| 366 |
+
"Your actions ripple through the digital ether.",
|
| 367 |
+
"The city pulses with hidden possibilities."
|
| 368 |
+
];
|
| 369 |
+
const randomResponse = responses[Math.floor(Math.random() * responses.length)];
|
| 370 |
+
addMessage(randomResponse);
|
| 371 |
+
}, 1000);
|
| 372 |
+
}
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
sendBtn.addEventListener('click', sendMessage);
|
| 376 |
+
chatInput.addEventListener('keypress', function(e) {
|
| 377 |
+
if (e.key === 'Enter') {
|
| 378 |
+
sendMessage();
|
| 379 |
+
}
|
| 380 |
+
});
|
| 381 |
+
|
| 382 |
+
// Image Upload
|
| 383 |
+
const imageUploadBtn = document.getElementById('imageUploadBtn');
|
| 384 |
+
imageUploadBtn.addEventListener('click', function() {
|
| 385 |
+
alert("Image upload functionality would be implemented here in a production app");
|
| 386 |
+
});
|
| 387 |
+
|
| 388 |
+
// Add sample inventory item
|
| 389 |
+
setTimeout(() => {
|
| 390 |
+
const inventoryItems = document.getElementById('inventoryItems');
|
| 391 |
+
const newItem = document.createElement('div');
|
| 392 |
+
newItem.className = 'item-added bg-gray-800 rounded p-2 text-center';
|
| 393 |
+
newItem.innerHTML = `
|
| 394 |
+
<img src="http://static.photos/technology/200x200/2" class="w-12 h-12 mx-auto rounded mb-1">
|
| 395 |
+
<div class="text-xs truncate">Cyber Key</div>
|
| 396 |
+
`;
|
| 397 |
+
inventoryItems.appendChild(newItem);
|
| 398 |
+
}, 2000);
|
| 399 |
+
});
|
| 400 |
+
</script>
|
| 401 |
+
</body>
|
| 402 |
</html>
|