From 0d9b6456360b3c84789fef41e261f6c23ec31879 Mon Sep 17 00:00:00 2001 From: AdrianoDev Date: Thu, 2 Jul 2026 13:08:09 +0200 Subject: [PATCH] feat: animazioni stile template prowess (reveal, parallax, marquee, hero, hover) --- src/components/Agenda.astro | 6 ++--- src/components/Header.astro | 2 +- src/components/PageHero.astro | 2 +- src/components/home/FeatureBlocks.astro | 4 +-- src/components/home/HeroSlider.astro | 13 +++++++++ src/components/home/InfoColumns.astro | 4 +-- src/components/home/MethodSteps.astro | 6 ++--- src/components/home/PartnersStrip.astro | 2 +- src/components/home/ProgramsGrid.astro | 11 +++++--- src/components/home/QuoteBanner.astro | 35 ++++++++++++++++++++----- src/components/home/TeamSection.astro | 11 ++++---- src/components/home/TrainingCards.astro | 12 ++++++--- src/layouts/Base.astro | 35 +++++++++++++++++++++++++ src/pages/training.astro | 4 +-- src/styles/global.css | 16 +++++++++++ 15 files changed, 129 insertions(+), 34 deletions(-) diff --git a/src/components/Agenda.astro b/src/components/Agenda.astro index 116b0c0..db5839b 100644 --- a/src/components/Agenda.astro +++ b/src/components/Agenda.astro @@ -3,13 +3,13 @@ import { agenda, disciplines, days, slots } from '../data/agenda'; ---
-

Agenda

-
+

Agenda

+
{disciplines.map((d, i) => ( ))}
-
+
{days.map((d) =>
{d}
)} {slots.map((slot) => ( diff --git a/src/components/Header.astro b/src/components/Header.astro index 7c62429..6e722bb 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -21,7 +21,7 @@ const path = Astro.url.pathname; .hdr.is-scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.08); } .hdr__in { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); } .hdr__nav { display: flex; gap: 34px; } - .hdr__link { font-family: var(--font-heading); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--c-heading); } + .hdr__link { font-family: var(--font-heading); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--c-heading); transition: color .3s ease; } .hdr__link:hover, .hdr__link.is-active { color: var(--c-accent-dark); } .hdr__burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; } .hdr__burger span { display: block; width: 22px; height: 2px; background: var(--c-heading); margin: 5px 0; } diff --git a/src/components/PageHero.astro b/src/components/PageHero.astro index 7a4529f..28c4d65 100644 --- a/src/components/PageHero.astro +++ b/src/components/PageHero.astro @@ -3,7 +3,7 @@ interface Props { title: string; eyebrow?: string } const { title, eyebrow } = Astro.props; ---
-
+
{eyebrow &&

{eyebrow}

}

{title}

diff --git a/src/components/home/FeatureBlocks.astro b/src/components/home/FeatureBlocks.astro index 914f7fd..f35f301 100644 --- a/src/components/home/FeatureBlocks.astro +++ b/src/components/home/FeatureBlocks.astro @@ -16,8 +16,8 @@ const blocks = [
{blocks.map((b) => (
- {b.title} -
+ {b.title} +

{b.title}

{b.text}

Scopri diff --git a/src/components/home/HeroSlider.astro b/src/components/home/HeroSlider.astro index 75f3e9d..4bfc503 100644 --- a/src/components/home/HeroSlider.astro +++ b/src/components/home/HeroSlider.astro @@ -37,6 +37,19 @@ const slides = [ .hero__arrow { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 3rem; color: var(--c-heading); cursor: pointer; } .hero__arrow--prev { left: 12px; } .hero__arrow--next { right: 12px; } @media (max-width: 991px) { .hero__in { grid-template-columns: 1fr; padding-block: 40px; min-height: 0; } } + + /* Ingresso al load stile Slider Revolution del template */ + @keyframes hero-up { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } } + @keyframes hero-side { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } } + :global(html.js) .hero__line { opacity: 0; animation: hero-up .8s ease forwards; } + :global(html.js) .hero__line:nth-child(1) { animation-delay: .15s; } + :global(html.js) .hero__line:nth-child(2) { animation-delay: .3s; } + :global(html.js) .hero__line:nth-child(3) { animation-delay: .45s; } + :global(html.js) .hero__text .btn { opacity: 0; animation: hero-up .8s ease .7s forwards; } + :global(html.js) .hero__img { opacity: 0; animation: hero-side 1s ease .2s forwards; } + @media (prefers-reduced-motion: reduce) { + :global(html.js) .hero__line, :global(html.js) .hero__text .btn, :global(html.js) .hero__img { opacity: 1; animation: none; } + }