{#
component: home introduction
text {string}: Text d'introduction
firstImage {image}: Première image d'introduction
size: {
width: "480",
height: "360"
}
secondImage {image}: Deuxième image d'introduction
size: {
width: "480",
height: "550"
}
link: [{
text {string}: Texte du lien
to {string}: Lien
}]
#}
{% set props = {
heading: null,
text:null,
shape:{
src:null,
backgroundcolor:false
}
}|merge(props|default({})) %}
<section
data-component="home-introduction" class="HomeIntroduction-component">
{# Background pattern #}
<div class="HomeIntroduction-backgroundPattern ">
{% include "component/waves.html.twig" with {
props: {
speed:0.1,
shape:props.shape
}
} %}
</div>
<div class="l-container">
<div
class="l-row">
{# Heading #}
{% include "component/heading.html.twig" with {
props: props.heading
} %}
</div>
<div class="l-row HomeIntroduction-firstContent">
<div class="l-column HomeIntroduction-firstImage">
{# 1st image #}
{% include "component/image.html.twig" with {
props: props.firstImage
} %}
{# Exemple of pictrue with webp src #}
{# {% if props.firstImage %}
{% include "component/picture.html.twig" with {
props: props.firstImage|merge({
srcWebp: (props.firstImage.src) ? asset(props.firstImage.src | imagine_filter('convert_img_to_webp')) : ''
})
} %}
{% endif %} #}
</div>
</div>
<div
class="l-row HomeIntroduction-secondContent">
{# Main #}
<div
class="l-column HomeIntroduction-main">
{# Text #}
<div class="HomeIntroduction-wysiwyg">
{% include "component/wysiwyg.html.twig" with {
props: {
content: props.text
}
} %}
</div>
{% if props.link is defined %}
{# Button #}
<div class="HomeIntroduction-button">
{% include "component/button.html.twig" with {
props: props.link
} %}
</div>
{% endif %}
</div>
<div
class="l-column HomeIntroduction-secondImage">
{# 2nd image #}
{% include "component/image.html.twig" with {
props: props.secondImage
} %}
{# Exemple of pictrue with webp src #}
{# {% if props.secondImage %}
{% include "component/picture.html.twig" with {
props: props.secondImage|merge({
srcWebp: (props.secondImage.src) ? asset(props.secondImage.src | imagine_filter('convert_img_to_webp')) : ''
})
} %}
{% endif %} #}
</div>
</div>
</div>
</section>