Initial commit
- Functional module
This commit is contained in:
227
views/css/gdpr_cookie.css
Normal file
227
views/css/gdpr_cookie.css
Normal file
@ -0,0 +1,227 @@
|
||||
/**
|
||||
* GDPR Cookie Consent Module for PrestaShop
|
||||
*
|
||||
* @author Walzen665
|
||||
* @copyright Copyright (c) 2025
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
*/
|
||||
|
||||
/* Banner styles */
|
||||
.gdpr-cookie-banner {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: rgba(33, 41, 52, 0.95);
|
||||
color: #fff;
|
||||
padding: 15px;
|
||||
z-index: 9999;
|
||||
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.gdpr-cookie-banner-content {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.gdpr-cookie-banner-content p {
|
||||
flex: 1;
|
||||
margin: 0 20px 10px 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.gdpr-cookie-banner-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* Modal styles */
|
||||
.gdpr-cookie-modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 10000;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.gdpr-cookie-modal-content {
|
||||
background-color: #fff;
|
||||
margin: 5% auto;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
width: 90%;
|
||||
max-width: 800px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.gdpr-cookie-modal-header {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.gdpr-cookie-modal-header h4 {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.gdpr-cookie-modal-body {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.gdpr-cookie-categories {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.gdpr-cookie-category {
|
||||
margin-bottom: 15px;
|
||||
padding: 10px;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 5px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.gdpr-cookie-category label {
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.gdpr-cookie-category p {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 0;
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.gdpr-cookie-modal-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.gdpr-cookie-more-info {
|
||||
color: #555;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.gdpr-cookie-buttons {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* Button styles */
|
||||
.gdpr-cookie-decline,
|
||||
.gdpr-cookie-banner-decline {
|
||||
background-color: #f1f1f1;
|
||||
color: #333;
|
||||
border: none;
|
||||
padding: 8px 15px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.gdpr-cookie-decline:hover,
|
||||
.gdpr-cookie-banner-decline:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.gdpr-cookie-accept-selected {
|
||||
background-color: #4285f4;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 8px 15px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.gdpr-cookie-accept-selected:hover {
|
||||
background-color: #2b6edb;
|
||||
}
|
||||
|
||||
.gdpr-cookie-accept-all,
|
||||
.gdpr-cookie-banner-accept {
|
||||
background-color: #4caf50;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 8px 15px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.gdpr-cookie-accept-all:hover,
|
||||
.gdpr-cookie-banner-accept:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
.gdpr-cookie-banner-settings {
|
||||
background-color: transparent;
|
||||
color: white;
|
||||
border: 1px solid white;
|
||||
padding: 8px 15px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.gdpr-cookie-banner-settings:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.gdpr-cookie-banner-content {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.gdpr-cookie-banner-content p {
|
||||
margin-right: 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.gdpr-cookie-modal-content {
|
||||
width: 95%;
|
||||
margin: 10% auto;
|
||||
}
|
||||
|
||||
.gdpr-cookie-modal-footer {
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.gdpr-cookie-more-info {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
7
views/css/index.php
Normal file
7
views/css/index.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
header('Strict-Transport-Security: max-age=31536000; includeSubDomains');
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
header("X-Frame-Options: DENY");
|
||||
header("X-XSS-Protection: 1; mode=block");
|
||||
header('Location: ../');
|
||||
exit;
|
Reference in New Issue
Block a user