]> Raphaƫl G. Git Repositories - blogbundle/blobdiff - templates/article/index.html.twig
Rename rapsys_blog route to rapsysblog
[blogbundle] / templates / article / index.html.twig
diff --git a/templates/article/index.html.twig b/templates/article/index.html.twig
new file mode 100644 (file)
index 0000000..c1a8aab
--- /dev/null
@@ -0,0 +1,45 @@
+{% extends '@RapsysBlog/_base.html.twig' %}
+{% block content %}
+       <section id="content">
+               <header>
+                       <h1><a href="{{ path('rapsysblog_article') }}">{{ title.page }}</a></h1>
+                       <p>{{ description }}</p>
+               </header>
+               <section>
+                       {% for article in articles %}
+                               <article>
+                                       <header>
+                                               <h2><a href="{{ path('rapsysblog_article_view', {'id': article.id, 'slug': article.slug}) }}">{{ article.title }}</a></h2>
+                                       </header>
+                                       <section>
+                                               <p>{{ article.description }}</p>
+                                               {% if article.keywords is defined and article.keywords %}
+                                                       <nav>
+                                                               {% for keyword in article.keywords %}
+                                                                       <a href="{{ path('rapsysblog_keyword_view', {'id': keyword.id, 'slug': keyword.slug}) }}">{{ keyword.title }}</a>
+                                                               {% endfor %}
+                                                       </nav>
+                                               {% endif %}
+                                       </section>
+                                       <footer>
+                                               <nav>
+                                                       <a href="{{ path('rapsysblog_article_view', {'id': article.id, 'slug': article.slug}) }}">{% trans %}Read more{% endtrans %}...</a>
+                                               </nav>
+                                       </footer>
+                               </article>
+                       {% endfor %}
+               </section>
+               {% if ( prev is defined and prev ) or ( next is defined and next ) %}
+                       <footer>
+                               <nav class="pager">
+                                       {% if prev is defined and prev %}
+                                               <a href="{{ prev }}" rel="prev">&lt; {% trans %}Previous articles{% endtrans %}</a>
+                                       {% endif %}
+                                       {% if next is defined and next %}
+                                               <a href="{{ next }}" rel="next">{% trans %}Next articles{% endtrans %} &gt;</a>
+                                       {% endif %}
+                               </nav>
+                       </footer>
+               {% endif %}
+       </section>
+{% endblock %}