2 <html{% if head['locale'] is defined and head['locale'] %} lang="{{ head['locale'] }}"{% endif %}>
3 <head{% if head['facebook'] is defined and head['facebook'] is not empty %} prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#"{% endif %}>
5 <meta charset="UTF-8" />
6 <title>{{ head['title'] }}</title>
7 <meta name="viewport" content="width=device-width, initial-scale=1" />
8 {#TODO: deal with unset head['description'] and set description #}
9 {% if head['description'] is defined and head['description'] %}
10 <meta name="description" content="{{ head['description'] }}" />
12 {% if head['keywords'] is defined and head['keywords'] %}
13 <meta name="keywords" content="{{ head['keywords'] }}" />
15 {% if head['facebook'] is defined and head['facebook'] %}
16 {% for property, contents in head['facebook'] %}
17 {% if contents is iterable %}
18 {% for content in contents %}
19 <meta property="{{ property }}" content="{{ content }}" />
22 <meta property="{{ property }}" content="{{ contents }}" />
28 {% if site is defined and site is not empty %}
29 <link rel="shortcut icon" type="image/x-icon" href="{{ asset(site.icon.ico) }}" />
30 <link rel="icon" type="image/svg+xml" href="{{ asset(site.icon.svg) }}" />
31 {% for size, icon in site.icon.png %}
33 {% if size in [120, 152, 167, 180] %}
35 <link rel="apple-touch-icon" href="{{ asset(icon) }}" />
37 <link rel="apple-touch-icon" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />
39 {% elseif size in [70, 150, 310] %}
40 <meta name="msapplication-square{{ size }}x{{ size }}logo" content="{{ asset(icon) }}" />
43 <link rel="icon" type="image/png" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />
47 {# stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysBlogBundle/Resources/public/css/{reset,screen}.css' #}
48 {% stylesheet '@RapsysBlog/css/{reset,droidsans,lemon,notoemoji,screen}.css' %}
49 <link rel="stylesheet" type="text/css" href="{{ asset_url }}?{{ 'now'|date('U') }}" />
51 {% stopwatch 'stylesheet' %}
53 {% if head["canonical"] is defined and head['canonical'] %}
54 <link rel="canonical" href="{{ head['canonical'] }}"{% if head['locale'] is defined and head['locale'] %} hreflang="{{ head['locale'] }}"{% endif %} />
56 {% if head['alternates'] is defined and head['alternates'] %}
57 {% for lang, alternate in head['alternates'] %}
58 <link rel="alternate" href="{{ alternate.absolute }}" hreflang="{{ lang }}" />
61 {% if head.prev is defined and head.prev %}
62 <link rel="prev" href="{{ head.prev }}" hreflang="{{ head.locale }}" />
64 {% if head.next is defined and head.next %}
65 <link rel="next" href="{{ head.next }}" hreflang="{{ head.locale }}" />
73 <a id="logo" href="{{ path(site.root) }}" title="{{ site.title }}">
74 <img src="{{ asset(site.logo.svg) }}?20221024100144" srcset="{{ asset(site.logo.png) }}?20221024100144 200w, {{ asset(site.logo.svg) }}?20221024100144 400w" sizes="(min-width:400px) 400px, 200px" alt="{{ site.logo.alt }}" width="100" height="60" />
75 <strong>{{ site.title }}</strong>
78 <a href="{{ path('rapsys_blog') }}" rel="home">{% trans %}Home{% endtrans %}</a>
79 <a href="{{ path('rapsys_blog_contact') }}" rel="contact">{% trans %}Contact{% endtrans %}</a>
80 {#<a href="{{ path('rapsys_blog_frequently_asked_questions') }}">{% trans %}Frequently asked questions{% endtrans %}</a>#}
81 {% if is_granted('ROLE_ADMIN') %}
82 <a href="{{ path('rapsys_blog_user') }}">{% trans %}Users{% endtrans %}</a>
84 {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
85 <a href="{{ path('rapsys_user_edit', {mail: app.user.mail|short, hash: app.user.mail|short|hash}) }}">{% trans %}My account{% endtrans %}</a>
86 <a href="{{ path('rapsys_user_logout') }}">{% trans %}Logout{% endtrans %}</a>
88 <a href="{{ path('rapsys_user_login') }}">{% trans %}Login{% endtrans %}</a>
89 <a href="{{ path('rapsys_user_register') }}">{% trans %}Register{% endtrans %}</a>
93 {% block site_subtitle %}{% endblock %}
94 {% block site_tagline %}
95 {% if tags is defined and tags %}
97 {% for id, tag in tags %}
98 <li><h2><a href="#{{id}}">{{tag}}</a></h2></li>
107 {# pass an array argument to get the messages of those types (['warning', 'error']) #}
108 {% for label, messages in app.flashes %}
110 <div class="message {{label}}">
112 {% for message in messages %}
113 <li>{{ message }}</li>
122 {% block sidebar %}<aside id="sidebar"></aside>{% endblock %}
127 {% block title %}<h1 id="title"><a href="{{ head.canonical }}">{{ title }}</a></h1>{% endblock %}>
133 <a href="{{ path('rapsys_blog_about') }}">{% trans %}About{% endtrans %}</a>
134 {% if copy is defined and copy %}
135 <details><summary>{{ copy.long }}</summary><span>{{ copy.short }} <a href="{{ copy.link }}" title="{{ copy.title }}" rel="author">{{ copy.by }}</a></span></details>
137 {#<a href="{{ path('rapsys_blog_terms_of_service') }}">{% trans %}Terms of service{% endtrans %}</a>#}
138 {% if alternates is defined and alternates %}
139 {% set langs = alternates|keys|filter(v => v|length == 5) %}
140 {% if langs|length > 1 %}
142 {% for lang in langs %}
143 <li><a href="{{ alternates[lang].relative }}" hreflang="{{ lang|replace({'_': '-'}) }}" title="{{ alternates[lang].title }}">{{ alternates[lang].translated }}</a></li>
147 {% set lang = langs|first %}
148 <a href="{{ alternates[lang].relative }}" hreflang="{{ lang|replace({'_': '-'}) }}" title="{{ alternates[lang].title }}">{{ alternates[lang].translated }}</a>
155 {% block javascripts %}
156 {% stopwatch 'javascript' %}
157 {#{% javascript '@RapsysBlog/js/*.js' %}
158 <script type="text/javascript" src="{{ asset_url }}"></script>
159 {% endjavascript %}#}