<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* bloc/diaporama.html.twig */
class __TwigTemplate_1d1745b568c91b9c513e70a80f48da5ae7c84e0109b865fb00166dddfb2ffec0 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "bloc/diaporama.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "bloc/diaporama.html.twig"));
// line 1
echo "<div id=\"carousel-home\">
<div class=\"owl-carousel owl-theme\">
";
// line 3
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["lienDiaporamas"]) || array_key_exists("lienDiaporamas", $context) ? $context["lienDiaporamas"] : (function () { throw new RuntimeError('Variable "lienDiaporamas" does not exist.', 3, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["lienDiaporama"]) {
// line 4
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["lienDiaporama"], "visible", [], "any", false, false, false, 4) === true)) {
// line 5
echo " ";
$context["diaporama"] = twig_get_attribute($this->env, $this->source, $context["lienDiaporama"], "diaporama", [], "any", false, false, false, 5);
// line 6
echo "
";
// line 7
$context["image"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/img/slides/slide_home_3.jpg");
// line 8
echo " ";
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 8, $this->source); })()), "image", [], "any", false, false, false, 8))) {
// line 9
echo " ";
$context["image"] = $this->env->getRuntime('App\Twig\AppRuntime')->sonataMedia(twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 9, $this->source); })()), "image", [], "any", false, false, false, 9), "1903_750_thumbnail");
// line 10
echo " ";
}
// line 11
echo "
<div class=\"owl-slide cover\" style=\"background-image: url('";
// line 12
echo twig_escape_filter($this->env, (isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 12, $this->source); })()), "html", null, true);
echo "');\">
<div class=\"opacity-mask d-flex align-items-center\" data-opacity-mask=\"rgba(0, 0, 0, 0.5)\">
<div class=\"container\">
<div class=\"row justify-content-center justify-content-md-start\">
<div class=\"col-lg-12 static\">
<div class=\"slide-text text-";
// line 17
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 17, $this->source); })()), "alignement", [], "any", false, false, false, 17), "html", null, true);
echo " white\">
";
// line 18
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 18, $this->source); })()), "titre", [], "any", false, false, false, 18))) {
// line 19
echo " ";
$context["headingTag"] = "h2";
// line 20
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 20)) {
// line 21
echo " ";
$context["headingTag"] = "h1";
// line 22
echo " ";
}
// line 23
echo "
<";
// line 24
echo twig_escape_filter($this->env, (isset($context["headingTag"]) || array_key_exists("headingTag", $context) ? $context["headingTag"] : (function () { throw new RuntimeError('Variable "headingTag" does not exist.', 24, $this->source); })()), "html", null, true);
echo " class=\"owl-slide-animated owl-slide-title\">
";
// line 25
echo nl2br(twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 25, $this->source); })()), "titre", [], "any", false, false, false, 25), "html", null, true));
echo "
</";
// line 26
echo twig_escape_filter($this->env, (isset($context["headingTag"]) || array_key_exists("headingTag", $context) ? $context["headingTag"] : (function () { throw new RuntimeError('Variable "headingTag" does not exist.', 26, $this->source); })()), "html", null, true);
echo ">
";
}
// line 28
echo "
";
// line 29
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 29, $this->source); })()), "accroche", [], "any", false, false, false, 29))) {
// line 30
echo " <p class=\"owl-slide-animated owl-slide-subtitle\">
";
// line 31
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 31, $this->source); })()), "accroche", [], "any", false, false, false, 31), "html", null, true);
echo "
</p>
";
}
// line 34
echo "
";
// line 35
if (( !(null === twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 35, $this->source); })()), "boutonLien", [], "any", false, false, false, 35)) && !(null === twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 35, $this->source); })()), "boutonTitre", [], "any", false, false, false, 35)))) {
// line 36
echo " <div class=\"owl-slide-animated owl-slide-cta\">
<a href=\"";
// line 37
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 37, $this->source); })()), "boutonLien", [], "any", false, false, false, 37), "html", null, true);
echo "\" role=\"button\" class=\"btn_1\" ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 37, $this->source); })()), "boutonTarget", [], "any", false, false, false, 37) === true)) {
echo "target=\"_blank\"";
}
echo ">
";
// line 38
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["diaporama"]) || array_key_exists("diaporama", $context) ? $context["diaporama"] : (function () { throw new RuntimeError('Variable "diaporama" does not exist.', 38, $this->source); })()), "boutonTitre", [], "any", false, false, false, 38), "html", null, true);
echo "
</a>
</div>
";
}
// line 42
echo " </div>
</div>
</div>
</div>
</div>
</div>
";
}
// line 49
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lienDiaporama'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 50
echo " </div>
<div id=\"icon_drag_mobile\"></div>
</div>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "bloc/diaporama.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 189 => 50, 175 => 49, 166 => 42, 159 => 38, 151 => 37, 148 => 36, 146 => 35, 143 => 34, 137 => 31, 134 => 30, 132 => 29, 129 => 28, 124 => 26, 120 => 25, 116 => 24, 113 => 23, 110 => 22, 107 => 21, 104 => 20, 101 => 19, 99 => 18, 95 => 17, 87 => 12, 84 => 11, 81 => 10, 78 => 9, 75 => 8, 73 => 7, 70 => 6, 67 => 5, 64 => 4, 47 => 3, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<div id=\"carousel-home\">
<div class=\"owl-carousel owl-theme\">
{% for lienDiaporama in lienDiaporamas %}
{% if lienDiaporama.visible is same as(true) %}
{% set diaporama = lienDiaporama.diaporama %}
{% set image = asset('build/img/slides/slide_home_3.jpg') %}
{% if diaporama.image is not null %}
{% set image = sonata_media(diaporama.image, '1903_750_thumbnail') %}
{% endif %}
<div class=\"owl-slide cover\" style=\"background-image: url('{{ image }}');\">
<div class=\"opacity-mask d-flex align-items-center\" data-opacity-mask=\"rgba(0, 0, 0, 0.5)\">
<div class=\"container\">
<div class=\"row justify-content-center justify-content-md-start\">
<div class=\"col-lg-12 static\">
<div class=\"slide-text text-{{ diaporama.alignement }} white\">
{% if diaporama.titre is not null %}
{% set headingTag = 'h2' %}
{% if loop.first %}
{% set headingTag = 'h1' %}
{% endif %}
<{{ headingTag }} class=\"owl-slide-animated owl-slide-title\">
{{ diaporama.titre|nl2br }}
</{{ headingTag }}>
{% endif %}
{% if diaporama.accroche is not null %}
<p class=\"owl-slide-animated owl-slide-subtitle\">
{{ diaporama.accroche }}
</p>
{% endif %}
{% if diaporama.boutonLien is not null and diaporama.boutonTitre is not null %}
<div class=\"owl-slide-animated owl-slide-cta\">
<a href=\"{{ diaporama.boutonLien }}\" role=\"button\" class=\"btn_1\" {% if diaporama.boutonTarget is same as(true) %}target=\"_blank\"{% endif %}>
{{ diaporama.boutonTitre }}
</a>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<div id=\"icon_drag_mobile\"></div>
</div>", "bloc/diaporama.html.twig", "/home/promostamt/dev/templates/bloc/diaporama.html.twig");
}
}