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

496 fix h1 in hero section on mobile #518

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
42 changes: 38 additions & 4 deletions src/containers/hero/layout-04/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,44 @@ const HeroArea = ({
className="tw-m-2.5"
onClick={() => setOpen(true)}
>
<i
className={clsx(
buttons[1]?.icon,
"tw-mr-4"
<496-fix-h1-in-hero-section-on-mobile
{headings?.[0]?.content && (
<h1 className="tw-text-[46px] lg:tw-text-[56px] tw-leading-tight tw-font-medium tw-text-white">
{headings[0].content}{" "}
<span className="tw-text-primary tw-inline-block mobileToTab:tw-block mobileAnimation:tw-min-h-[115px]">
{animatedText}
<Cursor />
</span>
</h1>
)}
{texts?.map((text) => (
<p
key={text.id}
className="tw-text-lg tw-font-medium tw-leading-relaxed tw-text-white tw-mb-5 sm:tw-mb-8"
>
{text.content}
</p>
))}
<div className="tw-flex tw-items-center tw-justify-center tw-flex-wrap">
{buttons?.[0] && (
<Button {...buttons[0]} className="tw-m-2.5">
{buttons[0].content}
</Button>
)}
{buttons?.[1] && (
<Button
{...buttons[1]}
className="tw-m-2.5"
onClick={() => setOpen(true)}
>
<i
className={clsx(
buttons[1]?.icon,
"tw-mr-4"
)}
/>
{buttons[1].content}
</Button>
)}
/>
{buttons[1].content}
Expand Down
4 changes: 4 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ module.exports = {
// => @media (max-width: 1199px) { ... }
maxLg: { max: "991px" },
// => @media (max-width: 991px) { ... }
mobileAnimation: { max: "493px" },
// => @media (max-width: 495px) { ... }
mobileToTab: { max: "767px" },
// => @media(max-width:767px) { ... }
smToMd: { min: "576px", max: "767px" },
sm: "576px",
// => @media (min-width: 576px) { ... }
Expand Down
Loading