Files
dankventskalender3.0/calender/templates/calender/admin.html
2020-11-16 15:06:52 +01:00

43 lines
1.5 KiB
HTML

{% extends 'base.html' %}
{% block header %}
<div class="container w3-center">
<h1>{% block title %}ADMIN!{% endblock %}</h1>
</div>
{% endblock %}
{% block content %}
<div class="container w3-center">
{% for post in posts %}
<div class="item">
<article class="post">
<header>
<div>
<h1>{{ post['title'] }}</h1>
<h2>{{ post['nickname'] }}</h2>
<div class="about">by {{ post['username'] }}
on {{ post['created'].strftime('%Y-%m-%d') }}</div>
</div>
{% if g.user['id'] %}
<a class="action" href="{{ url_for('calender.update', id=post['id']) }}">Edit</a>
{% endif %}
</header>
{% if post['type'] == 'image' %}
<img class="file" src="{{ post['file'] }}">
{% endif %}
{% if post['type'] == 'video' %}
<video class="file" preload="none" controls="" width="500">
<source src="{{ post['file'] }}">
</video>
{% endif %}
<p class="body">{{ post['body'] }}</p>
</article>
{% if not loop.last %}
<hr>
{% endif %}
</div>
{% endfor %}
</div>
{% endblock %}