Update day 16

Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
This commit is contained in:
2023-05-27 23:18:27 +02:00
parent f4e5dfcf3c
commit c809ab1dac
6 changed files with 191 additions and 26 deletions

View File

@@ -47,6 +47,47 @@
color: #fff;
}
.envoltorio-tarea {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
background-color: #fff;
border-top: 1px solid rgb(225,225,225);
}
.titulo-tarea {
display: flex;
}
.titulo-tarea a {
text-decoration: none;
color: #4B5156;
margin-left: 10px;
}
.icono-tarea-completa {
width: 20px;
height: 20px;
background-color: #4CAF50;
border-radius: 50%;
}
.icono-tarea-incompleta {
width: 20px;
height: 20px;
background-color: #FFC107;
border-radius: 50%;
}
.enlace-eliminar {
text-decoration: none;
font-weight: 900;
color: #FF0000;
font-size: 22px;
line-height: 0;
}
</style>
</head>

View File

@@ -9,9 +9,6 @@
</div>
{% if request.user.is_authenticated %}
<p>
{{request.user}}
</p>
<a href="{% url 'logout' %}">Salir</a>
@@ -23,42 +20,56 @@
</div>
<hr>
<h1>Lista de pendientes</h1>
<!--
<a href="{% url 'crear-tarea' %}">Crear nueva tarea</a>
<form method="get" action="">
{% csrf_token %}
<input type="text" name="area-buscar" value="{{valor_buscado}}">
<input type="submit" value="Buscar">
</form>
</form>
-->
<table>
<tr>
<th>Elementos</th>
<th></th>
<th></th>
<th></th>
</tr>
<div class="envoltorio-items-tarea">
{% for tarea in tareas %}
<tr>
<td>{{ tarea.titulo }}</td>
<td><a href="{% url 'editar-tarea' tarea.id %}">Editar</a></td>
<td><a href="{% url 'eliminar-tarea' tarea.id %}">Eliminar</a></td>
</tr>
<div class="envoltorio-tarea">
{% if tarea.completo %}
<div class="titulo-tarea">
<div class="icono-tarea-completa">
</div>
<i><s><a href="{% url 'editar-tarea' tarea.id %}">{{tarea}}</a></s></i>
</div>
<a class="enlace-eliminar" href="{% url 'eliminar-tarea' tarea.id %}">&#x2A2F;</a>
{% else %}
<div class="titulo-tarea">
<div class="icono-tarea-incompleta">
</div>
<a href="{% url 'editar-tarea' tarea.id %}">{{tarea}}</a>
</div>
<a class="enlace-eliminar" href="{% url 'eliminar-tarea' tarea.id %}">&#x2A2F;</a>
{% endif %}
</div>
{% empty %}
<h3>No hay elementos en esta lista</h3>
{% endfor %}
</table>
</div>
{% endblock content %}