Verified Commit fdf4d3ff authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

variable text in config

parent 17f2aa22
......@@ -84,7 +84,6 @@ kramdown:
# parse_block_html: true
# GDPR banner settings
banner_text: >-
This website needs some cookies and similar means to function.<br>
If you permit us, we will use those means to collect data on your visits for aggregated statistics to improve our service.
......@@ -96,4 +95,8 @@ banner_more_text: >-
More information
cookies_expire: 180 # days
analyticsurl: https://analytics.lcsb.uni.lu/hub/
siteID: 4 # you get this siteID by sending an email to lcsb-r3@uni.lu
\ No newline at end of file
siteID: 4 # you get this siteID by sending an email to lcsb-r3@uni.lu
accept_all_text: >-
All cookies are accepted
only_necessary_text: >-
Only necessary cookies are accepted
\ No newline at end of file
......@@ -24,6 +24,8 @@
settings.expires = "{{ site.cookies_expire }}";
settings.matomoURL = "{{ site.analyticsurl }}";
settings.siteID = "{{ site.siteID }}";
settings.accept_all_text = "{{ site.accept_all_text }}"
settings.only_necessary_text = "{{ site.only_necessary_text }}"
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@rc/dist/js.cookie.min.js"></script>
......
......@@ -44,9 +44,9 @@ function loadMatomo() {
function setResultText(acceptCookies){
if (acceptCookies == true) {
$('#gdpr-result-text').html('All cookies are accepted');
$('#gdpr-result-text').html(settings.accept_all_text);
} else {
$('#gdpr-result-text').html('Only necessary cookies are accepted');
$('#gdpr-result-text').html(settings.only_necessary_text);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment