]> Raphaƫl G. Git Repositories - blogbundle/blob - Resources/views/article/read.html.twig
Review layout for easier styling
[blogbundle] / Resources / views / article / read.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 blog_subtitle %}<h2><a href="{{ path('articles') }}">{% trans %}Articles list{% endtrans %}</a></h2>{% endblock %}
4 {% block content %}
5 {% if article is defined and article %}
6 <article id="article">
7 <header>
8 <h3><a href="{{ path('articles_article', {'_article': article.slug}) }}">{{article.title}}</a></h3>
9 <p>
10 <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>
11 {% if article.keywords %}
12 <span>
13 {% transchoice article.keywords|length %}{1} Keyword:|]1,Inf[ Keywords:{% endtranschoice %}
14 {% for keyword_id, keyword in article.keywords %}
15 <a href="{{ path('keywords_keyword', {'_keyword': keyword_id}) }}">{{ keyword }}</a>
16 {% endfor %}
17 </span>
18 {% endif %}
19 </p>
20 </header>
21 <p>{{article.body|bb2html}}</p>
22 </article>
23 {% endif %}
24 {% endblock %}
25 {% block alternate %}
26 <link rel="alternate" href="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" hreflang="{{ app.request.locale }}"/>
27 {% for locale, slug in article.slugs %}
28 <link rel="alternate" href="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')|merge(app.request.query.all|merge({'_locale': locale, '_article': slug}))) }}" hreflang="{{ locale }}"/>
29 {% endfor %}
30 {% endblock %}
31 {% block footer_nav %}
32 <nav>
33 {% for locale, slug in article.slugs %}
34 <a href="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')|merge(app.request.query.all|merge({'_locale': locale, '_article': slug}))) }}">{{ ('Display in ' ~ locale)|trans }}</a>
35 {% endfor %}
36 </nav>
37 {% endblock %}