summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Akritidis <43294513+cakrit@users.noreply.github.com>2018-11-30 15:41:47 +0100
committerGitHub <noreply@github.com>2018-11-30 15:41:47 +0100
commit8f585710c7737d1d8e731915872641c76c4a0dc6 (patch)
treef22491adba186219b02c0559ac8cbee56c0b310c
parent39de47141707969662a61db7b17933fe0bfbba40 (diff)
Add cookie consent javascript to docs (#4801)
Show pop up that the site uses cookies. We don't collect any personal info, so no opt-in/opt-out required (GA will be configured with IP Anonymization) Related to #4798
-rwxr-xr-xdocs/generator/buildyaml.sh5
-rw-r--r--docs/javascripts/cookie-consent.js15
2 files changed, 20 insertions, 0 deletions
diff --git a/docs/generator/buildyaml.sh b/docs/generator/buildyaml.sh
index f541d7eaa8..17d02e86be 100755
--- a/docs/generator/buildyaml.sh
+++ b/docs/generator/buildyaml.sh
@@ -64,6 +64,11 @@ extra:
theme:
name: "material"
custom_dir: themes/material
+extra_css:
+ - "https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css"
+extra_javascript:
+ - "javascripts/cookie-consent.js"
+ - "https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"
markdown_extensions:
- extra
- abbr
diff --git a/docs/javascripts/cookie-consent.js b/docs/javascripts/cookie-consent.js
new file mode 100644
index 0000000000..a5c65da495
--- /dev/null
+++ b/docs/javascripts/cookie-consent.js
@@ -0,0 +1,15 @@
+window.addEventListener("load", function(){
+window.cookieconsent.initialise({
+ "palette": {
+ "popup": {
+ "background": "#000"
+ },
+ "button": {
+ "background": "#f1d600"
+ }
+ },
+ "content": {
+ "href": "https://docs.netdata.cloud/docs/privacy-policy/"
+ }
+})});
+