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                         {% if head.description is defined and head.description %}
 
   9                                 <meta name="description" content="{{ head.description }}" />
 
  11                         {% if head.keywords is defined and head.keywords %}
 
  12                                 <meta name="keywords" content="{{ head.keywords }}" />
 
  14                         {% if head.facebook is defined and head.facebook %}
 
  15                                 {% for property, contents in head.facebook %}
 
  16                                         {% if contents is iterable %}
 
  17                                                 {% for content in contents %}
 
  18                                                         <meta property="{{ property }}" content="{{ content }}" />
 
  21                                                 <meta property="{{ property }}" content="{{ contents }}" />
 
  26                                 {% if head.icon.ico is defined and head.icon.ico is not empty %}
 
  27                                         <link rel="shortcut icon" type="image/x-icon" href="{{ asset(head.icon.ico) }}" />
 
  29                                 {% if head.icon.png is defined and head.icon.png is not empty %}
 
  30                                         {% for size, icon in head.icon.png %}
 
  32                                                 {% if size in [120, 152, 167, 180] %}
 
  34                                                                 <link rel="apple-touch-icon" href="{{ asset(icon) }}" />
 
  36                                                         <link rel="apple-touch-icon" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />
 
  38                                                 {% elseif size in [70, 150, 310] %}
 
  39                                                         <meta name="msapplication-square{{ size }}x{{ size }}logo" content="{{ asset(icon) }}" />
 
  42                                                         <link rel="icon" type="image/png" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />
 
  46                                 {% if head.icon.svg is defined and head.icon.svg is not empty %}
 
  47                                         <link rel="icon" type="image/svg+xml" href="{{ asset(head.icon.svg) }}" />
 
  49                                 {# stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysBlogBundle/Resources/public/css/{reset,screen}.css' #}
 
  50                                 {% stylesheet '@RapsysBlog/css/{reset,droidsans,lemon,notoemoji,screen}.css' %}
 
  51                                         <link rel="stylesheet" type="text/css" href="{{ asset_url }}?{{ 'now'|date('U') }}" />
 
  53                                 {% stopwatch 'stylesheet' %}
 
  55                                 {% if head.canonical is defined and head.canonical %}
 
  56                                         <link rel="canonical" href="{{ head.canonical }}"{% if head.locale is defined and head.locale %} hreflang="{{ head.locale }}"{% endif %} />
 
  58                                 {% if head.alternates is defined and head.alternates %}
 
  59                                         {% for lang, alternate in head.alternates %}
 
  60                                                 <link rel="alternate" href="{{ alternate.absolute }}" hreflang="{{ lang }}" />
 
  63                                 {% if head.prev is defined and head.prev %}
 
  64                                         <link rel="prev" href="{{ head.prev }}" hreflang="{{ head.locale }}" />
 
  66                                 {% if head.next is defined and head.next %}
 
  67                                         <link rel="next" href="{{ head.next }}" hreflang="{{ head.locale }}" />
 
  76                                         <a id="logo" href="{{ path(head.root) }}" title="{{ head.site }}">
 
  77                                                 <img src="{{ asset(head.logo.svg) }}?20221024100144" srcset="{{ asset(head.logo.png) }}?20221024100144 200w, {{ asset(head.logo.svg) }}?20221024100144 400w" sizes="(min-width:400px) 400px, 200px" alt="{{ head.logo.alt }}" width="100" height="60" />
 
  78                                                 <strong>{{ head.site }}</strong>
 
  81                                                 <a href="{{ path('rapsys_blog') }}" rel="home">{% trans %}Home{% endtrans %}</a>
 
  82                                                 <a href="{{ path('rapsys_blog_contact') }}" rel="contact">{% trans %}Contact{% endtrans %}</a>
 
  83                                                 {#<a href="{{ path('rapsys_blog_frequently_asked_questions') }}">{% trans %}Frequently asked questions{% endtrans %}</a>#}
 
  84                                                 {#{% if is_granted('ROLE_ADMIN') %}#}
 
  85                                                         <a href="{{ path('rapsys_blog_user') }}">{% trans %}Users{% endtrans %}</a>
 
  87                                                 {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
 
  88                                                         <a href="{{ path('rapsys_user_edit', {mail: app.user.mail|short, hash: app.user.mail|short|hash}) }}">{% trans %}My account{% endtrans %}</a>
 
  89                                                         <a href="{{ path('rapsys_user_logout') }}">{% trans %}Logout{% endtrans %}</a>
 
  91                                                         <a href="{{ path('rapsys_user_login') }}">{% trans %}Login{% endtrans %}</a>
 
  92                                                         <a href="{{ path('rapsys_user_register') }}">{% trans %}Register{% endtrans %}</a>
 
  95                                         {#{% block site_subtitle %}{% endblock %}
 
  96                                         {% block site_tagline %}
 
  97                                                 {% if tags is defined and tags %}
 
  99                                                                 {% for id, tag in tags %}
 
 100                                                                         <li><h2><a href="#{{id}}">{{tag}}</a></h2></li>
 
 108                                 {# pass an array argument to get the messages of those types (['warning', 'error']) #}
 
 109                                 {% for label, messages in app.flashes %}
 
 111                                                 <section class="message {{label}}">
 
 113                                                                 {% for message in messages %}
 
 114                                                                         <li>{{ message }}</li>
 
 122                 {#{% block sidebar %}<aside id="sidebar"></aside>{% endblock %}#}
 
 126                                         {% block title %}<h1 id="title"><a href="{{ head.canonical }}">{{ title }}</a></h1>{% endblock %}>
 
 127                                         <p>{{ description }}</p>
 
 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 head.alternates is defined and head.alternates %}
 
 139                                         {% set langs = head.alternates|keys|filter(v => v|length == 5) %}
 
 140                                         {% if langs|length > 1 %}
 
 142                                                         {% for lang in langs %}
 
 143                                                                 <li><a href="{{ head.alternates[lang].relative }}" hreflang="{{ lang|replace({'_': '-'}) }}" title="{{ head.alternates[lang].title }}">{{ head.alternates[lang].translated }}</a></li>
 
 147                                                 {% set lang = langs|first %}
 
 148                                                 <a href="{{ head.alternates[lang].relative }}" hreflang="{{ lang|replace({'_': '-'}) }}" title="{{ head.alternates[lang].title }}">{{ head.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 %}#}