gnousdoteu-v3/apps/gnous_eu/templates/layouts/base.html
2020-05-16 02:12:21 +02:00

54 lines
No EOL
1.6 KiB
HTML

{% load static %}
{% load i18n %}
<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}" data-theme="dark">
{% include 'layouts/head.html' %}
<body>
<div id="app">
<div class="uk-flex uk-flex-column min-height-100vh">
{% include 'layouts/header.html' %}
<div class="uk-flex-1">
{% block content %}
{% endblock %}
</div>
{% include 'layouts/footer.html' %}
</div>
{% include 'layouts/sidebar.html' %}
</div>
{% block javascript %}{% endblock %}
<script src="{% static 'javascripts/uikit/uikit.js' %}"></script>
<script src="{% static 'javascripts/uikit/uikit-icons.js' %}"></script>
<script>
window.theme = document.querySelector('input[name=theme]');
theme.checked = document.documentElement.getAttribute('data-theme') === 'dark';
theme.addEventListener('change', function () {
document.documentElement.setAttribute('data-theme', this.checked ? 'dark' : 'light')
})
</script>
<script>
if (document.cookie.split('cookie-banner=')[1] != 'hidden') {
cookie_notification = UIkit.notification(
'<span data-uk-icon="quote-right"></span> {% trans "Bla bla bla... bannière alakon pour dire qu&amp;on utilise des cookies (pour la langue et cette bannière)" %}',
{pos: 'bottom-center'}
);
UIkit.util.on(document, 'close', function (evt) {
if (evt.detail[0] === cookie_notification) {
document.cookie = 'cookie-banner=hidden'
}
});
}
</script>
</body>
</html>