app/template/default/Block/top_carousel.twig line 1

Open in your IDE?
  1. {% block stylesheet %}
  2.         <style>
  3.             .slick-slide {
  4.                 padding-right: 3px; padding-left: 3px;
  5.             }
  6.             .slick-slide img {
  7.                 border-radius: var(--8px, 8px);
  8.             }
  9.             .slick-prev:before {
  10.                 display: inline-block;
  11.                 width: 54px;  /* 指定したい幅 */
  12.                 height: 54px; /* 指定したい高さ */
  13.                 background-image: url({{ asset('assets/img/top_page/arrow_carousel_l.png', 'user_data') }});
  14.                 background-size: contain;
  15.                 background-repeat: no-repeat;
  16.                 background-position: center;
  17.             }
  18.                 
  19.             .slick-next:before {
  20.                 display: inline-block;
  21.                 width: 54px;  /* 指定したい幅 */
  22.                 height: 54px; /* 指定したい高さ */
  23.                 background-image: url({{ asset('assets/img/top_page/arrow_carousel_r.png', 'user_data') }});
  24.                 background-size: contain;
  25.                 background-repeat: no-repeat;
  26.                 background-position: center;
  27.             }
  28.     
  29.             .slick-prev:hover,
  30.             .slick-prev:focus,
  31.             .slick-next:hover,
  32.             .slick-next:focus {
  33.                 color: transparent;
  34.                 outline: none;
  35.                 background: transparent;
  36.             }
  37.             
  38.             .slick-prev:hover:before,
  39.             .slick-prev:focus:before,
  40.             .slick-next:hover:before,
  41.             .slick-next:focus:before {
  42.                 opacity: 1;
  43.             }
  44.             
  45.             .slick-prev.slick-disabled:before,
  46.             .slick-next.slick-disabled:before {
  47.                 opacity: .25;
  48.             }
  49.             .gradient-container {
  50.                 position: relative;
  51.                 overflow: hidden;
  52.             }
  53.             /* 左側のグラデーション */
  54.             .gradient-container::before {
  55.                 content: '';
  56.                 position: absolute;
  57.                 top: 0;
  58.                 left: 0;
  59.                 height: 100%;
  60.                 width: 70px; /* 左側の幅 */
  61.                 background: linear-gradient(to right, white, transparent);
  62.                 pointer-events: none;
  63.                 z-index: 1;
  64.             }
  65.             /* 右側のグラデーション */
  66.             .gradient-container::after {
  67.                 content: '';
  68.                 position: absolute;
  69.                 top: 0;
  70.                 right: 0;
  71.                 height: 100%;
  72.                 width: 70px; /* 右側の幅 */
  73.                 background: linear-gradient(to left, white, transparent);
  74.                 pointer-events: none;
  75.             }
  76.         </style>
  77.     {% endblock %}
  78.     
  79.     {% block javascript %}
  80.         <script>
  81.             
  82.             $(function() {
  83.                 $('.top_carousel').slick({
  84.                     dots: false,
  85.                     autoplay: true,
  86.                     speed: 300,
  87.                     centerMode: true,
  88.                     centerPadding: '6%',
  89.                     arrows: true,
  90.                     infinite: true,
  91.                     swipeToSlide: true,
  92.                     slidesToShow: 3
  93.                 });
  94.                 {% set current_domain = app.request.getHost() %}
  95.                 {% set is_prod = 'web-order.shikomel.com' in current_domain %}
  96.                 {% set is_stg = 'web-order-stg.shikomel.com' in current_domain %}
  97.                 // Lineバナークリックイベント
  98.                 {% if is_prod %}
  99.                     $('#line_link_carousel').on('click', function(event) {
  100.                         const currentPageUrl = window.location.href;
  101.                         fbq('trackCustom', 'ce_click_line_btn', {
  102.                             content_type: "ClickLineBtn",
  103.                             content_name: currentPageUrl,
  104.                             value: 50
  105.                         });
  106.                         window.dataLayer.push({
  107.                             event: 'ce_click_line_btn',
  108.                             custom_event_name: 'ce_click_line_btn',
  109.                             custom_page_url: currentPageUrl,
  110.                             custom_customer_id: '',
  111.                             custom_user_agent: $("#user_agent").val(),
  112.                             custom_is_ig: $("#is_ig").val(),
  113.                             custom_is_line: $("#is_line").val(),
  114.                             custom_referer: $("#referer").val(),
  115.                             custom_real_ip: $("#real_ip").val(),
  116.                         });
  117.                         _lt('send', 'cv', {
  118.                             type: 'ce_click_line_btn'
  119.                         },['d6fb195c-aa19-4109-8ea0-7b1d883fb349']);
  120.                         
  121.                     });
  122.                 {% endif %}
  123.             });
  124.         </script>
  125.     {% endblock javascript %}
  126.         <div class="ec-sliderRole" style="margin-bottom: 48px; padding: 0px;">
  127.             <div class="top_carousel gradient-container" style="margin-bottom: 13px; margin-top: 50px;">
  128.                 {# 開業直前事業者向けLP誘導 #}
  129.                 <div class="item slick-slide" style="height: 100px;">
  130.                     <a href="./user_data/new_open_resto_lp" alt="開業直前でも安心仕込みゼロの売れる食材たち">
  131.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_open.jpg', 'user_data') }}">
  132.                     </a>
  133.                 </div>
  134.                 {# LINE未連携の場合、LINE連携誘導 #}
  135.                 {% if not isLineLinked %}
  136.                     <div class="item slick-slide" style="">
  137.                         <a href="./plugin_line_login" alt="LINE連携での会員登録で必ずもらえる3000円引きクーポン" id="line_link_carousel">
  138.                             <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_line.jpg', 'user_data') }}">
  139.                         </a>
  140.                     </div>
  141.                 {% endif %}
  142.                 {# ジビエLP誘導 #}
  143.                 <div class="item slick-slide" style="height: 100px;">
  144.                     <a href="./user_data/gibier_lp" alt="珍しいジビエ肉で客単価アップ">
  145.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_gibier.png', 'user_data') }}">
  146.                     </a>
  147.                 </div>
  148.                 {# スポットLP誘導 #}
  149.                 <div class="item slick-slide" style="height: 100px;">
  150.                     <a href="./user_data/spot_menu_lp" alt="そのまま提供するだけ即戦力メニュー">
  151.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_spot.jpg', 'user_data') }}">
  152.                     </a>
  153.                 </div>
  154.                 {# ランチLP誘導 #}
  155.                 <div class="item slick-slide" style="height: 100px;">
  156.                     <a href="./user_data/oneope_lunch_lp" alt="仕込み時間短縮で月30万円の売り上げUP">
  157.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_lunch.jpg', 'user_data') }}">
  158.                     </a>
  159.                 </div>
  160.                 {# デザートLP誘導 #}
  161.                 {#<div class="item slick-slide" style="height: 100px;">#}
  162.                 {#    <a href="./user_data/dessert_lp" alt="カフェ営業に最適テリーヌとチーズケーキ">#}
  163.                 {#        <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_dessert.jpg', 'user_data') }}">#}
  164.                 {#    </a>#}
  165.                 {#</div>#}
  166.                 {# 一次加工LP誘導 #}
  167.                 <div class="item slick-slide" style="height: 100px;">
  168.                     <a href="./user_data/original_menu_lp" alt="こだわりの逸品で最高のおもてなしを">
  169.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_ingredient_1.png', 'user_data') }}">
  170.                     </a>
  171.                 </div>
  172.                 {# 友達紹介キャンペーン #}
  173.                 <div class="item slick-slide" style="height: 100px;">
  174.                     <a href="./refer_friend_lp" alt="友達紹介で1000円もらえる">
  175.                         <img src="{{ asset('assets/img/common/referrer_banner_max5000.webp', 'user_data') }}">
  176.                     </a>
  177.                 </div>
  178.             </div>
  179.         </div>