]> Raphaƫl G. Git Repositories - airbundle/blob - Resources/views/body.html.twig
Renamed in Handler
[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 app.request.locale is defined and app.request.locale %} hreflang="{{ app.request.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 ogps is defined and ogps %}
47 {% for property, content in ogps %}
48 <meta property="og:{{ property }}" content="{{ content }}" />
49 {% endfor %}
50 {% for property, contents in facebooks %}
51 {% if contents is iterable %}
52 {% for content in contents %}
53 <meta property="fb:{{ property }}" content="{{ content }}" />
54 {% endfor %}
55 {% else %}
56 <meta property="fb:{{ property }}" content="{{ contents }}" />
57 {% endif %}
58 {% endfor %}
59 {% endif %}
60 {% endblock %}
61 {% block javascripts %}
62 {% stopwatch 'javascript' %}
63 {#{% javascript '@RapsysAir/js/*.js' %}
64 <script type="text/javascript" src="{{ asset_url }}"></script>
65 {% endjavascript %}#}
66 {% endstopwatch %}
67 {% endblock %}
68 {% block title %}{{ [site.title, page.section, page.title]|filter(v => v)|join(' - ') }}{% endblock %}
69 {% block body %}
70 {% block header %}
71 <header id="header">
72 {% if site is defined and site %}
73 {% 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 %}
74 {% endif %}
75 {% block header_nav %}
76 <nav>
77 <h2>{% trans %}Navigation{% endtrans %}</h2>
78 <ul>
79 <li><a href="{{ path('rapsys_air') }}" rel="home">{% trans %}Home{% endtrans %}</a></li>
80 <li><a href="{{ path('rapsys_air_contact') }}" rel="contact">{% trans %}Contact{% endtrans %}</a></li>
81 <li><a href="{{ path('rapsys_air_frequently_asked_questions') }}">{% trans %}Frequently asked questions{% endtrans %}</a></li>
82 <li><a href="{{ path('rapsys_air_user') }}">{% trans %}Users{% endtrans %}</a></li>
83 {% if is_granted('ROLE_GUEST') %}
84 <li><a href="{{ path('rapsys_air_organizer_regulation') }}">{% trans %}Organizer regulation{% endtrans %}</a></li>
85 {% endif %}
86 {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
87 <li><a href="{{ path('rapsys_air_user_view', {id: app.user.id}) }}">{% trans %}My account{% endtrans %}</a></li>
88 <li><a href="{{ path('rapsys_user_logout') }}">{% trans %}Logout{% endtrans %}</a></li>
89 {% else %}
90 <li><a href="{{ path('rapsys_user_login') }}">{% trans %}Login{% endtrans %}</a></li>
91 <li><a href="{{ path('rapsys_user_register') }}">{% trans %}Register{% endtrans %}</a></li>
92 {% endif %}
93 </ul>
94 </nav>
95 {% endblock %}
96 {#
97 {% block site_subtitle %}{% endblock %}
98 {% block site_tagline %}
99 {% if tags is defined and tags %}
100 <ul>
101 {% for id, tag in tags %}
102 <li><h2><a href="#{{id}}">{{tag}}</a></h2></li>
103 {% endfor %}
104 </ul>
105 {% endif %}
106 {% endblock %}
107 #}
108 </header>
109 {% endblock %}
110 {% block message %}
111 {# pass an array argument to get the messages of those types (['warning', 'error']) #}
112 {% for label, messages in app.flashes %}
113 {% if messages %}
114 <div class="message {{label}}">
115 <ul>
116 {% for message in messages %}
117 <li>{{ message }}</li>
118 {% endfor %}
119 </ul>
120 </div>
121 {% endif %}
122 {% endfor %}
123 {% endblock %}
124 {#
125 {% block sidebar %}<aside id="sidebar"></aside>{% endblock %}
126 #}
127 {% block content %}
128 <section id="content">
129 <h2><a href="{{ path('rapsys_air_homepage') }}">{{ section }}</a></h2>
130 <p>{% trans %}Outdoor space reservation system{% endtrans %}</p>
131 </section>
132 {% endblock %}
133 {% block footer %}
134 <footer id="footer">
135 <a href="{{ path('rapsys_air_about') }}">{% trans %}About{% endtrans %}</a>
136 {% if copy is defined and copy %}
137 <details><summary>{{ copy.long }}</summary><span>{{ copy.short }} <a href="{{ copy.link }}" title="{{ copy.title }}" rel="author">{{ copy.by }}</a></span></details>
138 {% endif %}
139 <a href="{{ path('rapsys_air_terms_of_service') }}">{% trans %}Terms of service{% endtrans %}</a>
140 {% if alternates is defined and alternates %}
141 {% set langs = alternates|keys|filter(v => v|length == 5) %}
142 {% if langs|length > 1 %}
143 <ul>
144 {% for lang in langs %}
145 <li><a href="{{ alternates[lang].relative }}" hreflang="{{ lang }}" title="{{ alternates[lang].title }}">{{ alternates[lang].translated }}</a></li>
146 {% endfor %}
147 </ul>
148 {% else %}
149 {% set lang = langs|first %}
150 <a href="{{ alternates[lang].relative }}" hreflang="{{ lang }}" title="{{ alternates[lang].title }}">{{ alternates[lang].translated }}</a>
151 {% endif %}
152 {% else %}
153 <span>&nbsp;</span>
154 {% endif %}
155 </footer>
156 {% endblock %}
157 {% endblock %}