app/template/default/Block/top_carousel_sp.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.         </style>
  10.     {% endblock %}
  11.     
  12.     {% block javascript %}
  13.         <script>
  14.             
  15.             $(function() {
  16.                 let width = $(window).width();
  17.                 var photo_count = 1;
  18.                 if (width <= 768) {
  19.                 } else if (width <= 1024) {
  20.                     // タブレット
  21.                     photo_count = 2;
  22.                 } else {
  23.                     // PC
  24.                     photo_count = 2;
  25.                 }
  26.                 $('.main_visual').slick({
  27.                     dots: false,
  28.                     autoplay: true,
  29.                     speed: 300,
  30.                     centerMode: true,
  31.                     centerPadding: '7%',
  32.                     arrows: false,
  33.                     infinite: true,
  34.                     swipeToSlide: true,
  35.                     slidesToShow: photo_count
  36.                 });
  37.                 {% set current_domain = app.request.getHost() %}
  38.                 {% set is_prod = 'web-order.shikomel.com' in current_domain %}
  39.                 {% set is_stg = 'web-order-stg.shikomel.com' in current_domain %}
  40.                 // Lineバナークリックイベント
  41.                 {% if is_prod %}
  42.                     $('#line_link_carousel').on('click', function(event) {
  43.                         const currentPageUrl = window.location.href;
  44.                         fbq('trackCustom', 'ce_click_line_btn', {
  45.                             content_type: "ClickLineBtn",
  46.                             content_name: currentPageUrl,
  47.                             value: 50
  48.                         });
  49.                         window.dataLayer.push({
  50.                             event: 'ce_click_line_btn',
  51.                             custom_event_name: 'ce_click_line_btn',
  52.                             custom_page_url: currentPageUrl,
  53.                             custom_customer_id: '',
  54.                             custom_user_agent: $("#user_agent").val(),
  55.                             custom_is_ig: $("#is_ig").val(),
  56.                             custom_is_line: $("#is_line").val(),
  57.                             custom_referer: $("#referer").val(),
  58.                             custom_real_ip: $("#real_ip").val(),
  59.                         });
  60.                         _lt('send', 'cv', {
  61.                             type: 'ce_click_line_btn'
  62.                         },['d6fb195c-aa19-4109-8ea0-7b1d883fb349']);
  63.                         
  64.                     });
  65.                 {% endif %}
  66.             });
  67.         </script>
  68.     {% endblock javascript %}
  69.     
  70.         <div class="ec-sliderRole" style="margin-bottom: 16px; padding: 0px;">
  71.             <hr>
  72.             <div class="main_visual" style="margin-bottom: 12px; margin-top: 12px;">
  73.                 {# 開業直前事業者向けLP誘導 #}
  74.                 <div class="item slick-slide" style="">
  75.                     <a href="./user_data/new_open_resto_lp" alt="開業直前でも安心仕込みゼロの売れる食材たち">
  76.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_open.jpg', 'user_data') }}">
  77.                     </a>
  78.                 </div>
  79.                 {# LINE未連携の場合、LINE連携誘導 #}
  80.                 {% if not isLineLinked %}
  81.                     <div class="item slick-slide" style="">
  82.                         <a href="./plugin_line_login" alt="LINE連携での会員登録で必ずもらえる3000円引きクーポン" id="line_link_carousel">
  83.                             <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_line.jpg', 'user_data') }}">
  84.                         </a>
  85.                     </div>
  86.                 {% endif %}
  87.                 {# ジビエLP誘導 #}
  88.                 <div class="item slick-slide" style="">
  89.                     <a href="./user_data/gibier_lp" alt="珍しいジビエ肉で客単価アップ">
  90.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_gibier.png', 'user_data') }}">
  91.                     </a>
  92.                 </div>
  93.                 {# スポットLP誘導 #}
  94.                 <div class="item slick-slide" style="">
  95.                     <a href="./user_data/spot_menu_lp" alt="そのまま提供するだけ即戦力メニュー">
  96.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_spot.jpg', 'user_data') }}">
  97.                     </a>
  98.                 </div>
  99.                 {# ランチLP誘導 #}
  100.                 <div class="item slick-slide" style="">
  101.                     <a href="./user_data/oneope_lunch_lp" alt="仕込み時間短縮で月30万円の売り上げUP">
  102.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_lunch.jpg', 'user_data') }}">
  103.                     </a>
  104.                 </div>
  105.                 {# デザートLP誘導 #}
  106.                 {#<div class="item slick-slide" style="">#}
  107.                 {#    <a href="./user_data/dessert_lp" alt="カフェ営業に最適テリーヌとチーズケーキ">#}
  108.                 {#        <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_dessert.jpg', 'user_data') }}">#}
  109.                 {#    </a>#}
  110.                 {#</div>#}
  111.                 {# 一次加工LP誘導 #}
  112.                 <div class="item slick-slide" style="">
  113.                     <a href="./user_data/original_menu_lp" alt="こだわりの逸品で最高のおもてなしを">
  114.                         <img src="{{ asset('assets/img/top_carousel_banner/top_carousel_banner_ingredient_1.png', 'user_data') }}">
  115.                     </a>
  116.                 </div>
  117.                 {# 友達紹介キャンペーン #}
  118.                 <div class="item slick-slide" style="height: 100px;">
  119.                     <a href="./refer_friend_lp" alt="友達紹介で1000円もらえる">
  120.                         <img src="{{ asset('assets/img/common/referrer_banner_max5000.webp', 'user_data') }}">
  121.                     </a>
  122.                 </div>
  123.             </div>
  124.         </div>