index.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {% extends "base.html" %}
  2. {% block content_title %}{% endblock %}
  3. {% block content %}
  4. {% if articles %}
  5. {% for article in articles_page.object_list %}
  6. {# First item #}
  7. {% if loop.first and not articles_page.has_previous() %}
  8. <aside id="featured" class="body">
  9. <article>
  10. <h1 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
  11. {% include 'article_infos.html' %}{{ article.content }}{% include 'comments.html' %}
  12. </article>
  13. {% if loop.length == 1 %}
  14. {% include 'pagination.html' %}
  15. {% endif %}
  16. </aside><!-- /#featured -->
  17. {% if loop.length > 1 %}
  18. <section id="content" class="body">
  19. <h1>Other articles</h1>
  20. <hr />
  21. <ol id="posts-list" class="hfeed">
  22. {% endif %}
  23. {# other items #}
  24. {% else %}
  25. {% if loop.first and articles_page.has_previous %}
  26. <section id="content" class="body">
  27. <ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}">
  28. {% endif %}
  29. <li><article class="hentry">
  30. <header>
  31. <h1><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
  32. title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h1>
  33. </header>
  34. <div class="entry-content">
  35. {% include 'article_infos.html' %}
  36. {{ article.summary }}
  37. <a class="readmore" href="{{ SITEURL }}/{{ article.url }}">read more</a>
  38. {% include 'comments.html' %}
  39. </div><!-- /.entry-content -->
  40. </article></li>
  41. {% endif %}
  42. {% if loop.last %}
  43. {% if loop.length > 1 %}
  44. </ol><!-- /#posts-list -->
  45. {% endif %}
  46. {% if articles_page.has_previous() or loop.length > 1 %}
  47. {% include 'pagination.html' %}
  48. {% endif %}
  49. {% if loop.length > 1 %}
  50. </section><!-- /#content -->
  51. {% endif %}
  52. {% endif %}
  53. {% endfor %}
  54. {% else %}
  55. <section id="content" class="body">
  56. <h2>Pages</h2>
  57. {% for page in PAGES %}
  58. <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
  59. {% endfor %}
  60. </section>
  61. {% endif %}
  62. {% endblock content %}