var/cache/dev/twig/30/304c74461f43afeeabc071a3fb416235.php line 63

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. /* Block/recommend_for_top.twig */
  14. class __TwigTemplate_eb22b2b7db89a814e627689a14056541 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->parent false;
  23.         $this->blocks = [
  24.             'stylesheet' => [$this'block_stylesheet'],
  25.             'javascript' => [$this'block_javascript'],
  26.             'main' => [$this'block_main'],
  27.         ];
  28.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  29.         $this->checkSecurity();
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/recommend_for_top.twig"));
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/recommend_for_top.twig"));
  38.         // line 1
  39.         $context["recommend_products"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Plugin\\Recommend42\\Entity\\RecommendProduct"), "getRecommendProduct", [], "any"falsefalsetrue1);
  40.         // line 2
  41.         echo "
  42. ";
  43.         // line 3
  44.         $this->displayBlock('stylesheet'$context$blocks);
  45.         // line 224
  46.         echo "
  47. ";
  48.         // line 225
  49.         $this->displayBlock('javascript'$context$blocks);
  50.         // line 256
  51.         echo "
  52. ";
  53.         // line 257
  54.         $this->displayBlock('main'$context$blocks);
  55.         
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  57.         
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  59.     }
  60.     // line 3
  61.     public function block_stylesheet($context, array $blocks = [])
  62.     {
  63.         $macros $this->macros;
  64.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  65.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  66.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  67.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  68.         // line 4
  69.         echo "    <style>
  70.         .slick-slider {
  71.             margin-bottom: 30px;
  72.         }
  73.         .slick-dots {
  74.             position: absolute;
  75.             bottom: -25px;
  76.             display: block;
  77.             width: 100%;
  78.             padding: 0;
  79.             list-style: none;
  80.             text-align: center;
  81.         }
  82.         .slick-dots li {
  83.             position: relative;
  84.             display: inline-block;
  85.             width: 20px;
  86.             height: 20px;
  87.             margin: 0 5px;
  88.             padding: 0;
  89.             cursor: pointer;
  90.         }
  91.         .slick-dots li button {
  92.             font-size: 0;
  93.             line-height: 0;
  94.             display: block;
  95.             width: 20px;
  96.             height: 20px;
  97.             padding: 5px;
  98.             cursor: pointer;
  99.             color: transparent;
  100.             border: 0;
  101.             outline: none;
  102.             background: transparent;
  103.         }
  104.         .slick-dots li button:hover,
  105.         .slick-dots li button:focus {
  106.             outline: none;
  107.         }
  108.         .slick-dots li button:hover:before,
  109.         .slick-dots li button:focus:before {
  110.             opacity: 1;
  111.         }
  112.         .slick-dots li button:before {
  113.             content: \" \";
  114.             line-height: 20px;
  115.             position: absolute;
  116.             top: 0;
  117.             left: 0;
  118.             width: 12px;
  119.             height: 12px;
  120.             text-align: center;
  121.             opacity: .25;
  122.             background-color: black;
  123.             border-radius: 50%;
  124.         }
  125.         .slick-dots li.slick-active button:before {
  126.             opacity: .75;
  127.             background-color: black;
  128.         }
  129.         .slick-dots li button.thumbnail img {
  130.             width: 0;
  131.             height: 0;
  132.         }
  133.         .slick-prev, .slick-next {
  134.             font-size: 0;
  135.             line-height: 0;
  136.             position: absolute;
  137.             top: 50%;
  138.             display: block;
  139.             width: 60px;
  140.             height: 60px;
  141.             padding: 0;
  142.             -webkit-transform: translate(0, -50%);
  143.             -ms-transform: translate(0, -50%);
  144.             transform: translate(0, -50%);
  145.             cursor: pointer;
  146.             color: transparent;
  147.             border: none;
  148.             outline: none;
  149.             background: transparent;
  150.         }
  151.         .slick-prev {
  152.             left: 0;
  153.             z-index: 1;
  154.             height: 30px;
  155.         }
  156.         .slick-next {
  157.             right: 0;
  158.             z-index: 1;
  159.             height: 30px;
  160.         }
  161.         .slick-prev:before, .slick-next:before {
  162.             font-family: 'slick';
  163.             font-size: 40px;
  164.             line-height: 1;
  165.             opacity: 1;
  166.             color: white;
  167.             -webkit-font-smoothing: antialiased;
  168.             -moz-osx-font-smoothing: grayscale;
  169.         }
  170.         .slick-prev:before {
  171.             content: \"\";
  172.             opacity: 0;
  173.             pointer-events: none;
  174.             transition: opacity 0.3s ease;
  175.         }
  176.         .slick-next:before {
  177.             content: \"\";
  178.             opacity: 0;
  179.             pointer-events: none;
  180.             transition: opacity 0.3s ease;
  181.         }
  182.         ";
  183.         // line 140
  184.         echo "
  185.         ";
  186.         // line 147
  187.         echo "
  188.         ";
  189.         // line 152
  190.         echo "
  191.         .slick-track{
  192.             position: relative;
  193.             top: 0;
  194.             left: 0;
  195.             display: flex;
  196.             margin-left: auto;
  197.             margin-right: auto;
  198.         }
  199.         .product_name{
  200.             font-size: 15px;
  201.             height: 40px;
  202.             overflow: hidden;
  203.             display: -webkit-box;
  204.             text-overflow: ellipsis;
  205.             -webkit-box-orient: vertical;
  206.             -webkit-line-clamp: 2;
  207.             color: #1F9FCB;
  208.             margin-top: 8px;
  209.         }
  210.         .standardText {
  211.             color: #000000;
  212.             font-size: 12px;
  213.             padding-top: 8px;
  214.             padding-bottom: 8px;
  215.         }
  216.         .item_price {
  217.             color: black;
  218.             font-size: 18px;
  219.             font-weight: bold;
  220.         }
  221.     ";
  222.         // line 188
  223.         echo "    @media screen and (min-width: 1025px) {
  224.         /* .ec-sliderRole にホバーしたときだけ表示 */
  225.         .ec-sliderRole:hover .slick-prev:before,
  226.         .ec-sliderRole:hover .slick-next:before {
  227.             opacity: 1;
  228.             pointer-events: auto;
  229.         }
  230.         .slick-next:before {
  231.             content: \"\";
  232.             display: block;
  233.             width: 54px;
  234.             height: 54px;
  235.             background-image: url(/html/user_data/assets/img/common/btn_carousel_r_2.png);
  236.             background-size: contain;
  237.             margin-left: 40px;
  238.         }
  239.        .slick-prev:before {
  240.             content: \"\";
  241.             display: block;
  242.             width: 54px;
  243.             height: 54px;
  244.             background-image: url(/html/user_data/assets/img/common/btn_carousel_l_2.png);
  245.             background-size: contain;
  246.             margin-left: -40px;
  247.         }
  248.     }
  249.     ";
  250.         // line 219
  251.         echo "    @media screen and (max-width: 1024px) {
  252.     }
  253.     </style>
  254. ";
  255.         
  256.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  257.         
  258.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  259.     }
  260.     // line 225
  261.     public function block_javascript($context, array $blocks = [])
  262.     {
  263.         $macros $this->macros;
  264.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  265.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  266.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  267.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  268.         // line 226
  269.         echo "    <script>
  270.         \$(function() {
  271.             let width = \$(window).width();
  272.             var photo_count = 2;
  273.             if (width <= 768) {
  274.             } else if (width <= 1024) {
  275.                 // タブレット
  276.                 photo_count = 4;
  277.             } else {
  278.                 // PC
  279.                 photo_count = 4;
  280.             }
  281.             \$('.main_visual_2').slick({
  282.                 dots: false,
  283.                 autoplay: false,
  284.                 centerMode: true,
  285.                 centerPadding: '10%',
  286.                 arrows: true,
  287.                 infinite: true,
  288.                 slidesToShow: photo_count,
  289.                 swipeToSlide: true,
  290.                 touchMove: true,
  291.                 touchThreshold: 10,
  292.             });
  293.         });
  294.     </script>
  295. ";
  296.         
  297.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  298.         
  299.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  300.     }
  301.     // line 257
  302.     public function block_main($context, array $blocks = [])
  303.     {
  304.         $macros $this->macros;
  305.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  306.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  307.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  308.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  309.         // line 258
  310.         echo "    <div class=\"block_content\" style=\"max-width: 1150px; margin: auto; padding-left: 10px; padding-right: 10px; margin-bottom: 0px;\">
  311.         <h2 style=\"font-size: 18px; margin-bottom: 16px;\">おすすめ商品</h2>
  312.     </div>
  313.     <div class=\"ec-sliderRole\" style=\"margin-bottom: 0px; padding: 0px 10px;\">
  314.         <div class=\"main_visual_2\" style=\"margin-bottom: 0px;\">
  315.             ";
  316.         // line 263
  317.         $context['_parent'] = $context;
  318.         $context['_seq'] = twig_ensure_traversable((isset($context["recommend_products"]) || array_key_exists("recommend_products"$context) ? $context["recommend_products"] : (function () { throw new RuntimeError('Variable "recommend_products" does not exist.'263$this->source); })()));
  319.         foreach ($context['_seq'] as $context["_key"] => $context["RecommendProduct"]) {
  320.             // line 264
  321.             echo "            <div class=\"item slick-slide\" style=\"padding: 6px;\">
  322.                 <a href=\"";
  323.             // line 265
  324.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProduct"], "Product", [], "any"falsefalsetrue265), "id", [], "any"falsefalsetrue265)]), "html"nulltrue);
  325.             echo "\">
  326.                     <img src=\"";
  327.             // line 266
  328.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProduct"], "Product", [], "any"falsefalsetrue266), "mainFileName", [], "any"falsefalsetrue266), 266$this->source)), "save_image"), "html"nulltrue);
  329.             echo "\" style=\"width: 320px; height: 136px; object-fit: cover; border-radius: 4px;\">
  330.                     <dl>
  331.                         ";
  332.             // line 269
  333.             echo "                        <p class=\"product_name\">";
  334.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProduct"], "Product", [], "any"falsefalsetrue269), "name", [], "any"falsefalsetrue269), 269$this->source), "html"nulltrue);
  335.             echo "</p>
  336.                         ";
  337.             // line 271
  338.             echo "                        <p class=\"standardText\">";
  339.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProduct"], "Product", [], "any"falsefalsetrue271), "getStandardText", [], "any"falsefalsetrue271), 271$this->source), "html"nulltrue);
  340.             echo "</p>
  341.                         <dd class=\"item_price\">
  342.                             ";
  343.             // line 273
  344.             echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProduct"], "Product", [], "any"falsefalsetrue273), "getPrice02IncTaxMin", [], "any"falsefalsetrue273), 273$this->source)), "html"nulltrue);
  345.             echo "円
  346.                         </dd>
  347.                     </dl>
  348.                 </a>
  349.             </div>
  350.             ";
  351.         }
  352.         $_parent $context['_parent'];
  353.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['RecommendProduct'], $context['_parent'], $context['loop']);
  354.         $context array_intersect_key($context$_parent) + $_parent;
  355.         // line 279
  356.         echo "        </div>
  357.     </div>
  358. ";
  359.         
  360.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  361.         
  362.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  363.     }
  364.     public function getTemplateName()
  365.     {
  366.         return "Block/recommend_for_top.twig";
  367.     }
  368.     public function isTraitable()
  369.     {
  370.         return false;
  371.     }
  372.     public function getDebugInfo()
  373.     {
  374.         return array (  407 => 279,  395 => 273,  389 => 271,  384 => 269,  379 => 266,  375 => 265,  372 => 264,  368 => 263,  361 => 258,  351 => 257,  312 => 226,  302 => 225,  288 => 219,  256 => 188,  219 => 152,  216 => 147,  213 => 140,  83 => 4,  73 => 3,  63 => 257,  60 => 256,  58 => 225,  55 => 224,  53 => 3,  50 => 2,  48 => 1,);
  375.     }
  376.     public function getSourceContext()
  377.     {
  378.         return new Source("{% set recommend_products = repository('Plugin\\\\Recommend42\\\\Entity\\\\RecommendProduct').getRecommendProduct %}
  379. {% block stylesheet %}
  380.     <style>
  381.         .slick-slider {
  382.             margin-bottom: 30px;
  383.         }
  384.         .slick-dots {
  385.             position: absolute;
  386.             bottom: -25px;
  387.             display: block;
  388.             width: 100%;
  389.             padding: 0;
  390.             list-style: none;
  391.             text-align: center;
  392.         }
  393.         .slick-dots li {
  394.             position: relative;
  395.             display: inline-block;
  396.             width: 20px;
  397.             height: 20px;
  398.             margin: 0 5px;
  399.             padding: 0;
  400.             cursor: pointer;
  401.         }
  402.         .slick-dots li button {
  403.             font-size: 0;
  404.             line-height: 0;
  405.             display: block;
  406.             width: 20px;
  407.             height: 20px;
  408.             padding: 5px;
  409.             cursor: pointer;
  410.             color: transparent;
  411.             border: 0;
  412.             outline: none;
  413.             background: transparent;
  414.         }
  415.         .slick-dots li button:hover,
  416.         .slick-dots li button:focus {
  417.             outline: none;
  418.         }
  419.         .slick-dots li button:hover:before,
  420.         .slick-dots li button:focus:before {
  421.             opacity: 1;
  422.         }
  423.         .slick-dots li button:before {
  424.             content: \" \";
  425.             line-height: 20px;
  426.             position: absolute;
  427.             top: 0;
  428.             left: 0;
  429.             width: 12px;
  430.             height: 12px;
  431.             text-align: center;
  432.             opacity: .25;
  433.             background-color: black;
  434.             border-radius: 50%;
  435.         }
  436.         .slick-dots li.slick-active button:before {
  437.             opacity: .75;
  438.             background-color: black;
  439.         }
  440.         .slick-dots li button.thumbnail img {
  441.             width: 0;
  442.             height: 0;
  443.         }
  444.         .slick-prev, .slick-next {
  445.             font-size: 0;
  446.             line-height: 0;
  447.             position: absolute;
  448.             top: 50%;
  449.             display: block;
  450.             width: 60px;
  451.             height: 60px;
  452.             padding: 0;
  453.             -webkit-transform: translate(0, -50%);
  454.             -ms-transform: translate(0, -50%);
  455.             transform: translate(0, -50%);
  456.             cursor: pointer;
  457.             color: transparent;
  458.             border: none;
  459.             outline: none;
  460.             background: transparent;
  461.         }
  462.         .slick-prev {
  463.             left: 0;
  464.             z-index: 1;
  465.             height: 30px;
  466.         }
  467.         .slick-next {
  468.             right: 0;
  469.             z-index: 1;
  470.             height: 30px;
  471.         }
  472.         .slick-prev:before, .slick-next:before {
  473.             font-family: 'slick';
  474.             font-size: 40px;
  475.             line-height: 1;
  476.             opacity: 1;
  477.             color: white;
  478.             -webkit-font-smoothing: antialiased;
  479.             -moz-osx-font-smoothing: grayscale;
  480.         }
  481.         .slick-prev:before {
  482.             content: \"\";
  483.             opacity: 0;
  484.             pointer-events: none;
  485.             transition: opacity 0.3s ease;
  486.         }
  487.         .slick-next:before {
  488.             content: \"\";
  489.             opacity: 0;
  490.             pointer-events: none;
  491.             transition: opacity 0.3s ease;
  492.         }
  493.         {# .slick-prev:hover,
  494.         .slick-prev:focus,
  495.         .slick-next:hover,
  496.         .slick-next:focus {
  497.             color: transparent;
  498.             outline: none;
  499.             background: transparent;
  500.         } #}
  501.         {# .slick-prev:hover:before,
  502.         .slick-prev:focus:before,
  503.         .slick-next:hover:before,
  504.         .slick-next:focus:before {
  505.             opacity: 1;
  506.         } #}
  507.         {# .slick-prev.slick-disabled:before,
  508.         .slick-next.slick-disabled:before {
  509.             opacity: .25;
  510.         } #}
  511.         .slick-track{
  512.             position: relative;
  513.             top: 0;
  514.             left: 0;
  515.             display: flex;
  516.             margin-left: auto;
  517.             margin-right: auto;
  518.         }
  519.         .product_name{
  520.             font-size: 15px;
  521.             height: 40px;
  522.             overflow: hidden;
  523.             display: -webkit-box;
  524.             text-overflow: ellipsis;
  525.             -webkit-box-orient: vertical;
  526.             -webkit-line-clamp: 2;
  527.             color: #1F9FCB;
  528.             margin-top: 8px;
  529.         }
  530.         .standardText {
  531.             color: #000000;
  532.             font-size: 12px;
  533.             padding-top: 8px;
  534.             padding-bottom: 8px;
  535.         }
  536.         .item_price {
  537.             color: black;
  538.             font-size: 18px;
  539.             font-weight: bold;
  540.         }
  541.     {# PC用スタイル #}
  542.     @media screen and (min-width: 1025px) {
  543.         /* .ec-sliderRole にホバーしたときだけ表示 */
  544.         .ec-sliderRole:hover .slick-prev:before,
  545.         .ec-sliderRole:hover .slick-next:before {
  546.             opacity: 1;
  547.             pointer-events: auto;
  548.         }
  549.         .slick-next:before {
  550.             content: \"\";
  551.             display: block;
  552.             width: 54px;
  553.             height: 54px;
  554.             background-image: url(/html/user_data/assets/img/common/btn_carousel_r_2.png);
  555.             background-size: contain;
  556.             margin-left: 40px;
  557.         }
  558.        .slick-prev:before {
  559.             content: \"\";
  560.             display: block;
  561.             width: 54px;
  562.             height: 54px;
  563.             background-image: url(/html/user_data/assets/img/common/btn_carousel_l_2.png);
  564.             background-size: contain;
  565.             margin-left: -40px;
  566.         }
  567.     }
  568.     {# スマホ&タブレット用スタイル #}
  569.     @media screen and (max-width: 1024px) {
  570.     }
  571.     </style>
  572. {% endblock %}
  573. {% block javascript %}
  574.     <script>
  575.         \$(function() {
  576.             let width = \$(window).width();
  577.             var photo_count = 2;
  578.             if (width <= 768) {
  579.             } else if (width <= 1024) {
  580.                 // タブレット
  581.                 photo_count = 4;
  582.             } else {
  583.                 // PC
  584.                 photo_count = 4;
  585.             }
  586.             \$('.main_visual_2').slick({
  587.                 dots: false,
  588.                 autoplay: false,
  589.                 centerMode: true,
  590.                 centerPadding: '10%',
  591.                 arrows: true,
  592.                 infinite: true,
  593.                 slidesToShow: photo_count,
  594.                 swipeToSlide: true,
  595.                 touchMove: true,
  596.                 touchThreshold: 10,
  597.             });
  598.         });
  599.     </script>
  600. {% endblock javascript %}
  601. {% block main %}
  602.     <div class=\"block_content\" style=\"max-width: 1150px; margin: auto; padding-left: 10px; padding-right: 10px; margin-bottom: 0px;\">
  603.         <h2 style=\"font-size: 18px; margin-bottom: 16px;\">おすすめ商品</h2>
  604.     </div>
  605.     <div class=\"ec-sliderRole\" style=\"margin-bottom: 0px; padding: 0px 10px;\">
  606.         <div class=\"main_visual_2\" style=\"margin-bottom: 0px;\">
  607.             {% for RecommendProduct in recommend_products %}
  608.             <div class=\"item slick-slide\" style=\"padding: 6px;\">
  609.                 <a href=\"{{ url('product_detail', {'id': RecommendProduct.Product.id}) }}\">
  610.                     <img src=\"{{ asset(RecommendProduct.Product.mainFileName|no_image_product, \"save_image\") }}\" style=\"width: 320px; height: 136px; object-fit: cover; border-radius: 4px;\">
  611.                     <dl>
  612.                         {# 商品名 #}
  613.                         <p class=\"product_name\">{{ RecommendProduct.Product.name }}</p>
  614.                         {# 規格 #}
  615.                         <p class=\"standardText\">{{ RecommendProduct.Product.getStandardText }}</p>
  616.                         <dd class=\"item_price\">
  617.                             {{ RecommendProduct.Product.getPrice02IncTaxMin|number_format }}円
  618.                         </dd>
  619.                     </dl>
  620.                 </a>
  621.             </div>
  622.             {% endfor %}
  623.         </div>
  624.     </div>
  625. {% endblock %}
  626. ""Block/recommend_for_top.twig""/home/shikomel/shikomel.com/public_html/web-order-stg.shikomel.com/app/template/default/Block/recommend_for_top.twig");
  627.     }
  628.     
  629.     public function checkSecurity()
  630.     {
  631.         static $tags = array("set" => 1"block" => 3"for" => 263);
  632.         static $filters = array("escape" => 265"no_image_product" => 266"number_format" => 273);
  633.         static $functions = array("repository" => 1"url" => 265"asset" => 266);
  634.         try {
  635.             $this->sandbox->checkSecurity(
  636.                 ['set''block''for'],
  637.                 ['escape''no_image_product''number_format'],
  638.                 ['repository''url''asset']
  639.             );
  640.         } catch (SecurityError $e) {
  641.             $e->setSourceContext($this->source);
  642.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  643.                 $e->setTemplateLine($tags[$e->getTagName()]);
  644.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  645.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  646.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  647.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  648.             }
  649.             throw $e;
  650.         }
  651.     }
  652. }