fix(frontend): fix persistent cookie banner, close #4

This commit is contained in:
Romain J 2020-05-16 12:17:44 +02:00
parent dd04b0759f
commit aeb3898ca9
2 changed files with 9 additions and 1 deletions

View file

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CommitMessageInspectionProfile">
<profile version="1.0">
<inspection_tool class="GrazieCommit" enabled="true" level="TYPO" enabled_by_default="true" />
</profile>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>

View file

@ -37,7 +37,10 @@
</script>
<script>
if (document.cookie.split('cookie-banner=')[1] != 'hidden') {
let cookies = document.cookie.split('; ');
let banner_cookie = document.cookie.split('; ').filter(e => e.startsWith('cookie-banner='))[0]
if (banner_cookie == undefined || banner_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'}