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. {% if item_config.wrapper.class %}
  37. <div data-component-acl="{{ componentKey }}" class="{{ item_config.wrapper.class }}">
  38. {% endif %}
  39. {# EASTER EGG #}
  40. {% if isModuleActive(constant('App\\Constants\\Modules::EASTER_EGG')) and value.easterEgg is defined and value.easterEgg.enabled %}
  41. {% include 'front/easter_egg/easter_egg.html.twig' with {
  42. 'constant' : constant('App\\Constants\\EasterEgg::' ~ value.easterEgg.constant),
  43. 'animation': value.easterEgg.animation
  44. } %}
  45. {% endif %}
  46. {# EASTER EGG #}
  47. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.title, atom_key: componentKey ~ '.title'} %}
  48. {% block atom %}
  49. {% include'@component/atom/title.html.twig' with {'title': value} %}
  50. {% endblock atom %}
  51. {% endembed %}
  52. {% if value.text is defined %}
  53. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.text, atom_key: componentKey ~ '.text'} %}
  54. {% block atom %}
  55. {% include'@component/atom/paragraph.html.twig' with {'value': value} %}
  56. {% endblock atom %}
  57. {% endembed %}
  58. {% endif %}
  59. {% if value.link is defined %}
  60. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: value.link, atom_key: componentKey ~ '.link'} %}
  61. {% block atom %}
  62. <div {% if value.wrapper is defined and value.wrapper.class is defined %}class="{{ value.wrapper.class }}"{% endif %}>
  63. {% include '@component/atom/link.html.twig' with {'link': value} %}
  64. </div>
  65. {% endblock atom %}
  66. {% endembed %}
  67. {% endif %}
  68. {% if item_config.wrapper.class %}
  69. </div>
  70. {% endif %}
  71. </div>
  72. {% endif %}