templates/default/components/molecules/teaser/teaser.html.twig line 1

Open in your IDE?
  1. <div class="teaser js-teaser {{ class|default }}" {% if link is defined %} tabindex="0" {% endif %}>
  2. {% import 'macros/storyblok.html.twig' as storyblok %}
  3. <div class="teaser__image">
  4. {% block teaser_image %}
  5. {% if image is defined %}
  6. {# atoms/image #}
  7. {{ render_storyblok(image, {
  8. 'class': 'teaser__img ' ~ imageClass|default('image__src--full-width')
  9. }) }}
  10. {% endif %}
  11. {% endblock %}
  12. </div>
  13. <div class="teaser__content">
  14. {% block teaser_badge %}
  15. {% if badge is defined and badge is not empty %}
  16. <div class="teaser__tag">
  17. {{ badge }}
  18. </div>
  19. {% endif %}
  20. {% endblock %}
  21. {% block teaser_headline %}
  22. {% if headline is defined %}
  23. {# atoms/headline #}
  24. {{ render_storyblok(headline, {
  25. 'headlineTag': 'h3',
  26. 'class': 'teaser__headline headline--no-spacing'
  27. }) }}
  28. {% endif %}
  29. {% endblock %}
  30. {% block teaser_description %}
  31. {% if description is defined %}
  32. <div class="teaser__description">
  33. {# atoms/description #}
  34. {{ render_storyblok(description) }}
  35. </div>
  36. {% endif %}
  37. {% endblock %}
  38. {% block teaser_link %}
  39. {% if link is defined %}
  40. {# atoms/text-link #}
  41. {% if not app.getRequest().attributes.get('storyblok_preview') %}
  42. {{ render_storyblok(link, {
  43. 'class': 'text-link--arrow-right js-teaser-link',
  44. }) }}
  45. {% else %}
  46. {{ render_storyblok(link, {
  47. 'class': 'text-link--arrow-right',
  48. }) }}
  49. {% endif %}
  50. {% endif %}
  51. {% endblock %}
  52. </div>
  53. </div>