templates/component/waves.html.twig line 1

Open in your IDE?
  1. {% set props = {
  2.   speed:null,
  3.   shape:{
  4.     src:null,
  5.     backgroundcolor:false
  6.   }
  7. }|merge(props|default({}))  %}
  8. {% set backgroundcolor = false %}
  9. {% if props.shape.backgroundcolor is defined %}
  10.     {% set backgroundcolor = props.shape.backgroundcolor %}
  11. {% endif %}
  12. {% set jsComponentId = "waves" %}
  13. <div class="Waves-component" data-component="{{ jsComponentId }}" data-speed="{{ props.speed }}" data-shape="{{ backgroundcolor }}">
  14.     <div class="Waves-img" v-if="!hasWebGL">
  15.         {% include "component/image.html.twig" with {
  16.       props: {
  17.         src: props.shape.src
  18.       }
  19.     } %}
  20.     {# {% include "component/picture.html.twig" with {
  21.       props: {
  22.         src: props.shape.src
  23.       }|merge({
  24.         srcWebp: (props.shape.src) ? asset(props.shape.src | imagine_filter('convert_img_to_webp')) : ''
  25.       })
  26.     } %} #}
  27.     </div>
  28. </div>