basic admin interface done
This commit is contained in:
50
calender/templates/calender/admin.html
Normal file
50
calender/templates/calender/admin.html
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
<div class="container w3-center">
|
||||||
|
<h1>{% block title %}Welcome to the Dankventskalender 2020!{% endblock %}</h1>
|
||||||
|
<div>
|
||||||
|
<h6>Submit your meme for the next day now! Feel free to create and submit your own creations. </h6>
|
||||||
|
<br>
|
||||||
|
{% if g.user %}
|
||||||
|
<a class="action" href="{{ url_for('calender.create') }}">
|
||||||
|
<button>Submit a Meme</button>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</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 %}
|
||||||
Reference in New Issue
Block a user