var/cache/dev/twig/9d/9dc0e7bde39f7d2a4b8a5e1577099243.php line 61

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/news.twig */
  14. class __TwigTemplate_b313d660535c3ccefdadcfee219c9c87 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.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/news.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/news.twig"));
  33.         // line 26
  34.         echo "
  35. ";
  36.         // line 50
  37.         echo "
  38. ";
  39.         // line 52
  40.         echo "
  41. ";
  42.         // line 53
  43.         $context["NewsListMax"] = 10;
  44.         // line 54
  45.         echo "
  46. ";
  47.         // line 56
  48.         echo "
  49. <!-- Block/news.twig -->
  50. ";
  51.         // line 58
  52.         $context["NewsList"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\News"), "getList", [], "method"falsefalsefalse58);
  53.         // line 59
  54.         echo "
  55. ";
  56.         // line 61
  57.         echo "<!--
  58. <div class=\"ec-newsRole\">
  59.     <div class=\"ec-secHeading\">
  60.         <h2 class=\"text-span updown ec-secHeading__en\">
  61.             News
  62. ";
  63.         // line 70
  64.         echo "        </h2>
  65.     </div>
  66.     <div class=\"ec-newsRole__list appearEffect\">
  67.         ";
  68.         // line 76
  69.         echo "        <div class=\"ec-slickContainer slickGutter\">
  70.             ";
  71.         // line 79
  72.         $context['_parent'] = $context;
  73.         $context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList"$context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.'79$this->source); })()));
  74.         $context['loop'] = [
  75.           'parent' => $context['_parent'],
  76.           'index0' => 0,
  77.           'index'  => 1,
  78.           'first'  => true,
  79.         ];
  80.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  81.             $length count($context['_seq']);
  82.             $context['loop']['revindex0'] = $length 1;
  83.             $context['loop']['revindex'] = $length;
  84.             $context['loop']['length'] = $length;
  85.             $context['loop']['last'] = === $length;
  86.         }
  87.         foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
  88.             // line 80
  89.             echo "    ";
  90.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse80) < (isset($context["NewsListMax"]) || array_key_exists("NewsListMax"$context) ? $context["NewsListMax"] : (function () { throw new RuntimeError('Variable "NewsListMax" does not exist.'80$this->source); })()))) {
  91.                 // line 81
  92.                 echo "            <div class=\"ec-newsItemRole\" data-index=\"";
  93.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse81), "html"nulltrue);
  94.                 echo "\">
  95.                 ";
  96.                 // line 84
  97.                 echo "                <div class=\"ec-newsItemRole__thumbnail\"></div>
  98.                 ";
  99.                 // line 87
  100.                 echo "                <div class=\"ec-newsItemRole__content\">
  101.                     ";
  102.                 // line 89
  103.                 echo "                    <div class=\"ec-newsItemRole__title\">";
  104.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["News"], "title", [], "any"falsefalsefalse89), "html"nulltrue);
  105.                 echo "</div>
  106.                     ";
  107.                 // line 92
  108.                 echo "                    <time class=\"ec-newsItemRole__date\">";
  109.                 echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["News"], "publish_date", [], "any"falsefalsefalse92), "Y/m/d"), "html"nulltrue);
  110.                 echo "</time>
  111.                 </div>
  112.                 ";
  113.                 // line 96
  114.                 echo "        ";
  115.                 if (twig_get_attribute($this->env$this->source$context["News"], "description", [], "any"falsefalsefalse96)) {
  116.                     // line 97
  117.                     echo "                <div class=\"ec-newsItemRole__description\" style=\"display:none;\">
  118.                     ";
  119.                     // line 98
  120.                     echo twig_nl2br(twig_get_attribute($this->env$this->source$context["News"], "description", [], "any"falsefalsefalse98));
  121.                     echo "
  122.                 </div>
  123.         ";
  124.                 }
  125.                 // line 101
  126.                 echo "            </div>
  127.     ";
  128.             }
  129.             ++$context['loop']['index0'];
  130.             ++$context['loop']['index'];
  131.             $context['loop']['first'] = false;
  132.             if (isset($context['loop']['length'])) {
  133.                 --$context['loop']['revindex0'];
  134.                 --$context['loop']['revindex'];
  135.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  136.             }
  137.         }
  138.         $_parent $context['_parent'];
  139.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
  140.         $context array_intersect_key($context$_parent) + $_parent;
  141.         // line 104
  142.         echo "
  143.         </div>
  144.     </div>
  145. </div>
  146. -->
  147. ";
  148.         // line 110
  149.         echo "<div class=\"ec-newsDetailRole\">
  150.     <div class=\"ec-newsDetailRole__list\">
  151.         ";
  152.         // line 115
  153.         echo "        <div class=\"ec-slickContainer\">
  154.             ";
  155.         // line 118
  156.         $context['_parent'] = $context;
  157.         $context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList"$context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.'118$this->source); })()));
  158.         $context['loop'] = [
  159.           'parent' => $context['_parent'],
  160.           'index0' => 0,
  161.           'index'  => 1,
  162.           'first'  => true,
  163.         ];
  164.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  165.             $length count($context['_seq']);
  166.             $context['loop']['revindex0'] = $length 1;
  167.             $context['loop']['revindex'] = $length;
  168.             $context['loop']['length'] = $length;
  169.             $context['loop']['last'] = === $length;
  170.         }
  171.         foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
  172.             // line 119
  173.             echo "    ";
  174.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse119) < (isset($context["NewsListMax"]) || array_key_exists("NewsListMax"$context) ? $context["NewsListMax"] : (function () { throw new RuntimeError('Variable "NewsListMax" does not exist.'119$this->source); })()))) {
  175.                 // line 120
  176.                 echo "            <div class=\"ec-newsItemRole\">
  177.                 ";
  178.                 // line 123
  179.                 echo "                <div class=\"ec-newsItemRole__title\">";
  180.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["News"], "title", [], "any"falsefalsefalse123), "html"nulltrue);
  181.                 echo "</div>
  182.                 ";
  183.                 // line 126
  184.                 echo "                <time class=\"ec-newsItemRole__date\">";
  185.                 echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["News"], "publish_date", [], "any"falsefalsefalse126), "Y/m/d"), "html"nulltrue);
  186.                 echo "</time>
  187.                 ";
  188.                 // line 129
  189.                 echo "                <div class=\"ec-newsItemRole__description\">
  190.         ";
  191.                 // line 130
  192.                 if (twig_get_attribute($this->env$this->source$context["News"], "description", [], "any"falsefalsefalse130)) {
  193.                     // line 131
  194.                     echo "                    ";
  195.                     echo twig_nl2br(twig_get_attribute($this->env$this->source$context["News"], "description", [], "any"falsefalsefalse131));
  196.                     echo "
  197.             ";
  198.                     // line 132
  199.                     if (twig_get_attribute($this->env$this->source$context["News"], "url", [], "any"falsefalsefalse132)) {
  200.                         // line 133
  201.                         echo "                    <br><a href=\"";
  202.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["News"], "url", [], "any"falsefalsefalse133), "html"nulltrue);
  203.                         echo "\" ";
  204.                         if ((twig_get_attribute($this->env$this->source$context["News"], "link_method", [], "any"falsefalsefalse133) == "1")) {
  205.                             echo "target=\"_blank\"";
  206.                         }
  207.                         echo ">";
  208.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("詳しくはこちら"), "html"nulltrue);
  209.                         echo "</a>
  210.             ";
  211.                     }
  212.                     // line 135
  213.                     echo "        ";
  214.                 } else {
  215.                     // line 136
  216.                     echo "                    (詳細本文はありません)
  217.         ";
  218.                 }
  219.                 // line 138
  220.                 echo "                </div>
  221.             </div>
  222.     ";
  223.             }
  224.             ++$context['loop']['index0'];
  225.             ++$context['loop']['index'];
  226.             $context['loop']['first'] = false;
  227.             if (isset($context['loop']['length'])) {
  228.                 --$context['loop']['revindex0'];
  229.                 --$context['loop']['revindex'];
  230.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  231.             }
  232.         }
  233.         $_parent $context['_parent'];
  234.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
  235.         $context array_intersect_key($context$_parent) + $_parent;
  236.         // line 142
  237.         echo "
  238.         </div>
  239.     </div>
  240. </div>
  241. <script>
  242.     \$(function () {
  243.         var \$newsRole =        \$( '.ec-newsRole' );
  244.         var \$newsDetailRole =  \$( '.ec-newsDetailRole' );
  245.         var \$newsSlick =       \$newsRole.find('.ec-slickContainer');
  246.         var \$newsDetailSlick = \$newsDetailRole.find('.ec-slickContainer');
  247.         // 各記事ごとに、詳細本文からサムネイル情報を取得してしかるべき場所へappendします
  248.         \$newsRole.find( '.ec-newsItemRole' ).each(function(){
  249.             var \$this = \$(this);
  250.             // サムネイル画像配置要素
  251.             var \$newsThumbnail = \$this.find( '.ec-newsItemRole__thumbnail' );
  252.             // サムネイル画像要素を取得
  253.             var \$thumbnailImage = \$this.find( '.ec-newsItemRole__description .news_thumbnail' );
  254.             if ( !\$thumbnailImage.length ) {
  255.                 // サムネイル画像の指定がない場合はnone画像
  256.                 \$thumbnailImage = '<img src=\"/html/template/dtJEIA4010/assets/img/sample/news_thumbnail_none.jpg\" alt=\"\">';
  257.             }
  258.             // サムネイル画像要素を配置要素へappend
  259.             \$newsThumbnail.append( \$thumbnailImage );
  260.         });
  261.         // 新着情報一覧のslickスライダー実装
  262.         \$newsSlick.slick({
  263.             dots:          false,
  264.             arrows:        true,
  265.             prevArrow:     '<div class=\"slick-prev\"><i class=\"jeiafont jeia-arrow-left\"></i></div>',
  266.             nextArrow:     '<div class=\"slick-next\"><i class=\"jeiafont jeia-arrow\"></i></div>',
  267.             speed:         600,
  268.             slidesToShow:  4,
  269.             swipeToSlide:  true,// slidesToScrollに関係なく、ユーザーがスライドに直接ドラッグまたはスワイプすることを許可
  270.             responsive:    [
  271.                 {
  272.                     breakpoint: 1280,// 1280px未満(タブレット時)
  273.                     settings: {
  274.                         slidesToShow: 3// 3個で収まらない場合は2個に減らしてご調整ください
  275.                     }
  276.                 },
  277.                 {
  278.                     breakpoint: 768,// 768px未満(スマホ時)
  279.                     settings: {
  280.                         slidesToShow: 2
  281.                     }
  282.                 }
  283.             ]
  284.         });
  285.         // 詳細本文一覧のslickスライダー実装
  286.         \$newsDetailSlick.slick({
  287.             fade:          true,
  288.             dots:          false,
  289.             arrows:        true,
  290.             prevArrow:     '<div class=\"slick-prev\"><i class=\"jeiafont jeia-arrow-left\"></i></div>',
  291.             nextArrow:     '<div class=\"slick-next\"><i class=\"jeiafont jeia-arrow\"></i></div>',
  292.             adaptiveHeight: true,
  293.             speed:         300
  294.         });
  295.         // 新着情報アイテムのクリックで詳細本文をポップアップ表示
  296.         \$newsRole.on('click', '.ec-newsItemRole', function(){
  297.             // 詳細本文スライダーをクリックされたアイテムに合わせるためslickGoToします
  298.             var index = \$(this).data('index');
  299.             \$newsDetailSlick.slick('slickGoTo', index, true);
  300.             // ポップアップ表示開始
  301.             \$newsDetailRole.addClass( 'is-active' );
  302.         });
  303.         // ポップアップ表示のCLOSE
  304.         \$newsDetailRole.on('click', function(e){
  305.             // is-activeを確認する事で、背景以外のクリックイベントを回避します
  306.             if ( \$(e.target).hasClass( 'is-active' ) ) {
  307.                 \$newsDetailRole.removeClass( 'is-active' );
  308.             }
  309.         });
  310.     });
  311. </script>
  312. ";
  313.         
  314.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  315.         
  316.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  317.     }
  318.     public function getTemplateName()
  319.     {
  320.         return "Block/news.twig";
  321.     }
  322.     public function isTraitable()
  323.     {
  324.         return false;
  325.     }
  326.     public function getDebugInfo()
  327.     {
  328.         return array (  260 => 142,  243 => 138,  239 => 136,  236 => 135,  224 => 133,  222 => 132,  217 => 131,  215 => 130,  212 => 129,  206 => 126,  200 => 123,  196 => 120,  193 => 119,  176 => 118,  172 => 115,  166 => 110,  159 => 104,  143 => 101,  137 => 98,  134 => 97,  131 => 96,  124 => 92,  118 => 89,  115 => 87,  111 => 84,  105 => 81,  102 => 80,  85 => 79,  81 => 76,  74 => 70,  66 => 61,  63 => 59,  61 => 58,  57 => 56,  54 => 54,  52 => 53,  49 => 52,  46 => 50,  43 => 26,);
  329.     }
  330.     public function getSourceContext()
  331.     {
  332.         return new Source("{#
  333. ///////////////////////////////////////////////////////////////////////
  334. This template is part of EC-CUBE Design template.
  335. Copyright(c) JAPAN ELECTRONIC INDUSTRIAL ARTS CO.LTD.
  336. http://www.jeia.co.jp/
  337. For the full copyright and license information, please view the LICENSE
  338. file that was distributed with this source code.
  339. 本テンプレートの著作権は、「株式会社日本電子工藝社」に帰属いたします。
  340. ※本テンプレートを譲渡・再頒布・転用・第三者へ開示することは禁止いたします。
  341. ただし、事業者によるショップ運営者への設置代行を禁止するものではございません。
  342. ※本テンプレートを申請されたご利用サイトへの設置以外の目的で複製することは禁止いたします。
  343. ※本テンプレートデータ内のライセンス条項、および著作権に関する記述を削除することはできません。
  344. ※ご利用サイトを変更することはできません。申請と異なるサイトにてご利用になる場合は、
  345. 別途、ご利用費用をお支払いただく必要がございます。
  346. ※本テンプレートの改変にあたり、一切のサポートはいたしかねます。
  347. ※本テンプレートは、すべての設置環境で動作する事は保証しておりません。
  348. ///////////////////////////////////////////////////////////////////////
  349. #}
  350. {#
  351. 新着情報
  352. サムネイル画像を表示できる新着情報ブロックとなります。クリックにより詳細本文をポップアップ表示します。
  353. 記事の登録はEC-CUBE標準機能です。管理機能の「コンテンツ管理 > 新着情報管理」から記事を登録・編集してください。
  354. EC-CUBE標準では新着情報のサムネイル画像登録機能はありませんが当テンプレートでは新着情報の「詳細本文」欄の中に
  355. 以下のコード(img要素)を記述して頂くことでそれを拾ってサムネイル画像表示させています。
  356. サムネイル画像を登録する記述
  357. 例:
  358. <img class=\"news_thumbnail\" src=\"/html/template/dtJEIA4010/assets/img/sample/news_thumbnail_01.jpg\" alt=\"\">
  359. ※サムネイル画像の指定は、詳細本文欄のどこに記述して頂いても構いません。
  360. ※src属性には画像までのフルパスを記述してください。
  361. ※詳細本文の表示の中ではサムネイル画像は表示されません。
  362. 新着情報一覧の表示件数は下記のTwig変数「NewsListMax」にて設定して頂けます。
  363. 一覧表示はスライド表示します。
  364. 新着情報をクリックすることで詳細本文をポップアップ表示します。​
  365. 詳細本文もスライダーとなっており、ポップアップした中でスライド表示させることができます。
  366. #}
  367. {# ----------▼ 新着情報の表示件数 ▼---------- #}
  368. {% set NewsListMax = 10 %}
  369. {# ----------▲ 新着情報の表示件数 ▲---------- #}
  370. <!-- Block/news.twig -->
  371. {% set NewsList = repository('Eccube\\\\Entity\\\\News').getList() %}
  372. {# 新着情報一覧 #}
  373. <!--
  374. <div class=\"ec-newsRole\">
  375.     <div class=\"ec-secHeading\">
  376.         <h2 class=\"text-span updown ec-secHeading__en\">
  377.             News
  378. {#
  379.             <span class=\"ec-secHeading__ja\">新着情報</span>
  380. #}
  381.         </h2>
  382.     </div>
  383.     <div class=\"ec-newsRole__list appearEffect\">
  384.         {# slickコンテナ #}
  385.         <div class=\"ec-slickContainer slickGutter\">
  386.             {# 新着情報アイテム #}
  387. {% for News in NewsList %}
  388.     {% if loop.index0 < NewsListMax %}{# 10件までを表示 #}
  389.             <div class=\"ec-newsItemRole\" data-index=\"{{ loop.index0 }}\">
  390.                 {# サムネイル画像枠 #}
  391.                 <div class=\"ec-newsItemRole__thumbnail\"></div>
  392.                 {# 商品コンテンツ枠 #}
  393.                 <div class=\"ec-newsItemRole__content\">
  394.                     {# 新着情報タイトル #}
  395.                     <div class=\"ec-newsItemRole__title\">{{ News.title }}</div>
  396.                     {# 投稿日付 #}
  397.                     <time class=\"ec-newsItemRole__date\">{{ News.publish_date|date('Y/m/d') }}</time>
  398.                 </div>
  399.                 {# 詳細本文(こちらはjsがサムネイル情報を取得するために使用しますので、本文自体は非表示とします) #}
  400.         {% if News.description %}
  401.                 <div class=\"ec-newsItemRole__description\" style=\"display:none;\">
  402.                     {{ News.description|raw|nl2br }}
  403.                 </div>
  404.         {% endif %}
  405.             </div>
  406.     {% endif %}
  407. {% endfor %}
  408.         </div>
  409.     </div>
  410. </div>
  411. -->
  412. {# 詳細本文ポップアップスライダー #}
  413. <div class=\"ec-newsDetailRole\">
  414.     <div class=\"ec-newsDetailRole__list\">
  415.         {# slickコンテナ #}
  416.         <div class=\"ec-slickContainer\">
  417.             {# 新着情報アイテム #}
  418. {% for News in NewsList %}
  419.     {% if loop.index0 < NewsListMax %}{# 10件までを表示 #}
  420.             <div class=\"ec-newsItemRole\">
  421.                 {# 新着情報タイトル #}
  422.                 <div class=\"ec-newsItemRole__title\">{{ News.title }}</div>
  423.                 {# 投稿日付 #}
  424.                 <time class=\"ec-newsItemRole__date\">{{ News.publish_date|date('Y/m/d') }}</time>
  425.                 {# 詳細本文 #}
  426.                 <div class=\"ec-newsItemRole__description\">
  427.         {% if News.description %}
  428.                     {{ News.description|raw|nl2br }}
  429.             {% if News.url %}
  430.                     <br><a href=\"{{ News.url }}\" {% if News.link_method == '1' %}target=\"_blank\"{% endif %}>{{ '詳しくはこちら'|trans }}</a>
  431.             {% endif %}
  432.         {% else %}
  433.                     (詳細本文はありません)
  434.         {% endif %}
  435.                 </div>
  436.             </div>
  437.     {% endif %}
  438. {% endfor %}
  439.         </div>
  440.     </div>
  441. </div>
  442. <script>
  443.     \$(function () {
  444.         var \$newsRole =        \$( '.ec-newsRole' );
  445.         var \$newsDetailRole =  \$( '.ec-newsDetailRole' );
  446.         var \$newsSlick =       \$newsRole.find('.ec-slickContainer');
  447.         var \$newsDetailSlick = \$newsDetailRole.find('.ec-slickContainer');
  448.         // 各記事ごとに、詳細本文からサムネイル情報を取得してしかるべき場所へappendします
  449.         \$newsRole.find( '.ec-newsItemRole' ).each(function(){
  450.             var \$this = \$(this);
  451.             // サムネイル画像配置要素
  452.             var \$newsThumbnail = \$this.find( '.ec-newsItemRole__thumbnail' );
  453.             // サムネイル画像要素を取得
  454.             var \$thumbnailImage = \$this.find( '.ec-newsItemRole__description .news_thumbnail' );
  455.             if ( !\$thumbnailImage.length ) {
  456.                 // サムネイル画像の指定がない場合はnone画像
  457.                 \$thumbnailImage = '<img src=\"/html/template/dtJEIA4010/assets/img/sample/news_thumbnail_none.jpg\" alt=\"\">';
  458.             }
  459.             // サムネイル画像要素を配置要素へappend
  460.             \$newsThumbnail.append( \$thumbnailImage );
  461.         });
  462.         // 新着情報一覧のslickスライダー実装
  463.         \$newsSlick.slick({
  464.             dots:          false,
  465.             arrows:        true,
  466.             prevArrow:     '<div class=\"slick-prev\"><i class=\"jeiafont jeia-arrow-left\"></i></div>',
  467.             nextArrow:     '<div class=\"slick-next\"><i class=\"jeiafont jeia-arrow\"></i></div>',
  468.             speed:         600,
  469.             slidesToShow:  4,
  470.             swipeToSlide:  true,// slidesToScrollに関係なく、ユーザーがスライドに直接ドラッグまたはスワイプすることを許可
  471.             responsive:    [
  472.                 {
  473.                     breakpoint: 1280,// 1280px未満(タブレット時)
  474.                     settings: {
  475.                         slidesToShow: 3// 3個で収まらない場合は2個に減らしてご調整ください
  476.                     }
  477.                 },
  478.                 {
  479.                     breakpoint: 768,// 768px未満(スマホ時)
  480.                     settings: {
  481.                         slidesToShow: 2
  482.                     }
  483.                 }
  484.             ]
  485.         });
  486.         // 詳細本文一覧のslickスライダー実装
  487.         \$newsDetailSlick.slick({
  488.             fade:          true,
  489.             dots:          false,
  490.             arrows:        true,
  491.             prevArrow:     '<div class=\"slick-prev\"><i class=\"jeiafont jeia-arrow-left\"></i></div>',
  492.             nextArrow:     '<div class=\"slick-next\"><i class=\"jeiafont jeia-arrow\"></i></div>',
  493.             adaptiveHeight: true,
  494.             speed:         300
  495.         });
  496.         // 新着情報アイテムのクリックで詳細本文をポップアップ表示
  497.         \$newsRole.on('click', '.ec-newsItemRole', function(){
  498.             // 詳細本文スライダーをクリックされたアイテムに合わせるためslickGoToします
  499.             var index = \$(this).data('index');
  500.             \$newsDetailSlick.slick('slickGoTo', index, true);
  501.             // ポップアップ表示開始
  502.             \$newsDetailRole.addClass( 'is-active' );
  503.         });
  504.         // ポップアップ表示のCLOSE
  505.         \$newsDetailRole.on('click', function(e){
  506.             // is-activeを確認する事で、背景以外のクリックイベントを回避します
  507.             if ( \$(e.target).hasClass( 'is-active' ) ) {
  508.                 \$newsDetailRole.removeClass( 'is-active' );
  509.             }
  510.         });
  511.     });
  512. </script>
  513. ""Block/news.twig""/home/giftlife-tokyo/www/stg/awd/app/template/osechi/Block/news.twig");
  514.     }
  515. }