Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ForecastBoxer texts overflow #959

Merged
merged 1 commit into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions src/components/ForecastBoxer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,33 @@ const { image, imageAlt, boxerId, boxerName, boxerHref, isSmall = false } = Astr

<a
href={boxerHref}
class="group overflow-hidden transition-transform hover:scale-105"
class:list={[
"group relative transition-transform hover:scale-105 ",
isSmall ? "pb-[68px]" : "pb-[72px] md:pb-[96px]",
]}
aria-label={`Ir a la página de ${boxerName}`}
>
<article>
<img decoding="async" class="image" src={image} alt={imageAlt} />
<h3
class:list={[
"text-center font-medium uppercase text-white transition-transform group-hover:scale-125 md:group-hover:scale-150",
isSmall && "text-lg",
!isSmall && "text-2xl",
]}
>
{boxerName}
</h3>
<h4
data-id={boxerId}
class:list={[
"boxer-forecast mt-1 text-center font-semibold text-accent transition-transform group-hover:scale-75",
isSmall && "text-3xl",
!isSmall && "text-6xl",
]}
>
&nbsp;
</h4>
<div class="absolute bottom-0 left-2/4 -translate-x-2/4 text-center">
<h3
class:list={[
"text-nowrap font-medium uppercase text-white transition-transform group-hover:scale-110 md:group-hover:scale-150",
isSmall ? "text-lg" : "text-2xl",
]}
>
{boxerName}
</h3>
<h4
data-id={boxerId}
class:list={[
"boxer-forecast mt-1 text-3xl font-semibold text-accent transition-transform group-hover:scale-75",
!isSmall && "md:text-6xl",
]}
>
&nbsp;
</h4>
</div>
</article>
</a>

Expand Down
Loading