Skip to content

Commit

Permalink
Apply site color theme to cookie consent banner (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro J. Ortiz authored and gcushen committed May 1, 2018
1 parent ed5a518 commit fe8ea7b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions layouts/partials/cookie_consent.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{{ if .Site.Params.privacy_pack }}
{{ $scr := .Scratch }}
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#000"
"background": "{{ $scr.Get "primary" }}",
"text": "{{ $scr.Get "background" }}"
},
"button": {
"background": "#f1d600"
"background": "{{ $scr.Get "background" }}",
"text": "{{ $scr.Get "primary" }}"
}
},
"theme": "classic",
"content": {
"message": {{ i18n "cookie_message" | default "This website uses cookies to ensure you get the best experience on our website." }},
"dismiss": {{ i18n "cookie_dismiss" | default "Got it!" }},
"link": {{ i18n "cookie_learn" | default "Learn more" }}
}
})});
</script>
{{ end }}
{{ end }}

0 comments on commit fe8ea7b

Please sign in to comment.