index.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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">
  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. </aside><!-- /#featured -->
  14. {% if loop.length > 1 %}
  15. <section class="m3y">
  16. <h1>Autres articles</h1>
  17. <hr />
  18. <ol id="posts-list" class="hfeed">
  19. {% endif %}
  20. {# other items #}
  21. {% else %}
  22. {% if loop.first %}
  23. <section id="content">
  24. <ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}">
  25. {% endif %}
  26. <li>
  27. <article class="hentry">
  28. <header>
  29. <h1>
  30. <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
  31. {{ article.title }}
  32. </a>
  33. </h1>
  34. </header>
  35. <div class="entry-content">
  36. {% include 'article_infos.html' %}
  37. {{ article.summary }}
  38. <a class="readmore" href="{{ SITEURL }}/{{ article.url }}">read more</a>
  39. {% include 'comments.html' %}
  40. </div><!-- /.entry-content -->
  41. </article>
  42. </li>
  43. {% endif %}
  44. {% if loop.last %}
  45. {% if loop.length > 1 or articles_page.has_other_pages() %}
  46. </ol><!-- /#posts-list -->
  47. {% if articles_page.has_other_pages() %}
  48. {% include 'pagination.html' %}
  49. {% endif %}
  50. </section><!-- /#content -->
  51. {% endif %}
  52. {% endif %}
  53. {% endfor %}
  54. {% else %}
  55. <section id="content">
  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 %}