Created a base template and added to the others
This commit is contained in:
parent
9511ea93ba
commit
595ba93e39
@ -1,3 +1,43 @@
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: system-ui, sans-serif;
|
||||
background: #f6f7f9;
|
||||
}
|
||||
|
||||
.topbar {
|
||||
background: #1f2937;
|
||||
padding: 12px 20px;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.nav a {
|
||||
color: #e5e7eb;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.nav a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.user {
|
||||
color: #9ca3af;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.dashboard-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 500px));
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE>
|
||||
<html>
|
||||
<head>
|
||||
<title>Eliminar</title>
|
||||
<link rel="stylesheet" href="{% static 'expenses/css/base.css' %}">
|
||||
</head>
|
||||
<body>
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}Eliminar{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<h1>Eliminar cuenta</h1>
|
||||
|
||||
@ -20,5 +15,4 @@
|
||||
<a href="{% url 'account_list' %}">Cancelar</a>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
@ -1,11 +1,6 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE>
|
||||
<html>
|
||||
<head>
|
||||
<title>Cuenta</title>
|
||||
<link rel="stylesheet" href="{% static 'expenses/css/base.css' %}">
|
||||
</head>
|
||||
<body>
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}Cuenta{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<h1>
|
||||
{% if form.instance.pk %}
|
||||
@ -23,5 +18,4 @@
|
||||
<a href="{% url 'account_list' %}">Cancelar</a>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
@ -1,11 +1,6 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE>
|
||||
<html>
|
||||
<head>
|
||||
<title>Cuentas</title>
|
||||
<link rel="stylesheet" href="{% static 'expenses/css/base.css' %}">
|
||||
</head>
|
||||
<body>
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}Cuentas{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<h1>Mis cuentas</h1>
|
||||
|
||||
@ -40,5 +35,4 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
36
expenses_manager/expenses/templates/expenses/base.html
Normal file
36
expenses_manager/expenses/templates/expenses/base.html
Normal file
@ -0,0 +1,36 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{% block title %}Expenses manager{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{% static 'expenses/css/base.css' %}">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header class="topbar">
|
||||
<nav class="nav">
|
||||
<a href="{% url 'home' %}">Home</a>
|
||||
<a href="{% url 'dashboard' %}">Dashboard</a>
|
||||
<a href="{% url 'expense_list' %}">Gastos</a>
|
||||
<a href="{% url 'account_list' %}">Cuentas</a>
|
||||
<a href="{% url 'income_list' %}">Ingresos</a>
|
||||
<a href="{% url 'tag_list' %}">Etiquetas</a>
|
||||
|
||||
<span class="spacer"></span>
|
||||
|
||||
<span class="user">
|
||||
{{ request.user.username }}
|
||||
</span>
|
||||
<!-- <a href="{ url 'logout' }">Salir</a> -->
|
||||
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="content">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,12 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
{% extends "expenses/base.html" %}
|
||||
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Dashboard</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
|
||||
<h1>
|
||||
@ -254,5 +250,4 @@
|
||||
<hr>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
@ -1,10 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Borrar gasto</title>
|
||||
</head>
|
||||
{% extends "expenses/base.html" %}
|
||||
|
||||
<body>
|
||||
{% block title %}Borrar gasto{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Borrar gasto</h1>
|
||||
|
||||
<p>
|
||||
@ -23,5 +21,4 @@
|
||||
</form>
|
||||
|
||||
<a href="{% url 'expense_list' %}">Cancelar</a>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
@ -1,16 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
{% extends "expenses/base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{% if form.instance.pk %}
|
||||
Editar gasto
|
||||
{% else %}
|
||||
Nuevo gasto
|
||||
{% endif %}
|
||||
</title>
|
||||
</head>
|
||||
{% endblock %}
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% if form.instance.pk %}
|
||||
Editar gasto
|
||||
@ -32,5 +30,4 @@
|
||||
</form>
|
||||
|
||||
<a href="{% url 'expense_list' %}">Volver</a>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Gastos</title>
|
||||
<link rel="stylesheet" href="{% static 'expenses/css/base.css' %}">
|
||||
</head>
|
||||
<body>
|
||||
{% extends "expenses/base.html" %}
|
||||
|
||||
|
||||
{% block title %}
|
||||
Gastos
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Mis gastos</h1>
|
||||
|
||||
<form method="get">
|
||||
@ -138,5 +138,4 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
@ -1,13 +1,8 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Home</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<link rel="stylesheet" href="{% static 'expenses/css/base.css' %}">
|
||||
</head>
|
||||
{% extends "expenses/base.html" %}
|
||||
|
||||
<body>
|
||||
{% block title %}Home{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Home</h1>
|
||||
|
||||
@ -65,5 +60,4 @@
|
||||
|
||||
</section>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Borrar ingreso</title>
|
||||
</head>
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}Borrar ingreso{% endblock %}
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
<h1>Borrar ingreso</h1>
|
||||
|
||||
<p>
|
||||
@ -23,5 +20,4 @@
|
||||
</form>
|
||||
|
||||
<a href="{% url 'income_list' %}">Cancelar</a>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
@ -1,16 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}
|
||||
{% if form.instance.pk %}
|
||||
Editar ingreso
|
||||
{% else %}
|
||||
Nuevo ingreso
|
||||
{% endif %}
|
||||
</title>
|
||||
</head>
|
||||
{% endblock %}
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
<h1>
|
||||
{% if form.instance.pk %}
|
||||
Editar ingreso
|
||||
@ -32,5 +29,4 @@
|
||||
</form>
|
||||
|
||||
<a href="{% url 'income_list' %}">Volver</a>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
@ -1,11 +1,6 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Ingresos</title>
|
||||
<link rel="stylesheet" href="{% static 'expenses/css/base.css' %}">
|
||||
</head>
|
||||
<body>
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}Ingresos{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Mis ingresos</h1>
|
||||
|
||||
<a href="{% url 'income_create' %}">➕ Nuevo ingreso</a>
|
||||
@ -40,5 +35,4 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
@ -1,8 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}Etiquetas{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Eliminar etiqueta</h1>
|
||||
|
||||
<form method="post">
|
||||
@ -11,5 +9,4 @@
|
||||
</form>
|
||||
|
||||
<a href="{% url 'tag_list' %}">Cancelar</a>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
@ -1,8 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}Etiquetas{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Etiqueta</h1>
|
||||
|
||||
<form method="post">
|
||||
@ -12,5 +10,4 @@
|
||||
</form>
|
||||
|
||||
<a href="{% url 'tag_list' %}">Volver</a>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
@ -1,10 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}Etiquetas{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Etiquetas</h1>
|
||||
|
||||
<a href="{% url 'tag_create' %}">➕ Nueva etiqueta</a>
|
||||
|
||||
<ul>
|
||||
{% for tag in tags %}
|
||||
<li>
|
||||
@ -16,5 +16,4 @@
|
||||
<li>No hay etiquetas</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
Loading…
Reference in New Issue
Block a user