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