You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

  1. {% extends "base.html" %}
  2. {% import "bootstrap/wtf.html" as wtf %}
  3. {% import "_macros.html" as macros %}
  4. {% block title %}Flasky{% endblock %}
  5. {% block page_content %}
  6. <div class="page-header">
  7. <h1>
  8. Hello, {% if current_user.is_authenticated %}{{ current_user.username }}{% else %}Stranger{% endif %}!
  9. </h1>
  10. </div>
  11. <div>
  12. {% if current_user.can(Permission.WRITE) %}
  13. {{ wtf.quick_form(form) }}
  14. {% endif %}
  15. </div>
  16. <div class="post-tabs">
  17. <ul class="nav nav-tabs">
  18. <li {% if not show_followed %}class="active"{% endif %}>
  19. <a href="{{ url_for('.show_all') }}">All</a>
  20. </li>
  21. {% if current_user.is_authenticated %}
  22. <li {% if show_followed %}class="active"{% endif %}>
  23. <a href="{{ url_for('.show_followed') }}">Followed</a>
  24. </li>
  25. {% endif %}
  26. </ul>
  27. {% include '_posts.html' %}
  28. </div>
  29. {% if pagination %}
  30. <div class="pagination">
  31. {{ macros.pagination_widget(pagination, '.index') }}
  32. </div>
  33. {% endif %}
  34. {% endblock %}
  35. {% block scripts %}
  36. {{ super() }}
  37. {{ pagedown.include_pagedown() }}
  38. {% endblock %}