templates/platform/component/molecule/default_title_paragraph.html.twig line 1

Open in your IDE?
  1. {# configuration example
  2. ###########
  3. enabled: false
  4. container: w-100
  5. easterEgg:
  6. enabled: true
  7. constant: EMPLACEMENT_2
  8. animation: right-ease-in-out
  9. title:
  10. type: h1
  11. content: Bienvenue
  12. class: ''
  13. enabled: true
  14. text:
  15. content: 'Bienvenue sur votre plateforme'
  16. type: p
  17. class: ''
  18. enabled: true
  19. link:
  20. enabled: false
  21. tel: ''
  22. mailto: null
  23. url: ''
  24. route: ''
  25. params: ''
  26. class: ''
  27. target: _self
  28. content: dsdsd
  29. #}
  30. {% if componentKey is not defined %}
  31. {% set componentKey = "default_title_paragraph" %}
  32. {% endif %}
  33. {% set item_config = generateComponentOptions(value, componentKey)%}
  34. {% if canDisplayComponentByAcl(item_config) %}
  35. <div data-component-acl="{{ componentKey }}" class="{{ item_config.container.class }}">
  36. {# EASTER EGG #}
  37. {% if isModuleActive(constant('App\\Constants\\EasterEgg::MODULE_NAME')) and value.easterEgg is defined and value.easterEgg.enabled %}
  38. {% include 'front/easter_egg/easter_egg.html.twig' with {
  39. 'constant' : constant('App\\Constants\\EasterEgg::' ~ value.easterEgg.constant),
  40. 'animation': value.easterEgg.animation
  41. } %}
  42. {% endif %}
  43. {# EASTER EGG #}
  44. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.title, atom_key: componentKey ~ '.title'} %}
  45. {% block atom %}
  46. {% include'@component/atom/title.html.twig' with {'title': value} %}
  47. {% endblock atom %}
  48. {% endembed %}
  49. {% if value.text is defined %}
  50. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.text, atom_key: componentKey ~ '.text'} %}
  51. {% block atom %}
  52. {% include'@component/atom/paragraph.html.twig' with {'value': value} %}
  53. {% endblock atom %}
  54. {% endembed %}
  55. {% endif %}
  56. {% if value.link is defined %}
  57. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.link, atom_key: componentKey ~ '.link'} %}
  58. {% block atom %}
  59. <div {% if value.wrapper is defined and value.wrapper.class is defined %}class="{{ value.wrapper.class }}"{% endif %}>
  60. {% include '@component/atom/link.html.twig' with {'link': value} %}
  61. </div>
  62. {% endblock atom %}
  63. {% endembed %}
  64. {% endif %}
  65. </div>
  66. {% endif %}