{% block main %}
<style>
*,body,ul {
margin: 0;
padding: 0;
}
li {
list-style: none;
}
/* ↓ スライドの外枠 */
.slide-wrapper_a {
width: 100%;
height: auto;
position: relative;
overflow: hidden; /* はみ出したスライドを隠す */
}
/* ↓ スライド(コンテンツ) */
.slide_a { /*スライド全体 */
width: 500%;
height: 100%;
display: flex;
transition: all 3.0s;
}
.slide_a div { /* スライド */
width: 20.00%;
display: flex;
text-align: center;
justify-content: center;
align-items: center;
}
.slide_a1 { /* スライドさせるために必要なクラス */
transform: translateX(0);
}
.slide_a2 { /* スライドさせるために必要なクラス */
transform: translateX(-20.00%);
}
.slide_a3 { /* スライドさせるために必要なクラス */
transform: translateX(-40.00%);
}
.slide_a4 { /* スライドさせるために必要なクラス */
transform: translateX(-60.00%);
}
.slide_a5 { /* スライドさせるために必要なクラス */
transform: translateX(-80.00%);
}
.slide_a div:nth-of-type(1){ /* 背景色 */
/*background-image: url("https://nakatomishop.sakura.ne.jp/prod/MailMagazine/img/sm2025_top.png");*/
background-size: cover;
background-color: #E1F3FC;
}
.slide_a div:nth-of-type(2){ /* 背景色 */
background-color: #E1F3FC;
}
.slide_a div:nth-of-type(3){ /* 背景色 */
background-color: #E1F3FC;
}
.slide_a div:nth-of-type(4){ /* 背景色 */
background-color: #E1F3FC;
}
.slide_a div:nth-of-type(5){ /* 背景色 */
background-color: #e6e6fa;
}
/* ↓ 左右のボタン */
.next_a {
position: absolute;
width: 15px;
height: 15px;
right: 10px;
bottom: 50%;
z-index: 10;
cursor: pointer;
border-top: solid 3px #000;
border-right: solid 3px #000;
-webkit-transform: rotate(45deg) translateY(50%);
transform: rotate(45deg) translateY(50%);
}
.prev_a {
position: absolute;
width: 15px;
height: 15px;
left: 25px;
bottom: 50%;
z-index: 10;
cursor: pointer;
border-top: solid 3px #000;
border-right: solid 3px #000;
-webkit-transform: rotate(-135deg) translateY(-50%);
transform: rotate(-135deg) translateY(-50%);
}
/* ↓ インジケーター */
.indicator_a {
width: 100%;
position: absolute;
bottom: 5px;
display: flex;
column-gap: 18px;
z-index: 10;
justify-content: center;
align-items: center;
}
.indicator_a li {
width: 10px;
height: 10px;
border-radius: 50%;
list-style: none;
background-color: #fff;
border: 2px #dcdcdc solid;
cursor: pointer;
}
.indicator_a li:first-of-type {
background-color: #000;
}
.fit-picture_sl {
cursor: pointer;
width: 10%;
padding-top: 0.5%;
padding-bottom: 1%;
padding-right: 1%;
padding-right: 1%
}
.p_example_sm25_sl_a {
font-size: 21px;
font-weight: 700;
text-align: center;
padding-top: 2px;
}
</style>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>スライドショー</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- スライドの外枠 -->
<div class="slide-wrapper_a">
<!-- スライド(コンテンツ) -->
<div id="slide_a" class="slide_a">
<div>
<p class="p_example_sm25_sl_a">SPOT COOLER【OPTION】<br>
<a href="https://www.nakatomishop.com/products/detail/323">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_1.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/321">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_2.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/328">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_3.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/327">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_4.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/1349">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_5.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/517">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_6.png" alt="Image 1"></a>
</p>
</div>
<div>
<p class="p_example_sm25_sl_a">SPOT COOLER【OPTION】<br>
<a href="https://www.nakatomishop.com/products/detail/325">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP2_1.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/326">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP2_2.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/322">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP2_3.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/324">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP2_4.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/131">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP2_5.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/336">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP2_6.png" alt="Image 1"></a>
</p>
</div>
<div>
<p class="p_example_sm25_sl_a">SPOT COOLER【OPTION】<br>
<a href="https://www.nakatomishop.com/products/detail/1357">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP3_1.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/1358">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP3_2.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/1359">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP3_3.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/335">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP3_4.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/list?category_id=16">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_fl.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/list?category_id=9">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_etc.png" alt="Image 1"></a>
</p>
</div>
<div>
<p class="p_example_sm25_sl_a">SPOT COOLER【OPTION】<br>
<a href="https://www.nakatomishop.com/products/detail/1342">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP4_1.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/130">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP4_2.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/132">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP4_3.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/110">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP4_4.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/detail/556">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP4_5.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/user_data/2025spop">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_model.png" alt="Image 1"></a>
</p>
</div>
<div>
<p class="p_example_sm25_sl_a">【OPTION】<br>
<a href="https://www.nakatomishop.com/products/list?category_id=15">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_duct.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/list?category_id=16">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_fl.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/list?category_id=9">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_etc.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/list?category_id=99">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_BF.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/list?category_id=27">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_FF.png" alt="Image 1"></a>
<a href="https://www.nakatomishop.com/products/list?category_id=61">
<img class="fit-picture_sl" src="https://nakatomishop.sakura.ne.jp/prod/merchandiseimage/25slider/OP_CF.png" alt="Image 1"></a>
</p>
</div>
</div>
<!-- 左右のボタン -->
<span id="prev_a" class="prev_a"></span>
<span id="next_a" class="next_a"></span>
<!-- インジケーター -->
<ul class="indicator_a" id="indicator_a">
<li class="list_a"></li>
<li class="list_a"></li>
<li class="list_a"></li>
<li class="list_a"></li>
<li class="list_a"></li>
</ul>
</div>
</body>
</html>
<script>
const slide_a = document.getElementById('slide_a');
const prev_a = document.getElementById('prev_a');
const next_a = document.getElementById('next_a');
const indicator_a = document.getElementById('indicator_a');
const lists_a = document.querySelectorAll('.list_a');
const totalSlides_a = lists_a.length;
let count_a = 0;
let autoPlayInterval_a;
function updateListBackground() {
for (let i = 0; i < lists_a.length; i++) {
lists_a[i].style.backgroundColor = i === count_a % totalSlides_a ? '#000' : '#fff';
}
}
function nextClick() {
slide_a.classList.remove(`slide_a${count_a % totalSlides_a + 1}`);
count_a++;
slide_a.classList.add(`slide_a${count_a % totalSlides_a + 1}`);
updateListBackground();
}
function prevClick() {
slide_a.classList.remove(`slide_a${count_a % totalSlides_a + 1}`);
count_a--;
if (count_a < 0) count_a = totalSlides_a - 1;
slide_a.classList.add(`slide_a${count_a % totalSlides_a + 1}`);
updateListBackground();
}
function startAutoPlay() {
autoPlayInterval_a = setInterval(nextClick, 7000);
}
function resetAutoPlayInterval() {
clearInterval(autoPlayInterval_a);
startAutoPlay();
}
prev_a.addEventListener('click', () => {
prevClick();
resetAutoPlayInterval();
});
next_a.addEventListener('click', () => {
nextClick();
resetAutoPlayInterval();
});
indicator_a.addEventListener('click', (event_a) => {
if (event_a.target.classList_a.contains('list_a')) {
const index_a = Array.from(lists_a).indexOf(event_a.target_a);
slide_a.classList.remove(`slide_a${count_a % totalSlides_a + 1}`);
count_a = index_a;
slide_a.classList.add(`slide_a${count_a % totalSlides_a + 1}`);
updateListBackground();
resetAutoPlayInterval();
}
});
startAutoPlay();
</script>
{% endblock %}