EyeTrackVR-Docs/docs/_includes/cookie_consent.html
ZanzyTHEbar 4fd6a2dd81 update
- Removed toggle dark mode button
- Implement browser auto-detection of dark-mode based on browser setting
- Moved cookies JS to it's own file
- Organised file structure
2022-06-04 21:18:07 +02:00

51 lines
1.4 KiB
HTML

<style>
#cookie-notice {
padding: 0.5rem 1rem;
display: none;
text-align: center;
position: fixed;
bottom: 0;
width: 100%;
background: #27262b;
color: rgba(255, 255, 255, 0.8);
}
#cookie-notice a {
display: inline-block;
cursor: pointer;
margin-left: 0.5rem;
}
@media (max-width: 767px) {
#cookie-notice span {
display: block;
padding-top: 3px;
margin-bottom: 1rem;
}
#cookie-notice a {
position: relative;
bottom: 4px;
}
}
</style>
<div id="cookie-notice">
<span>I would like to use third party cookies and scripts to improve the functionality of this
website.
</span>
<a id="cookie-notice-accept" class="btn btn-primary btn-sm">Approve</a>
<a href="/EyeTrackVR/privacy" class="btn btn-primary btn-sm">More info
</a>
</div>
<script>
if (readCookie('cookie-notice-dismissed') == 'true') {
{% include ga.js %}
} else {
document.getElementById('cookie-notice').style.display = 'block';
}
document.getElementById('cookie-notice-accept').addEventListener("click", function () {
createCookie('cookie-notice-dismissed', 'true', 31);
document.getElementById('cookie-notice').style.display = 'none';
location.reload();
});
</script>