2019-12-17 23:02:10 +00:00
|
|
|
{% extends "base" %}
|
|
|
|
|
2019-12-19 00:32:45 +00:00
|
|
|
{% block extracss %}
|
|
|
|
<style>
|
|
|
|
div.table {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: auto 1fr repeat(3, auto);
|
|
|
|
}
|
|
|
|
|
|
|
|
div.table * {
|
|
|
|
margin: 0;
|
|
|
|
padding: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.colored {
|
|
|
|
background-color: #dddddd;
|
|
|
|
padding-color: #dddddd;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.table a {
|
|
|
|
color: #444444;
|
|
|
|
}
|
|
|
|
|
|
|
|
.center {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{% endblock extracss %}
|
|
|
|
|
|
|
|
{% block content %}
|
2019-12-17 23:02:10 +00:00
|
|
|
<h1>Panel de administración</h1>
|
|
|
|
|
|
|
|
<h3>
|
2019-12-19 00:32:45 +00:00
|
|
|
<a style="color: #444444" href="/admin/add_post">Agregar artículo</a>
|
|
|
|
<div class="table">
|
|
|
|
<h3>id</h3>
|
|
|
|
<h3 class="center">Título</h3>
|
|
|
|
<h3>Visitas</h3>
|
|
|
|
<h3>Visible</h3>
|
|
|
|
<h3></h3>
|
|
|
|
|
|
|
|
{% for post in posts %}
|
|
|
|
{% if loop.index is odd %}
|
|
|
|
<p class="colored">{{ post.id }}</p>
|
|
|
|
<p class="colored"><a href="/post/{{ post.title | slugify }}-{{ post.id }}">{{ post.title }}</a></p>
|
|
|
|
<p class="colored center">0</p>
|
|
|
|
<p class="colored center">{{ post.published }}</p>
|
2019-12-19 07:07:14 +00:00
|
|
|
<p class="colored"><a href="/admin/edit_post/{{ post.id }}">Editar</a></p>
|
2019-12-19 00:32:45 +00:00
|
|
|
{% else %}
|
|
|
|
<p>{{ post.id }}</p>
|
|
|
|
<p><a href="/post/{{ post.title | slugify }}-{{ post.id }}">{{ post.title }}</a></p>
|
|
|
|
<p class="center">0</p>
|
|
|
|
<p class="center">{{ post.published }}</p>
|
2019-12-19 07:07:14 +00:00
|
|
|
<p><a href="/admin/edit_post/{{ post.id }}">Editar</a></p>
|
2019-12-19 00:32:45 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endblock content %}
|