var/cache/dev/twig/1d/1d0e99653b8c5b2e212ad38505f4e0a2.php line 54

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. /* index.twig */
  14. class __TwigTemplate_b2797e06df71b66f3cfaaf29a14770c4 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.             'stylesheet' => [$this'block_stylesheet'],
  24.             'javascript' => [$this'block_javascript'],
  25.             'main' => [$this'block_main'],
  26.         ];
  27.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  28.         $this->checkSecurity();
  29.     }
  30.     protected function doGetParent(array $context)
  31.     {
  32.         // line 11
  33.         return "default_frame.twig";
  34.     }
  35.     protected function doDisplay(array $context, array $blocks = [])
  36.     {
  37.         $macros $this->macros;
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""index.twig"));
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""index.twig"));
  42.         // line 13
  43.         $context["body_class"] = "front_page";
  44.         // line 15
  45.         $context["NewsList"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\News"), "getList", [], "method"falsefalsetrue15);
  46.         // line 11
  47.         $this->parent $this->loadTemplate("default_frame.twig""index.twig"11);
  48.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  49.         
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  51.         
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  53.     }
  54.     // line 18
  55.     public function block_stylesheet($context, array $blocks = [])
  56.     {
  57.         $macros $this->macros;
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  62.         // line 19
  63.         echo "    <style>
  64.         .slick-slider{
  65.           height:100%;
  66.           width: 100%;
  67.           overflow: hidden;
  68.         }
  69.         .main_visual.slick-slider .slick-list,
  70.         .main_visual.slick-slider .slick-track,
  71.         .main_visual.slick-slider .slick-slide,
  72.         .main_visual.slick-slider .slick-track > .slick-slide > div,
  73.         .main_visual.slick-slider .slick-slide img{
  74.           height:100%;
  75.         }
  76.         .main_visual.slick-slider .slick-slide{
  77.           overflow:hidden;
  78.         }
  79.         .main_visual.slick-slider .slick-slide img{
  80.           opacity:0.8;
  81.         }
  82.         .main_visual.slick-slider:before {
  83.           background: rgba(60, 20, 0, .2);
  84.           content: '';
  85.           display: block;
  86.           height: 100%;
  87.           left: 0;
  88.           opacity: .6;
  89.           position: absolute;
  90.           top: 0;
  91.           width: 100%;
  92.           z-index: 10;
  93.         }
  94.         .main_visual.slick-slider:after {
  95.           background: linear-gradient(217deg, rgba(110, 72, 51, .6), rgba(255, 0, 0, 0) 70.71%), linear-gradient(127deg, rgba(241, 234, 230, .6), rgba(0, 255, 0, 0) 70.71%), linear-gradient(336deg, rgba(249, 247, 245, .6), rgba(0, 0, 255, 0) 70.71%);
  96.           content: '';
  97.           display: block;
  98.           height: 100%;
  99.           left: 0;
  100.           opacity: .6;
  101.           position: absolute;
  102.           top: 0;
  103.           width: 100%;
  104.           z-index: 5;
  105.         }
  106.         .slick-slide{
  107.           position:relative;
  108.         }
  109.       /* テキストのフェードインとスライドイン */
  110.       .main {
  111.           opacity: 0;
  112.           transform: translateX(10vw); /* 右からスライドイン */
  113.           transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  114.       }
  115.       .sub {
  116.           opacity: 0;
  117.           transform: translateX(10vw); /* 右からスライドイン */
  118.           transition: opacity 0.5s ease-in-out 0.3s, transform 0.5s ease-in-out 0.2s; /* 0.2秒遅れ */
  119.       }
  120.       .fade-in .main {
  121.           opacity: 1;
  122.           transform: translateX(0); /* 元の位置に戻る */
  123.       }
  124.       .fade-in .sub {
  125.           opacity: 1;
  126.           transform: translateX(0); /* 元の位置に戻る */
  127.       }
  128. /* 背景画像の設定 */
  129. .slick-slide {
  130.   overflow:hidden;
  131. }
  132. @-webkit-keyframes fadezoom {
  133.     0% {
  134.         transform: scale(1);
  135.     }
  136.     100% {
  137.         transform: scale(1.25);
  138.     }
  139. }
  140. @keyframes fadezoom {
  141.     0% {
  142.         transform: scale(1);
  143.     }
  144.     100% {
  145.         transform: scale(1.25);
  146.     }
  147. }
  148. .slick-animation {
  149.     animation: fadezoom 20s linear 0s normal both;
  150. }
  151.     </style>
  152. ";
  153.         
  154.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  155.         
  156.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  157.     }
  158.     // line 127
  159.     public function block_javascript($context, array $blocks = [])
  160.     {
  161.         $macros $this->macros;
  162.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  163.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  164.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  165.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  166.         // line 128
  167.         echo "
  168.     <script>
  169.       \$(function() {
  170.         // メインスライダーの初期化時のイベント
  171.         \$('.main_visual').on('init', function () {
  172.           // 最初のスライドにアニメーションを適用
  173.           \$('.slick-slide[data-slick-index=\"0\"] img').addClass('slick-animation');
  174.         });
  175.         // メインスライダーの設定
  176.         \$('.main_visual').slick({
  177.           autoplay: true,          // 自動再生
  178.           infinite: true,          // 無限ループ
  179.           slidesToShow: 1,         // 1つのスライドを表示
  180.           slidesToScroll: 1,       // スライドを1つずつスクロール
  181.           arrows: false,           // 矢印を非表示
  182.           speed: 3000,             // フェードアニメーションの速度
  183.           autoplaySpeed: 5000,     // スライドが切り替わる間隔
  184.           pauseOnFocus: false,     // フォーカス時にスライドを一時停止しない
  185.           pauseOnHover: false,     // ホバー時にスライドを一時停止しない
  186.           asNavFor: '.text_slider' // .text_slider と同期
  187.         })
  188.         .on({
  189.           beforeChange: function(event, slick, currentSlide, nextSlide) {
  190.             // 次のスライドに 'slick-animation' クラスを追加
  191.             \$(\".main_visual .slick-slide[data-slick-index='\" + nextSlide + \"'] img\").addClass(\"slick-animation\");
  192.           },
  193.           afterChange: function(event, slick, currentSlide) {
  194.             // 前のスライドのインデックスを計算
  195.             var prevSlide = (currentSlide === 0) ? slick.slideCount - 1 : currentSlide - 1;
  196.             // 一つ前のスライドから 'slick-animation' クラスを削除
  197.             \$(\".main_visual .slick-slide[data-slick-index='\" + prevSlide + \"'] img\").removeClass(\"slick-animation\");
  198.           }
  199.         });
  200.         // テキストスライダーの初期化時のイベント
  201.         \$('.text_slider').on('init', function () {
  202.           // 最初のスライドに 'fade-in' クラスを適用
  203.           \$('.slick-slide[data-slick-index=\"0\"]').addClass('fade-in');
  204.         });
  205.         // テキストスライダーの設定(メインスライダーと同期)
  206.         \$('.text_slider').slick({
  207.           autoplay: true,          // 自動再生
  208.           infinite: true,          // 無限ループ
  209.           slidesToShow: 1,         // 1つのスライドを表示
  210.           slidesToScroll: 1,       // スライドを1つずつスクロール
  211.           fade: true,
  212.           speed: 1000,
  213.           autoplaySpeed: 5000,
  214.           arrows: false,
  215.           pauseOnFocus: false,
  216.           pauseOnHover: false,
  217.           pauseOnDotsHover: false,
  218.           asNavFor: '.main_visual' // .main_visual と同期
  219.         })
  220.         .on({
  221.           beforeChange: function(event, slick, currentSlide, nextSlide) {
  222.             // 次のスライドに 'fade-in' クラスを追加
  223.             \$(\".text_slider .slick-slide[data-slick-index='\" + nextSlide + \"']\").addClass(\"fade-in\");
  224.           },
  225.           afterChange: function(event, slick, currentSlide) {
  226.             // 現在のスライド以外のすべてのスライドから 'fade-in' クラスを削除
  227.             \$(\".text_slider .slick-slide\").not(\"[data-slick-index='\" + currentSlide + \"']\").not(\".slick-cloned\").removeClass(\"fade-in\");
  228.             // 現在のスライドにクラスを確実に追加
  229.            \$(\".text_slider .slick-slide[data-slick-index='\" + currentSlide + \"']\").addClass(\"fade-in\");
  230.           }
  231.         });
  232.       });
  233.       \$(function() {
  234.           \$('.topic_slider').slick({
  235.               vertical: true,
  236.               autoplay: true,
  237.               autoplaySpeed: 3800,
  238.               speed: 800,
  239.               arrows: true,
  240.               pauseOnFocus: false,
  241.               pauseOnHover: false,
  242.               pauseOnDotsHover: false
  243.           });
  244.             \$('.ec-sliderRole__news').each(function() {
  245.                 var listLength = \$(this).find('.ec-sliderRole__newsItem').length;
  246.                 if (listLength > 5) {
  247.                     \$(this).find('.ec-sliderRole__newsItem:gt(4)').each(function() {
  248.                         \$(this).hide();
  249.                     });
  250.                     \$(this).append('<a id=\"news_readmore\" class=\"ec-inlineBtn--top\">";
  251.         // line 221
  252.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("more"), "html"nulltrue);
  253.         echo "</a>');
  254.                     var dispNum = 5;
  255.                     \$(this).find('#news_readmore').click(function() {
  256.                         dispNum += 5;
  257.                         \$(this).parent().find('.ec-sliderRole__newsItem:lt(' + dispNum + ')').show();
  258.                         if (dispNum >= listLength) {
  259.                             \$(this).hide();
  260.                         }
  261.                     })
  262.                 }
  263.             });
  264.       });
  265.     </script>
  266. ";
  267.         
  268.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  269.         
  270.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  271.     }
  272.     // line 237
  273.     public function block_main($context, array $blocks = [])
  274.     {
  275.         $macros $this->macros;
  276.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  277.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  278.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  279.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  280.         // line 238
  281.         echo "    <div class=\"ec-sliderRole\">
  282.       <div class=\"ec-sliderRole__wrap\">
  283.         <div class=\"mv__wrap\">
  284.           <div class=\"main_visual\">
  285.               <div class=\"item slick-slide\">
  286.                 <img src=\"";
  287.         // line 244
  288.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/top/01.jpg"), "html"nulltrue);
  289.         echo "\" class=\"outset\">
  290.               </div>
  291.               <div class=\"item slick-slide\">
  292.                 <img src=\"";
  293.         // line 247
  294.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/top/02.jpg"), "html"nulltrue);
  295.         echo "\" class=\"outset\">
  296.               </div>
  297.               <div class=\"item slick-slide\">
  298.                 <img src=\"";
  299.         // line 250
  300.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/top/03.jpg"), "html"nulltrue);
  301.         echo "\" class=\"outset\">
  302.               </div>
  303.               <div class=\"item slick-slide\">
  304.                 <img src=\"";
  305.         // line 253
  306.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/top/04.jpg"), "html"nulltrue);
  307.         echo "\" class=\"outset\">
  308.               </div>
  309.           </div>
  310.           <div class=\"text_slider\">
  311.             <div class=\"ec-sliderRole__title\">
  312.               <div class=\"main\">Lillie and</div>
  313.               <div class=\"sub\">Garcello</div>
  314.             </div>
  315.             <div class=\"ec-sliderRole__title\">
  316.               <div class=\"main\">ORIGINAL</div>
  317.               <div class=\"sub\">GOODS</div>
  318.             </div>
  319.             <div class=\"ec-sliderRole__title\">
  320.               <div class=\"main\">RECOMMENDED</div>
  321.               <div class=\"sub\">ITEM</div>
  322.             </div>
  323.             <div class=\"ec-sliderRole__title\">
  324.               <div class=\"main\">LIMITED</div>
  325.               <div class=\"sub\">SET</div>
  326.             </div>
  327.           </div>
  328.         </div>
  329.         <div class=\"ec-sliderRole__news topic_slider\">
  330.             ";
  331.         // line 280
  332.         $context['_parent'] = $context;
  333.         $context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList"$context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.'280$this->source); })()));
  334.         foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
  335.             // line 281
  336.             echo "                <a href=";
  337.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("news_detail", ["id" => twig_get_attribute($this->env$this->source$context["News"], "id", [], "any"falsefalsetrue281)]), "html"nulltrue);
  338.             echo " class=\"ec-sliderRole__newsItem\" target=\"_blank\">
  339.                     <div class=\"ec-sliderRole__newsHeading\">
  340.                         <div class=\"ec-sliderRole__newsDate\">
  341.                             ";
  342.             // line 284
  343.             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\IntlExtension']->date_day($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["News"], "publish_date", [], "any"falsefalsetrue284), 284$this->source)), "html"nulltrue);
  344.             echo "
  345.                         </div>
  346.                         <div class=\"ec-sliderRole__newsColumn\">
  347.                             <div class=\"ec-sliderRole__newsTitle\">
  348.                                 ";
  349.             // line 288
  350.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["News"], "title", [], "any"falsefalsetrue288), 288$this->source), "html"nulltrue);
  351.             echo "
  352.                             </div>
  353.                             ";
  354.             // line 297
  355.             echo "                        </div>
  356.                     </div>
  357.                     ";
  358.             // line 306
  359.             echo "                </a>
  360.             ";
  361.         }
  362.         $_parent $context['_parent'];
  363.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
  364.         $context array_intersect_key($context$_parent) + $_parent;
  365.         // line 308
  366.         echo "        </div>
  367.       </div>
  368.     </div>
  369. ";
  370.         
  371.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  372.         
  373.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  374.     }
  375.     public function getTemplateName()
  376.     {
  377.         return "index.twig";
  378.     }
  379.     public function isTraitable()
  380.     {
  381.         return false;
  382.     }
  383.     public function getDebugInfo()
  384.     {
  385.         return array (  423 => 308,  416 => 306,  412 => 297,  407 => 288,  400 => 284,  393 => 281,  389 => 280,  359 => 253,  353 => 250,  347 => 247,  341 => 244,  333 => 238,  323 => 237,  298 => 221,  203 => 128,  193 => 127,  77 => 19,  67 => 18,  56 => 11,  54 => 15,  52 => 13,  39 => 11,);
  386.     }
  387.     public function getSourceContext()
  388.     {
  389.         return new Source("{#
  390. This file is part of EC-CUBE
  391. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  392. http://www.ec-cube.co.jp/
  393. For the full copyright and license information, please view the LICENSE
  394. file that was distributed with this source code.
  395. #}
  396. {% extends 'default_frame.twig' %}
  397. {% set body_class = 'front_page' %}
  398. {% set NewsList = repository('Eccube\\\\Entity\\\\News').getList() %}
  399. {% block stylesheet %}
  400.     <style>
  401.         .slick-slider{
  402.           height:100%;
  403.           width: 100%;
  404.           overflow: hidden;
  405.         }
  406.         .main_visual.slick-slider .slick-list,
  407.         .main_visual.slick-slider .slick-track,
  408.         .main_visual.slick-slider .slick-slide,
  409.         .main_visual.slick-slider .slick-track > .slick-slide > div,
  410.         .main_visual.slick-slider .slick-slide img{
  411.           height:100%;
  412.         }
  413.         .main_visual.slick-slider .slick-slide{
  414.           overflow:hidden;
  415.         }
  416.         .main_visual.slick-slider .slick-slide img{
  417.           opacity:0.8;
  418.         }
  419.         .main_visual.slick-slider:before {
  420.           background: rgba(60, 20, 0, .2);
  421.           content: '';
  422.           display: block;
  423.           height: 100%;
  424.           left: 0;
  425.           opacity: .6;
  426.           position: absolute;
  427.           top: 0;
  428.           width: 100%;
  429.           z-index: 10;
  430.         }
  431.         .main_visual.slick-slider:after {
  432.           background: linear-gradient(217deg, rgba(110, 72, 51, .6), rgba(255, 0, 0, 0) 70.71%), linear-gradient(127deg, rgba(241, 234, 230, .6), rgba(0, 255, 0, 0) 70.71%), linear-gradient(336deg, rgba(249, 247, 245, .6), rgba(0, 0, 255, 0) 70.71%);
  433.           content: '';
  434.           display: block;
  435.           height: 100%;
  436.           left: 0;
  437.           opacity: .6;
  438.           position: absolute;
  439.           top: 0;
  440.           width: 100%;
  441.           z-index: 5;
  442.         }
  443.         .slick-slide{
  444.           position:relative;
  445.         }
  446.       /* テキストのフェードインとスライドイン */
  447.       .main {
  448.           opacity: 0;
  449.           transform: translateX(10vw); /* 右からスライドイン */
  450.           transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  451.       }
  452.       .sub {
  453.           opacity: 0;
  454.           transform: translateX(10vw); /* 右からスライドイン */
  455.           transition: opacity 0.5s ease-in-out 0.3s, transform 0.5s ease-in-out 0.2s; /* 0.2秒遅れ */
  456.       }
  457.       .fade-in .main {
  458.           opacity: 1;
  459.           transform: translateX(0); /* 元の位置に戻る */
  460.       }
  461.       .fade-in .sub {
  462.           opacity: 1;
  463.           transform: translateX(0); /* 元の位置に戻る */
  464.       }
  465. /* 背景画像の設定 */
  466. .slick-slide {
  467.   overflow:hidden;
  468. }
  469. @-webkit-keyframes fadezoom {
  470.     0% {
  471.         transform: scale(1);
  472.     }
  473.     100% {
  474.         transform: scale(1.25);
  475.     }
  476. }
  477. @keyframes fadezoom {
  478.     0% {
  479.         transform: scale(1);
  480.     }
  481.     100% {
  482.         transform: scale(1.25);
  483.     }
  484. }
  485. .slick-animation {
  486.     animation: fadezoom 20s linear 0s normal both;
  487. }
  488.     </style>
  489. {% endblock %}
  490. {% block javascript %}
  491.     <script>
  492.       \$(function() {
  493.         // メインスライダーの初期化時のイベント
  494.         \$('.main_visual').on('init', function () {
  495.           // 最初のスライドにアニメーションを適用
  496.           \$('.slick-slide[data-slick-index=\"0\"] img').addClass('slick-animation');
  497.         });
  498.         // メインスライダーの設定
  499.         \$('.main_visual').slick({
  500.           autoplay: true,          // 自動再生
  501.           infinite: true,          // 無限ループ
  502.           slidesToShow: 1,         // 1つのスライドを表示
  503.           slidesToScroll: 1,       // スライドを1つずつスクロール
  504.           arrows: false,           // 矢印を非表示
  505.           speed: 3000,             // フェードアニメーションの速度
  506.           autoplaySpeed: 5000,     // スライドが切り替わる間隔
  507.           pauseOnFocus: false,     // フォーカス時にスライドを一時停止しない
  508.           pauseOnHover: false,     // ホバー時にスライドを一時停止しない
  509.           asNavFor: '.text_slider' // .text_slider と同期
  510.         })
  511.         .on({
  512.           beforeChange: function(event, slick, currentSlide, nextSlide) {
  513.             // 次のスライドに 'slick-animation' クラスを追加
  514.             \$(\".main_visual .slick-slide[data-slick-index='\" + nextSlide + \"'] img\").addClass(\"slick-animation\");
  515.           },
  516.           afterChange: function(event, slick, currentSlide) {
  517.             // 前のスライドのインデックスを計算
  518.             var prevSlide = (currentSlide === 0) ? slick.slideCount - 1 : currentSlide - 1;
  519.             // 一つ前のスライドから 'slick-animation' クラスを削除
  520.             \$(\".main_visual .slick-slide[data-slick-index='\" + prevSlide + \"'] img\").removeClass(\"slick-animation\");
  521.           }
  522.         });
  523.         // テキストスライダーの初期化時のイベント
  524.         \$('.text_slider').on('init', function () {
  525.           // 最初のスライドに 'fade-in' クラスを適用
  526.           \$('.slick-slide[data-slick-index=\"0\"]').addClass('fade-in');
  527.         });
  528.         // テキストスライダーの設定(メインスライダーと同期)
  529.         \$('.text_slider').slick({
  530.           autoplay: true,          // 自動再生
  531.           infinite: true,          // 無限ループ
  532.           slidesToShow: 1,         // 1つのスライドを表示
  533.           slidesToScroll: 1,       // スライドを1つずつスクロール
  534.           fade: true,
  535.           speed: 1000,
  536.           autoplaySpeed: 5000,
  537.           arrows: false,
  538.           pauseOnFocus: false,
  539.           pauseOnHover: false,
  540.           pauseOnDotsHover: false,
  541.           asNavFor: '.main_visual' // .main_visual と同期
  542.         })
  543.         .on({
  544.           beforeChange: function(event, slick, currentSlide, nextSlide) {
  545.             // 次のスライドに 'fade-in' クラスを追加
  546.             \$(\".text_slider .slick-slide[data-slick-index='\" + nextSlide + \"']\").addClass(\"fade-in\");
  547.           },
  548.           afterChange: function(event, slick, currentSlide) {
  549.             // 現在のスライド以外のすべてのスライドから 'fade-in' クラスを削除
  550.             \$(\".text_slider .slick-slide\").not(\"[data-slick-index='\" + currentSlide + \"']\").not(\".slick-cloned\").removeClass(\"fade-in\");
  551.             // 現在のスライドにクラスを確実に追加
  552.            \$(\".text_slider .slick-slide[data-slick-index='\" + currentSlide + \"']\").addClass(\"fade-in\");
  553.           }
  554.         });
  555.       });
  556.       \$(function() {
  557.           \$('.topic_slider').slick({
  558.               vertical: true,
  559.               autoplay: true,
  560.               autoplaySpeed: 3800,
  561.               speed: 800,
  562.               arrows: true,
  563.               pauseOnFocus: false,
  564.               pauseOnHover: false,
  565.               pauseOnDotsHover: false
  566.           });
  567.             \$('.ec-sliderRole__news').each(function() {
  568.                 var listLength = \$(this).find('.ec-sliderRole__newsItem').length;
  569.                 if (listLength > 5) {
  570.                     \$(this).find('.ec-sliderRole__newsItem:gt(4)').each(function() {
  571.                         \$(this).hide();
  572.                     });
  573.                     \$(this).append('<a id=\"news_readmore\" class=\"ec-inlineBtn--top\">{{ 'more'|trans }}</a>');
  574.                     var dispNum = 5;
  575.                     \$(this).find('#news_readmore').click(function() {
  576.                         dispNum += 5;
  577.                         \$(this).parent().find('.ec-sliderRole__newsItem:lt(' + dispNum + ')').show();
  578.                         if (dispNum >= listLength) {
  579.                             \$(this).hide();
  580.                         }
  581.                     })
  582.                 }
  583.             });
  584.       });
  585.     </script>
  586. {% endblock javascript %}
  587. {% block main %}
  588.     <div class=\"ec-sliderRole\">
  589.       <div class=\"ec-sliderRole__wrap\">
  590.         <div class=\"mv__wrap\">
  591.           <div class=\"main_visual\">
  592.               <div class=\"item slick-slide\">
  593.                 <img src=\"{{ asset('assets/img/top/01.jpg') }}\" class=\"outset\">
  594.               </div>
  595.               <div class=\"item slick-slide\">
  596.                 <img src=\"{{ asset('assets/img/top/02.jpg') }}\" class=\"outset\">
  597.               </div>
  598.               <div class=\"item slick-slide\">
  599.                 <img src=\"{{ asset('assets/img/top/03.jpg') }}\" class=\"outset\">
  600.               </div>
  601.               <div class=\"item slick-slide\">
  602.                 <img src=\"{{ asset('assets/img/top/04.jpg') }}\" class=\"outset\">
  603.               </div>
  604.           </div>
  605.           <div class=\"text_slider\">
  606.             <div class=\"ec-sliderRole__title\">
  607.               <div class=\"main\">Lillie and</div>
  608.               <div class=\"sub\">Garcello</div>
  609.             </div>
  610.             <div class=\"ec-sliderRole__title\">
  611.               <div class=\"main\">ORIGINAL</div>
  612.               <div class=\"sub\">GOODS</div>
  613.             </div>
  614.             <div class=\"ec-sliderRole__title\">
  615.               <div class=\"main\">RECOMMENDED</div>
  616.               <div class=\"sub\">ITEM</div>
  617.             </div>
  618.             <div class=\"ec-sliderRole__title\">
  619.               <div class=\"main\">LIMITED</div>
  620.               <div class=\"sub\">SET</div>
  621.             </div>
  622.           </div>
  623.         </div>
  624.         <div class=\"ec-sliderRole__news topic_slider\">
  625.             {% for News in NewsList %}
  626.                 <a href={{ url('news_detail',  {'id': News.id}) }} class=\"ec-sliderRole__newsItem\" target=\"_blank\">
  627.                     <div class=\"ec-sliderRole__newsHeading\">
  628.                         <div class=\"ec-sliderRole__newsDate\">
  629.                             {{ News.publish_date|date_day }}
  630.                         </div>
  631.                         <div class=\"ec-sliderRole__newsColumn\">
  632.                             <div class=\"ec-sliderRole__newsTitle\">
  633.                                 {{ News.title }}
  634.                             </div>
  635.                             {# {% if News.description or News.url %}
  636.                                 <div class=\"ec-sliderRole__newsClose\">
  637.                                     <a class=\"ec-sliderRole__newsCloseBtn\">
  638.                                         <i class=\"fas fa-angle-down\"></i>
  639.                                     </a>
  640.                                 </div>
  641.                             {% endif %} #}
  642.                         </div>
  643.                     </div>
  644.                     {# <div class=\"ec-sliderRole__newsDescription\">
  645.                         {{ News.description|raw|nl2br }}
  646.                         {% if News.url %}
  647.                             <br>
  648.                             <a href=\"{{ News.url }}\" {% if News.link_method == '1' %}target=\"_blank\"{% endif %}>{{ '詳しくはこちら'|trans }}</a>
  649.                         {% endif %}
  650.                     </div> #}
  651.                 </a>
  652.             {% endfor %}
  653.         </div>
  654.       </div>
  655.     </div>
  656. {% endblock %}
  657. ""index.twig""/home/egonet/c-bcl.com/public_html/shop/app/template/lag/index.twig");
  658.     }
  659.     
  660.     public function checkSecurity()
  661.     {
  662.         static $tags = array("set" => 13"for" => 280);
  663.         static $filters = array("escape" => 221"trans" => 221"date_day" => 284);
  664.         static $functions = array("repository" => 15"asset" => 244"url" => 281);
  665.         try {
  666.             $this->sandbox->checkSecurity(
  667.                 ['set''for'],
  668.                 ['escape''trans''date_day'],
  669.                 ['repository''asset''url']
  670.             );
  671.         } catch (SecurityError $e) {
  672.             $e->setSourceContext($this->source);
  673.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  674.                 $e->setTemplateLine($tags[$e->getTagName()]);
  675.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  676.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  677.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  678.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  679.             }
  680.             throw $e;
  681.         }
  682.     }
  683. }