<?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;
/* blog_article/index.html.twig */
class __TwigTemplate_78e000175f2701ab9c43eb03b84e4b655b0df2069083fa6adb98e2830d01088a extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
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", "blog_article/index.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "blog_article/index.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "blog_article/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_title($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(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["setting"]) || array_key_exists("setting", $context) ? $context["setting"] : (function () { throw new RuntimeError('Variable "setting" does not exist.', 3, $this->source); })()), "siteName", [], "any", false, false, false, 3), "html", null, true);
echo " : Blog";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 5
public function block_body($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(), "block", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 49
echo "
<section class=\"container py-5\">
<div class=\"row\">
<div class=\"col\">
";
// line 55
echo " <div class=\"row\">
<div class=\"col small\">
<nav style=\"--bs-breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E");\"
aria-label=\"breadcrumb\">
<ol class=\"breadcrumb small\">
<li class=\"breadcrumb-item\"><a href=\"";
// line 60
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_home");
echo "\" class=\"text-decoration-none text-dark\">Accueil</a></li>
<li class=\"breadcrumb-item active\" aria-current=\"page\">Blog</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
";
// line 69
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 69, $this->source); })()), "flashes", [0 => "success"], "method", false, false, false, 69));
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 70
echo " <div class=\"alert alert-success alert-dismissible fade show text-center mt-4 mb-5\" role=\"alert\">
";
// line 71
echo twig_escape_filter($this->env, $context["message"], "html", null, true);
echo "
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 75
echo "
";
// line 76
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 76, $this->source); })()), "flashes", [0 => "email_not_exists"], "method", false, false, false, 76));
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 77
echo " <div class=\"alert alert-danger alert-dismissible fade show text-center mt-4 mb-5\" role=\"alert\">
";
// line 78
echo twig_escape_filter($this->env, $context["message"], "html", null, true);
echo "
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 82
echo "
";
// line 83
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 83, $this->source); })()), "flashes", [0 => "unsubscribe"], "method", false, false, false, 83));
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 84
echo " <div class=\"alert alert-success alert-dismissible fade show text-center mt-4 mb-5\" role=\"alert\">
";
// line 85
echo twig_escape_filter($this->env, $context["message"], "html", null, true);
echo "
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 89
echo "
<h1 class=\"text-center mb-2 color1 fw-700 text-uppercase\" data-aos=\"fade-down\" data-aos-duration=\"2000\">Blog</h1>
<div class=\"row row-cols-1 row-cols-md-3 g-4 mt-3\">
";
// line 92
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["articles"]) || array_key_exists("articles", $context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.', 92, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["article"]) {
// line 93
echo " <div class=\"col blog-cards\">
<div class=\"card h-100\">
<img src=\"";
// line 95
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("assets/img/articles/" . twig_get_attribute($this->env, $this->source, $context["article"], "image", [], "any", false, false, false, 95))), "html", null, true);
echo "\" class=\"card-img-top img-fluid shadow\" data-aos=\"flip-right\" data-aos-duration=\"2000\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["article"], "title", [], "any", false, false, false, 95), "html", null, true);
echo "\">
<div class=\"card-body\">
<h5 class=\"card-title\">
<a href=\"";
// line 98
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_blog_article_show", ["slug" => twig_get_attribute($this->env, $this->source, $context["article"], "slug", [], "any", false, false, false, 98)]), "html", null, true);
echo "\" class=\"text-decoration-none color1 text-uppercase fw-bold\">
";
// line 99
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["article"], "title", [], "any", false, false, false, 99), "html", null, true);
echo "
</a>
</h5>
<p class=\"text-xsmall color1\">
Publié le ";
// line 103
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["article"], "createdAt", [], "any", false, false, false, 103), "d-m-Y"), "html", null, true);
echo "
";
// line 104
if ((0 !== twig_compare(twig_get_attribute($this->env, $this->source, $context["article"], "updatedAt", [], "any", false, false, false, 104), null))) {
// line 105
echo " | Mis à jour le ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["article"], "updatedAt", [], "any", false, false, false, 105), "d-m-Y"), "html", null, true);
echo "
";
}
// line 107
echo " <br>Catégorie :
<a href=\"";
// line 108
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_blog_category_show", ["slug" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["article"], "category", [], "any", false, false, false, 108), "slug", [], "any", false, false, false, 108)]), "html", null, true);
echo "\" class=\"text-decoration-none color2\">
";
// line 109
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["article"], "category", [], "any", false, false, false, 109), "title", [], "any", false, false, false, 109), "html", null, true);
echo "
</a>
</p>
<p class=\"card-text\">";
// line 112
echo twig_slice($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, $context["article"], "content", [], "any", false, false, false, 112), ["<div>" => "", "</div>" => "", "<p>" => "", "</p>" => ""]), 0, 200);
echo "...</p>
</div>
<div class=\"card-footer\">
<a href=\"";
// line 115
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_blog_article_show", ["slug" => twig_get_attribute($this->env, $this->source, $context["article"], "slug", [], "any", false, false, false, 115)]), "html", null, true);
echo "\" class=\"text-decoration-none\">
<span class=\"button-difference text-uppercase\">Lire la suite</span>
</a>
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['article'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 122
echo " </div>
<div class=\"row mt-5\">
<div class=\"col navigation d-flex justify-content-center\">
";
// line 126
echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["articles"]) || array_key_exists("articles", $context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.', 126, $this->source); })()));
echo "
</div>
</div>
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "blog_article/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 254 => 126, 248 => 122, 235 => 115, 229 => 112, 223 => 109, 219 => 108, 216 => 107, 210 => 105, 208 => 104, 204 => 103, 197 => 99, 193 => 98, 185 => 95, 181 => 93, 177 => 92, 172 => 89, 162 => 85, 159 => 84, 155 => 83, 152 => 82, 142 => 78, 139 => 77, 135 => 76, 132 => 75, 122 => 71, 119 => 70, 115 => 69, 103 => 60, 96 => 55, 89 => 49, 79 => 5, 59 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}{{ setting.siteName }} : Blog{% endblock %}
{% block body %}
{# <h1>BlogArticle index</h1>
<table class=\"table\">
<thead>
<tr>
<th>Id</th>
<th>Title</th>
<th>Content</th>
<th>Image</th>
<th>Video</th>
<th>CreatedAt</th>
<th>UpdatedAt</th>
<th>IsEnabled</th>
<th>Slug</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for blog_article in blog_articles %}
<tr>
<td>{{ blog_article.id }}</td>
<td>{{ blog_article.title }}</td>
<td>{{ blog_article.content }}</td>
<td>{{ blog_article.image }}</td>
<td>{{ blog_article.video }}</td>
<td>{{ blog_article.createdAt ? blog_article.createdAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ blog_article.updatedAt ? blog_article.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ blog_article.isEnabled ? 'Yes' : 'No' }}</td>
<td>{{ blog_article.slug }}</td>
<td>
<a href=\"{{ path('app_blog_article_show', {'id': blog_article.id}) }}\">show</a>
<a href=\"{{ path('app_blog_article_edit', {'id': blog_article.id}) }}\">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan=\"10\">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href=\"{{ path('app_blog_article_new') }}\">Create new</a> #}
<section class=\"container py-5\">
<div class=\"row\">
<div class=\"col\">
{# Breadcrumbs #}
<div class=\"row\">
<div class=\"col small\">
<nav style=\"--bs-breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E");\"
aria-label=\"breadcrumb\">
<ol class=\"breadcrumb small\">
<li class=\"breadcrumb-item\"><a href=\"{{ path('app_home') }}\" class=\"text-decoration-none text-dark\">Accueil</a></li>
<li class=\"breadcrumb-item active\" aria-current=\"page\">Blog</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
{% for message in app.flashes('success') %}
<div class=\"alert alert-success alert-dismissible fade show text-center mt-4 mb-5\" role=\"alert\">
{{ message }}
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
</div>
{% endfor %}
{% for message in app.flashes('email_not_exists') %}
<div class=\"alert alert-danger alert-dismissible fade show text-center mt-4 mb-5\" role=\"alert\">
{{ message }}
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
</div>
{% endfor %}
{% for message in app.flashes('unsubscribe') %}
<div class=\"alert alert-success alert-dismissible fade show text-center mt-4 mb-5\" role=\"alert\">
{{ message }}
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
</div>
{% endfor %}
<h1 class=\"text-center mb-2 color1 fw-700 text-uppercase\" data-aos=\"fade-down\" data-aos-duration=\"2000\">Blog</h1>
<div class=\"row row-cols-1 row-cols-md-3 g-4 mt-3\">
{% for article in articles %}
<div class=\"col blog-cards\">
<div class=\"card h-100\">
<img src=\"{{ asset('assets/img/articles/' ~ article.image ) }}\" class=\"card-img-top img-fluid shadow\" data-aos=\"flip-right\" data-aos-duration=\"2000\" alt=\"{{ article.title }}\">
<div class=\"card-body\">
<h5 class=\"card-title\">
<a href=\"{{ path('app_blog_article_show', {'slug': article.slug}) }}\" class=\"text-decoration-none color1 text-uppercase fw-bold\">
{{ article.title }}
</a>
</h5>
<p class=\"text-xsmall color1\">
Publié le {{ article.createdAt|date('d-m-Y') }}
{% if article.updatedAt != null %}
| Mis à jour le {{ article.updatedAt|date('d-m-Y') }}
{% endif %}
<br>Catégorie :
<a href=\"{{ path('app_blog_category_show', {'slug': article.category.slug}) }}\" class=\"text-decoration-none color2\">
{{ article.category.title }}
</a>
</p>
<p class=\"card-text\">{{ article.content|replace({'<div>': '', '</div>': '', '<p>': '', '</p>': '',})|slice(0,200)|raw }}...</p>
</div>
<div class=\"card-footer\">
<a href=\"{{ path('app_blog_article_show', {'slug': article.slug}) }}\" class=\"text-decoration-none\">
<span class=\"button-difference text-uppercase\">Lire la suite</span>
</a>
</div>
</div>
</div>
{% endfor %}
</div>
<div class=\"row mt-5\">
<div class=\"col navigation d-flex justify-content-center\">
{{ knp_pagination_render(articles) }}
</div>
</div>
</section>
{% endblock %}", "blog_article/index.html.twig", "/home/debian/www/laroche-associes/preproduction/templates/blog_article/index.html.twig");
}
}