<?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;
use Twig\TemplateWrapper;
/* pages/blogs.html.twig */
class __TwigTemplate_45b912faff08dc5158c5e6bcd19da803 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'css' => [$this, 'block_css'],
'content' => [$this, 'block_content'],
'js' => [$this, 'block_js'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "pages/blogs.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/blogs.html.twig"));
$this->parent = $this->load("base.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_css(array $context, array $blocks = []): iterable
{
$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", "css"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "css"));
// line 3
yield " ";
yield from $this->yieldParentBlock("css", $context, $blocks);
yield "
<style>
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 9
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$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", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 10
yield " <section id=\"page-title\" class=\"text-light\" ";
yield $this->extensions['App\Twig\ImageRenderExtension']->generateBackground($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("websiteImage/blog.jpg"), "background-size: cover; background-position: center center;", true);
yield ">
<div class=\"bg-overlay\"></div>
<div class=\"container\">
<div class=\"page-title\">
<h1>";
// line 14
yield $this->extensions['App\Twig\TransExtension']->trans("blogs.title");
yield "</h1>
";
// line 15
if (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["generalS"]) || array_key_exists("generalS", $context) ? $context["generalS"] : (function () { throw new RuntimeError('Variable "generalS" does not exist.', 15, $this->source); })()), "imageAccueil", [], "any", false, false, false, 15), "texteBlogs", [], "any", false, false, false, 15) != null) || (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["generalS"]) || array_key_exists("generalS", $context) ? $context["generalS"] : (function () { throw new RuntimeError('Variable "generalS" does not exist.', 15, $this->source); })()), "imageAccueil", [], "any", false, false, false, 15), "texteBlogs", [], "any", false, false, false, 15) != ""))) {
yield "<p class=\"slider-text\"> ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["generalS"]) || array_key_exists("generalS", $context) ? $context["generalS"] : (function () { throw new RuntimeError('Variable "generalS" does not exist.', 15, $this->source); })()), "imageAccueil", [], "any", false, false, false, 15), "texteBlogs", [], "any", false, false, false, 15), "html", null, true);
yield "</p>";
}
// line 16
yield "
</div>
</div>
</section>
<section id=\"page-content\">
<div class=\"container\">
<div id=\"blog\" class=\"grid-layout post-3-columns m-b-30\" data-item=\"post-item\">
";
// line 26
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["blogs"]) || array_key_exists("blogs", $context) ? $context["blogs"] : (function () { throw new RuntimeError('Variable "blogs" does not exist.', 26, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["blog"]) {
// line 27
yield " <div class=\"post-item border\">
<div class=\"post-item-wrap\">
<div class=\"post-image\"> <a href=\"";
// line 29
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "id", [], "any", false, false, false, 29)]), "html", null, true);
yield "\"> <img alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "altDescription", [], "any", false, false, false, 29), "html", null, true);
yield "\" ";
yield $this->extensions['App\Twig\ImageRenderExtension']->generateSrc($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("images/upload/" . CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "image", [], "any", false, false, false, 29))));
yield "> </a></div>
<div class=\"post-item-description\"> <span class=\"post-meta-date\"><i class=\"fa fa-calendar-o\"></i>";
// line 30
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "date", [], "any", false, false, false, 30), "d M Y"), "html", null, true);
yield "</span>
<h2><a href=\"";
// line 31
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "id", [], "any", false, false, false, 31)]), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "titre", [], "any", false, false, false, 31), "html", null, true);
yield "</a></h2>
<div> ";
// line 32
yield CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "displayContent", [], "any", false, false, false, 32), "<strong><u><br><li><ul>")), "truncate", [200, "...", false], "method", false, false, false, 32);
yield " </div>
<a href=\"";
// line 33
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["blog"], "id", [], "any", false, false, false, 33)]), "html", null, true);
yield "\" class=\"item-link\">";
yield $this->extensions['App\Twig\TransExtension']->trans("blogs.read_more");
yield " <i class=\"icon-chevron-right\"></i></a>
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['blog'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
yield "
</div>
</div>
</section>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 50
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_js(array $context, array $blocks = []): iterable
{
$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", "js"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "js"));
// line 51
yield " ";
yield from $this->yieldParentBlock("js", $context, $blocks);
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "pages/blogs.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 216 => 51, 203 => 50, 182 => 38, 169 => 33, 165 => 32, 159 => 31, 155 => 30, 147 => 29, 143 => 27, 139 => 26, 127 => 16, 121 => 15, 117 => 14, 109 => 10, 96 => 9, 78 => 3, 65 => 2, 42 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'base.html.twig' %}
{% block css %}
{{ parent() }}
<style>
</style>
{% endblock %}
{% block content %}
<section id=\"page-title\" class=\"text-light\" {{ responsive_background( asset('websiteImage/blog.jpg'),\"background-size: cover; background-position: center center;\",true ) | raw }}>
<div class=\"bg-overlay\"></div>
<div class=\"container\">
<div class=\"page-title\">
<h1>{{ 'blogs.title' | admintrans | raw }}</h1>
{% if generalS.imageAccueil.texteBlogs != null or generalS.imageAccueil.texteBlogs != '' %}<p class=\"slider-text\"> {{ generalS.imageAccueil.texteBlogs }}</p>{% endif %}
</div>
</div>
</section>
<section id=\"page-content\">
<div class=\"container\">
<div id=\"blog\" class=\"grid-layout post-3-columns m-b-30\" data-item=\"post-item\">
{% for blog in blogs %}
<div class=\"post-item border\">
<div class=\"post-item-wrap\">
<div class=\"post-image\"> <a href=\"{{ path('blog',{'id' : blog.id}) }}\"> <img alt=\"{{ blog.altDescription }}\" {{ responsive_src(asset('images/upload/' ~ blog.image)) | raw }}> </a></div>
<div class=\"post-item-description\"> <span class=\"post-meta-date\"><i class=\"fa fa-calendar-o\"></i>{{ blog.date | date('d M Y') }}</span>
<h2><a href=\"{{ path('blog',{'id' : blog.id}) }}\">{{ blog.titre }}</a></h2>
<div> {{ blog.displayContent | striptags('<strong><u><br><li><ul>') | u.truncate( 200, '...', false) | raw }} </div>
<a href=\"{{ path('blog',{'id' : blog.id}) }}\" class=\"item-link\">{{ 'blogs.read_more' | admintrans | raw }} <i class=\"icon-chevron-right\"></i></a>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
{% endblock %}
{% block js %}
{{ parent() }}
{% endblock %}
", "pages/blogs.html.twig", "/app/templates/pages/blogs.html.twig");
}
}