/* Berlin Döner Rauma — Ice Cream page */
const THEME_URL = (document.getElementById('berlin-doner-icecream-js')?.src.replace('/assets/icecream-app.jsx', '').split('?')[0])
|| 'https://berlin2.demowpsite.com/wp-content/themes/berlin-doner-rauma';
const { useState, useEffect, useRef } = React;
const ICE_CREAM = [
{ name: 'Cherry', img: 'assets/icecream/Cherry-kirsikka.png' },
{ name: 'Mango Yogurt', img: 'assets/icecream/Mango yogurt-mangojogurtti-etusivu.png' },
{ name: 'Chili Chocolate Orange', img: 'assets/icecream/Chili chocolate orange-chili-suklaa-appelsiini.png' },
{ name: 'Superman', img: 'assets/icecream/SUPERMAN-Superman-Azzurro.png' },
{ name: 'Licorice', img: 'assets/icecream/Licorice-lakritsi.png' },
{ name: 'Creme Brulee', img: 'assets/icecream/Creme Brulee-Creme-Brulee-Crema-Catalana.png' },
{ name: 'Stracciatella', img: 'assets/icecream/Stracciatella-Stracciatella.png' },
{ name: 'Orange', img: 'assets/icecream/Orange-Appelsiini.png' },
];
function IceCream() {
const [currentIndex, setCurrentIndex] = useState(0);
const [isMobile, setIsMobile] = useState(false);
const containerRef = useRef(null);
const [containerWidth, setContainerWidth] = useState(0);
useEffect(() => {
function update() {
setIsMobile(window.innerWidth <= 768);
if (containerRef.current) setContainerWidth(containerRef.current.offsetWidth);
}
update();
window.addEventListener('resize', update);
return () => window.removeEventListener('resize', update);
}, []);
const gap = 16;
const visibleCount = isMobile ? 1 : 3;
const maxIndex = ICE_CREAM.length - visibleCount;
const cardWidth = containerWidth > 0 ? (containerWidth - (visibleCount - 1) * gap) / visibleCount : 220;
const translateX = currentIndex * (cardWidth + gap);
const prev = () => setCurrentIndex(i => Math.max(0, i - 1));
const next = () => setCurrentIndex(i => Math.min(maxIndex, i + 1));
const arrowStyle = (disabled) => ({
width: 44, height: 44, borderRadius: '50%',
border: `1px solid ${disabled ? 'rgba(255,255,255,0.1)' : '#7dddd8'}`,
background: disabled ? 'transparent' : '#7dddd8',
color: disabled ? 'rgba(255,255,255,0.25)' : '#0a0a0a',
fontSize: 22, cursor: disabled ? 'not-allowed' : 'pointer',
display: 'flex', alignItems: 'center', justifyContent: 'center',
transition: 'all 0.2s', lineHeight: 1,
});
return (
Premium Flavours.
We brought the best of both worlds to Rauma. Premium Minetti ice cream — one of the most respected brands on the market — now available alongside our döner. First-class döner meets premium level ice cream.
Find us at Savilankatu 6, Rauma. Open 7 days a week.
Find Us →