dankventskalender migrate to flask
Nie możesz wybrać więcej, niż 25 tematów
Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
|
- {% 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 %}
|