Skip to content

Commit

Permalink
add lotties
Browse files Browse the repository at this point in the history
  • Loading branch information
Jame committed Dec 12, 2023
1 parent 99134ca commit 5fea8db
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
17 changes: 11 additions & 6 deletions components/SectionIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,25 @@ import { usePage } from '@/hooks/usePage';
import ScrollHint from './ScrollHint';
import IconWithBg from './IconWithBg';
import ArrowDown from './ArrowDown';
import Lottie from 'lottie-react';
import paperLAnimation from '@/public/lotties/paper_l.json';
import paperRAnimation from '@/public/lotties/paper_r.json';

export default function SectionIntro() {
const { menuTabs, updatedDate } = useSnapshot(state);
const { goToSection } = usePage();

return (
<div className="relative overflow-x-hidden pb-14 lg:overflow-x-visible">
<CustomImg
src="/images/paper_intro.webp"
className="absolute -left-5 top-24 z-10 w-[78px] lg:top-[150px] lg:w-[260px]"
<Lottie
animationData={paperLAnimation}
loop={true}
className="absolute -left-5 top-0 z-10 w-[78px] lg:w-[260px]"
/>
<CustomImg
src="/images/paper_intro.webp"
className="absolute -right-5 top-24 z-10 w-[78px] -scale-x-100 lg:top-[150px] lg:w-[260px]"
<Lottie
animationData={paperRAnimation}
loop={true}
className="absolute -right-5 top-0 z-10 w-[78px] lg:w-[260px]"
/>
<div className="relative bg-grey3 pt-10 lg:pt-[100px]">
<CustomImg
Expand Down
18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@wevisdemo/ui": "^7.0.0",
"framer-motion": "^10.16.4",
"lodash": "^4.17.21",
"lottie-react": "^2.4.0",
"next": "14.0.0",
"react": "^18",
"react-dom": "^18",
Expand Down
Binary file removed public/images/paper_intro.webp
Binary file not shown.
1 change: 1 addition & 0 deletions public/lotties/paper_l.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/lotties/paper_r.json

Large diffs are not rendered by default.

0 comments on commit 5fea8db

Please sign in to comment.