From 5da341dde2de2ddea54acf08926dac2acca9cc54 Mon Sep 17 00:00:00 2001 From: ncoronel Date: Wed, 5 Aug 2026 16:16:46 -0300 Subject: [PATCH] feat: improve hero banner responsiveness and enhance event card layout --- .../hero-banner/hero-banner.component.html | 19 +- .../hero-banner/hero-banner.component.scss | 163 +++++++++++++++--- 2 files changed, 157 insertions(+), 25 deletions(-) diff --git a/src/app/shared/components/hero-banner/hero-banner.component.html b/src/app/shared/components/hero-banner/hero-banner.component.html index e544c02..0846a7b 100644 --- a/src/app/shared/components/hero-banner/hero-banner.component.html +++ b/src/app/shared/components/hero-banner/hero-banner.component.html @@ -1,8 +1,12 @@
-
+ @if (heroConfig) { } diff --git a/src/app/shared/components/hero-banner/hero-banner.component.scss b/src/app/shared/components/hero-banner/hero-banner.component.scss index b999bc4..52a25cd 100644 --- a/src/app/shared/components/hero-banner/hero-banner.component.scss +++ b/src/app/shared/components/hero-banner/hero-banner.component.scss @@ -5,22 +5,25 @@ .hero-banner { background-color: #e9ecef; - background-size: cover; - background-position: center; min-height: 400px; display: flex; flex-direction: column; +} - &::before { +.hero-media { + position: absolute; + inset: 0; + background-position: center; + background-repeat: no-repeat; + background-size: cover; + border-radius: inherit; + + &::after { content: ""; position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; + inset: 0; background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0.95) 100%); border-radius: inherit; - z-index: 1; } } @@ -85,27 +88,147 @@ font-weight: 500; } -@media (max-width: 768px) { - .hero-banner::before { - background: none; +.event-schedule-label { + display: none; +} + +@media (max-width: 767.98px) { + .hero-banner-container { + padding-bottom: 0; + margin-bottom: 0; + } + + .hero-banner { + min-height: 0; + overflow: hidden; + background-color: #f5f5f5; + } + + .hero-media { + position: relative; + inset: auto; + flex: 0 0 auto; + width: 100%; + height: clamp(8.75rem, 44vw, 10.5rem); + background-position: center center; + background-size: 140% auto; + border-radius: 0; + } + + .hero-media::after { + top: auto; + height: 48%; + background: linear-gradient( + to bottom, + rgba(245, 245, 245, 0) 0%, + rgba(245, 245, 245, 0.78) 55%, + #f5f5f5 100% + ); + border-radius: 0; } .hero-content { justify-content: center !important; - background: none; + height: auto !important; + min-height: 8.25rem; + margin-top: -1.7rem; + padding: 0 1.25rem 1.75rem !important; + align-items: flex-start !important; } - + .hero-text-box { + width: 100%; + max-width: 19rem; + padding: 0; text-align: center; - background: rgba(255, 255, 255, 0.8); - border-radius: 8px; + background: transparent; + border-radius: 0; } - + + ::ng-deep .hero-title, + .hero-title { + margin-bottom: 0.4rem; + font-size: 0.875rem; + line-height: 1.2; + } + + ::ng-deep .hero-title p, + ::ng-deep .hero-description p { + margin-bottom: 0; + } + + ::ng-deep .hero-description, + .hero-description { + font-size: 0.75rem; + line-height: 1.25; + } + + .hero-action { + margin-top: 1rem !important; + } + + .hero-action ::ng-deep .btn { + min-height: 1.875rem; + padding: 0.4rem 1.35rem; + border-radius: 0.25rem; + font-size: 0.625rem; + } + .event-card-container { - bottom: -80px; + position: relative !important; + bottom: auto; + left: auto; + padding: 0 1.25rem 1.2rem; } - - .hero-banner-container { - padding-bottom: 6rem; + + .event-card { + width: 100%; + max-width: 22rem; + min-height: 11.4rem; + padding: 1.75rem 1rem 0.8rem !important; + border-radius: 0 !important; + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04) !important; + } + + .event-title { + max-width: 16rem; + margin: 0 auto 0.85rem !important; + font-size: 1rem; + line-height: 1.1; + letter-spacing: 0; + } + + .event-details { + gap: 0.45rem !important; + font-size: 0.7rem; + line-height: 1.25; + } + + .event-details > div { + gap: 0.5rem !important; + } + + .event-icon { + width: 0.9rem; + font-size: 0.85rem; + } + + .event-info-text { + font-weight: 400; + } + + .event-schedule-label { + display: flex; + justify-content: center; + align-items: center; + gap: 0.55rem; + margin-top: 1.9rem; + color: var(--tenant-primary, #009d4f); + font-size: 0.625rem; + font-weight: 700; + } + + .event-schedule-label i { + font-size: 0.65rem; } }