Sfoglia il codice sorgente

basic admin interface done

master
Johannnes Bürst 5 anni fa
parent
commit
8972f0ffb0
1 ha cambiato i file con 50 aggiunte e 0 eliminazioni
  1. +50
    -0
      calender/templates/calender/admin.html

+ 50
- 0
calender/templates/calender/admin.html Vedi 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 %}

Loading…
Annulla
Salva