<?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;
/* event/index.html.twig */
class __TwigTemplate_be7e835be3a359d79fcc74a6d2e05740 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'stylesheets' => [$this, 'block_stylesheets'],
'banner' => [$this, 'block_banner'],
'main' => [$this, 'block_main'],
'contact' => [$this, 'block_contact'],
'footer' => [$this, 'block_footer'],
'script' => [$this, 'block_script'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "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", "event/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", "event/index.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "event/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"));
echo "Nos Futurs Événements - RénovAtHome Un Artisant Près De Chez Soi";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 5
public function block_stylesheets($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", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 6
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
<link rel=\"stylesheet\" href=\"";
// line 7
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/styles/evenements.css"), "html", null, true);
echo "\">
<meta name=\"description\" content=\"Vous trouverez ci-dessous tous les lieux et dates à retenir afin de rencontrer nos équipes pour discuter de vos projets de rénovation.\">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 11
public function block_banner($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", "banner"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "banner"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 13
public function block_main($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", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 14
echo "<main>
<div class=\"container\">
<div class=\"evenements\">
";
// line 17
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, (isset($context["events"]) || array_key_exists("events", $context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.', 17, $this->source); })()), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 17, $this->source); })()), "dateDebut", [], "any", false, false, false, 17) <= twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 17, $this->source); })()), "dateDebut", [], "any", false, false, false, 17)); }));
foreach ($context['_seq'] as $context["_key"] => $context["event"]) {
echo "
<div class=\"evenement\">
<div class=\"background-evenement\">
<img src=\"";
// line 20
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/evenements/" . twig_get_attribute($this->env, $this->source, $context["event"], "photo", [], "any", false, false, false, 20))), "html", null, true);
echo "\" alt=\"affiche de l'évenement ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "nom", [], "any", false, false, false, 20), "html", null, true);
echo "\">
</div>
<div class=\"text-evenement\">
<a class=\"titre-evenement\" href=\"";
// line 24
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("event", ["slug" => twig_get_attribute($this->env, $this->source, $context["event"], "slug", [], "any", false, false, false, 24)]), "html", null, true);
echo "\"> ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "nom", [], "any", false, false, false, 24), "html", null, true);
echo "</a>
<div class=\"lieu\">
<img src=\"";
// line 26
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/france.png"), "html", null, true);
echo "\" alt=\"drapeau de la france\">
<span> ";
// line 27
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "lieu", [], "any", false, false, false, 27), "html", null, true);
echo "</span>
</div>
<div class=\"description-evenement\">
";
// line 30
echo twig_get_attribute($this->env, $this->source, $context["event"], "description", [], "any", false, false, false, 30);
echo "
</div>
</div>
<div class=\"date-evenement\">
<div class=\"date-chiffre\">
<span class=\"\">
";
// line 36
echo twig_escape_filter($this->env, twig_localized_date_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "dateDebut", [], "any", false, false, false, 36), "none", "none", "fr", null, "d"), "html", null, true);
echo "
- ";
// line 37
echo twig_escape_filter($this->env, twig_localized_date_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "dateFin", [], "any", false, false, false, 37), "none", "none", "fr", null, "d"), "html", null, true);
echo "
</span>
</div>
<div class=\"date-mois\">
";
// line 41
echo twig_escape_filter($this->env, (((twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "dateDebut", [], "any", false, false, false, 41), "MMMM") == twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "dateFin", [], "any", false, false, false, 41), "MMMM"))) ? (twig_localized_date_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "dateDebut", [], "any", false, false, false, 41), "none", "none", "fr", null, "MMMM")) : (((twig_localized_date_filter($this->env, twig_get_attribute($this->env, $this->source, // line 42
$context["event"], "dateDebut", [], "any", false, false, false, 42), "none", "none", "fr", null, "MMMM") . " , ") . twig_localized_date_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "dateFin", [], "any", false, false, false, 42), "none", "none", "fr", null, "MMMM")))), "html", null, true);
echo "
<span class=\"date-annee\">";
// line 43
echo twig_escape_filter($this->env, twig_localized_date_filter($this->env, twig_get_attribute($this->env, $this->source, $context["event"], "dateFin", [], "any", false, false, false, 43), "none", "none", "fr", null, "Y"), "html", null, true);
echo " </span>
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['event'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 49
echo " </div>
<div class=\"plus-evenenement\">
AFFICHER PLUS D’ÉVÈNEMENTS
</div>
</div>
</main>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 59
public function block_contact($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", "contact"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "contact"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 61
public function block_footer($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", "footer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 63
public function block_script($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", "script"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "script"));
// line 64
echo " ";
$this->displayParentBlock("script", $context, $blocks);
echo "
<script src=\"";
// line 65
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/main.js"), "html", null, true);
echo "\"></script>
<script>
\$(document).ready(function () {
var card = \$('.evenement')
var nombrereal = 2;
if (nombrereal >= card.length) {
\$(\".plus-evenenement\").css('display','none');
}
for (var i =nombrereal ; i < card.length; i++) {
card[i].style.display = 'none';
}
\$(\".plus-evenenement\").click(function () {
for (var i = nombrereal; i < nombrereal + 2; i++) {
if (card[i]) {
card[i].style.display = 'flex';
}
}
nombrereal += 2;
if (nombrereal >= card.length) {
event.target.style.display = 'none';
}
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "event/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 283 => 65, 278 => 64, 268 => 63, 250 => 61, 232 => 59, 214 => 49, 202 => 43, 198 => 42, 197 => 41, 190 => 37, 186 => 36, 177 => 30, 171 => 27, 167 => 26, 160 => 24, 151 => 20, 143 => 17, 138 => 14, 128 => 13, 110 => 11, 97 => 7, 93 => 6, 83 => 5, 64 => 3, 41 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}Nos Futurs Événements - RénovAtHome Un Artisant Près De Chez Soi{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel=\"stylesheet\" href=\"{{ asset('assets/styles/evenements.css')}}\">
<meta name=\"description\" content=\"Vous trouverez ci-dessous tous les lieux et dates à retenir afin de rencontrer nos équipes pour discuter de vos projets de rénovation.\">
{% endblock %}
{% block banner %}{% endblock %}
{% block main %}
<main>
<div class=\"container\">
<div class=\"evenements\">
{% for event in events |sort((a, b) => a.dateDebut <= b.dateDebut) %}
<div class=\"evenement\">
<div class=\"background-evenement\">
<img src=\"{{ asset('uploads/evenements/'~event.photo)}}\" alt=\"affiche de l'évenement {{ event.nom }}\">
</div>
<div class=\"text-evenement\">
<a class=\"titre-evenement\" href=\"{{ path('event', { 'slug' : event.slug })}}\"> {{ event.nom }}</a>
<div class=\"lieu\">
<img src=\"{{ asset('assets/images/france.png')}}\" alt=\"drapeau de la france\">
<span> {{ event.lieu }}</span>
</div>
<div class=\"description-evenement\">
{{ event.description|raw }}
</div>
</div>
<div class=\"date-evenement\">
<div class=\"date-chiffre\">
<span class=\"\">
{{ event.dateDebut | localizeddate('none', 'none', 'fr', null, 'd') }}
- {{ event.dateFin | localizeddate('none', 'none', 'fr', null, 'd') }}
</span>
</div>
<div class=\"date-mois\">
{{event.dateDebut | date(\"MMMM\") == event.dateFin | date(\"MMMM\") ? event.dateDebut |localizeddate('none', 'none', 'fr', null, 'MMMM') :
event.dateDebut |localizeddate('none', 'none', 'fr', null, 'MMMM')~\" , \"~ event.dateFin |localizeddate('none', 'none', 'fr', null, 'MMMM') }}
<span class=\"date-annee\">{{ event.dateFin |localizeddate('none', 'none', 'fr', null, 'Y') }} </span>
</div>
</div>
</div>
{% endfor %}
</div>
<div class=\"plus-evenenement\">
AFFICHER PLUS D’ÉVÈNEMENTS
</div>
</div>
</main>
{% endblock %}
{% block contact %}{% endblock %}
{% block footer %}{% endblock %}
{% block script %}
{{ parent() }}
<script src=\"{{ asset('assets/js/main.js')}}\"></script>
<script>
\$(document).ready(function () {
var card = \$('.evenement')
var nombrereal = 2;
if (nombrereal >= card.length) {
\$(\".plus-evenenement\").css('display','none');
}
for (var i =nombrereal ; i < card.length; i++) {
card[i].style.display = 'none';
}
\$(\".plus-evenenement\").click(function () {
for (var i = nombrereal; i < nombrereal + 2; i++) {
if (card[i]) {
card[i].style.display = 'flex';
}
}
nombrereal += 2;
if (nombrereal >= card.length) {
event.target.style.display = 'none';
}
});
});
</script>
{% endblock %}", "event/index.html.twig", "/home/u847847315/domains/djabdigital.com/public_html/renovathome/templates/event/index.html.twig");
}
}