var/cache/dev/twig/9b/9b13dea5704837cc138cc36459ec7a99.php line 40

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Special/index.twig */
  14. class __TwigTemplate_b9e982daa1c38dd43747b4b27a038d6d extends \Eccube\Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'main' => [$this'block_main'],
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "default_frame.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Special/index.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Special/index.twig"));
  40.         // line 3
  41.         $context["breadcrumbs"] = [=> ["name" => "SPECIAL"]];
  42.         // line 1
  43.         $this->parent $this->loadTemplate("default_frame.twig""Special/index.twig"1);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 5
  51.     public function block_main($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  58.         // line 6
  59.         echo "    <section class=\"px-6 pb-10 pt-[7.5rem] md:pt-20 md:pb-1 text-black\">
  60.         <div class=\"mx-auto w-full max-w-[63rem]\">
  61.             <h1 class=\"flex items-start gap-4 md:gap-2\">
  62.                 <span class=\"block h-[7.5rem] w-0.5 bg-gradient-to-b from-[#ADAAA6] md:h-16 md:w-px\"></span>
  63.                 <p class=\"text-[2rem] font-light leading-normal tracking-widest md:text-xl\">
  64.                     SPECIAL</p>
  65.             </h1>
  66.         </div>
  67.     </section>
  68.     ";
  69.         // line 15
  70.         echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$context"Block/breadcrumb.twig");
  71.         echo "
  72.     <section class=\"px-6\">
  73.         <div class=\"mx-auto w-full max-w-[63rem]\">
  74.             <ul class=\"flex flex-wrap gap-2\" role=\"navigation\">
  75.                 <li>
  76.                     <a class=\"grid place-items-center rounded-3xl bg-sub-beige-pale px-4 py-1 text-sm leading-normal tracking-widest text-black hover
  77.                     ";
  78.         // line 21
  79.         if ( !(isset($context["category_id"]) || array_key_exists("category_id"$context) ? $context["category_id"] : (function () { throw new RuntimeError('Variable "category_id" does not exist.'21$this->source); })())) {
  80.             echo "!bg-sub-beige text-white";
  81.         }
  82.         echo "\" href=\"";
  83.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("special_posts");
  84.         echo "\">
  85.                         ALL
  86.                     </a>
  87.                 </li>
  88.                 ";
  89.         // line 25
  90.         $context['_parent'] = $context;
  91.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["special_posts"]) || array_key_exists("special_posts"$context) ? $context["special_posts"] : (function () { throw new RuntimeError('Variable "special_posts" does not exist.'25$this->source); })()), "categories", [], "any"falsefalsetrue25));
  92.         foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
  93.             // line 26
  94.             echo "                <li>
  95.                     <a class=\"grid place-items-center rounded-3xl bg-sub-beige-pale px-4 py-1 text-sm leading-normal tracking-widest text-black hover
  96.                     ";
  97.             // line 28
  98.             if (((isset($context["category_id"]) || array_key_exists("category_id"$context) ? $context["category_id"] : (function () { throw new RuntimeError('Variable "category_id" does not exist.'28$this->source); })()) == twig_get_attribute($this->env$this->source$context["category"], "term_id", [], "any"falsefalsetrue28))) {
  99.                 echo "!bg-sub-beige text-white";
  100.             }
  101.             echo "\" href=\"";
  102.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("special_posts", ["category" => twig_get_attribute($this->env$this->source$context["category"], "term_id", [], "any"falsefalsetrue28)]), "html"nulltrue);
  103.             echo "\">
  104.                         ";
  105.             // line 29
  106.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["category"], "name", [], "any"falsefalsetrue29), 29$this->source), "html"nulltrue);
  107.             echo "
  108.                     </a>
  109.                 </li>
  110.                 ";
  111.         }
  112.         $_parent $context['_parent'];
  113.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
  114.         $context array_intersect_key($context$_parent) + $_parent;
  115.         // line 33
  116.         echo "            </ul>
  117.         </div>
  118.     </section>
  119.     <section class=\"pt-20 md:pt-10 px-6 pb-[7.5rem] md:pb-20 text-black\">
  120.         <div class=\"mx-auto w-full max-w-[46rem]\">
  121.             <div class=\"grid grid-cols-2 gap-x-20 gap-y-28 md:grid-cols-1 md:gap-10\">
  122.                 ";
  123.         // line 39
  124.         $context['_parent'] = $context;
  125.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["special_posts"]) || array_key_exists("special_posts"$context) ? $context["special_posts"] : (function () { throw new RuntimeError('Variable "special_posts" does not exist.'39$this->source); })()), "posts", [], "any"falsefalsetrue39));
  126.         foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
  127.             // line 40
  128.             echo "                    <a href=\"";
  129.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("special_post", ["id" => twig_get_attribute($this->env$this->source$context["post"], "id", [], "any"falsefalsetrue40)]), "html"nulltrue);
  130.             echo "\" class=\" border-b border-black pb-4 hover\">
  131.                         <article class=\"grid\">
  132.                             <h2 class=\"mt-4 line-clamp-2 text-base font-medium leading-[1.8] text-black h-[2lh]\">
  133.                                 <span class=\"sr-only\">タイトル:</span>
  134.                                 ";
  135.             // line 44
  136.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["post"], "title", [], "any"falsefalsetrue44), 44$this->source), "html"nulltrue);
  137.             echo "</h2>
  138.                             <div class=\"flex flex-wrap gap-2 row-start-2 row-end-3 mt-4 text-sm leading-normal tracking-wider text-black\">
  139.                                 ";
  140.             // line 46
  141.             $context['_parent'] = $context;
  142.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["post"], "categories", [], "any"falsefalsetrue46));
  143.             foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
  144.                 // line 47
  145.                 echo "                                <span>";
  146.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["category"], "name", [], "any"falsefalsetrue47), 47$this->source), "html"nulltrue);
  147.                 echo "</span>
  148.                                 ";
  149.             }
  150.             $_parent $context['_parent'];
  151.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
  152.             $context array_intersect_key($context$_parent) + $_parent;
  153.             // line 49
  154.             echo "                            </div>
  155.                             <time datetime=\"";
  156.             // line 50
  157.             echo twig_escape_filter($this->envtwig_date_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["post"], "post_date", [], "any"falsefalsetrue50), 50$this->source), "Y-m-d"), "html"nulltrue);
  158.             echo "\" class=\"mt-7 text-right text-sm tracking-wider text-black\">
  159.                                 <span class=\"sr-only\">投稿日:</span>
  160.                                 ";
  161.             // line 52
  162.             echo twig_escape_filter($this->envtwig_date_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["post"], "post_date", [], "any"falsefalsetrue52), 52$this->source), "Y.m.d"), "html"nulltrue);
  163.             echo "</time>
  164.                             <div class=\"row-start-1 row-end-2 aspect-[4/3] \"><img alt=\"";
  165.             // line 53
  166.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["post"], "title", [], "any"falsefalsetrue53), 53$this->source), "html"nulltrue);
  167.             echo "\" loading=\"lazy\" width=\"327\" height=\"245\" decoding=\"async\" data-nimg=\"1\" class=\"size-full object-cover\" style=\"color:transparent\" src=\"";
  168.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "special_kv_pc", [], "any"falsefalsetrue53), "url", [], "any"falsefalsetrue53), 53$this->source), "html"nulltrue);
  169.             echo "\"></div>
  170.                         </article>
  171.                     </a>
  172.                 ";
  173.         }
  174.         $_parent $context['_parent'];
  175.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
  176.         $context array_intersect_key($context$_parent) + $_parent;
  177.         // line 57
  178.         echo "            </div>
  179.             <div class=\"ec-pagerRole\">
  180.                 ";
  181.         // line 59
  182.         $this->loadTemplate("pager.twig""Special/index.twig"59)->display(twig_array_merge($context, ["pages" => twig_get_attribute($this->env$this->source, (isset($context["special_posts"]) || array_key_exists("special_posts"$context) ? $context["special_posts"] : (function () { throw new RuntimeError('Variable "special_posts" does not exist.'59$this->source); })()), "paginationData", [], "any"falsefalsetrue59)]));
  183.         // line 60
  184.         echo "            </div>
  185.         </div>
  186.     </section>
  187. ";
  188.         
  189.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  190.         
  191.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  192.     }
  193.     public function getTemplateName()
  194.     {
  195.         return "Special/index.twig";
  196.     }
  197.     public function isTraitable()
  198.     {
  199.         return false;
  200.     }
  201.     public function getDebugInfo()
  202.     {
  203.         return array (  198 => 60,  196 => 59,  192 => 57,  180 => 53,  176 => 52,  171 => 50,  168 => 49,  159 => 47,  155 => 46,  150 => 44,  142 => 40,  138 => 39,  130 => 33,  120 => 29,  112 => 28,  108 => 26,  104 => 25,  93 => 21,  84 => 15,  73 => 6,  63 => 5,  52 => 1,  50 => 3,  37 => 1,);
  204.     }
  205.     public function getSourceContext()
  206.     {
  207.         return new Source("{% extends 'default_frame.twig' %}
  208. {% set breadcrumbs = [ {'name': 'SPECIAL'}] %}
  209. {% block main %}
  210.     <section class=\"px-6 pb-10 pt-[7.5rem] md:pt-20 md:pb-1 text-black\">
  211.         <div class=\"mx-auto w-full max-w-[63rem]\">
  212.             <h1 class=\"flex items-start gap-4 md:gap-2\">
  213.                 <span class=\"block h-[7.5rem] w-0.5 bg-gradient-to-b from-[#ADAAA6] md:h-16 md:w-px\"></span>
  214.                 <p class=\"text-[2rem] font-light leading-normal tracking-widest md:text-xl\">
  215.                     SPECIAL</p>
  216.             </h1>
  217.         </div>
  218.     </section>
  219.     {{ include('Block/breadcrumb.twig') }}
  220.     <section class=\"px-6\">
  221.         <div class=\"mx-auto w-full max-w-[63rem]\">
  222.             <ul class=\"flex flex-wrap gap-2\" role=\"navigation\">
  223.                 <li>
  224.                     <a class=\"grid place-items-center rounded-3xl bg-sub-beige-pale px-4 py-1 text-sm leading-normal tracking-widest text-black hover
  225.                     {% if not category_id %}!bg-sub-beige text-white{% endif %}\" href=\"{{ url('special_posts') }}\">
  226.                         ALL
  227.                     </a>
  228.                 </li>
  229.                 {% for category in special_posts.categories %}
  230.                 <li>
  231.                     <a class=\"grid place-items-center rounded-3xl bg-sub-beige-pale px-4 py-1 text-sm leading-normal tracking-widest text-black hover
  232.                     {% if category_id == category.term_id %}!bg-sub-beige text-white{% endif %}\" href=\"{{ url('special_posts', { category: category.term_id }) }}\">
  233.                         {{ category.name }}
  234.                     </a>
  235.                 </li>
  236.                 {% endfor %}
  237.             </ul>
  238.         </div>
  239.     </section>
  240.     <section class=\"pt-20 md:pt-10 px-6 pb-[7.5rem] md:pb-20 text-black\">
  241.         <div class=\"mx-auto w-full max-w-[46rem]\">
  242.             <div class=\"grid grid-cols-2 gap-x-20 gap-y-28 md:grid-cols-1 md:gap-10\">
  243.                 {% for post in special_posts.posts %}
  244.                     <a href=\"{{ url('special_post', { id: post.id }) }}\" class=\" border-b border-black pb-4 hover\">
  245.                         <article class=\"grid\">
  246.                             <h2 class=\"mt-4 line-clamp-2 text-base font-medium leading-[1.8] text-black h-[2lh]\">
  247.                                 <span class=\"sr-only\">タイトル:</span>
  248.                                 {{ post.title }}</h2>
  249.                             <div class=\"flex flex-wrap gap-2 row-start-2 row-end-3 mt-4 text-sm leading-normal tracking-wider text-black\">
  250.                                 {% for category in post.categories %}
  251.                                 <span>{{ category.name }}</span>
  252.                                 {% endfor %}
  253.                             </div>
  254.                             <time datetime=\"{{ post.post_date|date('Y-m-d') }}\" class=\"mt-7 text-right text-sm tracking-wider text-black\">
  255.                                 <span class=\"sr-only\">投稿日:</span>
  256.                                 {{ post.post_date|date('Y.m.d') }}</time>
  257.                             <div class=\"row-start-1 row-end-2 aspect-[4/3] \"><img alt=\"{{ post.title }}\" loading=\"lazy\" width=\"327\" height=\"245\" decoding=\"async\" data-nimg=\"1\" class=\"size-full object-cover\" style=\"color:transparent\" src=\"{{ post.special_kv_pc.url }}\"></div>
  258.                         </article>
  259.                     </a>
  260.                 {% endfor %}
  261.             </div>
  262.             <div class=\"ec-pagerRole\">
  263.                 {% include \"pager.twig\" with {'pages': special_posts.paginationData} %}
  264.             </div>
  265.         </div>
  266.     </section>
  267. {% endblock %}
  268. ""Special/index.twig""/home/xs545372/itsukushi-store.com/public_html/stg.itsukushi-store.com/app/template/default/Special/index.twig");
  269.     }
  270.     
  271.     public function checkSecurity()
  272.     {
  273.         static $tags = array("set" => 3"if" => 21"for" => 25"include" => 59);
  274.         static $filters = array("escape" => 28"date" => 50);
  275.         static $functions = array("include" => 15"url" => 21);
  276.         try {
  277.             $this->sandbox->checkSecurity(
  278.                 ['set''if''for''include'],
  279.                 ['escape''date'],
  280.                 ['include''url']
  281.             );
  282.         } catch (SecurityError $e) {
  283.             $e->setSourceContext($this->source);
  284.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  285.                 $e->setTemplateLine($tags[$e->getTagName()]);
  286.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  287.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  288.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  289.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  290.             }
  291.             throw $e;
  292.         }
  293.     }
  294. }