<?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_bac45faab136c71207c8b531b79296ab extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'bodyClass' => [$this, 'block_bodyClass'],
'content' => [$this, 'block_content'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "layouts/front.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("layouts/front.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_bodyClass($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", "bodyClass"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyClass"));
echo "interne";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 5
public function block_content($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", "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 6
echo " <section class=\"title-page\" style=\"background:url(";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/title-page.jpg"), "html", null, true);
echo ")\">
<div class=\"container\">
<div class=\"row\">
<div class=\"head_page\">
<div class=\"head\"> Blog</div>
<div class=\"sperateur\"></div>
<div class=\"sub_title\"> Découvrez nos actualités </div>
</div>
<div class=\"arrows_head\">
<a href=\"#\">
<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\"
id=\"Layer_1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 492 492\"
style=\"enable-background:new 0 0 492 492;\" xml:space=\"preserve\" fill=\"#fff\">
<g>
<g>
<path xmlns=\"http://www.w3.org/2000/svg\" fill=\"\"
d=\"M198.608,246.104L382.664,62.04c5.068-5.056,7.856-11.816,7.856-19.024c0-7.212-2.788-13.968-7.856-19.032l-16.128-16.12 C361.476,2.792,354.712,0,347.504,0s-13.964,2.792-19.028,7.864L109.328,227.008c-5.084,5.08-7.868,11.868-7.848,19.084 c-0.02,7.248,2.76,14.028,7.848,19.112l218.944,218.932c5.064,5.072,11.82,7.864,19.032,7.864c7.208,0,13.964-2.792,19.032-7.864 l16.124-16.12c10.492-10.492,10.492-27.572,0-38.06L198.608,246.104z\"/>
</g></svg>
<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\"
id=\"Layer_1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 492 492\" style=\"enable-background:new 0 0 492 492;\"
xml:space=\"preserve\" fill=\"#fff\">
<g>
<g>
<path xmlns=\"http://www.w3.org/2000/svg\" fill=\"\"
d=\"M198.608,246.104L382.664,62.04c5.068-5.056,7.856-11.816,7.856-19.024c0-7.212-2.788-13.968-7.856-19.032l-16.128-16.12 C361.476,2.792,354.712,0,347.504,0s-13.964,2.792-19.028,7.864L109.328,227.008c-5.084,5.08-7.868,11.868-7.848,19.084 c-0.02,7.248,2.76,14.028,7.848,19.112l218.944,218.932c5.064,5.072,11.82,7.864,19.032,7.864c7.208,0,13.964-2.792,19.032-7.864 l16.124-16.12c10.492-10.492,10.492-27.572,0-38.06L198.608,246.104z\"/>
</g></svg>
</a>
</div>
</div>
</div>
</section>
<section class=\"breadcumbs\">
<div class=\"container\">
<div class=\"row\">
<div class=\"crumbs\"><a href=\"#\"> Home </a> > <a href=\"\"> Blog </a></div>
</div>
</div>
</section>
<section class=\"bloc1\">
<div class=\"container\">
<div class=\"row\">
<div class=\"blocs\">
<form id=\"filter\">
<div class=\"colf\">
<p class=\"title_filter\"> Vous recherchez ? </p>
</div>
<div class=\"colf\">
<input id=\"keywords\" name=\"keywords\" type=\"text\" class=\"input\" placeholder=\"Mots clés..\"
value=\"";
// line 55
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 55, $this->source); })()), "request", [], "any", false, false, false, 55), "get", [0 => "keywords", 1 => ""], "method", false, false, false, 55), "html", null, true);
echo "\">
</div>
<div class=\"colf\">
<div id=\"date-picker-example\" class=\"md-form md-outline input-with-post-icon\">
<input name=\"date\" placeholder=\"Select date\" type=\"text\" id=\"date\"
class=\"form-control js-datepicker\" value=\"";
// line 60
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, 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.', 60, $this->source); })()), "request", [], "any", false, false, false, 60), "get", [0 => "date", 1 => ""], "method", false, false, false, 60), "html", null, true);
echo "\">
<i class=\"fa fa-calendar input-prefix\" tabindex=0></i>
</div>
</div>
<div class=\"colf\">
<button type=\"submit\" class=\"submit\" /><i class=\"icon icon-left-arrow gly-rotate\"> </i> Rechercher</button>
</div>
</form>
</div>
</div>
</div>
</section>
<section class=\"stage blog\">
<div class=\"container\">
<div class=\"row\">
<div class=\"list-actus stage_list\">
";
// line 76
if ((twig_length_filter($this->env, (isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.', 76, $this->source); })())) > 0)) {
// line 77
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.', 77, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
// line 78
echo " <div class=\"actus\">
<div class=\"actus-img\">
<a href=\"";
// line 80
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("page_blog_single", ["slug" => twig_get_attribute($this->env, $this->source, $context["post"], "slug", [], "any", false, false, false, 80)]), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/" . twig_get_attribute($this->env, $this->source, $context["post"], "image", [], "any", false, false, false, 80))), "html", null, true);
echo "\"></a>
</div>
<div class=\"content-actus\">
<div class=\"titre\"> <a href=\"";
// line 83
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("page_blog_single", ["slug" => twig_get_attribute($this->env, $this->source, $context["post"], "slug", [], "any", false, false, false, 83)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["post"], "title", [], "any", false, false, false, 83), "html", null, true);
echo "</a></div>
<div class=\"sous-titre\"> <a href=\"";
// line 84
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("page_blog_single", ["slug" => twig_get_attribute($this->env, $this->source, $context["post"], "slug", [], "any", false, false, false, 84)]), "html", null, true);
echo "\">Publié le : ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["post"], "publishAt", [], "any", false, false, false, 84), "d/m/Y"), "html", null, true);
echo "</a></div>
<div class=\"sperateur\"></div>
<div class=\"expert\">
";
// line 87
echo twig_escape_filter($this->env, $this->extensions['App\Twig\CmsExtension']->excerpt(twig_get_attribute($this->env, $this->source, $context["post"], "excerpt", [], "any", false, false, false, 87), 150), "html", null, true);
echo "
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 92
echo " ";
} else {
// line 93
echo " <div class=\"alert alert-info\" role=\"alert\">
Pas d'article disponible pour le moment.
</div>
";
}
// line 97
echo " </div>
</div>
";
// line 99
if ((twig_length_filter($this->env, (isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.', 99, $this->source); })())) > 0)) {
// line 100
echo " <div class=\"row\">
<div class=\"link_actus\">
<input type=\"hidden\" id=\"page\" value=\"";
// line 102
echo twig_escape_filter($this->env, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 102, $this->source); })()), "html", null, true);
echo "\"/>
<input type=\"hidden\" id=\"limit\" value=\"";
// line 103
echo twig_escape_filter($this->env, (isset($context["limit"]) || array_key_exists("limit", $context) ? $context["limit"] : (function () { throw new RuntimeError('Variable "limit" does not exist.', 103, $this->source); })()), "html", null, true);
echo "\"/>
<a id=\"load-more\" href=\"#\"> <i class=\"icon icon-left-arrow gly-rotate\"></i> charger plus </a>
<img id=\"img-loading\" src=\"";
// line 105
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/loading.gif"), "html", null, true);
echo "\" style=\"width: 80px; height: 80px; display: none;\">
</div>
</div>
";
}
// line 109
echo " </div>
</section>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 114
public function block_javascripts($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", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 115
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script type=\"text/javascript\">
\$(function () {
\$('#load-more').on('click', function (e) {
e.preventDefault();
\$('#load-more').hide();
\$('#img-loading').show();
\$.ajax({
url: Routing.generate('page_blog_paginate'),
data: {
'page': \$('#page').val(),
'limit': \$('#limit').val(),
'keywords': \$('#keywords').val(),
'date': \$('#date').val(),
},
success: function (html) {
if (html != '') {
\$('.stage_list').append(html);
var page = parseInt(\$('#page').val()) + 1;
\$('#page').val(page);
\$('#load-more').show();
}
\$('#img-loading').hide();
}
});
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "front/blog/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 271 => 115, 261 => 114, 248 => 109, 241 => 105, 236 => 103, 232 => 102, 228 => 100, 226 => 99, 222 => 97, 216 => 93, 213 => 92, 202 => 87, 194 => 84, 188 => 83, 180 => 80, 176 => 78, 171 => 77, 169 => 76, 150 => 60, 142 => 55, 89 => 6, 79 => 5, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'layouts/front.html.twig' %}
{% block bodyClass %}interne{% endblock %}
{% block content %}
<section class=\"title-page\" style=\"background:url({{ asset('build/images/title-page.jpg') }})\">
<div class=\"container\">
<div class=\"row\">
<div class=\"head_page\">
<div class=\"head\"> Blog</div>
<div class=\"sperateur\"></div>
<div class=\"sub_title\"> Découvrez nos actualités </div>
</div>
<div class=\"arrows_head\">
<a href=\"#\">
<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\"
id=\"Layer_1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 492 492\"
style=\"enable-background:new 0 0 492 492;\" xml:space=\"preserve\" fill=\"#fff\">
<g>
<g>
<path xmlns=\"http://www.w3.org/2000/svg\" fill=\"\"
d=\"M198.608,246.104L382.664,62.04c5.068-5.056,7.856-11.816,7.856-19.024c0-7.212-2.788-13.968-7.856-19.032l-16.128-16.12 C361.476,2.792,354.712,0,347.504,0s-13.964,2.792-19.028,7.864L109.328,227.008c-5.084,5.08-7.868,11.868-7.848,19.084 c-0.02,7.248,2.76,14.028,7.848,19.112l218.944,218.932c5.064,5.072,11.82,7.864,19.032,7.864c7.208,0,13.964-2.792,19.032-7.864 l16.124-16.12c10.492-10.492,10.492-27.572,0-38.06L198.608,246.104z\"/>
</g></svg>
<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\"
id=\"Layer_1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 492 492\" style=\"enable-background:new 0 0 492 492;\"
xml:space=\"preserve\" fill=\"#fff\">
<g>
<g>
<path xmlns=\"http://www.w3.org/2000/svg\" fill=\"\"
d=\"M198.608,246.104L382.664,62.04c5.068-5.056,7.856-11.816,7.856-19.024c0-7.212-2.788-13.968-7.856-19.032l-16.128-16.12 C361.476,2.792,354.712,0,347.504,0s-13.964,2.792-19.028,7.864L109.328,227.008c-5.084,5.08-7.868,11.868-7.848,19.084 c-0.02,7.248,2.76,14.028,7.848,19.112l218.944,218.932c5.064,5.072,11.82,7.864,19.032,7.864c7.208,0,13.964-2.792,19.032-7.864 l16.124-16.12c10.492-10.492,10.492-27.572,0-38.06L198.608,246.104z\"/>
</g></svg>
</a>
</div>
</div>
</div>
</section>
<section class=\"breadcumbs\">
<div class=\"container\">
<div class=\"row\">
<div class=\"crumbs\"><a href=\"#\"> Home </a> > <a href=\"\"> Blog </a></div>
</div>
</div>
</section>
<section class=\"bloc1\">
<div class=\"container\">
<div class=\"row\">
<div class=\"blocs\">
<form id=\"filter\">
<div class=\"colf\">
<p class=\"title_filter\"> Vous recherchez ? </p>
</div>
<div class=\"colf\">
<input id=\"keywords\" name=\"keywords\" type=\"text\" class=\"input\" placeholder=\"Mots clés..\"
value=\"{{ app.request.get('keywords', '') }}\">
</div>
<div class=\"colf\">
<div id=\"date-picker-example\" class=\"md-form md-outline input-with-post-icon\">
<input name=\"date\" placeholder=\"Select date\" type=\"text\" id=\"date\"
class=\"form-control js-datepicker\" value=\"{{ app.request.get('date', '') }}\">
<i class=\"fa fa-calendar input-prefix\" tabindex=0></i>
</div>
</div>
<div class=\"colf\">
<button type=\"submit\" class=\"submit\" /><i class=\"icon icon-left-arrow gly-rotate\"> </i> Rechercher</button>
</div>
</form>
</div>
</div>
</div>
</section>
<section class=\"stage blog\">
<div class=\"container\">
<div class=\"row\">
<div class=\"list-actus stage_list\">
{% if posts|length > 0 %}
{% for post in posts %}
<div class=\"actus\">
<div class=\"actus-img\">
<a href=\"{{ path('page_blog_single', {slug: post.slug}) }}\"><img src=\"{{ asset('uploads/'~post.image) }}\"></a>
</div>
<div class=\"content-actus\">
<div class=\"titre\"> <a href=\"{{ path('page_blog_single', {slug: post.slug}) }}\">{{ post.title }}</a></div>
<div class=\"sous-titre\"> <a href=\"{{ path('page_blog_single', {slug: post.slug}) }}\">Publié le : {{ post.publishAt|date('d/m/Y') }}</a></div>
<div class=\"sperateur\"></div>
<div class=\"expert\">
{{ post.excerpt|excerpt(150) }}
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class=\"alert alert-info\" role=\"alert\">
Pas d'article disponible pour le moment.
</div>
{% endif %}
</div>
</div>
{% if posts|length > 0 %}
<div class=\"row\">
<div class=\"link_actus\">
<input type=\"hidden\" id=\"page\" value=\"{{ page }}\"/>
<input type=\"hidden\" id=\"limit\" value=\"{{ limit }}\"/>
<a id=\"load-more\" href=\"#\"> <i class=\"icon icon-left-arrow gly-rotate\"></i> charger plus </a>
<img id=\"img-loading\" src=\"{{ asset('build/images/loading.gif') }}\" style=\"width: 80px; height: 80px; display: none;\">
</div>
</div>
{% endif %}
</div>
</section>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type=\"text/javascript\">
\$(function () {
\$('#load-more').on('click', function (e) {
e.preventDefault();
\$('#load-more').hide();
\$('#img-loading').show();
\$.ajax({
url: Routing.generate('page_blog_paginate'),
data: {
'page': \$('#page').val(),
'limit': \$('#limit').val(),
'keywords': \$('#keywords').val(),
'date': \$('#date').val(),
},
success: function (html) {
if (html != '') {
\$('.stage_list').append(html);
var page = parseInt(\$('#page').val()) + 1;
\$('#page').val(page);
\$('#load-more').show();
}
\$('#img-loading').hide();
}
});
});
});
</script>
{% endblock %}
", "front/blog/index.html.twig", "/home/saco/subdomains/preprod/templates/front/blog/index.html.twig");
}
}