cookieconsent.html.twig 1.5 KB

123456789101112131415161718192021222324252627
  1. window.addEventListener("load", function(){
  2. window.cookieconsent.initialise({
  3. "palette": {
  4. "popup": {
  5. "background": "{{ config.plugins.cookieconsent.popup_background_color }}",
  6. "text": "{{ config.plugins.cookieconsent.popup_text_color }}"
  7. },
  8. "button": {
  9. "background": "{{ config.plugins.cookieconsent.button_background_color }}",
  10. "text": "{{ config.plugins.cookieconsent.button_text_color }}",
  11. "border": "{{ config.plugins.cookieconsent.button_border_color }}"
  12. }
  13. },
  14. {% if config.plugins.cookieconsent.position == 'top-pushdown' %}
  15. "position": "top",
  16. "static": true,
  17. {% else %}
  18. "position": "{{ config.plugins.cookieconsent.position }}",
  19. {% endif %}
  20. "theme": "{{ config.plugins.cookieconsent.theme }}",
  21. "content": {
  22. "message": "{% if config.plugins.cookieconsent.content_message %}{{ config.plugins.cookieconsent.content_message }}{% else %}{{ 'PLUGINS.COOKIECONSENT.CONTENT_MESSAGE'|t }}{% endif %}",
  23. "dismiss": "{% if config.plugins.cookieconsent.content_dismiss %}{{ config.plugins.cookieconsent.content_dismiss }}{% else %}{{ 'PLUGINS.COOKIECONSENT.CONTENT_DISMISS'|t }}{% endif %}",
  24. "link": "{% if config.plugins.cookieconsent.content_link %}{{ config.plugins.cookieconsent.content_link }}{% else %}{{ 'PLUGINS.COOKIECONSENT.CONTENT_LINK'|t }}{% endif %}",
  25. "href": "{% if config.plugins.cookieconsent.content_href %}{{ config.plugins.cookieconsent.content_href }}{% else %}{{ 'PLUGINS.COOKIECONSENT.CONTENT_HREF'|t }}{% endif %}"
  26. }
  27. })});