article_list.html 1.1 KB

12345678910111213141516171819202122232425262728
  1. {% extends "base.html" %}
  2. {# questa macro e' utile per mostrare articoli dentro ad una lista; non e' la migliore per mostrare un
  3. articolo come contenuto principale della pagina #}
  4. {% macro article_in_list(article) %}
  5. <article>
  6. <h2><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h2>
  7. {% if DISPLAY_ARTICLE_INFO_ON_INDEX %}
  8. <div class="well well-sm">
  9. {% include "includes/article_info.html" %}
  10. </div>
  11. {% endif %}
  12. <div class="summary">{{ article.summary }}
  13. {% include 'includes/comment_count.html' %}
  14. <a class="btn btn-default btn-xs" href="{{ SITEURL }}/{{ article.url }}">more ...</a>
  15. </div>
  16. </article>
  17. {% endmacro %}
  18. {% block content %}
  19. {% if articles %}
  20. {% for article in (articles_page.object_list if articles_page else articles) %}
  21. {{ article_in_list(article) }}
  22. <hr/>
  23. {% endfor %}
  24. {% endif %}
  25. {% include 'includes/pagination.html' %}
  26. {% endblock content %}