]> git.agnieray.net Git - galette.git/blob - galette/templates/default/elements/header.html.twig
e2b28454ada80d58f6104e6810e10d648849e2b3
[galette.git] / galette / templates / default / elements / header.html.twig
1 {# This file contains common html headers to include for Galette Twig rendering. #}
2 <title>{% if preferences.pref_slogan != "" %}{{ __(preferences.pref_slogan) }} - {% endif %}{% if page_title != "" %}{{ page_title }} - {% endif %}Galette {{ constant('GALETTE_VERSION') }}</title>
3 <meta charset="UTF-8" />
4 <meta name="viewport" content="width=device-width" />
5 <link rel="stylesheet" type="text/css" href="{{ base_path() }}/{{ constant('GALETTE_THEME') }}ui/semantic{% if i18n.isRtl() %}.rtl{% endif %}.min.css" />
6
7 {% if html_editor %}
8 <link rel="stylesheet" type="text/css" href="{{ base_path() }}/assets/css/codemirror.css">
9 <link rel="stylesheet" type="text/css" href="{{ base_path() }}/assets/css/summernote.min.css" />
10 {% endif %}
11
12 {# Let's see if a local CSS exists and include it #}
13 {% set localstylesheet = constant('_CURRENT_THEME_PATH') ~ "galette_local.css" %}
14 {% if file_exists(localstylesheet) %}
15 <link rel="stylesheet" type="text/css" href="{{ base_path() }}/{{ constant('GALETTE_THEME') }}galette_local.css" />
16 {% endif %}
17 {# Let's see if a local print CSS exists and include it #}
18 {% set localprintstylesheet = constant('_CURRENT_THEME_PATH') ~ "galette_print_local.css" %}
19 {% if file_exists(localprintstylesheet) %}
20 <link rel="stylesheet" type="text/css" href="{{ base_path() }}/{{ constant('GALETTE_THEME') }}galette_print_local.css" media="print" />
21 {% endif %}
22 <link rel="shortcut icon" href="{{ base_path() }}/{{ constant('GALETTE_THEME') }}images/favicon.png" />
23
24 <script type="text/javascript" src="{{ base_path() }}/assets/js/jquery.min.js"></script>
25
26 {# If some additional headers should be added from plugins, we load the relevant template file
27 We have to use a template file, so Twig will do its work (like replacing variables). #}
28 {% if plugin_headers|length != 0 %}
29 {% for mid, header in plugin_headers %}
30 {% include header with {'module_id': mid} %}
31 {% endfor %}
32 {% endif %}