app/template/default/index.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% set body_class = 'front_page' %}
  10. {% block stylesheet %}
  11.     <style>
  12.         .slick-slider {
  13.             margin-bottom: 30px;
  14.         }
  15.         .slick-dots {
  16.             position: absolute;
  17.             bottom: -45px;
  18.             display: block;
  19.             width: 100%;
  20.             padding: 0;
  21.             list-style: none;
  22.             text-align: center;
  23.         }
  24.         .slick-dots li {
  25.             position: relative;
  26.             display: inline-block;
  27.             width: 20px;
  28.             height: 20px;
  29.             margin: 0 5px;
  30.             padding: 0;
  31.             cursor: pointer;
  32.         }
  33.         .slick-dots li button {
  34.             font-size: 0;
  35.             line-height: 0;
  36.             display: block;
  37.             width: 20px;
  38.             height: 20px;
  39.             padding: 5px;
  40.             cursor: pointer;
  41.             color: transparent;
  42.             border: 0;
  43.             outline: none;
  44.             background: transparent;
  45.         }
  46.         .slick-dots li button:hover,
  47.         .slick-dots li button:focus {
  48.             outline: none;
  49.         }
  50.         .slick-dots li button:hover:before,
  51.         .slick-dots li button:focus:before {
  52.             opacity: 1;
  53.         }
  54.         .slick-dots li button:before {
  55.             content: " ";
  56.             line-height: 20px;
  57.             position: absolute;
  58.             top: 0;
  59.             left: 0;
  60.             width: 12px;
  61.             height: 12px;
  62.             text-align: center;
  63.             opacity: .25;
  64.             background-color: black;
  65.             border-radius: 50%;
  66.         }
  67.         .slick-dots li.slick-active button:before {
  68.             opacity: .75;
  69.             background-color: black;
  70.         }
  71.         .slick-dots li button.thumbnail img {
  72.             width: 0;
  73.             height: 0;
  74.         }
  75.     </style>
  76. {% endblock %}
  77. {% block javascript %}
  78.     <script>
  79.         const worksSplide = new Splide('.works-slide-wrap', {
  80.             perPage: 4,
  81.             perMove: 1,
  82.             rewind: true,
  83.             gap: '40px',
  84.             autoWidth: true,
  85.             pagination: true,
  86.             breakpoints: {
  87.                 769: {
  88.                     perPage: 1,
  89.                     focus: 'center',
  90.                     trimSpace: false,
  91.                     gap: '50px',
  92.                 },
  93.               }
  94.         });
  95.         worksSplide.mount();
  96.         const bannerSplide = new Splide('.main-visual__banner', {
  97.             perPage: 1,
  98.             focus: 'center',
  99.             type: 'loop',
  100.             gap: '10px',
  101.             padding: '30px',
  102.             mediaQuery: 'min',
  103.             breakpoints: {
  104.                 769: {
  105.                     destroy: true,
  106.                 },
  107.               }
  108.         });
  109.         bannerSplide.mount();
  110.     </script>
  111. {% endblock javascript %}
  112. {% block main %}
  113.     <section class="main-visual">
  114.         <div class="main-visual__video">
  115.             <video src="{{ asset('assets/img/top/madoba_fv_video01.mp4') }}" class="mv-video" autoplay muted loop playsinline></video>
  116.             <div class="mv-catch">
  117.                 <div class="mv-catch__text">毎日の暮らしを良質に。<br>街並みを美しく。</div>
  118.                 <a href="{{ url('history') }}" class="link-block en-font mv-catch__button btn-design01">Our history</a>
  119.             </div>
  120.         </div>
  121.         <div class="splide main-visual__banner" role="group" aria-label="banner-slider">
  122.             <div class="splide__track">
  123.                 <ul class="mv-banner-wrap splide__list">
  124.                     <li class="mv-banner-item splide__slide">
  125.                         <a href="https://tokyogumi.co.jp/showroom/" target="_blank">
  126.                             <div class="mv-banner-item__text mv-banner-text">
  127.                                 <p class="mv-banner-text__heading">
  128.                                     <span>東京ショールーム</span>
  129.                                 </p>
  130.                                 <p class="mv-banner-text__sub-heading">Show Room in Tokyo</p>
  131.                             </div>
  132.                             <img src="{{ asset('assets/img/top/fv_banner01.jpg') }}" alt="" srcset="{{ asset('assets/img/top/fv_banner01.jpg') }} 1x, {{ asset('assets/img/top/fv_banner01@2x.jpg') }} 2x">
  133.                         </a>
  134.                     </li>
  135.                     <li class="mv-banner-item splide__slide">
  136.                         <a href="https://madoba.jp/wp/showroom.html" target="_blank">
  137.                             <div class="mv-banner-item__text mv-banner-text">
  138.                                 <p class="mv-banner-text__heading">
  139.                                     <span>青森ショールーム</span>
  140.                                 </p>
  141.                                 <p class="mv-banner-text__sub-heading">Show Room in Aomori</p>
  142.                             </div>
  143.                             <img src="{{ asset('assets/img/top/fv_banner02.jpg') }}" alt="" srcset="{{ asset('assets/img/top/fv_banner02.jpg') }} 1x, {{ asset('assets/img/top/fv_banner02@2x.jpg') }} 2x">
  144.                         </a>
  145.                     </li>
  146.                     <li class="mv-banner-item splide__slide">
  147.                         <a href="https://madoba.jp/news/" target="_blank">
  148.                             <div class="mv-banner-item__text mv-banner-text">
  149.                                 <p class="mv-banner-text__heading">
  150.                                     <span>その他イベント情報</span>
  151.                                 </p>
  152.                                 <p class="mv-banner-text__sub-heading">News & Event</p>
  153.                             </div>
  154.                             <img src="{{ asset('assets/img/top/fv_banner03.jpg') }}" alt="" srcset="{{ asset('assets/img/top/fv_banner03.jpg') }} 1x, {{ asset('assets/img/top/fv_banner03@2x.jpg') }} 2x">
  155.                         </a>
  156.                     </li>
  157.                 </ul>
  158.             </div>
  159.         </div>
  160.     </section>
  161.     <section class="top-works">
  162.         <div class="inner sp-full">
  163.             <div class="top-works__heading top-works-heading">
  164.                 <p class="en-font top-works-heading__lead"><span>Our works</span></p>
  165.                 <span class="top-works-heading__line"></span>
  166.                 <p class="top-works-heading__caption">わたしたちの家づくりを体験する</p>
  167.             </div>
  168.             <div class="splide top-works__slider works-slide-wrap" role="group" aria-label="works-slider">
  169.                 <div class="splide__arrows works-arrows">
  170.                     <button class="splide__arrow splide__arrow--prev">
  171.                         <svg class="icon">
  172.                             <use xlink:href="assets/img/common/sprite.svg#icon-arrow01"></use>
  173.                         </svg>
  174.                     </button>
  175.                     <button class="splide__arrow splide__arrow--next">
  176.                         <svg class="icon">
  177.                             <use xlink:href="assets/img/common/sprite.svg#icon-arrow01"></use>
  178.                         </svg>
  179.                     </button>
  180.                 </div>
  181.                 <div class="splide__track">
  182.                     <ul class="splide__list">
  183.                         {# 施工事例一覧 #}
  184.                         {% for Construction in Constructions %}
  185.                         <li class="works-slide splide__slide">
  186.                             <div class="works-slide__num en-font">
  187.                                 <p><span>Case</span>{{ Construction.id }}</p>
  188.                             </div>
  189.                             <p class="works-slide__text">
  190.                                 <span>{{ Construction.title }}</span>
  191.                             </p>
  192.                             <div class="works-slide__image-wrap">
  193.                                 <img src="{{ asset(attribute(Construction, 'fileName' ~ 1)|no_image_product, 'save_image') }}" alt="{{ Construction.title }}">
  194.                             </div>
  195.                         </li>
  196.                         {% endfor %}
  197.                     </ul>
  198.                 </div>
  199.             </div>
  200.             <a href="{{ url('work') }}" class="top-works__button btn-design02">一覧で表示</a>
  201.         </div>
  202.     </section>
  203.     <section class="top-product products-wrap">
  204.         <div class="inner sp-full">
  205.             {{ include('Block/sidebar.twig') }}
  206.             <div class="product-main">
  207.                 {## Pickup items ##}
  208.                 <div class="pickup-items-wrap">
  209.                     <div class="heading-design01">
  210.                         <div class="heading-design01-wrap">
  211.                             <p class="heading-design01__lead en-font">Pickup items</p>
  212.                             <p class="heading-design01__caption">
  213.                                 <span>MADOBAシリーズ</span>
  214.                             </p>
  215.                         </div>
  216.                     </div>
  217.                     <div class="item-intro-deisgn01">
  218.                         <div class="item-intro-deisgn01__image-wrap">
  219.                             <img src="{{ asset('assets/img/top/product_pickup-items_image.jpg') }}" alt="" srcset="{{ asset('assets/img/top/product_pickup-items_image.jpg') }} 1x, {{ asset('assets/img/top/product_pickup-items_image@2x.jpg') }} 2x">
  220.                         </div>
  221.                         <div class="item-intro-deisgn01__text">
  222.                             <p class="lead">サンプルテキストサンプルテキストサンプルテキスト</p>
  223.                             <p class="text">サンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキストサンプルテキスト</p>
  224.                         </div>
  225.                     </div>
  226.                     {% if Category1Products|length > 0 %}
  227.                         <div class="category-items-wrap">
  228.                             <div class="category-items-wrap__heading">
  229.                                 <p class="lead">MADOBAシリーズ</p>
  230.                                 <a href="{{ url('product_list') }}?category_id=1" class="link-txt">すべて見る</a>
  231.                             </div>
  232.                             <div class="splide category-slider" role="group" aria-label="category-slider" data-splide='{"perPage":4}'>
  233.                                 <div class="splide__arrows works-arrows">
  234.                                     <button class="splide__arrow splide__arrow--prev">
  235.                                         <svg class="icon">
  236.                                             <use xlink:href="assets/img/common/sprite.svg#icon-arrow01"></use>
  237.                                         </svg>
  238.                                     </button>
  239.                                     <button class="splide__arrow splide__arrow--next">
  240.                                         <svg class="icon">
  241.                                             <use xlink:href="assets/img/common/sprite.svg#icon-arrow01"></use>
  242.                                         </svg>
  243.                                     </button>
  244.                                 </div>
  245.                                 <div class="splide__track">
  246.                                     <ul class="splide__list">
  247.                                         {## MADOBAシリーズの商品一覧 ##}
  248.                                         {% for Product in Category1Products %}
  249.                                             <li class="splide__slide category-slide-list">
  250.                                                 <a href="{{ url('product_detail', {'id': Product.id}) }}">
  251.                                                     <div class="category-slide-list__image-wrap">
  252.                                                         <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}">
  253.                                                     </div>
  254.                                                     <div class="category-slide-list__text product-list-text">
  255.                                                         <p class="product-list-text__code">{% if Product.code_min is not empty %}{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}{% endif %}</p>
  256.                                                         <p class="product-list-text__name">{{ Product.name }}</p>
  257.                                                         <p class="product-list-text__price en-font">
  258.                                                             {% if Product.hasProductClass %}
  259.                                                                 {% if Product.getPrice02Min == Product.getPrice02Max %}
  260.                                                                     {{ Product.getPrice02IncTaxMin|price }}
  261.                                                                 {% else %}
  262.                                                                     {{ Product.getPrice02IncTaxMin|price }}
  263.                                                                     ~
  264.                                                                     {{ Product.getPrice02IncTaxMax|price }}
  265.                                                                 {% endif %}
  266.                                                             {% else %}
  267.                                                                 {{ Product.getPrice02IncTaxMin|price }}
  268.                                                             {% endif %}
  269.                                                         </p>
  270.                                                     </div>
  271.                                                 </a>
  272.                                             </li>
  273.                                         {% endfor %}
  274.                                     </ul>
  275.                                 </div>
  276.                             </div>
  277.                         </div>
  278.                     {% endif %}
  279.                 </div>
  280.                 {## 建材カテゴリ(表示対象のカテゴリは app/config/eccube/services.yaml で指定) ##}
  281.                 {% for CategoriesProduct in CategoriesProducts %}
  282.                     {% if CategoriesProduct.products|length > 0 %}
  283.                         <div class="category-items-wrap">
  284.                             <div class="category-items-wrap__heading">
  285.                                 <p class="lead">{{ CategoriesProduct.category_name }}</p>
  286.                                 <a href="{{ url('product_list') }}?category_id={{ CategoriesProduct.category_id }}" class="link-txt">すべて見る</a>
  287.                             </div>
  288.                             <div class="splide category-slider" role="group" aria-label="category-slider" data-splide='{"perPage":4}'>
  289.                                 <div class="splide__arrows works-arrows">
  290.                                     <button class="splide__arrow splide__arrow--prev">
  291.                                         <svg class="icon">
  292.                                             <use xlink:href="assets/img/common/sprite.svg#icon-arrow01"></use>
  293.                                         </svg>
  294.                                     </button>
  295.                                     <button class="splide__arrow splide__arrow--next">
  296.                                         <svg class="icon">
  297.                                             <use xlink:href="assets/img/common/sprite.svg#icon-arrow01"></use>
  298.                                         </svg>
  299.                                     </button>
  300.                                 </div>
  301.                                 <div class="splide__track">
  302.                                     <ul class="splide__list">
  303.                                         {## 建材カテゴリの商品一覧 ##}
  304.                                         {% for Product in CategoriesProduct.products %}
  305.                                             <li class="splide__slide category-slide-list">
  306.                                                 <a href="{{ url('product_detail', {'id': Product.id}) }}">
  307.                                                     <div class="category-slide-list__image-wrap">
  308.                                                         <img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="{{ Product.name }}">
  309.                                                     </div>
  310.                                                     <div class="category-slide-list__text product-list-text">
  311.                                                         <p class="product-list-text__code">{% if Product.code_min is not empty %}{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}{% endif %}</p>
  312.                                                         <p class="product-list-text__name">{{ Product.name }}</p>
  313.                                                         <p class="product-list-text__price en-font">
  314.                                                             {% if Product.hasProductClass %}
  315.                                                                 {% if Product.getPrice02Min == Product.getPrice02Max %}
  316.                                                                     {{ Product.getPrice02IncTaxMin|price }}
  317.                                                                 {% else %}
  318.                                                                     {{ Product.getPrice02IncTaxMin|price }}
  319.                                                                     ~
  320.                                                                     {{ Product.getPrice02IncTaxMax|price }}
  321.                                                                 {% endif %}
  322.                                                             {% else %}
  323.                                                                 {{ Product.getPrice02IncTaxMin|price }}
  324.                                                             {% endif %}
  325.                                                         </p>
  326.                                                     </div>
  327.                                                 </a>
  328.                                             </li>
  329.                                         {% endfor %}
  330.                                     </ul>
  331.                                 </div>
  332.                             </div>
  333.                         </div>
  334.                     {% endif %}
  335.                 {% endfor %}
  336.             </div>
  337.         </div>
  338.     </section>
  339. {% endblock %}