vendor/connectholland/cookie-consent-bundle/Resources/views/cookie_consent.html.twig line 1

Open in your IDE?
  1. {% form_theme form '@CHCookieConsent/form/cookie_consent_theme.html.twig' %}
  2. {% block style %}
  3.     <link rel="stylesheet" href="{{ asset('bundles/chcookieconsent/css/cookie_consent.css') }}">
  4.     <style>
  5.         .ch-cookie-consent-overlay {
  6.             position: fixed;
  7.             top: 0;
  8.             left: 0;
  9.             width: 100%;
  10.             height: 100%;
  11.             background: rgba(0, 0, 0, 0.5); /* Semi-transparente negro */
  12.             z-index: 9998; /* Justo debajo del banner de cookies */
  13.             display: none; /* Oculto por defecto */
  14.         }
  15.         .cookieBanner {
  16.             position: fixed;
  17.             width: 100%;
  18.             z-index: 9999; /* Asegúrate de que esté sobre la superposición */
  19.         }
  20.     </style>
  21. {% endblock %}
  22. {% block script %}
  23.     <script src="{{ asset('bundles/chcookieconsent/js/cookie_consent.js') }}"></script>
  24. {% endblock %}
  25. <div class="ch-cookie-consent-overlay"></div>
  26. <div class="cookieBanner">
  27.     <div class="ch-cookie-consent ch-cookie-consent--{{ theme }}-theme ch-cookie-consent--{{ position }} {% if simplified %}ch-cookie-consent--simplified{% endif %}">
  28.         {% block title %}
  29.             <h3 class="ch-cookie-consent__title">{{ 'ch_cookie_consent.title'|trans({}, 'CHCookieConsentBundle') }}</h3>
  30.         {% endblock %}
  31.         {% block intro %}
  32.             <p class="ch-cookie-consent__intro">{{ 'ch_cookie_consent.intro'|trans({}, 'CHCookieConsentBundle') }}</p>
  33.         {% endblock %}
  34.         {% block read_more %}
  35.             <a class="ch-cookie-consent__read-more" href="{% block read_more_link %}{{ path('cookie_policy') }}{% endblock %}">{{ 'ch_cookie_consent.read_more'|trans({}, 'CHCookieConsentBundle') }}</a>
  36.         {% endblock %}
  37.         {{ form_start(form, {'attr': {'class': 'ch-cookie-consent__form'}}) }}
  38.             <div class="ch-cookie-consent__category-group">
  39.                 {% for child in form %}
  40.                     {% if child.vars.block_prefixes[0] != 'button' %}
  41.                         {{ form_row(child) }}
  42.                     {% endif %}
  43.                 {% endfor %}
  44.             </div>
  45.             <div class="ch-cookie-consent__btn-group">
  46.                 {{ form_rest(form) }}
  47.                 {% if simplified %}
  48.                     {% block toggle_details %}
  49.                         <div class="ch-cookie-consent__toggle-details">
  50.                             <span class="ch-cookie-consent__toggle-details-show">{{ 'ch_cookie_consent.show_details'|trans({}, 'CHCookieConsentBundle') }}</span>
  51.                             <span class="ch-cookie-consent__toggle-details-hide">{{ 'ch_cookie_consent.hide_details'|trans({}, 'CHCookieConsentBundle') }}</span>
  52.                         </div>
  53.                     {% endblock %}
  54.                 {% endif %}
  55.             </div>
  56.         {{ form_end(form) }}
  57.     </div>
  58. </div>