removed cookie banner

This commit is contained in:
coulisse 2024-03-10 10:04:19 +01:00
parent 05b1efde28
commit 1592993225
6 changed files with 29 additions and 80 deletions

View File

@ -3,6 +3,7 @@ Date: 10/03/2024
Release: v2.5.3
- adapted card size and text for mobile
- removed monitor
- removed cookie consent banner, since this application uses only technical cookies
- issue [#51] (https://github.com/coulisse/spiderweb/issues/51) -- just for caching
- security [#22] (https://github.com/coulisse/spiderweb/security/dependabot/22)

View File

@ -1,14 +0,0 @@
/*
script used to acquire user consent to cookie banner (and set the cookie consent)
*/
let cookie_modal = new bootstrap.Modal(document.getElementById('cookie_consent_modal'), {
keyboard: false
});
cookie_modal.show();
//if button is pressed, setting cookie
document.getElementById('cookie_consent_btn').onclick = function(){
setCookie('cookie_consent',true,30);
cookie_modal.hide();
};

View File

@ -1 +0,0 @@
let cookie_modal=new bootstrap.Modal(document.getElementById("cookie_consent_modal"),{keyboard:!1});cookie_modal.show(),document.getElementById("cookie_consent_btn").onclick=function(){setCookie("cookie_consent",!0,30),cookie_modal.hide()};

View File

@ -123,35 +123,6 @@
{% endblock app_scripts %}
{% block inline_scripts %}
{% endblock inline_scripts %}
<!-- cookie consent management -->
{% block cookie %}
{% if cookies_check() %}
{# then user has already consented so no requirement for consent banner #}
{% else %}
{# show a cookie consent banner #}
<!-- Modal for cookie consent-->
<div class="modal fade" id="cookie_consent_modal" tabindex="-1" aria-labelledby="cookie-consent-container"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<strong class="modal-title" id="exampleModalLabel">We use cookies</strong>
</div>
<div class="modal-body">
<p>We use only technical cookies.</p>
<p>Clicking &quot;I agree&quot;, you agree to the storing of cookies on your device. To learn more
about how we use cookies, please see our cookies policy.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="cookie_consent_btn">I agree</button>
</div>
</div>
</div>
</div>
<script defer src="static/js/rel/cookie_consent.min.js"></script>
{% endif %}
{% endblock cookie %}
<!-- Back to top button -->
<button type="button" class="btn btn-secondary btn-floating btn-lg" id="btn-back-to-top">
<i class="bi bi-arrow-up"></i>

View File

@ -16,29 +16,34 @@
{% endblock %}
{% block contents %}
<div class="col mr-3 px-2">
<p class="text-justify"><span class="font-weight-bold">Cookies</span> are small text files that can be used by
websites to make a user's experience more efficient. This site uses different types of cookies. You can at any time
change or withdraw
your consent from the Cookies page on my website. Some cookies are placed by third party services that appear on our
pages, for example if you view or listen to any embedded audio or video content. I don't control the setting of
these cookies, so
please check the websites of these third parties for more information about their cookies and how they manage them.
</p>
<p class="text-justify"><span class="font-weight-bold">Necessary</span> cookies help make a website usable by enabling
basic functions like page navigation and access to secure areas of the website. The website cannot function properly
without
these cookies.</p>
<p class="text-justify"><span class="font-weight-bold">Preference</span> cookies enable a website to remember
information that changes the way the website behaves or looks, like your preferred language or the region that you
are in.</p>
<p class="text-justify"><span class="font-weight-bold">Statistic</span> cookies help website owners to understand how
visitors interact with websites by collecting and reporting information anonymously.</p>
<p class="text-justify"><span class="font-weight-bold">Marketing</span> cookies are used to track visitors across
websites. The intention is to display content, as well as ads that are relevant and engaging for the individual user
and thereby more
valuable for publishers and third party advertisers.</p>
<p class="text-justify"><span class="font-weight-bold">Unclassified</span> cookies are cookies that we are in the
process of classifying, together with the providers of individual cookies.</p>
<h1>What Are Cookies?</h1>
<p>Cookies, also known as internet cookies, are small text files that websites generate and send to your web browser when you visit them. These cookies serve various purposes and play a crucial role in enhancing your browsing experience.</p>
<p>They can be categorized based on their lifespan and origin:</p>
<ul>
<li><strong>Session Cookies:</strong> Exist only during your browsing session and are deleted when you close your browser.</li>
<li><strong>Persistent Cookies:</strong> Remain on your device for a specified period (e.g., days, months, or years).</li>
<li><strong>First-Party Cookies:</strong> Set by the website you're currently visiting.</li>
<li><strong>Third-Party Cookies:</strong> Set by external domains (e.g., advertisers, analytics services) embedded in the website.</li>
</ul>
<h1>Strictly Necessary Cookies</h1>
<p>Strictly necessary cookies (also known as essential cookies) are essential for the basic functioning of a website. They ensure a seamless consumer experience and data security. These cookies do not track user behavior for analytics or advertising purposes.</p>
<p>Examples of what strictly necessary cookies do:</p>
<ul>
<li>Authentication: Verify consumer identities and provide secure account access.</li>
<li>Session Management: Maintain consumers' browsing activities in a single session.</li>
<li>Security: Protect the site and consumers from malicious activities.</li>
<li>Consumer Interface Preferences: Remember choices like language or font size.</li>
</ul>
<div class="alert alert-info mt-4">
<strong>Cookie Disclaimer:</strong> This website uses <em><strong>strictly necessary technical cookies</strong></em> to enhance your browsing experience. These cookies are essential for the proper functioning of the site and do not track or store any personal information. By continuing to use this website, you consent to the use of these cookies.
</div>
</div>
{% endblock %}
{% block app_data %}

View File

@ -390,19 +390,6 @@ def csp_reports():
response=flask.Response(status=204)
return response
@app.context_processor
def inject_template_scope():
injections = dict()
def cookies_check():
value = request.cookies.get("cookie_consent")
return value == "true"
injections.update(cookies_check=cookies_check)
return injections
@app.after_request
def add_security_headers(resp):