-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a60a1c
commit 68567ad
Showing
141 changed files
with
171 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.html linguist-detectable=false | ||
.png filter=lfs diff=lfs merge=lfs -text | ||
.gif filter=lfs diff=lfs merge=lfs -text |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Carousel with 50 Slides</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
} | ||
.carousel-container { | ||
width: 900px; | ||
height: 900px; | ||
overflow: hidden; | ||
position: relative; | ||
margin: auto; | ||
border: 2px solid #ccc; | ||
} | ||
|
||
.carousel { | ||
display: flex; | ||
width: calc(900px * 50); | ||
height: 900px; | ||
transition: transform 0.5s ease; | ||
} | ||
|
||
.slide { | ||
width: 900px; | ||
height: 900px; | ||
flex-shrink: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: #000; | ||
} | ||
|
||
.slide img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
|
||
.controls { | ||
position: absolute; | ||
top: 50%; | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
transform: translateY(-50%); | ||
pointer-events: none; | ||
} | ||
|
||
.controls button { | ||
background-color: rgba(0, 0, 0, 0.5); | ||
color: white; | ||
border: none; | ||
padding: 10px; | ||
cursor: pointer; | ||
pointer-events: all; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="carousel-container"> | ||
<div class="carousel" id="carousel"> | ||
</div> | ||
<div class="controls"> | ||
<button id="prevBtn"><</button> | ||
<button id="nextBtn">></button> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
const carousel = document.getElementById('carousel'); | ||
for (let i = 1; i <= 49; i++) { | ||
const slide = document.createElement('div'); | ||
slide.className = 'slide'; | ||
|
||
const table = document.createElement('table'); | ||
table.width = "880"; | ||
|
||
const tr1 = document.createElement('tr'); | ||
const td1 = document.createElement('td'); | ||
const img1 = document.createElement('img'); | ||
img1.src = `media/outputs/frame_${String(i).padStart(2, '0')}/icp.gif`; | ||
img1.alt = `Slide ${i} - Image 1`; | ||
td1.appendChild(img1); | ||
tr1.appendChild(td1); | ||
|
||
const tr2 = document.createElement('tr'); | ||
const td2 = document.createElement('td'); | ||
const img2 = document.createElement('img'); | ||
img2.src = `media/outputs/frame_${String(i).padStart(2, '0')}/results.png`; | ||
img2.alt = `Slide ${i} - Image 2`; | ||
td2.appendChild(img2); | ||
tr2.appendChild(td2); | ||
|
||
table.appendChild(tr1); | ||
table.appendChild(tr2); | ||
|
||
slide.appendChild(table); | ||
carousel.appendChild(slide); | ||
} | ||
|
||
let currentIndex = 0; | ||
|
||
const slides = document.querySelectorAll('.slide'); | ||
const totalSlides = slides.length; | ||
|
||
document.getElementById('prevBtn').addEventListener('click', () => { | ||
currentIndex = (currentIndex === 0) ? totalSlides - 1 : currentIndex - 1; | ||
updateCarousel(); | ||
}); | ||
|
||
document.getElementById('nextBtn').addEventListener('click', () => { | ||
currentIndex = (currentIndex === totalSlides - 1) ? 0 : currentIndex + 1; | ||
updateCarousel(); | ||
}); | ||
|
||
function updateCarousel() { | ||
const translateXValue = -currentIndex * 900; | ||
carousel.style.transform = `translateX(${translateXValue}px)`; | ||
} | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.