(function() {
'use strict';
function initTestimonialsCarousel() {
console.log('Inicjalizacja karuzeli opinii...');
var track = document.querySelector('.carousel-track-stilano');
var cards = document.querySelectorAll('.testimonial-card-stilano');
var leftArrow = document.querySelector('.carousel-arrow-left-stilano');
var rightArrow = document.querySelector('.carousel-arrow-right-stilano');
var indicatorsContainer = document.querySelector('.carousel-indicators-stilano');
if (!track) {
console.error('Nie znaleziono elementu .carousel-track-stilano');
return;
}
if (!cards || cards.length === 0) {
console.error('Nie znaleziono kart opinii');
return;
}
if (!leftArrow || !rightArrow) {
console.error('Nie znaleziono strzałek nawigacji');
return;
}
if (!indicatorsContainer) {
console.error('Nie znaleziono kontenera wskaźników');
return;
}
console.log('Znaleziono wszystkie elementy, uruchamiam karuzelę...');
console.log('Liczba kart: ' + cards.length);
var currentIndex = 0;
var totalSlides = cards.length;
// Tworzenie wskaźników
function createIndicators() {
indicatorsContainer.innerHTML = '';
for (var i = 0; i < totalSlides; i++) {
var dot = document.createElement('button');
dot.className = 'indicator-dot-stilano';
dot.setAttribute('aria-label', 'Przejdź do slajdu ' + (i + 1));
if (i === 0) {
dot.className += ' active';
}
(function(index) {
dot.onclick = function() {
goToSlide(index);
};
})(i);
indicatorsContainer.appendChild(dot);
}
console.log('Utworzono ' + totalSlides + ' wskaźników');
}
// Aktualizacja pozycji karuzeli
function updateCarousel() {
var cardWidth = cards[0].offsetWidth;
var gap = 25;
var moveAmount = (cardWidth + gap) * currentIndex;
track.style.transform = 'translateX(-' + moveAmount + 'px)';
console.log('Przesunięcie do slajdu: ' + currentIndex);
// Aktualizacja strzałek
leftArrow.disabled = currentIndex === 0;
rightArrow.disabled = currentIndex >= totalSlides - 1;
// Aktualizacja wskaźników
var dots = document.querySelectorAll('.indicator-dot-stilano');
for (var i = 0; i < dots.length; i++) {
if (i === currentIndex) {
dots[i].className = 'indicator-dot-stilano active';
} else {
dots[i].className = 'indicator-dot-stilano';
}
}
}
// Przejście do konkretnego slajdu
function goToSlide(index) {
if (index < 0) index = 0;
if (index >= totalSlides) index = totalSlides - 1;
currentIndex = index;
updateCarousel();
}
// Obsługa strzałki w lewo
leftArrow.onclick = function() {
if (currentIndex > 0) {
currentIndex--;
updateCarousel();
}
};
// Obsługa strzałki w prawo
rightArrow.onclick = function() {
if (currentIndex < totalSlides - 1) {
currentIndex++;
updateCarousel();
}
};
// Obsługa gestów dotykowych
var touchStartX = 0;
var touchEndX = 0;
track.addEventListener('touchstart', function(e) {
touchStartX = e.changedTouches[0].screenX;
}, false);
track.addEventListener('touchend', function(e) {
touchEndX = e.changedTouches[0].screenX;
var diff = touchStartX - touchEndX;
var threshold = 50;
if (Math.abs(diff) > threshold) {
if (diff > 0 && currentIndex < totalSlides - 1) {
currentIndex++;
updateCarousel();
} else if (diff < 0 && currentIndex > 0) {
currentIndex--;
updateCarousel();
}
}
}, false);
// Obsługa klawiatury
document.addEventListener('keydown', function(e) {
if (e.key === 'ArrowLeft' || e.keyCode === 37) {
if (currentIndex > 0) {
currentIndex--;
updateCarousel();
}
} else if (e.key === 'ArrowRight' || e.keyCode === 39) {
if (currentIndex < totalSlides - 1) {
currentIndex++;
updateCarousel();
}
}
});
// Responsive
var resizeTimer;
window.addEventListener('resize', function() {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
updateCarousel();
}, 250);
});
// Inicjalizacja
createIndicators();
updateCarousel();
console.log('Karuzela opinii została zainicjalizowana!');
}
// Uruchom gdy DOM jest gotowy
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initTestimonialsCarousel);
} else {
// DOM już załadowany - uruchom od razu
setTimeout(initTestimonialsCarousel, 100);
}
})();
-
-
-
Opis produktu marki OSKAR:
4x Krzesło BORA:
- ponadczasowy design połączony z doskonałą ergonomią
- model krzesła BORA doskonale pasuje do salonu, kuchni, sypialni czy jadalni
- funkcjonalność, wygoda użytkowania i wytrzymałość to główne zalety krzesła BORA
- krzesła dostępne są w kolorze CIEMNOSZARYM
Wymiary: (+/- 1 cm):
- wysokość krzesła - 81,5 cm
- wysokość siedziska - 44 cm
- szerokość krzesła - 44,5 cm
- szerokość siedziska - 44 cm
- głębokość krzesła - 54 cm
- głębokość siedziska - 38 cm
Specyfikacja:
- materiał siedziska: welur
- waga (netto) - ok. 3,6 kg
- krzesło do łatwego samodzielnego montażu
Dane logistyczne 4 x SKU 3755 waga 18 kg brutto - wymiary 60 x 60 x 55 cm.
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%
-24%