mirror of
https://gitlab.com/CodeSolutionsProject/CodeShare.git
synced 2026-02-14 09:01:33 +01:00
Improve cookies disable: TODO
This commit is contained in:
@@ -102,6 +102,10 @@
|
||||
<td>cookieconsent_status</td>
|
||||
<td>Cookie alert visibility</td>
|
||||
</tr>
|
||||
<tr class="active">
|
||||
<td>Google Analytics Cookies</td>
|
||||
<td>Track your navigation on CodeShare</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 class="top10">Disclosure Of Data</h4>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<h5>Open source licenses</h5>
|
||||
<p><a href="http://getbootstrap.com/"><strong>Bootstrap 3</strong> by Twitter - Licensed under MIT</a></p>
|
||||
<p><a href="https://bootswatch.com/"><strong>Paper theme to Boostrap 3</strong> by Bootswatch - Licensed under MIT</a></p>
|
||||
<p><a href="https://jquery.com/"><strong>jQuery 3.2.1</strong> by jQuery - Licensed under MIT</a></p>
|
||||
<p><a href="https://jquery.com/"><strong>jQuery</strong> by jQuery - Licensed under MIT</a></p>
|
||||
<p><a href="https://highlightjs.org/"><strong>Highlight.js</strong> by Ivan Sagalev - Licensed under BSD</a></p>
|
||||
<p><a href="https://cookieconsent.insites.com"><strong>Cookie Consent</strong> by Insites - Licensed under MIT</a></p>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link type="text/css" rel="stylesheet" href="{{ app.frontcss }}/main.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="{{ app.frontcss }}/alert.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="{{ app.frontcss }}/codeStyles/vs.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
|
||||
{#<link rel="shortcut icon" href="{{ path.img }}favicon.ico" type="image/x-icon"/>#}
|
||||
{% block css %}{% endblock %}
|
||||
@@ -49,10 +49,41 @@
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
{% endblock %}
|
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
|
||||
<script>
|
||||
window.addEventListener("load", function(){
|
||||
window.cookieconsent.initialise({
|
||||
onInitialise: function (status) {
|
||||
var type = this.options.type;
|
||||
var didConsent = this.hasConsented();
|
||||
if (type == 'opt-in' && didConsent) {
|
||||
// enable cookies
|
||||
}
|
||||
if (type == 'opt-out' && !didConsent) {
|
||||
// disable cookies
|
||||
}
|
||||
},
|
||||
|
||||
onStatusChange: function(status, chosenBefore) {
|
||||
var type = this.options.type;
|
||||
var didConsent = this.hasConsented();
|
||||
if (type == 'opt-in' && didConsent) {
|
||||
// enable cookies
|
||||
}
|
||||
if (type == 'opt-out' && !didConsent) {
|
||||
// disable cookies
|
||||
}
|
||||
},
|
||||
|
||||
onRevokeChoice: function() {
|
||||
var type = this.options.type;
|
||||
if (type == 'opt-in') {
|
||||
// disable cookies
|
||||
}
|
||||
if (type == 'opt-out') {
|
||||
// enable cookies
|
||||
}
|
||||
},
|
||||
"palette": {
|
||||
"popup": {
|
||||
"background": "#2196f3",
|
||||
@@ -64,11 +95,13 @@
|
||||
"border": "#b2dbfb"
|
||||
}
|
||||
},
|
||||
"type": "opt-out",
|
||||
"content": {
|
||||
"href": "{{ path('tos') }}#cookiePolicy",
|
||||
"message": "This website uses cookies to ensure you get the best experience on on our website. If you don't accept any cookie won't be install on your browser.",
|
||||
"dismiss": "I accept it"
|
||||
"dismiss": "I accept them",
|
||||
"href": "{{ path('tos') }}#cookiePolicy"
|
||||
}
|
||||
})});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user