]> Raphaƫl G. Git Repositories - airbundle/blob - Resources/views/base.html.twig
New title layout
[airbundle] / Resources / views / base.html.twig
1 <!DOCTYPE html>
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>
6 {% block stylesheet %}
7 <meta name="viewport" content="width=device-width, initial-scale=1" />
8 {% if description is defined and description %}
9 <meta name="description" content="{{ description }}" />
10 {% endif %}
11 {% if keywords is defined and keywords %}
12 <meta name="keywords" content="{{ keywords|join(', ') }}" />
13 {% endif %}
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 %}
18 {# Apple #}
19 {% if size in [120, 152, 167, 180] %}
20 {% if size == 180 %}
21 <link rel="apple-touch-icon" href="{{ asset(icon) }}" />
22 {% endif %}
23 <link rel="apple-touch-icon" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />
24 {# Windows #}
25 {% elseif size in [70, 150, 310] %}
26 <meta name="msapplication-square{{ size }}x{{ size }}logo" content="{{ asset(icon) }}" />
27 {# Others #}
28 {% else %}
29 <link rel="icon" type="image/png" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />
30 {% endif %}
31 {% endfor %}
32 {% endif %}
33 {# stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysAirBundle/Resources/public/css/{reset,screen}.css' #}
34 {% stopwatch 'stylesheet' %}
35 {% stylesheet '@rapsys_air_bundle/css/{reset,droidsans,lemon,notoemoji,screen}.css' %}
36 <link rel="stylesheet" type="text/css" href="{{ asset_url }}?20221024100144" />
37 {% endstylesheet %}
38 {% endstopwatch %}
39 {% if canonical is defined and canonical %}
40 <link rel="canonical" href="{{ canonical }}"{% if locale is defined and locale %} hreflang="{{ locale }}"{% endif %} />
41 {% endif %}
42 {% if alternates is defined and alternates %}
43 {% for lang, alternate in alternates %}
44 <link rel="alternate" href="{{ alternate.absolute }}" hreflang="{{ lang }}" />
45 {% endfor %}
46 {% endif %}
47 {% if facebook is defined and facebook %}
48 {% for property, contents in facebook %}
49 {% if contents is iterable %}
50 {% for content in contents %}
51 <meta property="{{ property }}" content="{{ content }}" />
52 {% endfor %}
53 {% else %}
54 <meta property="{{ property }}" content="{{ contents }}" />
55 {% endif %}
56 {% endfor %}
57 {% endif %}
58 {% endblock %}
59 </head>
60 <body>
61 {% block body %}
62 {% block header %}
63 <header id="header">
64 <div>
65 {% if logo is defined and logo %}
66 {% block header_title %}<a id="logo" href="{{ root }}" title="{{ title.site }}"><img src="{{ asset(logo.svg) }}?20221024100144" srcset="{{ asset(logo.png) }}?20221024100144 200w, {{ asset(logo.svg) }}?20221024100144 400w" sizes="(min-width:400px) 400px, 200px" alt="{{ title.site }}" width="100" height="45" /><span>{{ title.site }}</span></a>{% endblock %}
67 {% endif %}
68 <h1 id="title"><a href="{{ canonical }}">{{ title.page }}</a></h1>
69 </div>
70 {% block header_nav %}
71 <nav id="nav">
72 {#<h2>{% trans %}Navigation{% endtrans %}</h2>#}
73 <a href="{{ path('rapsys_air') }}" rel="home">{% trans %}Home{% endtrans %}</a>
74 <a href="{{ path('rapsys_air_contact') }}" rel="contact">{% trans %}Contact{% endtrans %}</a>
75 <a href="{{ path('rapsys_air_frequently_asked_questions') }}">{% trans %}Frequently asked questions{% endtrans %}</a>
76 {% if is_granted('ROLE_ADMIN') %}
77 <a href="{{ path('rapsys_air_user') }}">{% trans %}Users{% endtrans %}</a>
78 {% endif %}
79 {% if is_granted('ROLE_GUEST') %}
80 <a href="{{ path('rapsys_air_organizer_regulation') }}">{% trans %}Organizer regulation{% endtrans %}</a>
81 {% endif %}
82 {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
83 <a href="{{ path('rapsys_user_edit', {mail: app.user.mail|short, hash: app.user.mail|short|hash}) }}">{% trans %}My account{% endtrans %}</a>
84 <a href="{{ path('rapsys_user_logout') }}">{% trans %}Logout{% endtrans %}</a>
85 {% else %}
86 <a href="{{ path('rapsys_user_login') }}">{% trans %}Login{% endtrans %}</a>
87 <a href="{{ path('rapsys_user_register') }}">{% trans %}Register{% endtrans %}</a>
88 {% endif %}
89 </nav>
90 {% endblock %}
91 {#
92 {% block site_subtitle %}{% endblock %}
93 {% block site_tagline %}
94 {% if tags is defined and tags %}
95 <ul>
96 {% for id, tag in tags %}
97 <li><h2><a href="#{{id}}">{{tag}}</a></h2></li>
98 {% endfor %}
99 </ul>
100 {% endif %}
101 {% endblock %}
102 #}
103 </header>
104 {% endblock %}
105 {% block message %}
106 {# pass an array argument to get the messages of those types (['warning', 'error']) #}
107 {% for label, messages in app.flashes %}
108 {% if messages %}
109 <div class="message {{label}}">
110 <ul>
111 {% for message in messages %}
112 <li>{{ message }}</li>
113 {% endfor %}
114 </ul>
115 </div>
116 {% endif %}
117 {% endfor %}
118 {% endblock %}
119 {#
120 {% block sidebar %}<aside id="sidebar"></aside>{% endblock %}
121 #}
122 {% block content %}
123 <article>
124 <header>
125 <h2>{% trans %}Outdoor space reservation system{% endtrans %}</h2>
126 </header>
127 </article>
128 {% endblock %}
129 {% block footer %}
130 <footer id="footer">
131 <a href="{{ path('rapsys_air_about') }}">{% trans %}About{% endtrans %}</a>
132 {% if copy is defined and copy %}
133 <details><summary>{{ copy.long }}</summary><span>{{ copy.short }} <a href="{{ copy.link }}" title="{{ copy.title }}" rel="author">{{ copy.by }}</a></span></details>
134 {% endif %}
135 <a href="{{ path('rapsys_air_terms_of_service') }}">{% trans %}Terms of service{% endtrans %}</a>
136 {% if alternates is defined and alternates %}
137 {% set langs = alternates|keys|filter(v => v|length == 5) %}
138 {% if langs|length > 1 %}
139 <ul>
140 {% for lang in langs %}
141 <li><a href="{{ alternates[lang].relative }}" hreflang="{{ lang|replace({'_': '-'}) }}" title="{{ alternates[lang].title }}">{{ alternates[lang].translated }}</a></li>
142 {% endfor %}
143 </ul>
144 {% else %}
145 {% set lang = langs|first %}
146 <a href="{{ alternates[lang].relative }}" hreflang="{{ lang|replace({'_': '-'}) }}" title="{{ alternates[lang].title }}">{{ alternates[lang].translated }}</a>
147 {% endif %}
148 {% else %}
149 <span>&nbsp;</span>
150 {% endif %}
151 </footer>
152 {% endblock %}
153 {% endblock %}
154 {% block javascript %}
155 {% stopwatch 'javascript' %}
156 {#{% javascript '@RapsysAir/js/*.js' %}
157 <script type="text/javascript" src="{{ asset_url }}"></script>
158 {% endjavascript %}#}
159 {% endstopwatch %}
160 {% endblock %}
161 </body>
162 </html>