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

Open in your IDE?
  1. {% block main %}
  2. <style>
  3. *,body,ul {
  4.   margin: 0;
  5.   padding: 0;
  6.   }
  7. li {
  8.   list-style: none;
  9.   }
  10. /* ↓ スライドの外枠 */
  11. .slide-wrapper_b {
  12.   width: 100%;
  13.   height: auto;
  14.   position: relative;
  15.   overflow: hidden; /* はみ出したスライドを隠す */
  16.   }
  17. /*  ↓ スライド(コンテンツ) */
  18. .slide_b { /*スライド全体 */
  19.   width: 800%;
  20.   height: 100%;
  21.   display: flex;
  22.   transition: all 3.0s; 
  23.   }
  24. .slide_b div { /* スライド */
  25.   width: 12.5%;
  26.   display: flex;
  27.   text-align: center;
  28.   justify-content: center;
  29.   align-items: center;
  30.   }
  31. .slide_b1 { /* スライドさせるために必要なクラス */
  32.   transform: translateX(0);
  33.   }
  34. .slide_b2 { /* スライドさせるために必要なクラス */
  35.   transform: translateX(-12.50%);
  36.   }
  37. .slide_b3 { /* スライドさせるために必要なクラス */
  38.   transform: translateX(-25.00%);
  39.   }
  40. .slide_b4 { /* スライドさせるために必要なクラス */
  41.   transform: translateX(-37.50%);
  42.   }
  43. .slide_b5 { /* スライドさせるために必要なクラス */
  44.   transform: translateX(-50.00%);
  45.   }
  46. .slide_b6 { /* スライドさせるために必要なクラス */
  47.   transform: translateX(-62.50%);
  48.   }
  49. .slide_b7 { /* スライドさせるために必要なクラス */
  50.   transform: translateX(-75.00%);
  51.   }
  52. .slide_b8 { /* スライドさせるために必要なクラス */
  53.   transform: translateX(-87.50%);
  54.   }  
  55. .slide_b div:nth-of-type(1){ /* 背景色 */
  56. /*background-image: url("https://nakatomishop.sakura.ne.jp/prod/MailMagazine/img/sm2025_top.png");*/
  57.   background-size: cover;
  58.   background-color: #e5fff7;
  59.   }
  60. .slide_b div:nth-of-type(2){ /* 背景色 */
  61.   background-color: #efffff;
  62.   }
  63. .slide_b div:nth-of-type(3){ /* 背景色 */
  64.   background-color: #fcfcfc;
  65.   }
  66. .slide_b div:nth-of-type(4){ /* 背景色 */
  67.   background-color: #fcfcfc;
  68.   }
  69. .slide_b div:nth-of-type(5){ /* 背景色 */
  70.   background-color: #fcfcfc;
  71.   }
  72. .slide_b div:nth-of-type(6){ /* 背景色 */
  73.   background-color: #efffff;
  74.   }
  75. .slide_b div:nth-of-type(7){ /* 背景色 */
  76.   background-color: #f7efff;
  77.   }
  78. .slide_b div:nth-of-type(8){ /* 背景色 */
  79.   background-color: #ffffe5;
  80.   }
  81. /* ↓ 左右のボタン */
  82. .next_b {
  83.   position: absolute;
  84.   width: 15px;
  85.   height: 15px;
  86.   right: 10px;
  87.   bottom: 50%;
  88.   z-index: 10;
  89.   cursor: pointer;
  90.   border-top: solid 3px #000;
  91.   border-right: solid 3px #000;
  92.   -webkit-transform: rotate(45deg) translateY(50%);
  93.   transform: rotate(45deg) translateY(50%);
  94.   }
  95. .prev_b {
  96.   position: absolute;
  97.   width: 15px;
  98.   height: 15px;
  99.   left: 25px;
  100.   bottom: 50%;
  101.   z-index: 10;
  102.   cursor: pointer;
  103.   border-top: solid 3px #000;
  104.   border-right: solid 3px #000;
  105.   -webkit-transform: rotate(-135deg) translateY(-50%);
  106.   transform: rotate(-135deg) translateY(-50%);
  107.   }
  108. /* ↓ インジケーター */
  109. .indicator_b {
  110.   width: 100%;
  111.   position: absolute;
  112.   bottom: 5px;
  113.   display: flex;
  114.   column-gap: 18px;
  115.   z-index: 10;
  116.   justify-content: center;
  117.   align-items: center;
  118.   }
  119. .indicator_b li {
  120.   width: 10px;
  121.   height: 10px;
  122.   border-radius: 50%;
  123.   list-style: none;
  124.   background-color: #fff;
  125.   border: 2px #dcdcdc solid;
  126.   cursor: pointer;
  127.   }
  128. .indicator_b li:first-of-type {
  129.   background-color: #000;
  130.   }
  131. .fit-picture_sl {
  132.   cursor: pointer; 
  133.   width: 10%;
  134.   padding-top: 0.5%;
  135.   padding-bottom: 1%;
  136.   padding-right: 1%;
  137.   margin-left: -0.4%;
  138.   }
  139. .p_example_sm25_sl_b {
  140.   font-size: 21px;
  141.   font-weight: 700;
  142.   text-align: center;
  143.   padding-top: 4px;
  144.   }
  145. </style>
  146.           
  147. <html lang="ja">
  148.   <head>
  149.     <meta charset="UTF-8">
  150.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  151.       <title>スライドショー</title>
  152.     <link rel="stylesheet" href="styles.css">
  153.   </head>
  154. <body>
  155. <!-- スライドの外枠 -->
  156. <div class="slide-wrapper_b">
  157. <!-- スライド(コンテンツ) -->
  158.   <div id="slide_b" class="slide_b">
  159.     <div>
  160.         <p class="p_example_sm25_sl_b">スポットクーラー R32 NEW<br>
  161.         <a href="https://www.nakatomishop.com/products/list?category_id=76">
  162.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/R32NEWMODEL25_TOP_POP_1.png" alt="Image 1"></a>
  163.         <a href="https://www.nakatomishop.com/products/detail/1364">
  164.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/R32NEWMODEL25_TOP1.png" alt="Image 1"></a>
  165.         <a href="https://www.nakatomishop.com/products/detail/1365">
  166.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/R32NEWMODEL25_TOP2.png" alt="Image 1"></a>
  167.         <a href="https://www.nakatomishop.com/products/detail/1366">
  168.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/R32NEWMODEL25_TOP3.png" alt="Image 1"></a>
  169.         <a href="https://www.nakatomishop.com/products/detail/1367">
  170.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/R32NEWMODEL25_TOP4.png" alt="Image 1"></a>     
  171.         <a href="https://www.nakatomishop.com/products/detail/1369">
  172.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/R32NEWMODEL25_TOP5.png" alt="Image 1"></a>
  173.         </p>
  174.     </div>
  175.     <div>
  176.         <p class="p_example_sm25_sl_b">スタンダードモデル<br>
  177.         <a href="https://www.nakatomishop.com/products/list?category_id=94">
  178.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/STANDARD25_TOP_POP1.png" alt="Image 1"></a>    
  179.         <a href="https://www.nakatomishop.com/products/detail/1336">
  180.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/STANDARD25_TOP1.png" alt="Image 1"></a>
  181.         <a href="https://www.nakatomishop.com/products/detail/1337">
  182.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/STANDARD25_TOP2.png" alt="Image 1"></a>
  183.         <a href="https://www.nakatomishop.com/products/detail/1338">
  184.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/STANDARD25_TOP3.png" alt="Image 1"></a>
  185.         <a href="https://www.nakatomishop.com/products/detail/1339">
  186.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/STANDARD25_TOP4.png" alt="Image 1"></a>       
  187.         <a href="https://www.nakatomishop.com/products/detail/1340">
  188.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/STANDARD25_TOP5.png" alt="Image 1"></a>      
  189.         </p>
  190.     </div>
  191.     <div>
  192.         <p class="p_example_sm25_sl_b">ビッグファン<br>
  193.         <a href="https://www.nakatomishop.com/products/list?category_id=28">
  194.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/BIG_FAN_SL_POP.png" alt="Image 1"></a>        
  195.         <a href="https://www.nakatomishop.com/products/detail/1376">
  196.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/BIG_FAN_SL1.png" alt="Image 1"></a>
  197.         <a href="https://www.nakatomishop.com/products/detail/1361">
  198.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/BIG_FAN_SL2.png" alt="Image 1"></a>
  199.         <a href="https://www.nakatomishop.com/products/detail/1362">
  200.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/BIG_FAN_SL3.png" alt="Image 1"></a>
  201.         <a href="https://www.nakatomishop.com/products/detail/1363">
  202.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/BIG_FAN_SL4.png" alt="Image 1"></a>       
  203.         <a href="https://www.nakatomishop.com/products/detail/1360">
  204.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/BIG_FAN_SL5.png" alt="Image 1"></a>    
  205.         </p>
  206.     </div>
  207.     <div>
  208.         <p class="p_example_sm25_sl_b">工場扇<br>  
  209.         <a href="https://www.nakatomishop.com/products/list?category_id=17">
  210.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/FACTORY_FAN_TOP_POP.png" alt="Image 1"></a>
  211.         <a href="https://www.nakatomishop.com/products/detail/1330">
  212.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/FACTORY_FAN_SL1" alt="Image 1"></a>
  213.         <a href="https://www.nakatomishop.com/products/detail/1327">
  214.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/FACTORY_FAN_SL2.png" alt="Image 1"></a>
  215.         <a href="https://www.nakatomishop.com/products/detail/1331">
  216.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/FACTORY_FAN_SL3.png" alt="Image 1"></a>       
  217.         <a href="https://www.nakatomishop.com/products/detail/1328">
  218.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/FACTORY_FAN_SL4.png" alt="Image 1"></a>          
  219.         <a href="https://www.nakatomishop.com/products/detail/1329">
  220.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/FACTORY_FAN_SL5.png" alt="Image 1"></a>          
  221.         </p>
  222.     </div>
  223.     <div>
  224.         <p class="p_example_sm25_sl_b">循環送風機 / 大型送風機<br>  
  225.         <a href="https://www.nakatomishop.com/products/detail/1351">
  226.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/CIR_LAR_TOP_POP.png" alt="Image 1"></a>
  227.         <a href="https://www.nakatomishop.com/products/detail/1351">
  228.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/CIR_LAR_SL1.png" alt="Image 1"></a>
  229.         <a href="https://www.nakatomishop.com/products/detail/1351">
  230.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/CIR_LAR_SL2.png" alt="Image 1"></a>
  231.         <a href="https://www.nakatomishop.com/products/detail/1351">
  232.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/CIR_LAR_SL3.png" alt="Image 1"></a>       
  233.         <a href="https://www.nakatomishop.com/products/detail/1351">
  234.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/CIR_LAR_SL4.png" alt="Image 1"></a>          
  235.         <a href="https://www.nakatomishop.com/products/detail/1351">
  236.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/CIR_LAR_SL5.png" alt="Image 1"></a>          
  237.         </p>
  238.     </div>
  239.         <div>
  240.         <p class="p_example_sm25_sl_b">ミスト発生機 / 冷風扇<br>  
  241.         <a href="https://www.nakatomishop.com/products/detail/1377">
  242.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/MIST_COOL_SL1.png" alt="Image 1"></a>
  243.         <a href="https://www.nakatomishop.com/products/detail/1378">
  244.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/MIST_COOL_SL2.png" alt="Image 1"></a>
  245.         <a href="https://www.nakatomishop.com/products/detail/1379">
  246.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/MIST_COOL_SL3.png" alt="Image 1"></a>
  247.         <a href="https://www.nakatomishop.com/products/detail/436">
  248.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/MIST_COOL_SL4.png" alt="Image 1"></a>       
  249.         <a href="https://www.nakatomishop.com/products/detail/437">
  250.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/MIST_COOL_SL5.png" alt="Image 1"></a>          
  251.         <a href="https://www.nakatomishop.com/products/detail/438">
  252.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/MIST_COOL_SL6.png" alt="Image 1"></a>          
  253.         </p>
  254.     </div>
  255.     <div>
  256.         <p class="p_example_sm25_sl_b">除湿機<br>  
  257.         <a href="https://www.nakatomishop.com/products/detail/1372">
  258.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/DEHUMIDIFIER_SL1.png" alt="Image 1"></a>
  259.         <a href="https://www.nakatomishop.com/products/detail/106">
  260.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/DEHUMIDIFIER_SL2.png" alt="Image 1"></a>
  261.         <a href="https://www.nakatomishop.com/products/detail/108">
  262.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/DEHUMIDIFIER_SL3.png" alt="Image 1"></a>
  263.         <a href="https://www.nakatomishop.com/products/detail/668">
  264.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/DEHUMIDIFIER_SL4.png" alt="Image 1"></a>       
  265.         <a href="https://www.nakatomishop.com/products/detail/667">
  266.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/DEHUMIDIFIER_SL5.png" alt="Image 1"></a>          
  267.         <a href="https://www.nakatomishop.com/products/detail/109">
  268.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/DEHUMIDIFIER_SL6.png" alt="Image 1"></a>          
  269.         </p>
  270.     </div>
  271.     <div>
  272.         <p class="p_example_sm25_sl_b">SHOP information<br>  
  273.         <a href="https://www.nakatomi-sangyo.com/index.html">
  274.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/INFO_SL5.png" alt="Image 1"></a>
  275.         <a href="https://www.nakatomi-sangyo.com/catalog/index.html">
  276.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/25CATALOG_TOP.png" alt="Image 1"></a>       
  277.         <a href="https://www.nakatomishop.com/user_data/3nenhosyoukiyaku">
  278.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/INFO_SL3.png" alt="Image 1"></a>
  279.         <a href="https://www.nakatomishop.com/entry">
  280.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/INFO_SL4.png" alt="Image 1"></a>  
  281.         <a href="https://page.line.me/420khjyx?openQrModal=true">
  282.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/INFO_SL2.png" alt="Image 1"></a>
  283.         <a href="https://www.nakatomishop.com/user_data/2025spop">
  284.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_model.png" alt="Image 1"></a>              
  285.         <a href="https://www.nakatomishop.com/guide">
  286.           <img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/INFO_SL1.png" alt="Image 1"></a>
  287.         </p> 
  288.     </div>
  289.   </div>
  290.     <!-- 左右のボタン -->
  291.     <span id="prev_b" class="prev_b"></span>
  292.     <span id="next_b" class="next_b"></span>
  293.     <!-- インジケーター -->
  294.     <ul class="indicator_b" id="indicator_b">
  295.       <li class="list_b"></li>
  296.       <li class="list_b"></li>
  297.       <li class="list_b"></li>
  298.       <li class="list_b"></li>
  299.       <li class="list_b"></li>
  300.       <li class="list_b"></li>
  301.       <li class="list_b"></li>
  302.       <li class="list_b"></li>
  303.     </ul>
  304. </div>    
  305. </body>
  306. </html>
  307. <script>
  308.   const slide_b = document.getElementById('slide_b');
  309.   const prev_b = document.getElementById('prev_b');
  310.   const next_b = document.getElementById('next_b');
  311.   const indicator_b = document.getElementById('indicator_b');
  312.   const lists_b = document.querySelectorAll('.list_b');
  313.   const totalSlides_b = lists_b.length;
  314.   let count_b = 0;
  315.   let autoPlayInterval_b;
  316.   function updateListBackground_b() {
  317.     for (let i = 0; i < lists_b.length; i++) {
  318.     lists_b[i].style.backgroundColor = i === count_b % totalSlides_b ? '#000' : '#fff';
  319.   }
  320. }
  321. function nextClick_b() {
  322.   slide_b.classList.remove(`slide_b${count_b % totalSlides_b + 1}`);
  323.   count_b++;
  324.   slide_b.classList.add(`slide_b${count_b % totalSlides_b + 1}`);
  325.   updateListBackground_b();
  326. }
  327. function prevClick_b() {
  328.   slide_b.classList.remove(`slide_b${count_b % totalSlides_b + 1}`);
  329.   count_b--;
  330.   if (count_b < 0) count_b = totalSlides_b - 1;
  331.   slide_b.classList.add(`slide_b${count_b % totalSlides_b + 1}`);
  332.   updateListBackground_b();
  333. }
  334. function startAutoPlay() {
  335.   autoPlayInterval_b = setInterval(nextClick_b, 6000);
  336. }
  337. function resetAutoPlayInterval() {
  338.   clearInterval(autoPlayInterval_b);
  339.   startAutoPlay();
  340. }
  341. prev_b.addEventListener('click', () => {
  342.   prevClick_b();
  343.   resetAutoPlayInterval();
  344. });
  345. next_b.addEventListener('click', () => {
  346.   nextClick_b();
  347.   resetAutoPlayInterval();
  348. });
  349. indicator_b.addEventListener('click', (event_b) => {
  350.   if (event_b.target_b.classList.contains('list_b')) {
  351.   const index_b = Array.from(lists_b).indexOf(event_b.target_b);
  352.     slide_b.classList.remove(`slide_b${count_b % totalSlides_b + 1}`);
  353.     count_b = index_b;
  354.     slide_b.classList.add(`slide_b${count_b % totalSlides_b + 1}`);
  355.     updateListBackground_b();
  356.     resetAutoPlayInterval();
  357.   }
  358. });
  359.   startAutoPlay();
  360.   </script>
  361.     
  362. {% endblock %}