<?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;
/* front/blog/index.html.twig */
class __TwigTemplate_63465b2a6077b2dfabd5b42098e713a2 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'seo' => [$this, 'block_seo'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "front/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/blog/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/blog/index.html.twig"));
$this->parent = $this->loadTemplate("front/base.html.twig", "front/blog/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
// line 4
echo "\t";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("seo.blog_title"), "html", null, true);
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 7
public function block_seo($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "seo"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "seo"));
// line 8
echo "\t<meta name=\"description\" content=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("seo.blog_description"), "html", null, true);
echo "\">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 11
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 12
echo "
\t<section class=\"mt-0 first-section\" id=\"blog-search\">
\t\t<div class=\"container\">
\t\t\t<div class=\"row justify-content-center\">
\t\t\t\t<div class=\"col-lg-8\">
\t\t\t\t\t";
// line 17
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 17, $this->source); })()), 'form_start', ["attr" => ["class" => "blog-main-search"]]);
echo "
\t\t\t\t\t\t<div class=\"form-inline\">
\t\t\t\t\t\t\t";
// line 19
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 19, $this->source); })()), "title", [], "any", false, false, false, 19), 'widget', ["attr" => ["class" => "input-main-search"]]);
echo "
\t\t\t\t\t\t\t<button class=\"btn btn-main-search\" type=\"submit\">
\t\t\t\t\t\t\t\t<span class=\"hide-mobile\">";
// line 21
echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("global.search")), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t<i class=\"far fa-search hide-desktop\"></i>
\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t</div>
\t\t\t\t\t";
// line 25
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 25, $this->source); })()), 'form_end');
echo "
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</section>
\t";
// line 32
echo "\t<section id=\"categories\">
\t\t";
// line 33
if ((twig_length_filter($this->env, (isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 33, $this->source); })())) > 0)) {
// line 34
echo "\t\t\t<div class=\"container\">
\t\t\t\t<h2 class=\"section-title-underline\">";
// line 35
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("blog.categories"), "html", null, true);
echo "</h2>
\t\t\t\t<div class=\"categories-grid\">
\t\t\t\t\t";
// line 39
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 39, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 40
echo "
\t\t\t\t\t\t<a class=\"card-category\" href=\"";
// line 41
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("article_category", ["slug" => twig_get_attribute($this->env, $this->source, $context["category"], "slug", [], "any", false, false, false, 41)]), "html", null, true);
echo "\">
\t\t\t\t\t\t\t<img loading=\"lazy\" src=\"";
// line 42
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("/images/categories/" . twig_get_attribute($this->env, $this->source, $context["category"], "image", [], "any", false, false, false, 42))), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "title", [], "any", false, false, false, 42), "html", null, true);
echo "\"/>
\t\t\t\t\t\t\t<h3 class=\"title\">";
// line 43
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "title", [], "any", false, false, false, 43), "html", null, true);
echo "</h3>
\t\t\t\t\t\t</a>
\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 47
echo "\t\t\t\t</div>
\t\t\t\t
\t\t\t</div>
\t\t";
}
// line 51
echo "\t</section>
\t<section id=\"blog\" class=\"pt-0\">
\t\t";
// line 54
if ((twig_length_filter($this->env, (isset($context["featured"]) || array_key_exists("featured", $context) ? $context["featured"] : (function () { throw new RuntimeError('Variable "featured" does not exist.', 54, $this->source); })())) > 0)) {
// line 55
echo "\t\t\t<div class=\"container\">
\t\t\t\t<h2 class=\"section-title-underline\">";
// line 56
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("blog.headline"), "html", null, true);
echo "</h2>
\t\t\t\t<div class=\"row\">
\t\t\t\t\t";
// line 58
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["featured"]) || array_key_exists("featured", $context) ? $context["featured"] : (function () { throw new RuntimeError('Variable "featured" does not exist.', 58, $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["article"]) {
// line 59
echo "\t\t\t\t\t\t<div class=\"col-xl-3 col-lg-4 col-md-6 col-sm-12 blog-col\">
\t\t\t\t\t\t\t";
// line 60
$this->loadTemplate("front/blog/_blog-card.html.twig", "front/blog/index.html.twig", 60)->display($context);
// line 61
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t";
++$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['article'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 63
echo "\t\t\t\t</div>
\t\t\t</div>
\t\t";
}
// line 66
echo "\t\t";
if ((twig_length_filter($this->env, (isset($context["latest"]) || array_key_exists("latest", $context) ? $context["latest"] : (function () { throw new RuntimeError('Variable "latest" does not exist.', 66, $this->source); })())) > 0)) {
// line 67
echo "\t\t\t<div class=\"container\" id=\"news\">
\t\t\t\t<h2 class=\"section-title-underline\">";
// line 68
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("blog.latest"), "html", null, true);
echo "</h2>
\t\t\t\t<div class=\"row\">
\t\t\t\t\t";
// line 70
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["latest"]) || array_key_exists("latest", $context) ? $context["latest"] : (function () { throw new RuntimeError('Variable "latest" does not exist.', 70, $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["article"]) {
// line 71
echo "\t\t\t\t\t\t<div class=\"col-xl-3 col-lg-4 col-md-6 col-sm-12 blog-col\">
\t\t\t\t\t\t\t";
// line 72
$this->loadTemplate("front/blog/_blog-card.html.twig", "front/blog/index.html.twig", 72)->display($context);
// line 73
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t";
++$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['article'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 75
echo "\t\t\t\t</div>
\t\t\t\t<div class=\"text-center\">
\t\t\t\t\t<a href=\"";
// line 77
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("latest_news");
echo "\" class=\"btn main-btn\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("blog.more_latest"), "html", null, true);
echo "</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t";
}
// line 81
echo "
\t</section>
\t";
// line 84
$this->loadTemplate("front/blog/_blog-cta.html.twig", "front/blog/index.html.twig", 84)->display($context);
// line 85
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "front/blog/index.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 322 => 85, 320 => 84, 315 => 81, 306 => 77, 302 => 75, 287 => 73, 285 => 72, 282 => 71, 265 => 70, 260 => 68, 257 => 67, 254 => 66, 249 => 63, 234 => 61, 232 => 60, 229 => 59, 212 => 58, 207 => 56, 204 => 55, 202 => 54, 197 => 51, 191 => 47, 181 => 43, 175 => 42, 171 => 41, 168 => 40, 164 => 39, 157 => 35, 154 => 34, 152 => 33, 149 => 32, 140 => 25, 133 => 21, 128 => 19, 123 => 17, 116 => 12, 106 => 11, 93 => 8, 83 => 7, 70 => 4, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"front/base.html.twig\" %}
{% block title %}
\t{{ 'seo.blog_title' | trans }}
{% endblock %}
{% block seo %}
\t<meta name=\"description\" content=\"{{ 'seo.blog_description' | trans }}\">
{% endblock %}
{% block body %}
\t<section class=\"mt-0 first-section\" id=\"blog-search\">
\t\t<div class=\"container\">
\t\t\t<div class=\"row justify-content-center\">
\t\t\t\t<div class=\"col-lg-8\">
\t\t\t\t\t{{ form_start(form, {'attr': {'class': 'blog-main-search'}}) }}
\t\t\t\t\t\t<div class=\"form-inline\">
\t\t\t\t\t\t\t{{ form_widget(form.title, {'attr': {'class': 'input-main-search'}}) }}
\t\t\t\t\t\t\t<button class=\"btn btn-main-search\" type=\"submit\">
\t\t\t\t\t\t\t\t<span class=\"hide-mobile\">{{ 'global.search' | trans | capitalize }}</span>
\t\t\t\t\t\t\t\t<i class=\"far fa-search hide-desktop\"></i>
\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t</div>
\t\t\t\t\t{{ form_end(form) }}
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</section>
\t{# Categories #}
\t<section id=\"categories\">
\t\t{% if categories | length > 0 %}
\t\t\t<div class=\"container\">
\t\t\t\t<h2 class=\"section-title-underline\">{{ 'blog.categories' | trans }}</h2>
\t\t\t\t<div class=\"categories-grid\">
\t\t\t\t\t{% for category in categories %}
\t\t\t\t\t\t<a class=\"card-category\" href=\"{{ path('article_category', {'slug': category.slug}) }}\">
\t\t\t\t\t\t\t<img loading=\"lazy\" src=\"{{asset('/images/categories/' ~ category.image) }}\" alt=\"{{ category.title }}\"/>
\t\t\t\t\t\t\t<h3 class=\"title\">{{ category.title }}</h3>
\t\t\t\t\t\t</a>
\t\t\t\t\t{% endfor %}
\t\t\t\t</div>
\t\t\t\t
\t\t\t</div>
\t\t{% endif %}
\t</section>
\t<section id=\"blog\" class=\"pt-0\">
\t\t{% if featured | length > 0 %}
\t\t\t<div class=\"container\">
\t\t\t\t<h2 class=\"section-title-underline\">{{ 'blog.headline' | trans }}</h2>
\t\t\t\t<div class=\"row\">
\t\t\t\t\t{% for article in featured %}
\t\t\t\t\t\t<div class=\"col-xl-3 col-lg-4 col-md-6 col-sm-12 blog-col\">
\t\t\t\t\t\t\t{% include \"front/blog/_blog-card.html.twig\" %}
\t\t\t\t\t\t</div>
\t\t\t\t\t{% endfor %}
\t\t\t\t</div>
\t\t\t</div>
\t\t{% endif %}
\t\t{% if latest | length > 0 %}
\t\t\t<div class=\"container\" id=\"news\">
\t\t\t\t<h2 class=\"section-title-underline\">{{ 'blog.latest' | trans }}</h2>
\t\t\t\t<div class=\"row\">
\t\t\t\t\t{% for article in latest %}
\t\t\t\t\t\t<div class=\"col-xl-3 col-lg-4 col-md-6 col-sm-12 blog-col\">
\t\t\t\t\t\t\t{% include \"front/blog/_blog-card.html.twig\" %}
\t\t\t\t\t\t</div>
\t\t\t\t\t{% endfor %}
\t\t\t\t</div>
\t\t\t\t<div class=\"text-center\">
\t\t\t\t\t<a href=\"{{ path('latest_news') }}\" class=\"btn main-btn\">{{ 'blog.more_latest' | trans }}</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t{% endif %}
\t</section>
\t{% include \"front/blog/_blog-cta.html.twig\" %}
{% endblock %}
", "front/blog/index.html.twig", "/var/www/preprod/racket-trip/templates/front/blog/index.html.twig");
}
}