Gastos01
This commit is contained in:
parent
66eef0c3c2
commit
a288b28941
102
add_expense.php
Normal file
102
add_expense.php
Normal file
@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Añadir Gasto</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css">
|
||||
</head>
|
||||
<body style="background-color: #F3F4F6;">
|
||||
|
||||
<div class="container mt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-8">
|
||||
<div class="card shadow-sm" style="border-radius: 1rem;">
|
||||
<div class="card-body p-4 p-md-5">
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<a href="index.php" class="btn btn-light me-3"><i class="bi bi-arrow-left"></i></a>
|
||||
<h2 class="mb-0">Añadir Nuevo Gasto</h2>
|
||||
</div>
|
||||
<form id="add-expense-form">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label for="expense-date" class="form-label">Fecha</label>
|
||||
<input type="date" class="form-control" id="expense-date" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="expense-title" class="form-label">Título</label>
|
||||
<input type="text" class="form-control" id="expense-title" placeholder="Ej: Cena con amigos" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="expense-category" class="form-label">Categoría</label>
|
||||
<select id="expense-category" class="form-select" required>
|
||||
<option selected disabled value="">Elegir...</option>
|
||||
<option>Comida</option>
|
||||
<option>Transporte</option>
|
||||
<option>Ocio</option>
|
||||
<option>Hogar</option>
|
||||
<option>Otros</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="expense-payer" class="form-label">Pagado por</label>
|
||||
<select id="expense-payer" class="form-select" required>
|
||||
<option selected disabled value="">Elegir...</option>
|
||||
<option>Usuario 1</option>
|
||||
<option>Usuario 2</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="expense-amount" class="form-label">Monto</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">$</span>
|
||||
<input type="number" class="form-control" id="expense-amount" placeholder="100.00" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="expense-currency" class="form-label">Moneda</label>
|
||||
<select id="expense-currency" class="form-select" required>
|
||||
<option selected>USD</option>
|
||||
<option>EUR</option>
|
||||
<option>ARS</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label class="form-label">División del Gasto</label>
|
||||
<div class="d-flex justify-content-around">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="split-type" id="split-equal" checked>
|
||||
<label class="form-check-label" for="split-equal">Equitativa (50/50)</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="split-type" id="split-exact">
|
||||
<label class="form-check-label" for="split-exact">Monto Exacto</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label for="formFile" class="form-label">Adjuntar Recibo</label>
|
||||
<input class="form-control" type="file" id="formFile">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-4">
|
||||
|
||||
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
|
||||
<button type="button" class="btn btn-light me-md-2" onclick="window.location.href='index.php'">Cancelar</button>
|
||||
<button type="submit" class="btn btn-primary">Guardar Gasto</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
18
assets/css/custom.css
Normal file
18
assets/css/custom.css
Normal file
@ -0,0 +1,18 @@
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #4F46E5;
|
||||
border-color: #4F46E5;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #4338CA;
|
||||
border-color: #4338CA;
|
||||
}
|
||||
|
||||
.form-control:focus, .form-select:focus {
|
||||
border-color: #4F46E5;
|
||||
box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
|
||||
}
|
||||
7
assets/js/main.js
Normal file
7
assets/js/main.js
Normal file
@ -0,0 +1,7 @@
|
||||
document.getElementById('add-expense-form').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
alert('Gasto añadido (simulación)!');
|
||||
// Here you would normally send the data to the server
|
||||
// For now, we just reset the form
|
||||
this.reset();
|
||||
});
|
||||
121
index.php
121
index.php
@ -32,115 +32,38 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
<!-- Twitter image -->
|
||||
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<?php endif; ?>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background-color: #F3F4F6;
|
||||
color: #111827;
|
||||
}
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
.btn-primary {
|
||||
background-color: #4F46E5;
|
||||
border-color: #4F46E5;
|
||||
}
|
||||
@keyframes bg-pan {
|
||||
0% { background-position: 0% 0%; }
|
||||
100% { background-position: 100% 100%; }
|
||||
}
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.loader {
|
||||
margin: 1.25rem auto 1.25rem;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border: 3px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
.hint {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px; height: 1px;
|
||||
padding: 0; margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap; border: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 1rem;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
code {
|
||||
background: rgba(0,0,0,0.2);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.7;
|
||||
.btn-primary:hover {
|
||||
background-color: #4338CA;
|
||||
border-color: #4338CA;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your website…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
</div>
|
||||
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
|
||||
<p class="hint">This page will update automatically as the plan is implemented.</p>
|
||||
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
|
||||
<div class="container">
|
||||
<div class="px-4 py-5 my-5 text-center">
|
||||
<h1 class="display-5 fw-bold text-body-emphasis">Gestor de Gastos Familiar</h1>
|
||||
<div class="col-lg-6 mx-auto">
|
||||
<p class="lead mb-4">Bienvenido a tu espacio financiero compartido. Registra gastos, crea presupuestos y mantén el control de tus finanzas en pareja.</p>
|
||||
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
|
||||
<a href="add_expense.php" type="button" class="btn btn-primary btn-lg px-4 gap-3">Añadir Gasto</a>
|
||||
<button type="button" class="btn btn-outline-secondary btn-lg px-4">Ver Resumen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user