]> Raphaƫl G. Git Repositories - blogbundle/blobdiff - Resources/views/index.html.twig
Remove contact page
[blogbundle] / Resources / views / index.html.twig
index a32a0ca441d4c744703da4fd325940b682a5b92a..04c49e4a27803165908b01abe7fb9143adac1171 100644 (file)
@@ -1,3 +1,45 @@
-{% extends 'RapsysBlogBundle::body.html.twig' %}
-{% block title %}Welcome!{% endblock %}
-{% block content %}Hello world !{% endblock %}
+{% extends '@RapsysBlog/_base.html.twig' %}
+{% block content %}
+       <section id="content">
+               <header>
+                       <h1 id="title"><a href="{{ head.canonical }}">{{ title }}</a></h1>
+                       <p>{{ description }}</p>
+               </header>
+               <section>
+                       {% for article in articles %}
+                               <article>
+                                       <header>
+                                               <h2><a href="{{ path('rapsys_blog_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('rapsys_blog_keyword_view', {'id': keyword.id, 'slug': keyword.slug}) }}">{{ keyword.title }}</a>
+                                                               {% endfor %}
+                                                       </nav>
+                                               {% endif %}
+                                       </section>
+                                       <footer>
+                                               <nav>
+                                                       <a href="{{ path('rapsys_blog_article_view', {'id': article.id, 'slug': article.slug}) }}">{% trans %}Read more{% endtrans %}...</a>
+                                               </nav>
+                                       </footer>
+                               </article>
+                       {% endfor %}
+               </section>
+               {% if articles_prev is defined or articles_next is defined %}
+                       <footer>
+                               <nav class="pager">
+                                       {% if articles_prev is defined %}
+                                               <a href="{{ articles_prev }}" rel="prev">&lt; {% trans %}Previous articles{% endtrans %}</a>
+                                       {% endif %}
+                                       {% if articles_next is defined %}
+                                               <a href="{{ articles_next }}" rel="next">{% trans %}Next articles{% endtrans %} &gt;</a>
+                                       {% endif %}
+                               </nav>
+                       </footer>
+               {% endif %}
+       </section>
+{% endblock %}