diff --git a/assets/Burger eating together.jpg b/assets/Burger eating together.jpg new file mode 100644 index 0000000..13536d7 Binary files /dev/null and b/assets/Burger eating together.jpg differ diff --git a/assets/Cake cutting figs.jpg b/assets/Cake cutting figs.jpg new file mode 100644 index 0000000..918d384 Binary files /dev/null and b/assets/Cake cutting figs.jpg differ diff --git a/assets/Cooking woman at home.jpg b/assets/Cooking woman at home.jpg new file mode 100644 index 0000000..7c352e8 Binary files /dev/null and b/assets/Cooking woman at home.jpg differ diff --git a/assets/Eating and laughing girls.jpg b/assets/Eating and laughing girls.jpg new file mode 100644 index 0000000..5fb4520 Binary files /dev/null and b/assets/Eating and laughing girls.jpg differ diff --git a/assets/Pasta and many forks.jpg b/assets/Pasta and many forks.jpg new file mode 100644 index 0000000..e795f02 Binary files /dev/null and b/assets/Pasta and many forks.jpg differ diff --git a/assets/Pasta in cheese.jpg b/assets/Pasta in cheese.jpg new file mode 100644 index 0000000..60d64d9 Binary files /dev/null and b/assets/Pasta in cheese.jpg differ diff --git a/assets/Red checkered social eating.jpg b/assets/Red checkered social eating.jpg new file mode 100644 index 0000000..e7b06b6 Binary files /dev/null and b/assets/Red checkered social eating.jpg differ diff --git a/assets/Salad roommates.jpg b/assets/Salad roommates.jpg new file mode 100644 index 0000000..77c1ee3 Binary files /dev/null and b/assets/Salad roommates.jpg differ diff --git a/assets/Sharing food table.jpg b/assets/Sharing food table.jpg new file mode 100644 index 0000000..181665a Binary files /dev/null and b/assets/Sharing food table.jpg differ diff --git a/assets/Spicy food zoomed.jpg b/assets/Spicy food zoomed.jpg new file mode 100644 index 0000000..0426e15 Binary files /dev/null and b/assets/Spicy food zoomed.jpg differ diff --git a/assets/Zoomed in asian eating.jpg b/assets/Zoomed in asian eating.jpg new file mode 100644 index 0000000..6fe4517 Binary files /dev/null and b/assets/Zoomed in asian eating.jpg differ diff --git a/assets/vecteezy_instagram-social-media-icon-symbol-element-vector-illustration_8385736.jpg b/assets/vecteezy_instagram-social-media-icon-symbol-element-vector-illustration_8385736.jpg new file mode 100644 index 0000000..e53859c Binary files /dev/null and b/assets/vecteezy_instagram-social-media-icon-symbol-element-vector-illustration_8385736.jpg differ diff --git a/css/landingpage.css b/css/landingpage.css index 85e9719..7a67ed6 100644 --- a/css/landingpage.css +++ b/css/landingpage.css @@ -254,29 +254,104 @@ body { } } -/* Container for the 3 photos */ +/* Carousel gallery */ +.gallery__carousel { + position: relative; +} + .gallery__track { - display: grid; - grid-template-columns: repeat(3, 1fr); + display: flex; gap: 20px; + overflow: hidden; margin-bottom: 30px; /* Space between photos and dots */ + scroll-behavior: smooth; +} + +.gallery__item { + flex: 0 0 calc((100% - 40px) / 3); + min-width: calc((100% - 40px) / 3); + border-radius: 24px; + overflow: hidden; + background: #fff; + box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06); + aspect-ratio: 2 / 3; +} + +.gallery__item img { + width: 100%; + height: 100%; + display: block; + object-fit: cover; +} + +.gallery__arrow { + position: absolute; + top: 50%; + transform: translateY(-50%); + width: 48px; + height: 48px; + display: grid; + place-items: center; + border-radius: 999px; + background: rgba(255, 255, 255, 0.55); + backdrop-filter: blur(12px); + border: 1px solid rgba(255, 255, 255, 0.55); + color: #221c1a; + cursor: pointer; + transition: transform 0.2s ease, background-color 0.2s ease; +} + +.gallery__arrow:hover { + transform: translateY(-50%) scale(1.05); + background: rgba(255, 255, 255, 0.8); +} + +.gallery__arrow--prev { + left: 0; +} + +.gallery__arrow--next { + right: 0; } /* Container for the dots to keep them in the middle */ -.gallery__dots { + +.gallery__center-arrow { display: flex; - justify-content: center; /* This is the "magic" line that centers them */ - gap: 12px; /* Space between the dots */ - width: 100%; + justify-content: center; + align-items: center; + margin-bottom: 24px; } -/* The actual black dots */ -.dot { - width: 12px; - height: 12px; - background-color: #000; /* Solid black */ - border-radius: 50%; /* Makes them round */ - display: inline-block; +.gallery__arrow--center { + width: 48px; + height: 48px; + display: grid; + place-items: center; + border-radius: 999px; + background: rgba(255, 255, 255, 0.55); + backdrop-filter: blur(12px); + border: 1px solid rgba(255, 255, 255, 0.55); + color: #221c1a; + cursor: pointer; + box-shadow: 0 2px 8px rgba(102, 52, 13, 0.08); + transition: transform 0.2s ease, background-color 0.2s ease; +} + +.gallery__arrow--center:hover { + background: rgba(255, 255, 255, 0.8); + transform: scale(1.05); +} + +@media (max-width: 900px) { + .gallery__track { + gap: 16px; + } + + .gallery__item { + flex: 0 0 100%; + min-width: 100%; + } } /* --- 2. Button & Link Styling --- */ diff --git a/index.html b/index.html index 5389a1c..faf704c 100644 --- a/index.html +++ b/index.html @@ -26,8 +26,8 @@
-

Events entdecken, Plätze sichern, Genuss teilen.

-

Finde kulinarische Erlebnisse in deiner Nähe oder erstelle dein eigenes Event – alles in einer warmen, einladenden Invité-Atmosphäre.

+

Dein Platz am Tisch wartet schon.

+

Egal, ob du leidenschaftlich gerne den Kochlöffel schwingst oder dich einfach auf ein hausgemachtes Essen in guter Gesellschaft freust: Bei Invité bringst du Menschen zusammen. Finde Events, die zu deinem Geschmack passen, und geniesse unkomplizierte Begegnungen ohne Networking-Zwang.

Anmelden
@@ -61,32 +61,70 @@
- + + diff --git a/js/index-carousel.js b/js/index-carousel.js new file mode 100644 index 0000000..aba54e1 --- /dev/null +++ b/js/index-carousel.js @@ -0,0 +1,54 @@ +const carouselTrack = document.querySelector('.gallery__track'); +const prevArrow = document.querySelector('.gallery__arrow--prev'); +const nextArrow = document.querySelector('.gallery__arrow--next'); +const centerArrow = document.querySelector('.gallery__arrow--center'); + +if (carouselTrack) { + const items = Array.from(carouselTrack.querySelectorAll('.gallery__item')); + const getItemsPerPage = () => (window.matchMedia('(max-width: 900px)').matches ? 1 : 3); + let itemsPerPage = getItemsPerPage(); + const pageCount = Math.ceil(items.length / itemsPerPage); + let activePage = 0; + + function scrollToPage(page) { + activePage = page; + const pageWidth = carouselTrack.clientWidth; + carouselTrack.scrollTo({ left: pageWidth * page, behavior: 'smooth' }); + } + + function showNext() { + activePage = (activePage + 1) % pageCount; + scrollToPage(activePage); + } + + function showPrev() { + activePage = (activePage - 1 + pageCount) % pageCount; + scrollToPage(activePage); + } + + function refreshCarousel() { + const responsiveItemsPerPage = getItemsPerPage(); + if (responsiveItemsPerPage !== itemsPerPage) { + itemsPerPage = responsiveItemsPerPage; + window.location.reload(); + } + } + + if (nextArrow) nextArrow.addEventListener('click', showNext); + if (prevArrow) prevArrow.addEventListener('click', showPrev); + if (centerArrow) centerArrow.addEventListener('click', showNext); + + document.addEventListener('keydown', (event) => { + if (event.key === 'ArrowRight') { + showNext(); + } + if (event.key === 'ArrowLeft') { + showPrev(); + } + }); + + window.addEventListener('resize', () => { + refreshCarousel(); + scrollToPage(activePage); + }); +}