Skip to content

Commit

Permalink
fix: scale mobile anims
Browse files Browse the repository at this point in the history
  • Loading branch information
sragabor committed Feb 16, 2024
1 parent a07869f commit 09dd9f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/sections/two-column-h2.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const TwoColumnH2 = ({
<div className={"row align-items-center"}>

<div className={`col col-12 col-lg-6 anim-col ${animVersion === 2 && 'px-2'} ${direction === "rtl" ? "order-lg-2" : "order-lg-1"}`}>
{anim && <Lottie className={`lottie-anim-${animVersion}`} lottieRef={lottieRef} animationData={anim} loop={false} autoplay={false}
{anim && <Lottie
resizeMode="cover" className={`lottie-anim-${animVersion}`} lottieRef={lottieRef} animationData={anim} loop={false} autoplay={false}
renderer={"canvas"}
/>}
{!anim && <Image alt={title} filename={image} />}
Expand Down
12 changes: 12 additions & 0 deletions src/scss/sections/two-column-h2-section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
max-width:100%;
}
}

@include media-breakpoint-down(sm) {
transform: scale(1.5);
transform-origin: center !important;
margin-bottom:30px;
}
}
.lottie-anim-2{
width:680px;
Expand All @@ -92,6 +98,12 @@
max-width:100%;
}
}

@include media-breakpoint-down(sm) {
transform: scale(1.5);
transform-origin: center !important;
margin-bottom:30px;
}
}
}

Expand Down

0 comments on commit 09dd9f1

Please sign in to comment.