Files
dockergprompt/resources/views/components/cookie-consent-banner.blade.php
2026-09-01 09:22:30 -03:00

227 lines
7.6 KiB
PHP
Executable File

<div id="cookieConsentBanner" class="cookie-consent-banner" style="display: none;">
<div class="cookie-consent-card shadow-lg">
<div class="cookie-consent-icon">
<i class="bi bi-shield-lock"></i>
</div>
<div class="cookie-consent-body">
<h6 class="fw-bold mb-2">@lang('cookie_consent.title')</h6>
<p class="mb-3 text-muted small">
@lang('cookie_consent.description')
<a href="{{ route('legal.document.show', 'privacy-policy') }}" class="text-decoration-none">@lang('cookie_consent.privacy_policy')</a>.
</p>
<div class="d-flex flex-wrap gap-2">
<button type="button" class="btn btn-outline-dark btn-sm cookie-btn-customize" onclick="cookieConsent.showPreferences()">
<i class="bi bi-sliders me-1"></i> @lang('cookie_consent.customize')
</button>
<button type="button" class="btn btn-outline-secondary btn-sm cookie-btn-reject" onclick="cookieConsent.reject()">
@lang('cookie_consent.reject')
</button>
<button type="button" class="btn btn-primary btn-sm cookie-btn-accept" onclick="cookieConsent.acceptAll()">
<i class="bi bi-check-lg me-1"></i> @lang('cookie_consent.accept_all')
</button>
</div>
</div>
</div>
</div>
<div id="cookieConsentPreferences" class="modal fade" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold">
<i class="bi bi-shield-check me-2 text-primary"></i>@lang('cookie_consent.customize')
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body pt-2">
<p class="small text-muted mb-4">@lang('cookie_consent.select_types')</p>
<div class="cookie-category mb-3 p-3 rounded bg-light">
<div class="form-check mb-0">
<input class="form-check-input" type="checkbox" id="cookieNecessary" checked disabled>
<label class="form-check-label fw-semibold" for="cookieNecessary">
<i class="bi bi-lock-fill me-2 text-success"></i>@lang('cookie_consent.necessary')
</label>
<span class="d-block small text-muted mt-1 ms-4">@lang('cookie_consent.necessary_description')</span>
</div>
</div>
<div class="cookie-category mb-3 p-3 rounded bg-light">
<div class="form-check mb-0">
<input class="form-check-input" type="checkbox" id="cookieStatistics" value="statistics">
<label class="form-check-label fw-semibold" for="cookieStatistics">
<i class="bi bi-bar-chart-fill me-2 text-info"></i>@lang('cookie_consent.statistics')
</label>
<span class="d-block small text-muted mt-1 ms-4">@lang('cookie_consent.statistics_description')</span>
</div>
</div>
<div class="cookie-category mb-3 p-3 rounded bg-light">
<div class="form-check mb-0">
<input class="form-check-input" type="checkbox" id="cookieMarketing" value="marketing">
<label class="form-check-label fw-semibold" for="cookieMarketing">
<i class="bi bi-megaphone-fill me-2 text-warning"></i>@lang('cookie_consent.marketing')
</label>
<span class="d-block small text-muted mt-1 ms-4">@lang('cookie_consent.marketing_description')</span>
</div>
</div>
<div class="cookie-category p-3 rounded bg-light">
<div class="form-check mb-0">
<input class="form-check-input" type="checkbox" id="cookiePreferences" value="preferences">
<label class="form-check-label fw-semibold" for="cookiePreferences">
<i class="bi bi-gear-fill me-2 text-secondary"></i>@lang('cookie_consent.preferences')
</label>
<span class="d-block small text-muted mt-1 ms-4">@lang('cookie_consent.preferences_description')</span>
</div>
</div>
</div>
<div class="modal-footer border-0 pt-0">
<button type="button" class="btn btn-light btn-sm" data-bs-dismiss="modal">@lang('cookie_consent.cancel')</button>
<button type="button" class="btn btn-primary btn-sm px-4" onclick="cookieConsent.savePreferences()">
<i class="bi bi-check-lg me-1"></i> @lang('cookie_consent.save_preferences')
</button>
</div>
</div>
</div>
</div>
<style>
.cookie-consent-banner {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1080;
padding: 1rem;
animation: slideUp 0.4s ease-out;
}
.cookie-consent-card {
background: white;
border-radius: 16px;
padding: 1.5rem;
display: flex;
align-items: flex-start;
gap: 1rem;
max-width: 900px;
margin: 0 auto;
border: 1px solid rgba(0,0,0,0.08);
}
.cookie-consent-icon {
flex-shrink: 0;
width: 48px;
height: 48px;
background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.5rem;
}
.cookie-consent-body {
flex: 1;
}
.cookie-consent-body h6 {
font-size: 1.1rem;
color: #1a1a2e;
}
.cookie-consent-body p {
font-size: 0.9rem;
line-height: 1.6;
color: #6c757d;
}
.cookie-consent-actions {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.cookie-btn-accept {
background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
border: none;
padding: 0.5rem 1.25rem;
border-radius: 8px;
font-weight: 500;
}
.cookie-btn-accept:hover {
background: linear-gradient(135deg, #224abe 0%, #1a3a9e 100%);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
}
.cookie-btn-reject {
border-radius: 8px;
padding: 0.5rem 1.25rem;
font-weight: 500;
}
.cookie-btn-customize {
border-radius: 8px;
padding: 0.5rem 1.25rem;
font-weight: 500;
}
.cookie-category {
transition: all 0.2s;
border: 1px solid transparent;
}
.cookie-category:hover {
border-color: #dee2e6;
background: #f8f9fa !important;
}
.cookie-category .form-check-input:checked {
background-color: #4e73df;
border-color: #4e73df;
}
.cookie-category .form-check-input:disabled {
background-color: #4e73df;
border-color: #4e73df;
opacity: 0.7;
}
@keyframes slideUp {
from {
transform: translateY(100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
@media (max-width: 576px) {
.cookie-consent-card {
flex-direction: column;
padding: 1.25rem;
}
.cookie-consent-icon {
width: 40px;
height: 40px;
font-size: 1.25rem;
}
.cookie-consent-actions {
width: 100%;
}
.cookie-consent-actions .btn {
flex: 1;
}
}
</style>
<script src="/js/cookie-consent.js"></script>