Browse Source

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

v2
Romain J 2 weeks ago
parent
commit
aeb3898ca9
2 changed files with 9 additions and 1 deletions
  1. +5
    -0
      .idea/vcs.xml
  2. +4
    -1
      apps/gnous_eu/templates/layouts/base.html

+ 5
- 0
.idea/vcs.xml 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>

+ 4
- 1
apps/gnous_eu/templates/layouts/base.html 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'}


Loading…
Cancel
Save