From c9d4f62ba9b4025392a5e068fba20ed059769cdc Mon Sep 17 00:00:00 2001 From: isUnknown Date: Tue, 5 Nov 2024 11:53:46 +0100 Subject: [PATCH] fix header overflow --- assets/css/src/hero.css | 12 +++++++++--- site/templates/home.php | 14 +++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/assets/css/src/hero.css b/assets/css/src/hero.css index f1d3a60..6279335 100644 --- a/assets/css/src/hero.css +++ b/assets/css/src/hero.css @@ -11,10 +11,14 @@ .hero__text { position: relative; + display: flex; + flex-direction: column; + justify-content: space-between; + overflow: auto; } .hero__text h2 { - font-size: var(--font-size-xl); + font-size: max(4.167vw, 3rem); width: 100%; margin-bottom: var(--padding-vertical); } @@ -40,9 +44,8 @@ } .hero__link { - position: absolute; - bottom: 0; font-weight: bold; + margin-top: var(--space-m); } .hero__link::before { display: inline-block; @@ -80,6 +83,9 @@ .hero__text h3 { text-align: left !important; } + .hero__text h2 { + font-size: var(--font-size-xl); + } .hero__text h2.big { font-size: calc(var(--font-size-xxl) / 1.2); text-align: left; diff --git a/site/templates/home.php b/site/templates/home.php index 6d28124..aa0de81 100644 --- a/site/templates/home.php +++ b/site/templates/home.php @@ -2,7 +2,9 @@
heroMode() == 'custom'): ?>
- heroText()->toBlocks() ?> +
+ heroText()->toBlocks() ?> +
heroLinkUrl()->isNotEmpty() == 'true'): ?> heroLinkText()->isNotEmpty() == 'true', $site->heroLinkText(), $site->heroLinkUrl()->toUrl()) ?> @@ -25,10 +27,12 @@ heroEvent()->toPage(); ?>
-

- title() ?> -

- chapo() ?> +
+

+ title() ?> +

+ chapo() ?> +
Découvrir