Spaces:
Sleeping
Sleeping
Create index.html
Browse files- index.html +100 -0
index.html
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="es">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>NEUROCORE V10.3 — MICTLÁN</title>
|
| 7 |
+
<script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
|
| 8 |
+
<script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
|
| 9 |
+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
| 10 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 11 |
+
<link href="https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=JetBrains+Mono&display=swap" rel="stylesheet">
|
| 12 |
+
<style>
|
| 13 |
+
:root { --gold: #D4AF37; --obsidian: #050505; }
|
| 14 |
+
body { background: #000; color: #e0e0e0; font-family: 'JetBrains Mono', monospace; overflow: hidden; }
|
| 15 |
+
.mictlan-header { border-bottom: 2px solid var(--gold); background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); }
|
| 16 |
+
.gold-glow { text-shadow: 0 0 10px var(--gold); }
|
| 17 |
+
.card-msg { background: rgba(255,255,255,0.03); border: 1px solid rgba(212,175,55,0.2); border-left: 3px solid var(--gold); }
|
| 18 |
+
.btn-ritual { background: var(--gold); color: #000; font-family: 'Cinzel Decorative', serif; font-weight: bold; transition: 0.3s; }
|
| 19 |
+
.btn-ritual:hover { background: #FFD700; transform: scale(1.05); box-shadow: 0 0 20px var(--gold); }
|
| 20 |
+
#batuto-sig { position: absolute; top: 10px; left: 10px; font-family: 'Cinzel Decorative'; color: var(--gold); font-size: 14px; z-index: 50; pointer-events: none; }
|
| 21 |
+
</style>
|
| 22 |
+
</head>
|
| 23 |
+
<body>
|
| 24 |
+
<div id="batuto-sig">BATUTO-ART</div>
|
| 25 |
+
<div id="root"></div>
|
| 26 |
+
|
| 27 |
+
<script type="text/babel">
|
| 28 |
+
const { useState, useEffect, useRef } = React;
|
| 29 |
+
const MODELS = ["DeepSeek-R1-0528", "DeepSeek-V3.1-cb", "Llama-4-Maverick-17B-128E-Instruct", "Qwen3-235B"];
|
| 30 |
+
|
| 31 |
+
function App() {
|
| 32 |
+
const [tab, setTab] = useState('chat');
|
| 33 |
+
const [chat, setChat] = useState([{ r: 'asst', t: 'El Mictlán te recibe, Rey BATUTO. ¿Qué visión invocamos hoy?' }]);
|
| 34 |
+
const [msg, setMsg] = useState('');
|
| 35 |
+
const [loading, setLoading] = useState(false);
|
| 36 |
+
const scrollRef = useRef(null);
|
| 37 |
+
|
| 38 |
+
useEffect(() => { scrollRef.current?.scrollIntoView({ behavior: 'smooth' }); }, [chat]);
|
| 39 |
+
|
| 40 |
+
const onSend = async () => {
|
| 41 |
+
if(!msg) return;
|
| 42 |
+
const userMsg = msg; setMsg('');
|
| 43 |
+
setChat(prev => [...prev, { r: 'user', t: userMsg }]);
|
| 44 |
+
setLoading(true);
|
| 45 |
+
try {
|
| 46 |
+
const res = await fetch('/api/chat', {
|
| 47 |
+
method: 'POST',
|
| 48 |
+
headers: {'Content-Type': 'application/json'},
|
| 49 |
+
body: JSON.stringify({ message: userMsg, model: MODELS[0] })
|
| 50 |
+
});
|
| 51 |
+
const data = await res.json();
|
| 52 |
+
setChat(prev => [...prev, { r: 'asst', t: data.reply }]);
|
| 53 |
+
} catch { setChat(prev => [...prev, { r: 'asst', t: 'Error en el portal.' }]); }
|
| 54 |
+
setLoading(false);
|
| 55 |
+
};
|
| 56 |
+
|
| 57 |
+
return (
|
| 58 |
+
<div className="h-screen flex flex-col max-w-md mx-auto border-x border-[#D4AF3733]">
|
| 59 |
+
<header className="p-6 pt-12 mictlan-header text-center">
|
| 60 |
+
<h1 className="text-sm tracking-[0.5em] text-[#D4AF37] gold-glow font-bold uppercase">Neurocore V10.3</h1>
|
| 61 |
+
</header>
|
| 62 |
+
|
| 63 |
+
<nav className="flex bg-black border-b border-[#D4AF3722]">
|
| 64 |
+
{['chat', 'vision'].map(t => (
|
| 65 |
+
<button key={t} onClick={() => setTab(t)} className={`flex-1 py-4 text-[10px] uppercase tracking-widest ${tab === t ? 'text-[#D4AF37] border-b-2 border-[#D4AF37]' : 'opacity-40'}`}>{t}</button>
|
| 66 |
+
))}
|
| 67 |
+
</nav>
|
| 68 |
+
|
| 69 |
+
<main className="flex-1 overflow-y-auto p-4 space-y-4">
|
| 70 |
+
{tab === 'chat' ? (
|
| 71 |
+
<>
|
| 72 |
+
{chat.map((m, i) => (
|
| 73 |
+
<div key={i} className={`p-4 rounded-xl card-msg ${m.r === 'user' ? 'ml-8' : 'mr-8'}`}>
|
| 74 |
+
<p className="text-xs leading-relaxed">{m.t}</p>
|
| 75 |
+
</div>
|
| 76 |
+
))}
|
| 77 |
+
<div ref={scrollRef} />
|
| 78 |
+
</>
|
| 79 |
+
) : (
|
| 80 |
+
<div className="text-center space-y-6 pt-10">
|
| 81 |
+
<p className="text-[10px] uppercase tracking-widest opacity-50">Espejo de Obsidiana</p>
|
| 82 |
+
<div className="aspect-square bg-white/5 rounded-3xl border border-dashed border-[#D4AF3744] flex items-center justify-center italic text-xs opacity-20">Invocando visiones...</div>
|
| 83 |
+
<button className="w-full py-4 btn-ritual rounded-2xl">Manifestar Arte</button>
|
| 84 |
+
</div>
|
| 85 |
+
)}
|
| 86 |
+
</main>
|
| 87 |
+
|
| 88 |
+
{tab === 'chat' && (
|
| 89 |
+
<footer className="p-4 bg-black flex gap-2">
|
| 90 |
+
<input value={msg} onChange={e => setMsg(e.target.value)} onKeyDown={e => e.key === 'Enter' && onSend()} className="flex-1 bg-white/5 border border-[#D4AF3733] rounded-xl px-4 text-xs outline-none focus:border-[#D4AF37]" placeholder="Escribe al inframundo..." />
|
| 91 |
+
<button onClick={onSend} className="w-12 h-12 btn-ritual rounded-xl">💀</button>
|
| 92 |
+
</footer>
|
| 93 |
+
)}
|
| 94 |
+
</div>
|
| 95 |
+
);
|
| 96 |
+
}
|
| 97 |
+
ReactDOM.createRoot(document.getElementById("root")).render(<App />);
|
| 98 |
+
</script>
|
| 99 |
+
</body>
|
| 100 |
+
</html>
|