<?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;
/* default/menus.html.twig */
class __TwigTemplate_8b671edb1e9841b00c40b8a10bdc1ca0 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'metas' => [$this, 'block_metas'],
'stylesheets' => [$this, 'block_stylesheets'],
'javascripts' => [$this, 'block_javascripts'],
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
'postjavascripts' => [$this, 'block_postjavascripts'],
];
}
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", "default/menus.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "default/menus.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "default/menus.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_metas($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", "metas"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metas"));
// line 4
echo "\t<meta name=\"description\" content=\"Encuentra los mejores menús cerca de ti.\">
\t<meta property=\"og:title\" content=\"Menu del dia\"/>
\t<meta property=\"og:url\" content=\"";
// line 6
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl(twig_get_attribute($this->env, $this->source, 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.', 6, $this->source); })()), "request", [], "any", false, false, false, 6), "attributes", [], "any", false, false, false, 6), "get", [0 => "_route"], "method", false, false, false, 6), twig_get_attribute($this->env, $this->source, 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.', 6, $this->source); })()), "request", [], "any", false, false, false, 6), "attributes", [], "any", false, false, false, 6), "get", [0 => "_route_params"], "method", false, false, false, 6)), "html", null, true);
echo "\"/>
\t<meta property=\"og:description\" content=\"Encuentra los mejores menús cerca de ti.\">
\t<meta property=\"og:image\" itemprop=\"image\" content=\"https://menusdeldia.com/uploads/menu.jpg\">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 10
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 11
echo "\t";
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
\t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css\"/>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 14
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 15
echo "\t";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
\t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/js/ion.rangeSlider.min.js\"></script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 19
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 "Menu del dia
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 22
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 23
echo "\t<div class=\"container py-3\">
\t\t<section class=\"pb-2 pt-2\">
\t\t\t<form action=\"";
// line 25
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("menus");
echo "\" method=\"post\" role=\"form\" enctype=\"multipart/form-data\" class=\"w-100\">
\t\t\t\t<div class=\"row\">
\t\t\t\t\t<div class='col-md-6 text-center'>
\t\t\t\t\t\t<h6>
\t\t\t\t\t\t\t<small>Precio</small>
\t\t\t\t\t\t</h6>
\t\t\t\t\t\t<input type=\"text\" class=\"js-range-precio\" name=\"precioMax\" value=\"\"/>
\t\t\t\t\t</div>
\t\t\t\t\t<div class='col-md-6 text-center'>
\t\t\t\t\t\t<h6>
\t\t\t\t\t\t\t<small>Distancia</small>
\t\t\t\t\t\t</h6>
\t\t\t\t\t\t<input type=\"text\" class=\"js-range-distancia\" name=\"distanciaMax\" value=\"\"/>
\t\t\t\t\t</div>
\t\t\t\t\t<input name=\"latActual\" type=\"hidden\" value=\"";
// line 39
echo twig_escape_filter($this->env, (isset($context["latActual"]) || array_key_exists("latActual", $context) ? $context["latActual"] : (function () { throw new RuntimeError('Variable "latActual" does not exist.', 39, $this->source); })()), "html", null, true);
echo "\">
\t\t\t\t\t<input name=\"lngActual\" type=\"hidden\" value=\"";
// line 40
echo twig_escape_filter($this->env, (isset($context["lngActual"]) || array_key_exists("lngActual", $context) ? $context["lngActual"] : (function () { throw new RuntimeError('Variable "lngActual" does not exist.', 40, $this->source); })()), "html", null, true);
echo "\">
\t\t\t\t</div>
\t\t\t</form>
\t\t\t<div class=\"row text-center mt-2\">
\t\t\t\t<p>
\t\t\t\t\t<em>Se han encontrado
\t\t\t\t\t</em>
\t\t\t\t\t<strong>";
// line 47
echo twig_escape_filter($this->env, twig_length_filter($this->env, (isset($context["menus"]) || array_key_exists("menus", $context) ? $context["menus"] : (function () { throw new RuntimeError('Variable "menus" does not exist.', 47, $this->source); })())), "html", null, true);
echo "</strong>
\t\t\t\t\t<em>
\t\t\t\t\t\tmenús cerca de ti.
\t\t\t\t\t</em>
\t\t\t\t</p>
\t\t\t</div>
\t\t</section>
\t\t<div class=\"row row-cols-1 row-cols-sm-2 row-cols-md-4 mt-1\">
\t\t\t";
// line 55
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["menus"]) || array_key_exists("menus", $context) ? $context["menus"] : (function () { throw new RuntimeError('Variable "menus" does not exist.', 55, $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["menu"]) {
// line 56
echo "\t\t\t\t<div class=\"col my-4\">
\t\t\t\t\t<div class=\"card shadow-sm\">
\t\t\t\t\t\t<div class=\"card-header text-center py-1\">
\t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"";
// line 59
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("showrestaurant", ["restaurante" => twig_lower_filter($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 59), "nombre", [], "any", false, false, false, 59), [" " => "-"])), "id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 59), "id", [], "any", false, false, false, 59)]), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 59), "nombre", [], "any", false, false, false, 59), "html", null, true);
echo "\" target=\"_blank\">
\t\t\t\t\t\t\t\t<em class=\"fw-semibold text-dark-emphasis fs-6\">";
// line 60
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 60), "nombre", [], "any", false, false, false, 60), "html", null, true);
echo "</em>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
// line 63
echo twig_include($this->env, $context, "default/partials/_carousel.html.twig", ["images" => twig_get_attribute($this->env, $this->source, $context["menu"], "images", [], "any", false, false, false, 63), "restaurant" => twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 63)]);
echo "
\t\t\t\t\t\t";
// line 65
if (((isset($context["latActual"]) || array_key_exists("latActual", $context) ? $context["latActual"] : (function () { throw new RuntimeError('Variable "latActual" does not exist.', 65, $this->source); })()) && (isset($context["lngActual"]) || array_key_exists("lngActual", $context) ? $context["lngActual"] : (function () { throw new RuntimeError('Variable "lngActual" does not exist.', 65, $this->source); })()))) {
// line 66
echo "\t\t\t\t\t\t\t<div class=\"restaurant-km\">
\t\t\t\t\t\t\t\t<small class=\"badge bg-success bg-gradient text-wrap fw-bolder fs-6\">
\t\t\t\t\t\t\t\t\t<em>
\t\t\t\t\t\t\t\t\t\t";
// line 69
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 69), "distancia", [], "any", false, false, false, 69), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\tKm
\t\t\t\t\t\t\t\t\t</em>
\t\t\t\t\t\t\t\t</small>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
}
// line 75
echo "\t\t\t\t\t\t<div class=\"card-body text-center py-1\">
\t\t\t\t\t\t\t";
// line 76
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 76), "rating", [], "any", false, false, false, 76)) {
// line 77
echo "\t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
\t\t\t\t\t\t\t\t\t<div class=\"float-start badge bg-primary text-wrap fw-bold fs-6\">
\t\t\t\t\t\t\t\t\t\t";
// line 79
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["menu"], "precio", [], "any", false, false, false, 79), 1, ".", ","), "html", null, true);
echo "€
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"float-end\">
\t\t\t\t\t\t\t\t\t\t";
// line 82
$context["rating"] = twig_split_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 82), "rating", [], "any", false, false, false, 82), ".");
// line 83
echo "\t\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(1, twig_get_attribute($this->env, $this->source, (isset($context["rating"]) || array_key_exists("rating", $context) ? $context["rating"] : (function () { throw new RuntimeError('Variable "rating" does not exist.', 83, $this->source); })()), 0, [], "array", false, false, false, 83)));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 84
echo "\t\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star\"></i>
\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 86
echo "\t\t\t\t\t\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, ($context["rating"] ?? null), 1, [], "array", true, true, false, 86)) {
// line 87
echo "\t\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star-half\"></i>
\t\t\t\t\t\t\t\t\t\t";
}
// line 89
echo "\t\t\t\t\t\t\t\t\t\t";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 89), "rating", [], "any", false, false, false, 89), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t";
} else {
// line 93
echo "\t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
\t\t\t\t\t\t\t\t\t<div class=\"float-start badge bg-primary text-wrap fw-bold fs-6\">
\t\t\t\t\t\t\t\t\t\t";
// line 95
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["menu"], "precio", [], "any", false, false, false, 95), 1, ".", ","), "html", null, true);
echo "€
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<span class=\"float-end fw-lighter fst-italic\">
\t\t\t\t\t\t\t\t\t\tSin puntuar</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t";
}
// line 101
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"card-footer d-flex justify-content-between align-items-center text-center\">
\t\t\t\t\t\t\t<a href=\"whatsapp://send?text=";
// line 103
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("showrestaurant", ["restaurante" => twig_lower_filter($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 103), "nombre", [], "any", false, false, false, 103), [" " => "-"])), "id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 103), "id", [], "any", false, false, false, 103)]), "html", null, true);
echo "\" data-action=\"share/whatsapp/share\">
\t\t\t\t\t\t\t\t<i class=\"fas fa-share-alt mx-3\"></i>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t";
// line 106
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 106), "telefono", [], "any", false, false, false, 106)) {
// line 107
echo "\t\t\t\t\t\t\t\t<a href=\"tel:";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 107), "telefono", [], "any", false, false, false, 107), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 107), "telefono", [], "any", false, false, false, 107), "html", null, true);
echo "\">
\t\t\t\t\t\t\t\t\t<i class=\"fa fa-phone mx-3\"></i>
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t";
}
// line 111
echo "\t\t\t\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 111), "lat", [], "any", false, false, false, 111) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 111), "lng", [], "any", false, false, false, 111))) {
// line 112
echo "\t\t\t\t\t\t\t\t<a href=\"https://www.google.es/maps/dir//";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 112), "lat", [], "any", false, false, false, 112), "html", null, true);
echo "+";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["menu"], "restaurante", [], "any", false, false, false, 112), "lng", [], "any", false, false, false, 112), "html", null, true);
echo "\" target=\"_blank\">
\t\t\t\t\t\t\t\t\t<i class=\"fa fa-map-marker m-3\" aria-hidden=\"true\"></i>
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t";
}
// line 116
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\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['menu'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 120
echo "\t\t</div>
\t</div>
\t<div class=\"modal\" id=\"imagemodal\" tabindex=\"-1\">
\t\t<div class=\"modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<div class=\"modal-header\">
\t\t\t\t\t<h6 class=\"nombre\"></h6>
\t\t\t\t\t<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<img src=\"\" class=\"imagepreview\" style=\"width: 100%;\">
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 136
public function block_postjavascripts($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", "postjavascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "postjavascripts"));
// line 137
echo "\t";
$this->displayParentBlock("postjavascripts", $context, $blocks);
echo "
\t<!-- parse-ignore-start -->
\t<script>
\t\t\$(document).ready(function () {
\t\t\t\$('.zoom').on('click', function () {
\t\t\t\t\$(\".nombre\").html(\$(this).attr('restaurante'));
\t\t\t\t\$('.imagepreview').attr('src', \$(this).attr('src'));
\t\t\t\t\$('#imagemodal').modal('show');
\t\t\t});
\t\t\tconst tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')
\t\t\tconst tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
\t\t\tif (!\$(\"input[name='latActual']\").val() && !\$(\"input[name='lngActual']\").val()) {
\t\t\t\tif (navigator.geolocation) {
\t\t\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);
\t\t\t\t} else {
\t\t\t\t\tconsole.log(\"Geolocation is not supported by this browser.\");
\t\t\t\t}
\t\t\t}
\t\t\t
\t\t\t\$(\".js-range-precio\").ionRangeSlider({
\t\t\t\tskin: \"round\",
\t\t\t\tstep: 5,
\t\t\t\tgrid: true,
\t\t\t\tmin: 0,
\t\t\t\tmax: 50,
\t\t\t\tfrom: ";
// line 166
echo twig_escape_filter($this->env, (isset($context["precioMax"]) || array_key_exists("precioMax", $context) ? $context["precioMax"] : (function () { throw new RuntimeError('Variable "precioMax" does not exist.', 166, $this->source); })()), "html", null, true);
echo ",
\t\t\t\tprefix: \"€\",
\t\t\t\tonFinish: function (data) {
\t\t\t\t\t\$(\"form\").submit();
\t\t\t\t}
});
\t\t\t\$(\".js-range-distancia\").ionRangeSlider({
\t\t\t\tskin: \"round\",
\t\tstep: 5,
\t\t\t\tgrid: true,
\t\t\t\tmin: 0,
\t\t\t\tmax: 50,
\t\t\t\tfrom: ";
// line 179
echo twig_escape_filter($this->env, (isset($context["distanciaMax"]) || array_key_exists("distanciaMax", $context) ? $context["distanciaMax"] : (function () { throw new RuntimeError('Variable "distanciaMax" does not exist.', 179, $this->source); })()), "html", null, true);
echo ",
\t\t\t\tprefix: \"Km\",
\t\t\t\tonFinish: function (data) {
\t\t\t\t\t\$(\"form\").submit();
\t\t\t\t}
\t\t\t});
\t\t\tfunction showPosition(position) {
\t\t\t\t\$(\"input[name='latActual']\").val(position.coords.latitude);
\t\t\t\t\$(\"input[name='lngActual']\").val(position.coords.longitude);
\t\t\t\t\$(\"form\").submit();
\t\t\t}
\t\t});
\t</script>
<!-- parse-ignore-end -->
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "default/menus.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 463 => 179, 447 => 166, 414 => 137, 404 => 136, 379 => 120, 362 => 116, 352 => 112, 349 => 111, 339 => 107, 337 => 106, 331 => 103, 327 => 101, 318 => 95, 314 => 93, 306 => 89, 302 => 87, 299 => 86, 292 => 84, 287 => 83, 285 => 82, 279 => 79, 275 => 77, 273 => 76, 270 => 75, 261 => 69, 256 => 66, 254 => 65, 249 => 63, 243 => 60, 237 => 59, 232 => 56, 215 => 55, 204 => 47, 194 => 40, 190 => 39, 173 => 25, 169 => 23, 159 => 22, 139 => 19, 125 => 15, 115 => 14, 101 => 11, 91 => 10, 77 => 6, 73 => 4, 63 => 3, 40 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block metas %}
\t<meta name=\"description\" content=\"Encuentra los mejores menús cerca de ti.\">
\t<meta property=\"og:title\" content=\"Menu del dia\"/>
\t<meta property=\"og:url\" content=\"{{ url(app.request.attributes.get(\"_route\"), app.request.attributes.get(\"_route_params\")) }}\"/>
\t<meta property=\"og:description\" content=\"Encuentra los mejores menús cerca de ti.\">
\t<meta property=\"og:image\" itemprop=\"image\" content=\"https://menusdeldia.com/uploads/menu.jpg\">
{% endblock %}
{% block stylesheets %}
\t{{ parent() }}
\t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css\"/>
{% endblock %}
{% block javascripts %}
\t{{ parent() }}
\t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/js/ion.rangeSlider.min.js\"></script>
{% endblock %}
{% block title %}Menu del dia
{% endblock %}
{% block body %}
\t<div class=\"container py-3\">
\t\t<section class=\"pb-2 pt-2\">
\t\t\t<form action=\"{{ path('menus') }}\" method=\"post\" role=\"form\" enctype=\"multipart/form-data\" class=\"w-100\">
\t\t\t\t<div class=\"row\">
\t\t\t\t\t<div class='col-md-6 text-center'>
\t\t\t\t\t\t<h6>
\t\t\t\t\t\t\t<small>Precio</small>
\t\t\t\t\t\t</h6>
\t\t\t\t\t\t<input type=\"text\" class=\"js-range-precio\" name=\"precioMax\" value=\"\"/>
\t\t\t\t\t</div>
\t\t\t\t\t<div class='col-md-6 text-center'>
\t\t\t\t\t\t<h6>
\t\t\t\t\t\t\t<small>Distancia</small>
\t\t\t\t\t\t</h6>
\t\t\t\t\t\t<input type=\"text\" class=\"js-range-distancia\" name=\"distanciaMax\" value=\"\"/>
\t\t\t\t\t</div>
\t\t\t\t\t<input name=\"latActual\" type=\"hidden\" value=\"{{ latActual }}\">
\t\t\t\t\t<input name=\"lngActual\" type=\"hidden\" value=\"{{ lngActual }}\">
\t\t\t\t</div>
\t\t\t</form>
\t\t\t<div class=\"row text-center mt-2\">
\t\t\t\t<p>
\t\t\t\t\t<em>Se han encontrado
\t\t\t\t\t</em>
\t\t\t\t\t<strong>{{ menus|length }}</strong>
\t\t\t\t\t<em>
\t\t\t\t\t\tmenús cerca de ti.
\t\t\t\t\t</em>
\t\t\t\t</p>
\t\t\t</div>
\t\t</section>
\t\t<div class=\"row row-cols-1 row-cols-sm-2 row-cols-md-4 mt-1\">
\t\t\t{% for menu in menus %}
\t\t\t\t<div class=\"col my-4\">
\t\t\t\t\t<div class=\"card shadow-sm\">
\t\t\t\t\t\t<div class=\"card-header text-center py-1\">
\t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"{{ path('showrestaurant' , { 'restaurante': menu.restaurante.nombre|replace({' ': '-'})|lower, 'id': menu.restaurante.id }) }}\" title=\"{{ menu.restaurante.nombre }}\" target=\"_blank\">
\t\t\t\t\t\t\t\t<em class=\"fw-semibold text-dark-emphasis fs-6\">{{ menu.restaurante.nombre }}</em>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t{{ include('default/partials/_carousel.html.twig', { 'images': menu.images , 'restaurant' : menu.restaurante}) }}
\t\t\t\t\t\t{% if latActual and lngActual %}
\t\t\t\t\t\t\t<div class=\"restaurant-km\">
\t\t\t\t\t\t\t\t<small class=\"badge bg-success bg-gradient text-wrap fw-bolder fs-6\">
\t\t\t\t\t\t\t\t\t<em>
\t\t\t\t\t\t\t\t\t\t{{ menu.restaurante.distancia }}
\t\t\t\t\t\t\t\t\t\tKm
\t\t\t\t\t\t\t\t\t</em>
\t\t\t\t\t\t\t\t</small>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t<div class=\"card-body text-center py-1\">
\t\t\t\t\t\t\t{% if menu.restaurante.rating %}
\t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
\t\t\t\t\t\t\t\t\t<div class=\"float-start badge bg-primary text-wrap fw-bold fs-6\">
\t\t\t\t\t\t\t\t\t\t{{ menu.precio|number_format(1, '.', ',') }}€
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"float-end\">
\t\t\t\t\t\t\t\t\t\t{% set rating = menu.restaurante.rating|split('.') %}
\t\t\t\t\t\t\t\t\t\t{% for i in 1..rating[0] %}
\t\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star\"></i>
\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t{% if rating[1] is defined %}
\t\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star-half\"></i>
\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t{{ menu.restaurante.rating }}
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
\t\t\t\t\t\t\t\t\t<div class=\"float-start badge bg-primary text-wrap fw-bold fs-6\">
\t\t\t\t\t\t\t\t\t\t{{ menu.precio|number_format(1, '.', ',') }}€
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<span class=\"float-end fw-lighter fst-italic\">
\t\t\t\t\t\t\t\t\t\tSin puntuar</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"card-footer d-flex justify-content-between align-items-center text-center\">
\t\t\t\t\t\t\t<a href=\"whatsapp://send?text={{url('showrestaurant',{'restaurante' : menu.restaurante.nombre|replace({' ': '-'})|lower, 'id' : menu.restaurante.id})}}\" data-action=\"share/whatsapp/share\">
\t\t\t\t\t\t\t\t<i class=\"fas fa-share-alt mx-3\"></i>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t{% if menu.restaurante.telefono %}
\t\t\t\t\t\t\t\t<a href=\"tel:{{ menu.restaurante.telefono }}\" title=\"{{ menu.restaurante.telefono }}\">
\t\t\t\t\t\t\t\t\t<i class=\"fa fa-phone mx-3\"></i>
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t{% if menu.restaurante.lat and menu.restaurante.lng %}
\t\t\t\t\t\t\t\t<a href=\"https://www.google.es/maps/dir//{{ menu.restaurante.lat }}+{{ menu.restaurante.lng }}\" target=\"_blank\">
\t\t\t\t\t\t\t\t\t<i class=\"fa fa-map-marker m-3\" aria-hidden=\"true\"></i>
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t{% endfor %}
\t\t</div>
\t</div>
\t<div class=\"modal\" id=\"imagemodal\" tabindex=\"-1\">
\t\t<div class=\"modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<div class=\"modal-header\">
\t\t\t\t\t<h6 class=\"nombre\"></h6>
\t\t\t\t\t<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
\t\t\t\t</div>
\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<img src=\"\" class=\"imagepreview\" style=\"width: 100%;\">
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
{% endblock %}
{% block postjavascripts %}
\t{{ parent() }}
\t<!-- parse-ignore-start -->
\t<script>
\t\t\$(document).ready(function () {
\t\t\t\$('.zoom').on('click', function () {
\t\t\t\t\$(\".nombre\").html(\$(this).attr('restaurante'));
\t\t\t\t\$('.imagepreview').attr('src', \$(this).attr('src'));
\t\t\t\t\$('#imagemodal').modal('show');
\t\t\t});
\t\t\tconst tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')
\t\t\tconst tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
\t\t\tif (!\$(\"input[name='latActual']\").val() && !\$(\"input[name='lngActual']\").val()) {
\t\t\t\tif (navigator.geolocation) {
\t\t\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);
\t\t\t\t} else {
\t\t\t\t\tconsole.log(\"Geolocation is not supported by this browser.\");
\t\t\t\t}
\t\t\t}
\t\t\t
\t\t\t\$(\".js-range-precio\").ionRangeSlider({
\t\t\t\tskin: \"round\",
\t\t\t\tstep: 5,
\t\t\t\tgrid: true,
\t\t\t\tmin: 0,
\t\t\t\tmax: 50,
\t\t\t\tfrom: {{ precioMax }},
\t\t\t\tprefix: \"€\",
\t\t\t\tonFinish: function (data) {
\t\t\t\t\t\$(\"form\").submit();
\t\t\t\t}
});
\t\t\t\$(\".js-range-distancia\").ionRangeSlider({
\t\t\t\tskin: \"round\",
\t\tstep: 5,
\t\t\t\tgrid: true,
\t\t\t\tmin: 0,
\t\t\t\tmax: 50,
\t\t\t\tfrom: {{ distanciaMax }},
\t\t\t\tprefix: \"Km\",
\t\t\t\tonFinish: function (data) {
\t\t\t\t\t\$(\"form\").submit();
\t\t\t\t}
\t\t\t});
\t\t\tfunction showPosition(position) {
\t\t\t\t\$(\"input[name='latActual']\").val(position.coords.latitude);
\t\t\t\t\$(\"input[name='lngActual']\").val(position.coords.longitude);
\t\t\t\t\$(\"form\").submit();
\t\t\t}
\t\t});
\t</script>
<!-- parse-ignore-end -->
{% endblock %}
", "default/menus.html.twig", "/var/www/vhosts/menusdeldia.com/httpdocs/templates/default/menus.html.twig");
}
}