- Auth movida a NGINX (Basic Auth en htpasswd) para que fetch() del browser incluya credenciales automáticamente — resuelve categorías sin cargar y POST fallido - Tailwind CDN descargado al build del Docker y servido localmente — elimina dependencia externa en cada carga de página - Soporte de teclado físico en add.html (números, punto/coma, Backspace, Enter) - Layout centrado en desktop con max-w-md mx-auto en las tres páginas - Eliminada imagen decorativa externa y links de fonts duplicados Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
180 lines
10 KiB
HTML
180 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html class="light" lang="es"><head>
|
|
<meta charset="utf-8"/>
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
|
<title>Nuevo Movimiento - Sanctuary</title>
|
|
<script src="js/tailwind.cdn.js"></script>
|
|
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap" rel="stylesheet"/>
|
|
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
|
|
<script id="tailwind-config">
|
|
tailwind.config = {
|
|
darkMode: "class",
|
|
theme: {
|
|
extend: {
|
|
"colors": {
|
|
"surface-container-high": "#e6e9e8",
|
|
"on-secondary": "#ffffff",
|
|
"on-primary-fixed-variant": "#004f4f",
|
|
"on-primary-container": "#97e7e6",
|
|
"on-background": "#191c1c",
|
|
"secondary-fixed-dim": "#b4ccbd",
|
|
"inverse-surface": "#2e3131",
|
|
"surface-container": "#eceeed",
|
|
"surface-tint": "#006a6a",
|
|
"outline-variant": "#bec9c8",
|
|
"on-surface": "#191c1c",
|
|
"on-primary": "#ffffff",
|
|
"tertiary": "#264b5c",
|
|
"primary-fixed-dim": "#84d4d3",
|
|
"error-container": "#ffdad6",
|
|
"surface-bright": "#f8faf9",
|
|
"tertiary-fixed-dim": "#a7cce1",
|
|
"on-error": "#ffffff",
|
|
"outline": "#6e7979",
|
|
"background": "#f8faf9",
|
|
"secondary-fixed": "#d0e8d9",
|
|
"primary-fixed": "#a0f0f0",
|
|
"on-secondary-container": "#51685b",
|
|
"primary": "#005050",
|
|
"on-primary-fixed": "#002020",
|
|
"surface-container-highest": "#e1e3e2",
|
|
"surface": "#f8faf9",
|
|
"on-tertiary-container": "#b9def3",
|
|
"inverse-primary": "#84d4d3",
|
|
"on-tertiary-fixed": "#001e2b",
|
|
"on-surface-variant": "#3e4948",
|
|
"error": "#ba1a1a",
|
|
"surface-variant": "#e1e3e2",
|
|
"on-error-container": "#93000a",
|
|
"inverse-on-surface": "#eff1f0",
|
|
"tertiary-fixed": "#c2e8fd",
|
|
"tertiary-container": "#3f6375",
|
|
"secondary": "#4d6357",
|
|
"on-secondary-fixed-variant": "#364b40",
|
|
"on-secondary-fixed": "#0a1f16",
|
|
"secondary-container": "#cde6d6",
|
|
"on-tertiary": "#ffffff",
|
|
"surface-dim": "#d8dada",
|
|
"primary-container": "#006a6a",
|
|
"on-tertiary-fixed-variant": "#264b5c",
|
|
"surface-container-lowest": "#ffffff",
|
|
"surface-container-low": "#f2f4f3"
|
|
},
|
|
"borderRadius": {
|
|
"DEFAULT": "0.25rem",
|
|
"lg": "0.5rem",
|
|
"xl": "0.75rem",
|
|
"full": "9999px"
|
|
},
|
|
"fontFamily": {
|
|
"headline": ["Manrope"],
|
|
"body": ["Manrope"],
|
|
"label": ["Manrope"]
|
|
}
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
<style>
|
|
body { font-family: 'Manrope', sans-serif; }
|
|
.material-symbols-outlined {
|
|
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
|
}
|
|
.numpad-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 1rem;
|
|
}
|
|
.prosperity-glow {
|
|
background: radial-gradient(circle at center, rgba(160, 240, 240, 0.15) 0%, transparent 70%);
|
|
}
|
|
</style>
|
|
<style>
|
|
body {
|
|
min-height: max(884px, 100dvh);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="bg-background text-on-background min-h-screen flex flex-col">
|
|
<div class="max-w-md mx-auto w-full flex flex-col flex-1 relative">
|
|
<!-- Top AppBar - Transactional Context (Shell Suppressed per mandate) -->
|
|
<header class="bg-[#f8faf9] dark:bg-[#191c1c] w-full top-0 px-6 py-4 flex justify-between items-center bg-transparent">
|
|
<div class="flex items-center gap-4">
|
|
<button class="hover:opacity-80 transition-opacity p-2 -ml-2" onclick="window.location.href='index.html'">
|
|
<span class="material-symbols-outlined text-primary dark:text-[#a0f0f0]" data-icon="chevron_left">chevron_left</span>
|
|
</button>
|
|
<h1 class="font-['Manrope'] headline-sm text-[#191c1c] dark:text-[#f8faf9] font-bold">Nuevo Movimiento</h1>
|
|
</div>
|
|
<div class="w-10"></div> <!-- Spacer for center-ish balance -->
|
|
</header>
|
|
<main class="flex-1 px-6 pb-32 max-w-md mx-auto w-full overflow-y-auto">
|
|
<!-- Type Selector (Segmented Control) -->
|
|
<div class="mt-4 p-1.5 bg-surface-container-low rounded-xl flex items-center mb-8" id="ui-tipo-selector">
|
|
<button id="btn-gasto" data-tipo="gasto" class="flex-1 py-2.5 text-sm font-bold bg-surface-container-lowest text-primary rounded-lg shadow-sm">Gasto</button>
|
|
<button id="btn-ingreso" data-tipo="ingreso" class="flex-1 py-2.5 text-sm font-semibold text-on-surface-variant hover:opacity-80 transition-opacity">Ingreso</button>
|
|
</div>
|
|
<!-- Hero Amount Input -->
|
|
<div class="relative text-center mb-10 prosperity-glow py-8 rounded-[2rem]">
|
|
<label class="block text-xs uppercase tracking-[0.15em] font-bold text-on-surface-variant mb-2">Monto del Movimiento</label>
|
|
<div class="flex items-baseline justify-center gap-1">
|
|
<span class="text-3xl font-light text-on-surface-variant">$</span>
|
|
<span id="ui-monto" class="text-6xl font-extrabold tracking-tight text-primary">0</span>
|
|
</div>
|
|
</div>
|
|
<!-- Modern Form Fields Grid -->
|
|
<div class="space-y-6">
|
|
<!-- Category Dropdown -->
|
|
<div class="space-y-2">
|
|
<label class="text-[11px] uppercase tracking-widest font-bold text-on-surface-variant px-1">Categoría</label>
|
|
<select id="ui-categoria" class="bg-surface-container-lowest p-4 rounded-xl w-full font-bold text-on-surface focus:outline-none">
|
|
<option value="">Cargando...</option>
|
|
</select>
|
|
</div>
|
|
<!-- Date & Notes Grid -->
|
|
<div class="grid grid-cols-2 gap-4">
|
|
<div class="space-y-2">
|
|
<label class="text-[11px] uppercase tracking-widest font-bold text-on-surface-variant px-1">Fecha</label>
|
|
<div class="bg-surface-container-highest/40 p-4 rounded-xl flex items-center gap-3">
|
|
<span class="material-symbols-outlined text-primary text-sm" data-icon="calendar_today">calendar_today</span>
|
|
<input type="date" id="ui-fecha" class="bg-transparent text-sm font-bold w-full focus:outline-none"/>
|
|
</div>
|
|
</div>
|
|
<div class="space-y-2">
|
|
<label class="text-[11px] uppercase tracking-widest font-bold text-on-surface-variant px-1">Notas</label>
|
|
<div class="bg-surface-container-highest/40 p-4 rounded-xl flex items-center gap-3">
|
|
<span class="material-symbols-outlined text-outline text-sm" data-icon="edit_note">edit_note</span>
|
|
<input type="text" id="ui-notas" placeholder="Opcional..." class="bg-transparent text-sm font-medium w-full focus:outline-none placeholder-outline"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Integrated Custom Numpad -->
|
|
<div id="ui-numpad" class="mt-12 numpad-grid">
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">1</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">2</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">3</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">4</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">5</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">6</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">7</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">8</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">9</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">.</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-2xl font-semibold text-on-surface hover:bg-surface-container-high transition-colors">0</button>
|
|
<button class="h-16 rounded-xl flex items-center justify-center text-on-surface hover:bg-surface-container-high transition-colors">
|
|
<span class="material-symbols-outlined" data-icon="backspace">backspace</span>
|
|
</button>
|
|
</div>
|
|
</main>
|
|
<!-- Bottom Action Area -->
|
|
<div class="fixed bottom-0 left-0 w-full p-6 bg-gradient-to-t from-background via-background/95 to-transparent">
|
|
<button id="btn-save" class="w-full h-16 bg-gradient-to-br from-[#005050] to-[#006a6a] text-white rounded-xl font-bold text-lg shadow-[0px_12px_32px_rgba(0,80,80,0.2)] active:scale-[0.98] transition-transform flex items-center justify-center gap-3">
|
|
<span>Guardar Movimiento</span>
|
|
<span class="material-symbols-outlined" data-icon="check_circle">check_circle</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<script src="js/ui.js"></script>
|
|
<script src="js/add.js"></script>
|
|
</body></html> |