dankventskalender migrate to flask
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

43 lines
1.5KB

  1. {% extends 'base.html' %}
  2. {% block header %}
  3. <div class="container w3-center">
  4. <h1>{% block title %}ADMIN!{% endblock %}</h1>
  5. </div>
  6. {% endblock %}
  7. {% block content %}
  8. <div class="container w3-center">
  9. {% for post in posts %}
  10. <div class="item">
  11. <article class="post">
  12. <header>
  13. <div>
  14. <h1>{{ post['title'] }}</h1>
  15. <h2>{{ post['nickname'] }}</h2>
  16. <div class="about">by {{ post['username'] }}
  17. on {{ post['created'].strftime('%Y-%m-%d') }}</div>
  18. </div>
  19. {% if g.user['id'] %}
  20. <a class="action" href="{{ url_for('calender.update', id=post['id']) }}">Edit</a>
  21. {% endif %}
  22. </header>
  23. {% if post['type'] == 'image' %}
  24. <img class="file" src="{{ post['file'] }}">
  25. {% endif %}
  26. {% if post['type'] == 'video' %}
  27. <video class="file" preload="none" controls="" width="500">
  28. <source src="{{ post['file'] }}">
  29. </video>
  30. {% endif %}
  31. <p class="body">{{ post['body'] }}</p>
  32. </article>
  33. {% if not loop.last %}
  34. <hr>
  35. {% endif %}
  36. </div>
  37. {% endfor %}
  38. </div>
  39. {% endblock %}