Merge branch 'master' of ssh://gitlab.com/CodeSolutionsProject/CodeShare

This commit is contained in:
JoseluCross
2018-10-26 16:43:08 +02:00
10 changed files with 80 additions and 15 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -28,10 +28,10 @@
<label class="control-label col-sm-6" for="lang">Name of external library, if needed:</label>
<label class="control-label col-sm-6" for="lang">It needs a specific version of this library?:</label>
<div class="col-sm-6">
<input type="text" name="extlib" placeholder="Name of library"/>
<input type="text" name="extlib" id="extlib" placeholder="Name of library"/>
</div>
<div class="col-sm-6">
<input type="text" name="extlibver" placeholder="Version used, only if needed"/>
<input type="text" name="extlibver" id="extlibver" placeholder="Version used, only if needed"/>
</div>
</div>
<div class="form-group">
@@ -73,4 +73,25 @@
width: 100%;
}
</style>
{% endblock %}
{% block js %}
<script>
function verRequired() {
if(extlib.value=="")
extlibver.removeAttribute("required");
else
extlibver.setAttribute("required","required");
if(extlib2.value=="")
extlibver2.removeAttribute("required");
else
extlibver2.setAttribute("required","required");
}
extlib = document.getElementById("extlib");
extlibver=document.getElementById("extlibver");
extlib2 = document.getElementById("extlib2");
extlibver2=document.getElementById("extlibver2");
extlib.onkeyup=verRequired;
extlib2.onkeyup=verRequired;
</script>
{% endblock %}

View File

@@ -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) {
}
if (type == 'opt-out' && !didConsent) {
deleteCookies();
}
},
"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) {
deleteCookies();
}
},
"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>