]> Raphaƫl G. Git Repositories - blogbundle/blob - Resources/views/article/index.html.twig
817a4e078b7c38eb1c8792dc642eaf6a15d786d5
[blogbundle] / Resources / views / article / index.html.twig
1 {% extends 'RapsysBlogBundle::body.html.twig' %}
2 {% block blog_title %}<h1><a href="{{ path('homepage') }}">{% trans %}Dev log{% endtrans %}</a></h1>{% endblock %}
3 {% block content %}
4 <section id="content">
5 <h2><a href="{{ path('articles') }}">{% trans %}Articles list{% endtrans %}</a></h2>
6 {% for article in articles %}
7 <article>
8 <header>
9 <h3><a href="{{ path('articles_article', {'_article': article.slug}) }}">{{article.title}}</a></h3>
10 <p>
11 <span>{% trans with {'%date%': article.created|localizeddate('full', 'short')} %}Published the %date%{% endtrans %}{% if article.created != article.updated %}{% trans with {'%date%': article.updated|localizeddate('short', 'short')} %}, edited the %date%{% endtrans %}{% endif %}</span>
12 {% if article.keywords %}
13 <span>
14 {% transchoice article.keywords|length %}{1} Keyword:|]1,Inf[ Keywords:{% endtranschoice %}
15 {% for slug, keyword in article.keywords %}
16 <a href="{{ path('keywords_keyword', {'_keyword': slug}) }}">{{ keyword }}</a>
17 {% endfor %}
18 </span>
19 {% endif %}
20 </p>
21 </header>
22 <p>{{article.description}}</p>
23 <nav>
24 <a href="{{ path('articles_article', {'_article': article.slug}) }}">{% trans %}Read more{% endtrans %}...</a>
25 </nav>
26 </article>
27 {% endfor %}
28 </section>
29 {% endblock %}