Merge pull request 'style: added adaption to mobile & block animations' (#2) from style/adaptation-animation into main
All checks were successful
Deploy Olimparena / deploy (push) Successful in 14s

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2026-04-23 15:02:12 +00:00
7 changed files with 1476 additions and 663 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

58
assets/js/main.js Normal file
View File

@@ -0,0 +1,58 @@
(() => {
const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const selectors = [
".section__head",
".info-card",
".feature-card",
".object-card",
".service-card",
".gallery__item",
".review-card",
".stats article",
".booking__form",
".contacts-card",
".hours-card",
".footer__col",
".footer__bottom"
];
const elements = Array.from(document.querySelectorAll(selectors.join(",")));
if (!elements.length) return;
const siblingCounters = new WeakMap();
elements.forEach((element) => {
element.classList.add("scroll-reveal");
const parent = element.parentElement;
let offsetIndex = 0;
if (parent) {
offsetIndex = siblingCounters.get(parent) ?? 0;
siblingCounters.set(parent, offsetIndex + 1);
}
element.style.setProperty("--reveal-delay", `${(offsetIndex % 4) * 80}ms`);
});
if (reduceMotion || !("IntersectionObserver" in window)) {
elements.forEach((element) => element.classList.add("is-visible"));
return;
}
const observer = new IntersectionObserver(
(entries, currentObserver) => {
entries.forEach((entry) => {
if (!entry.isIntersecting) return;
entry.target.classList.add("is-visible");
currentObserver.unobserve(entry.target);
});
},
{
threshold: 0.18,
rootMargin: "0px 0px -12% 0px"
}
);
elements.forEach((element) => observer.observe(element));
})();

File diff suppressed because it is too large Load Diff

View File

@@ -12,3 +12,9 @@
border-radius: $radius-md; border-radius: $radius-md;
box-shadow: $shadow-card; box-shadow: $shadow-card;
} }
@mixin respond($breakpoint) {
@media only screen and (max-width: $breakpoint) {
@content;
}
}

View File

@@ -1,6 +1,12 @@
$container: 1400px; $container: 1400px;
$container-padding: 24px; $container-padding: 24px;
$bp-xxl: 1600px;
$bp-xl: 1280px;
$bp-lg: 1024px;
$bp-md: 768px;
$bp-sm: 520px;
$font-main: "Segoe UI", "Segoe UI Variable", "Helvetica Neue", Arial, sans-serif; $font-main: "Segoe UI", "Segoe UI Variable", "Helvetica Neue", Arial, sans-serif;
$color-bg: #121212; $color-bg: #121212;

View File

@@ -308,5 +308,7 @@
</div> </div>
</footer> </footer>
</div> </div>
<script src="./assets/js/main.js" defer></script>
</body> </body>
</html> </html>