<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
/* blocks/previews-from-controller/preview-article-logic.html.twig */
class __TwigTemplate_b2ba7cecb2a26cb4c1b0d02ed33b1026e9bae1db0b1c9c7a50a4e4320c55ecf0 extends 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", "blocks/previews-from-controller/preview-article-logic.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "blocks/previews-from-controller/preview-article-logic.html.twig"));
// line 1
yield "<div class=\"preview-container ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 1, $this->source); })()), "html", null, true);
yield " br8 dflex fdc";
if ((0 === CoreExtension::compare((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 1, $this->source); })()), 0))) {
yield " first-preview";
}
if ((0 === CoreExtension::compare((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 1, $this->source); })()), 1))) {
yield " second-preview";
}
yield "\">
\t<div class=\"preview-header\">
\t\t";
// line 3
if ((array_key_exists("img", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 3, $this->source); })())))) {
// line 4
yield "\t\t\t";
yield from $this->loadTemplate("blocks/previews/img/image.html.twig", "blocks/previews-from-controller/preview-article-logic.html.twig", 4)->unwrap()->yield($context);
// line 5
yield "\t\t";
} else {
// line 6
yield "\t\t\t";
yield from $this->loadTemplate("blocks/previews/img/default-image.html.twig", "blocks/previews-from-controller/preview-article-logic.html.twig", 6)->unwrap()->yield($context);
// line 7
yield "\t\t";
}
// line 8
yield "\t\t";
if ((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 8, $this->source); })()), "analyses"))) {
// line 9
yield "\t\t\t<div class=\"background-color-blue\"></div>
\t\t";
} elseif ((0 === CoreExtension::compare( // line 10
(isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 10, $this->source); })()), "guides_outils"))) {
// line 11
yield "\t\t\t<div class=\"background-color-blue\"></div>
\t\t";
}
// line 13
yield "\t\t<p class=\"fs14 lh20 dflex aic\">
\t\t\t";
// line 14
if ((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 14, $this->source); })()), "analyses"))) {
// line 15
yield "\t\t\t\tAnalyse
\t\t\t";
} elseif ((0 === CoreExtension::compare( // line 16
(isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 16, $this->source); })()), "guides_outils"))) {
// line 17
yield "\t\t\t\tGuide / Outil
\t\t\t";
} else {
// line 19
yield "\t\t\t\tArticle
\t\t\t";
}
// line 21
yield "\t\t</p>
\t\t";
// line 22
if ((0 === CoreExtension::compare((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 22, $this->source); })()), 0))) {
// line 23
yield "\t\t\t";
yield from $this->loadTemplate("blocks/previews-from-controller/blocks/categories.html.twig", "blocks/previews-from-controller/preview-article-logic.html.twig", 23)->unwrap()->yield($context);
// line 24
yield "\t\t";
}
// line 25
yield "\t</div>
\t<div class=\"preview-content";
// line 26
if ((0 !== CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 26, $this->source); })()), "articles"))) {
yield " dflex fdc";
}
if ((0 === CoreExtension::compare((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 26, $this->source); })()), 0))) {
yield " pt-0p5em";
}
yield "\">
\t\t";
// line 27
if (((1 === CoreExtension::compare((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 27, $this->source); })()), 1)) || (0 === CoreExtension::compare((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 27, $this->source); })()), 1)))) {
// line 28
yield "\t\t\t";
yield from $this->loadTemplate("blocks/previews-from-controller/blocks/categories.html.twig", "blocks/previews-from-controller/preview-article-logic.html.twig", 28)->unwrap()->yield($context);
// line 29
yield "\t\t";
}
// line 30
yield "\t\t<a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["url"]) || array_key_exists("url", $context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.', 30, $this->source); })()), "html", null, true);
yield "\" class=\"cblue nodeco ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["title_lines"]) || array_key_exists("title_lines", $context) ? $context["title_lines"] : (function () { throw new RuntimeError('Variable "title_lines" does not exist.', 30, $this->source); })()), "html", null, true);
yield " ";
if ((0 === CoreExtension::compare((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 30, $this->source); })()), 1))) {
yield " mt1p5em";
}
if ((0 !== CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 30, $this->source); })()), "articles"))) {
yield " reverse";
}
yield "\">
\t\t\t<div class=\"fw500 fs20 preview-h3 ";
// line 31
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["title_lines"]) || array_key_exists("title_lines", $context) ? $context["title_lines"] : (function () { throw new RuntimeError('Variable "title_lines" does not exist.', 31, $this->source); })()), "html", null, true);
yield " lh28\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 31, $this->source); })()), "html", null, true);
yield "</div>
\t\t</a>
\t</div>
\t<div class=\"mta\">
\t\t<div class=\"mt-12px\">
\t\t\t<div class=\"dflex jcsb mt-8px\">
\t\t\t\t<div class=\"preview-contributors\">
\t\t\t\t\t";
// line 38
yield from $this->loadTemplate("users/contributorAlaune.html.twig", "blocks/previews-from-controller/preview-article-logic.html.twig", 38)->unwrap()->yield(CoreExtension::merge($context, ["contributors" => (isset($context["hitContributors"]) || array_key_exists("hitContributors", $context) ? $context["hitContributors"] : (function () { throw new RuntimeError('Variable "hitContributors" does not exist.', 38, $this->source); })())]));
// line 39
yield "\t\t\t\t</div>
\t\t\t\t";
// line 40
if ((array_key_exists("readtime", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["readtime"]) || array_key_exists("readtime", $context) ? $context["readtime"] : (function () { throw new RuntimeError('Variable "readtime" does not exist.', 40, $this->source); })())))) {
// line 41
yield "\t\t\t\t\t<div class=\"cgrey fs14 lh20\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["readtime"]) || array_key_exists("readtime", $context) ? $context["readtime"] : (function () { throw new RuntimeError('Variable "readtime" does not exist.', 41, $this->source); })()), "html", null, true);
yield "
\t\t\t\t\t\tmin de lecture
\t\t\t\t\t</div>
\t\t\t\t";
}
// line 45
yield "\t\t\t</div>
\t\t</div>
\t\t<span class=\"cgrey fs14 lh20\">PubliƩ le
\t\t\t";
// line 48
if ((array_key_exists("authored", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["authored"]) || array_key_exists("authored", $context) ? $context["authored"] : (function () { throw new RuntimeError('Variable "authored" does not exist.', 48, $this->source); })())))) {
// line 49
yield "\t\t\t\t";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, (isset($context["authored"]) || array_key_exists("authored", $context) ? $context["authored"] : (function () { throw new RuntimeError('Variable "authored" does not exist.', 49, $this->source); })()), "short", "none", "", null, "gregorian", "fr"), "html", null, true);
yield "
\t\t\t";
}
// line 51
yield "\t\t</span>
\t</div>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "blocks/previews-from-controller/preview-article-logic.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 186 => 51, 180 => 49, 178 => 48, 173 => 45, 165 => 41, 163 => 40, 160 => 39, 158 => 38, 146 => 31, 132 => 30, 129 => 29, 126 => 28, 124 => 27, 115 => 26, 112 => 25, 109 => 24, 106 => 23, 104 => 22, 101 => 21, 97 => 19, 93 => 17, 91 => 16, 88 => 15, 86 => 14, 83 => 13, 79 => 11, 77 => 10, 74 => 9, 71 => 8, 68 => 7, 65 => 6, 62 => 5, 59 => 4, 57 => 3, 44 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"preview-container {{ type }} br8 dflex fdc{% if i == 0 %} first-preview{% endif %}{% if i == 1 %} second-preview{% endif %}\">
\t<div class=\"preview-header\">
\t\t{% if img is defined and img is not empty %}
\t\t\t{% include \"blocks/previews/img/image.html.twig\" %}
\t\t{% else %}
\t\t\t{% include \"blocks/previews/img/default-image.html.twig\" %}
\t\t{% endif %}
\t\t{% if type == \"analyses\" %}
\t\t\t<div class=\"background-color-blue\"></div>
\t\t{% elseif type == \"guides_outils\" %}
\t\t\t<div class=\"background-color-blue\"></div>
\t\t{% endif %}
\t\t<p class=\"fs14 lh20 dflex aic\">
\t\t\t{% if type == \"analyses\" %}
\t\t\t\tAnalyse
\t\t\t{% elseif type == \"guides_outils\" %}
\t\t\t\tGuide / Outil
\t\t\t{% else %}
\t\t\t\tArticle
\t\t\t{% endif %}
\t\t</p>
\t\t{% if i == 0 %}
\t\t\t{% include \"blocks/previews-from-controller/blocks/categories.html.twig\" %}
\t\t{% endif %}
\t</div>
\t<div class=\"preview-content{% if type != \"articles\" %} dflex fdc{% endif %}{% if i == 0 %} pt-0p5em{% endif %}\">
\t\t{% if i > 1 or i == 1 %}
\t\t\t{% include \"blocks/previews-from-controller/blocks/categories.html.twig\" %}
\t\t{% endif %}
\t\t<a href=\"{{ url }}\" class=\"cblue nodeco {{ title_lines }} {% if i == 1 %} mt1p5em{% endif %}{% if type != \"articles\" %} reverse{% endif %}\">
\t\t\t<div class=\"fw500 fs20 preview-h3 {{ title_lines }} lh28\">{{ title }}</div>
\t\t</a>
\t</div>
\t<div class=\"mta\">
\t\t<div class=\"mt-12px\">
\t\t\t<div class=\"dflex jcsb mt-8px\">
\t\t\t\t<div class=\"preview-contributors\">
\t\t\t\t\t{% include \"users/contributorAlaune.html.twig\" with {contributors: hitContributors} %}
\t\t\t\t</div>
\t\t\t\t{% if readtime is defined and readtime is not empty %}
\t\t\t\t\t<div class=\"cgrey fs14 lh20\">{{ readtime }}
\t\t\t\t\t\tmin de lecture
\t\t\t\t\t</div>
\t\t\t\t{% endif %}
\t\t\t</div>
\t\t</div>
\t\t<span class=\"cgrey fs14 lh20\">PubliƩ le
\t\t\t{% if authored is defined and authored is not empty %}
\t\t\t\t{{ authored|format_datetime('short', 'none', locale='fr') }}
\t\t\t{% endif %}
\t\t</span>
\t</div>
</div>
", "blocks/previews-from-controller/preview-article-logic.html.twig", "/var/www/html/templates/blocks/previews-from-controller/preview-article-logic.html.twig");
}
}