diff options
author | Dillon <dillonzq@outlook.com> | 2020-05-13 16:19:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 16:19:39 +0300 |
commit | 0a9ec9745073527c2d43c545ef8d228fb22a16fa (patch) | |
tree | 8572ef783e39c44d35737a4b5fa7b38bf8769c1a /src | |
parent | 8d491509e02ff1a4a50f1a1b70e79e94c48bb2f6 (diff) |
feat(cookies): add Cookie consent banner (#355)
Diffstat (limited to 'src')
-rw-r--r-- | src/js/theme.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/theme.js b/src/js/theme.js index 0d44938..2c0b543 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -626,6 +626,10 @@ class Theme { if (SmoothScroll) new SmoothScroll('[href^="#"]', { speed: 300, speedAsDuration: true, header: '#header-desktop' }); } + initCookieconsent() { + if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent); + } + onScroll() { const $headers = []; if (document.body.getAttribute('header-desktop') === 'auto') $headers.push(document.getElementById('header-desktop')); @@ -706,6 +710,7 @@ class Theme { this.initEcharts(); this.initTypeit(); this.initMapbox(); + this.initCookieconsent(); this.onScroll(); this.onResize(); |