{% form_theme form '@CHCookieConsent/form/cookie_consent_theme.html.twig' %}
{% block style %}
<link rel="stylesheet" href="{{ asset('bundles/chcookieconsent/css/cookie_consent.css') }}">
<style>
.ch-cookie-consent-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5); /* Semi-transparente negro */
z-index: 9998; /* Justo debajo del banner de cookies */
display: none; /* Oculto por defecto */
}
.cookieBanner {
position: fixed;
width: 100%;
z-index: 9999; /* Asegúrate de que esté sobre la superposición */
}
</style>
{% endblock %}
{% block script %}
<script src="{{ asset('bundles/chcookieconsent/js/cookie_consent.js') }}"></script>
{% endblock %}
<div class="ch-cookie-consent-overlay"></div>
<div class="cookieBanner">
<div class="ch-cookie-consent ch-cookie-consent--{{ theme }}-theme ch-cookie-consent--{{ position }} {% if simplified %}ch-cookie-consent--simplified{% endif %}">
{% block title %}
<h3 class="ch-cookie-consent__title">{{ 'ch_cookie_consent.title'|trans({}, 'CHCookieConsentBundle') }}</h3>
{% endblock %}
{% block intro %}
<p class="ch-cookie-consent__intro">{{ 'ch_cookie_consent.intro'|trans({}, 'CHCookieConsentBundle') }}</p>
{% endblock %}
{% block read_more %}
<a class="ch-cookie-consent__read-more" href="{% block read_more_link %}{{ path('cookie_policy') }}{% endblock %}">{{ 'ch_cookie_consent.read_more'|trans({}, 'CHCookieConsentBundle') }}</a>
{% endblock %}
{{ form_start(form, {'attr': {'class': 'ch-cookie-consent__form'}}) }}
<div class="ch-cookie-consent__category-group">
{% for child in form %}
{% if child.vars.block_prefixes[0] != 'button' %}
{{ form_row(child) }}
{% endif %}
{% endfor %}
</div>
<div class="ch-cookie-consent__btn-group">
{{ form_rest(form) }}
{% if simplified %}
{% block toggle_details %}
<div class="ch-cookie-consent__toggle-details">
<span class="ch-cookie-consent__toggle-details-show">{{ 'ch_cookie_consent.show_details'|trans({}, 'CHCookieConsentBundle') }}</span>
<span class="ch-cookie-consent__toggle-details-hide">{{ 'ch_cookie_consent.hide_details'|trans({}, 'CHCookieConsentBundle') }}</span>
</div>
{% endblock %}
{% endif %}
</div>
{{ form_end(form) }}
</div>
</div>