Skip to content

Commit 7330892

Browse files
committed
docs:layout:add cookie concent
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent a03c28e commit 7330892

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

docs/_templates/layout.html

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@
8080
.wy-nav-side {
8181
top: 4rem;
8282
}
83+
.no-margin {
84+
margin-bottom: 0 !important;
85+
}
86+
.auto-width > img {
87+
width: auto !important;
88+
}
8389
</style>
8490
{% endblock %}
8591
{% block extrabody %}
@@ -97,6 +103,7 @@
97103
{% block footer %}
98104
<!-- Global site tag (gtag.js) - Google Analytics -->
99105
<script async src="https://www.googletagmanager.com/gtag/js?id=G-CLMHTDV889"></script>
106+
<script src="https://cc.cdn.civiccomputing.com/9/cookieControl-9.x.min.js" type="text/javascript"></script>
100107
<script>
101108
function myFunction() {
102109
var x = document.getElementById("myTopnav");
@@ -107,12 +114,35 @@
107114
}
108115
}
109116
$(window).scroll(function () {
110-
var top = 64 - $(this).scrollTop();
117+
var top = 65.6 - $(this).scrollTop();
111118
if (top < 0)
112119
$('.wy-nav-side').css({ 'top': 0 });
113120
else
114121
$('.wy-nav-side').css({ 'top': top });
115122
});
123+
var config = {
124+
"apiKey": "688bab0005645ab4ef2e0d8bcf4f2e3bd467a3e9",
125+
"product": "COMMUNITY",
126+
"optionalCookies": [{
127+
"name": "analytics",
128+
"label": "Analytical Cookies",
129+
"description": "Analytical cookies help us to improve our website by collecting and reporting information on its usage.",
130+
"cookies": ["_ga_*", "_ga", "_gid", "_gat_gtag_UA_*"],
131+
"onAccept": "function () {}",
132+
"onRevoke": "function () {}"
133+
}],
134+
"mode": "ccpa",
135+
"excludedCountries": "all",
136+
"iabCMP": false,
137+
"necessaryCookies": ["__cf_bm"],
138+
"branding": {
139+
"fontColor": "",
140+
"backgroundColor": "#343131"
141+
}
142+
};
143+
144+
CookieControl.load( config );
145+
116146
window.dataLayer = window.dataLayer || [];
117147
function gtag() { dataLayer.push(arguments); }
118148
gtag('js', new Date());

0 commit comments

Comments
 (0)