fix(frontend): fix persistent cookie banner, close #4
This commit is contained in:
parent
dd04b0759f
commit
aeb3898ca9
2 changed files with 9 additions and 1 deletions
|
@ -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>
|
||||
|
|
|
@ -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&on utilise des cookies (pour la langue et cette bannière)" %}',
|
||||
{pos: 'bottom-center'}
|
||||
|
|
Loading…
Reference in a new issue