2 <html{% if locale is defined and locale %} lang="{{ locale }}"{% endif %}>
3 <head{% if facebook is defined and facebook %} prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#"{% endif %}>
4 {% block meta %}<meta charset="UTF-8">{% endblock %}
5 <title>{% block title %}{{ [title.page, title.section, title.site]|filter(v => v)|join(' - ') }}{% endblock %}</title>
7 <meta name="viewport" content="width=device-width, initial-scale=1" />
8 {% if description is defined and description %}
9 <meta name="description" content="{{ description }}" />
11 {% if keywords is defined and keywords %}
12 <meta name="keywords" content="{{ keywords|join(', ') }}" />
14 {% if icon is defined and icon %}
15 <link rel="shortcut icon" type="image/x-icon" href="{{ asset(icon.ico) }}" />
16 <link rel="icon" type="image/svg+xml" href="{{ asset(icon.svg) }}" />
17 {% for size, icon in icon.png %}
19 {% if size in [120, 152, 167, 180] %}
21 <link rel="apple-touch-icon" href="{{ asset(icon) }}" />
23 <link rel="apple-touch-icon" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />
25 {% elseif size in [70, 150, 310] %}
26 <meta name="msapplication-square{{ size }}x{{ size }}logo" content="{{ asset(icon) }}" />
29 <link rel="icon" type="image/png" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />
33 {% stopwatch 'stylesheet' %}
34 {# stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysBlogBundle/css/{reset,screen}.css' #}
35 {% stylesheet '@RapsysBlog/css/{reset,droidsans,lemon,notoemoji,screen}.css' %}
36 <link rel="stylesheet" type="text/css" href="{{ asset }}?{{ 'now'|date('U') }}" />
39 {% if canonical is defined and canonical %}
40 <link rel="canonical" href="{{ canonical }}"{% if locale is defined and locale %} hreflang="{{ locale }}"{% endif %} />
42 {% if alternates is defined and alternates %}
43 {% for lang, alternate in alternates %}
44 <link rel="alternate" href="{{ alternate.absolute }}" hreflang="{{ lang }}" />
47 {% if prev is defined and prev %}
48 <link rel="prev" href="{{ prev }}" hreflang="{{ locale }}" />
50 {% if next is defined and next %}
51 <link rel="next" href="{{ next }}" hreflang="{{ locale }}" />
53 {% if facebook is defined and facebook %}
54 {% for property, contents in facebook %}
55 {% if contents is iterable %}
56 {% for content in contents %}
57 <meta property="{{ property }}" content="{{ content }}" />
60 <meta property="{{ property }}" content="{{ contents }}" />
70 {% if logo is defined and logo %}
71 {% block header_title %}
72 <a id="logo" href="{{ path(root) }}" title="{{ title.site }}">
73 <img src="{{ asset(logo.svg) }}?{{ 'now'|date('U') }}" srcset="{{ asset(logo.png) }}?{{ 'now'|date('U') }} 200w, {{ asset(logo.svg) }}?{{ 'now'|date('U') }} 400w" sizes="(min-width:400px) 400px, 200px" alt="{{ title.site }}" width="100" height="45" />
74 <strong>{{ title.site }}</strong>
78 {% block header_nav %}
80 <a href="{{ path('rapsysblog') }}" rel="home">{% trans %}Home{% endtrans %}</a>
81 <a href="{{ path('rapsysblog_contact') }}" rel="contact">{% trans %}Contact{% endtrans %}</a>
82 {#<a href="{{ path('rapsysblog_frequently_asked_questions') }}">{% trans %}Frequently asked questions{% endtrans %}</a>#}
83 {#{% if is_granted('ROLE_ADMIN') %}#}
84 <a href="{{ path('rapsysblog_user') }}">{% trans %}Users{% endtrans %}</a>
86 {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
87 <a href="{{ path('rapsysuser_edit', {mail: app.user.mail|short, hash: app.user.mail|short|hash}) }}">{% trans %}My account{% endtrans %}</a>
88 <a href="{{ path('rapsysuser_logout') }}">{% trans %}Logout{% endtrans %}</a>
90 <a href="{{ path('rapsysuser_login') }}">{% trans %}Login{% endtrans %}</a>
91 <a href="{{ path('rapsysuser_register') }}">{% trans %}Register{% endtrans %}</a>
96 {% block header_subtitle %}{% endblock %}
97 {% block header_tagline %}
98 {% if tags is defined and tags %}
100 {% for id, tag in tags %}
101 <li><h2><a href="#{{id}}">{{tag}}</a></h2></li>
110 {# pass an array argument to get the messages of those types (['warning', 'error']) #}
111 {% for label, messages in app.flashes %}
113 <section class="message {{label}}">
115 {% for message in messages %}
116 <li>{{ message }}</li>
123 {#{% block sidebar %}<aside id="sidebar"></aside>{% endblock %}#}
127 {% block content_title %}<h1 id="title"><a href="{{ canonical }}">{{ title.page }}</a></h1>{% endblock %}>
128 <p>{{ description }}</p>
134 <a href="{{ path('rapsysblog_about') }}">{% trans %}About{% endtrans %}</a>
135 {% if copy is defined and copy %}
136 <details><summary>{{ copy.long }}</summary><span>{{ copy.short }} <a href="{{ copy.link }}" title="{{ copy.title }}" rel="author">{{ copy.by }}</a></span></details>
138 {#<a href="{{ path('rapsysblog_terms_of_service') }}">{% trans %}Terms of service{% endtrans %}</a>#}
139 {% if alternates is defined and alternates %}
140 {% set langs = alternates|keys|filter(v => v|length == 5) %}
141 {% if langs|length > 1 %}
143 {% for lang in langs %}
144 <li><a href="{{ alternates[lang].relative }}" hreflang="{{ lang|replace({'_': '-'}) }}" title="{{ alternates[lang].title }}">{{ alternates[lang].translated }}</a></li>
148 {% set lang = langs|first %}
149 <a href="{{ alternates[lang].relative }}" hreflang="{{ lang|replace({'_': '-'}) }}" title="{{ alternates[lang].title }}">{{ alternates[lang].translated }}</a>
157 {% block javascript %}
158 {% stopwatch 'javascript' %}
159 {#{% javascript '@RapsysBlog/js/*.js' %}
160 <script type="text/javascript" src="{{ asset_url }}"></script>
161 {% endjavascript %}#}