-
Notifications
You must be signed in to change notification settings - Fork 82
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
ff1fe30
commit 3c5b7e1
Showing
16 changed files
with
180 additions
and
2 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,24 @@ | ||
.carousel-container { | ||
position: relative; | ||
width: 80%; | ||
max-width: 800px; | ||
margin: auto; | ||
overflow: hidden; | ||
} | ||
|
||
.carousel { | ||
display: flex; | ||
transition: transform 0.5s ease-in-out; | ||
} | ||
|
||
.carousel img { | ||
width: 100%; | ||
height: auto; | ||
} | ||
.prev { | ||
left: 0; | ||
} | ||
|
||
.next { | ||
right: 0; | ||
} |
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,24 @@ | ||
function setupCarousel() { | ||
let currentSlide = 0; | ||
const slides = document.querySelectorAll('.carousel img'); | ||
const totalSlides = slides.length; | ||
|
||
function moveSlide(direction) { | ||
currentSlide += direction; | ||
|
||
if (currentSlide < 0) { | ||
currentSlide = totalSlides - 1; | ||
} else if (currentSlide >= totalSlides) { | ||
currentSlide = 0; | ||
} | ||
|
||
updateCarouselPosition(); | ||
} | ||
|
||
function updateCarouselPosition() { | ||
const carousel = document.querySelector('.carousel'); | ||
const offset = -currentSlide * 100; | ||
carousel.style.transform = `translateX(${offset}%)`; | ||
} | ||
return { moveSlide } | ||
} |
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,9 @@ | ||
function setupIcon(iconf, el ) { | ||
const icon = document.createElement('img') | ||
icon.src = "./icons/"+iconf+".png" | ||
// icon.width = "20px" | ||
// icon.height = "20px" | ||
icon.style.width = "40px" | ||
icon.style.height = "40px" | ||
return el ? el.appendChild(icon) : icon | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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