código partido en src/: la app no cambia ni un byte

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YA7U5k2DMU8ZdD6MztyVYS
This commit is contained in:
2026-10-20 04:49:54 +02:00
co-authored by Claude Opus 5.5
parent 104d83087b
commit b486f04427
58 changed files with 11525 additions and 11421 deletions
+53
View File
@@ -0,0 +1,53 @@
// Cada tema trae sus colores Y su letra. La letra es lo que da carácter:
// con solo cambiar colores, todos los temas parecían el mismo.
// sans → texto corrido mono → datos, cifras, etiquetas
// serif → títulos (si el tema los quiere con serifa; si no, null)
// Las fuentes nuevas (Lora, Source Serif 4, Courier Prime) se sirven desde
// el propio nodo como las IBM Plex — ver instalar-fuentes.sh. Si aún no
// están instaladas, cada pila cae en una letra parecida del sistema.
const LETRA_TERMINAL = { sans:"'IBM Plex Sans','Helvetica Neue',sans-serif", mono:"monospace", serif:null, italica:false };
const THEMES = {
cypherpunk: {
bg:"#05080d", bgCard:"#090e16", bgHover:"#0d1520",
border:"#131d2b", borderBright:"#1e2e42",
green:"#00e87a", greenMuted:"rgba(0,232,122,0.08)",
amber:"#f5a623", amberMuted:"rgba(245,166,35,0.08)",
purple:"#b06ef3", purpleMuted:"rgba(176,110,243,0.08)",
blue:"#41c8f5", blueMuted:"rgba(65,200,245,0.08)",
red:"#f56565", redMuted:"rgba(245,101,101,0.08)",
t1:"#dde6f0", t2:"#6b88a8", t3:"#3a4d63",
headerBg:"rgba(5,8,13,0.93)",
...LETRA_TERMINAL,
},
amber: {
bg:"#0b0802", bgCard:"#110c04", bgHover:"#181107", border:"#2b1f0b", borderBright:"#3f2e12", green:"#ffb000", greenMuted:"rgba(255,176,0,0.09)", amber:"#ff8f1f", amberMuted:"rgba(255,143,31,0.09)", purple:"#ffc857", purpleMuted:"rgba(255,200,87,0.09)", blue:"#e0a64a", blueMuted:"rgba(224,166,74,0.09)", red:"#ff5533", redMuted:"rgba(255,85,51,0.09)", t1:"#ffd48a", t2:"#b8893f", t3:"#6e5226", headerBg:"rgba(11,8,2,0.95)",
sans:"monospace", mono:"monospace", serif:null, italica:false, // fósforo: todo en terminal
},
piedra: {
bg:"#14110f", bgCard:"#1b1714", bgHover:"#231e1a", border:"#2c2520", borderBright:"#3d342d", green:"#93b083", greenMuted:"rgba(147,176,131,0.09)", amber:"#d6a145", amberMuted:"rgba(214,161,69,0.09)", purple:"#cf6a57", purpleMuted:"rgba(207,106,87,0.09)", blue:"#c8b79a", blueMuted:"rgba(200,183,154,0.09)", red:"#e0533f", redMuted:"rgba(224,83,63,0.09)", t1:"#eee6da", t2:"#a59886", t3:"#6c6157", headerBg:"rgba(20,17,15,0.95)",
sans:"'IBM Plex Sans','Helvetica Neue',sans-serif", mono:"monospace", serif:"'Lora',Charter,Georgia,serif", italica:false
},
archivo: {
bg:"#f2ede3", bgCard:"#f9f6ef", bgHover:"#ebe5d8", border:"#dcd3c1", borderBright:"#c7bca6", green:"#2e5a43", greenMuted:"rgba(46,90,67,0.09)", amber:"#946510", amberMuted:"rgba(148,101,16,0.09)", purple:"#1e2a46", purpleMuted:"rgba(30,42,70,0.09)", blue:"#3a5878", blueMuted:"rgba(58,88,120,0.09)", red:"#a5221b", redMuted:"rgba(165,34,27,0.09)", t1:"#1c1a17", t2:"#5b544a", t3:"#9b9282", headerBg:"rgba(242,237,227,0.96)",
sans:"'Source Serif 4',Charter,'Bitstream Charter',Georgia,serif", mono:"'Courier Prime','Courier 10 Pitch','Courier New',monospace", serif:"'Source Serif 4',Charter,'Bitstream Charter',Georgia,serif", italica:true
},
};
const THEME_META = [
{ id:"cypherpunk", label:"Cypherpunk", dot:"#00e87a" },
{ id:"amber", label:"Ámbar", dot:"#ffb000" },
{ id:"piedra", label:"Piedra", dot:"#cf6a57" },
{ id:"archivo", label:"Archivo (claro)", dot:"#f2ede3" },
];
// Slate y Claro se retiraron en la v1.20: quien los tuviera guardados
// pasa al más parecido en vez de quedarse con un tema que ya no existe.
const TEMA_RETIRADO = { slate:"cypherpunk", light:"archivo" };
let C = THEMES.cypherpunk;
const setTheme = id => {
C = THEMES[id] || THEMES.cypherpunk;
// Lo que no se puede tocar desde los estilos en línea (esquinas, fondo
// de la página al estirar, brillos) va por CSS según data-tema.
try { document.body.dataset.tema = THEMES[id] ? id : "cypherpunk"; document.body.style.background = C.bg; } catch {}
};