135 lines
4.8 KiB
HTML
135 lines
4.8 KiB
HTML
{% extends theme_base_filename %}
|
|
{% load static i18n combo gadjo pwa %}
|
|
|
|
{% block meta_icons %}
|
|
{% if favicon %}
|
|
<link rel="shortcut icon" href="{{site_base}}{% static "" %}{{favicon}}" />
|
|
{% endif %}
|
|
{% for icon_size in icon_sizes %}
|
|
<link rel="apple-touch-icon" sizes="{{icon_size}}x{{icon_size}}"
|
|
href="{{ site_base }}{% static "" %}{{ css_variant }}/{{ icon_prefix }}{{ icon_size }}px.png">
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% block extra_top_head %}
|
|
{{ block.super }}
|
|
<script src="{{site_base}}{% xstatic 'jquery' 'jquery.min.js' %}"></script>
|
|
{% skeleton_extra_placeholder extra-top-head %}
|
|
{% end_skeleton_extra_placeholder %}
|
|
{% if page.picture %}
|
|
<style>
|
|
:root {
|
|
--page-picture: url("{{site_base}}{{page.picture.url}}");
|
|
}
|
|
</style>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block extra_scripts %}
|
|
<script src="{{site_base}}{% static 'js/combo.public.js' %}?{% start_timestamp %}" async></script>
|
|
<script src="{{site_base}}{% static 'js/combo.back.js' %}?{% start_timestamp %}" async></script>
|
|
<script src="{{site_base}}/__services.js"></script>
|
|
{% if not no_extra_js %}
|
|
<script src="{{site_base}}{% static "" %}{{css_variant}}/extra.js?{% start_timestamp %}" async></script>
|
|
{% endif %}
|
|
{% skeleton_extra_placeholder extra-head %}
|
|
{% end_skeleton_extra_placeholder %}
|
|
{% endblock %}
|
|
|
|
{% block bodyattrs %}
|
|
data-api-root="{{ site_base }}/api/"
|
|
{% if check_badges %}data-check-badges="true"{% endif %}
|
|
{% if page.picture %}data-picture="{{site_base}}{{page.picture.url}}"{% endif %}
|
|
{% skeleton_extra_placeholder extra-body-args %}
|
|
{% end_skeleton_extra_placeholder %}
|
|
{% endblock %}
|
|
|
|
{% block bodyclasses %}
|
|
page-{{ page.slug }} page-template-{{ page.template_name }} {% if pages %}section-{{pages.0.slug}}{% endif %}
|
|
{% skeleton_extra_placeholder extra-body-class %}
|
|
{% if user.is_authenticated %}authenticated-user{% else %}anonymous-user{% endif %}
|
|
{% end_skeleton_extra_placeholder %}
|
|
{% if page.picture %}has-picture{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block title %} - {% if render_skeleton %}{% skeleton_extra_placeholder title %}{% firstof page_title site_title %}{% end_skeleton_extra_placeholder %}{% else %}{{page.title}}{% endif %}{% endblock %}
|
|
|
|
{% block menu %}
|
|
{% show_menu depth=2 ignore_visibility=True %}
|
|
{% placeholder "menu_right" %}
|
|
{% endblock %}
|
|
|
|
{% block before-main-content %}
|
|
{% if pwa_display == "standalone" or pwa_display == "fullscreen" %}
|
|
{% pwa_navigation %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block messages %}
|
|
{{ block.super }}
|
|
{% placeholder "messages" %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% block combo-content %}
|
|
{% block page-content %}
|
|
<div id="columns">
|
|
{% trans "Content" as name %}
|
|
{% placeholder "content" name=name %}
|
|
</div>
|
|
{% endblock %}
|
|
{% endblock %}
|
|
{% endblock %}
|
|
|
|
{% block footer %}
|
|
{% trans "Footer" as name %}
|
|
{% placeholder "footer" acquired=True name=name %}
|
|
<div class="partners">
|
|
<div class="partner apave"></div>
|
|
<div class="partner veritas"></div>
|
|
<div class="partner dekra"></div>
|
|
<div class="partner qualiconsult"></div>
|
|
<div class="partner sgs"></div>
|
|
<div class="partner socotec"></div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block user-info %}
|
|
{% skeleton_extra_placeholder user-info %}
|
|
{% if user.is_authenticated %}
|
|
<span class="logged-in">
|
|
{% if idp_account_url %}<a href="{{idp_account_url}}">{% endif %}
|
|
<span class="connected-user">{{user.first_name}} {{user.last_name}}</span>{% if idp_account_url %}</a>{% endif %}
|
|
<a accesskey="o" class="logout" href="{% url 'auth_logout' %}">Déconnexion</a>
|
|
</span>
|
|
{% else %}
|
|
{% if idp_registration_url %}
|
|
<span class="login"><a accesskey="2" href="{% url 'auth_login' %}">Connexion</a> <span class="sep">/</span>
|
|
<a class="registration" href="{{idp_registration_url}}">Inscription</a></span>
|
|
{% else %}
|
|
<span class="login"><a accesskey="2" href="{% url 'auth_login' %}">Connexion <span class="sep">/</span> Inscription</a></span>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% end_skeleton_extra_placeholder %}
|
|
{% endblock %}
|
|
|
|
{% block body-bottom %}
|
|
{% skeleton_extra_placeholder service-worker %}
|
|
{% if page %} {# limit this to combo itself #}
|
|
{% if pwa_display == "standalone" or pwa_display == "fullscreen" %}
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
navigator.serviceWorker.register('/service-worker.js', {scope: '/'}).then(function(registration) {
|
|
// Registration was successful
|
|
console.log('ServiceWorker registration successful with scope: ', registration.scope);
|
|
}).catch(function(err) {
|
|
// registration failed :(
|
|
console.log('ServiceWorker registration failed: ', err);
|
|
});
|
|
}
|
|
</script>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% end_skeleton_extra_placeholder %}
|
|
{% endblock %}
|