templates/pages/_institutional_page.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% if form is defined %}
  3. {% form_theme form 'form_theme.html.twig' %}
  4. {% endif %}
  5. {% block page_class %}
  6. page institutional-page
  7. {% endblock %}
  8. {% block header_search %}{% endblock %}
  9. {% block header_search_mobile %}{% endblock %}
  10. {% block stylesheets %}
  11. {{ parent() }}
  12. {{ encore_entry_link_tags('institutional_styles') }}
  13. {% endblock %}
  14. {% block content %}
  15. <div class="container-fluid px-0" id="institutional-page">
  16. {% set in_band = false %}
  17. {% for section in content.sections|default([]) %}
  18. {% set wave = section.wave|default('none') %}
  19. {% if wave == 'bottom' %}
  20. {% set wave = 'none' %}
  21. {% elseif wave == 'top' %}
  22. {% set wave = 'start' %}
  23. {% endif %}
  24. {% set wants_band = wave in ['start', 'join'] %}
  25. {% if wants_band and not in_band %}
  26. {% set bandStart = section.waveColor|default('#00AAD7') %}
  27. {% set bandEnd = section.waveColorEnd|default('#FFFFFF') %}
  28. <div class="inst-band" style="--band-color: {{ bandStart }}; --band-color-end: {{ bandEnd }}">
  29. <div class="inst-band__wave" aria-hidden="true">
  30. <svg viewBox="0 -48 1920 480" preserveAspectRatio="xMidYMin meet" focusable="false">
  31. <defs>
  32. <linearGradient id="inst-band-grad-{{ loop.index }}" gradientUnits="userSpaceOnUse" x1="960" y1="-20" x2="960" y2="420">
  33. <stop offset="0" stop-color="var(--band-color)"/>
  34. <stop offset="0.14" stop-color="var(--band-color)"/>
  35. <stop offset="0.72" stop-color="var(--band-color-end)"/>
  36. <stop offset="1" stop-color="var(--band-color-end)"/>
  37. </linearGradient>
  38. </defs>
  39. <path fill="url(#inst-band-grad-{{ loop.index }})" d="M0 32.8704C0 32.8704 321.5 -41.088 960.995 32.8704C1600.49 106.829 1920 32.8704 1920 32.8704V420H0V32.8704Z"/>
  40. </svg>
  41. </div>
  42. {% set in_band = true %}
  43. {% elseif not wants_band and in_band %}
  44. </div>
  45. {% set in_band = false %}
  46. {% endif %}
  47. {% include 'pages/institutional/_' ~ section.type ~ '.html.twig' with { section: section } %}
  48. {% endfor %}
  49. {% if in_band %}
  50. </div>
  51. {% endif %}
  52. </div>
  53. {% endblock %}