Skip to content

Commit

Permalink
merge sett
Browse files Browse the repository at this point in the history
  • Loading branch information
Venn22 committed Jan 11, 2024
2 parents 2289147 + b694197 commit fe9970d
Show file tree
Hide file tree
Showing 26 changed files with 2,333 additions and 407 deletions.
1,026 changes: 1,016 additions & 10 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/react": "^2.8.2",
"@commitlint/cli": "^18.4.3",
"@dotlottie/react-player": "^1.6.12",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@next/bundle-analyzer": "^14.0.4",
Expand Down
Binary file added public/landing/banner-bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/landing/bvm-lego.lottie
Binary file not shown.
Binary file added public/landing/bvm-lego2.lottie
Binary file not shown.
28 changes: 14 additions & 14 deletions public/landing/drag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/landing/hero-bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/landing/noise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 13 additions & 5 deletions public/landing/subtract.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import MainLayout from '@/layouts/MainLayout';
import Landing from '@/modules/landing';
// import HomeModule from '@/modules/home';

export default function Home() {
return (
Expand All @@ -11,7 +10,3 @@ export default function Home() {
</MainLayout>
);
}

// export default function Home() {
// return <></>;
// }
40 changes: 40 additions & 0 deletions src/hooks/useIsInViewport.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { useEffect, useMemo, useState } from "react";

const defaultOptions = {
rootMargin: "0px 0px 0px 0px",
threshold: 1,
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function useIsInViewport(
ref: any,
customOptions?: IntersectionObserverInit
) {
const [isIntersecting, setIsIntersecting] = useState(false);

const options = useMemo(() => {
return customOptions
? { ...defaultOptions, ...customOptions }
: defaultOptions;
}, [customOptions]);

const observer = useMemo(
() =>
new IntersectionObserver(([entry]) => {
if (!entry) return setIsIntersecting(false);
return setIsIntersecting(entry.isIntersecting), options;
}),
[]
);

useEffect(() => {
ref.current && observer.observe(ref.current);

return () => {
ref.current && observer.unobserve(ref.current);
observer.disconnect();
};
}, [ref, observer]);

return isIntersecting;
}
2 changes: 0 additions & 2 deletions src/layouts/MainLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
'use client';

// import Footer from '@/layouts/Footer';
import Header, { HeaderProps } from '@/layouts/Header';
import { useEffect } from 'react';
import { usePathname } from 'next/navigation';
import useAnimationStore from '@/stores/useAnimationStore';
// import s from './styles.module.scss';

type IMainProps = {
hideHeader?: boolean;
Expand Down
11 changes: 6 additions & 5 deletions src/modules/landing/Componets/Chain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ export default function Chain() {
const { mobileScreen } = useWindowSize();
return (
<div className={s.chain}>
<div className="container">
<section className={s.chain_label}>
{mobileScreen && <HeroLabel />}
</section>

<div className='container'>
{
mobileScreen && <section className={s.chain_label}>
<HeroLabel />
</section>
}
<section className={s.chain_inner}>
<h2 className={s.chain_heading}>
<Chars>
Expand Down
20 changes: 11 additions & 9 deletions src/modules/landing/Componets/Hero/ItemHero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ function ItemHero({ data, delay }: { data: TItemHero; delay: number }) {
return (
<div className={s.itemHero}>
<Fade from={{ x: 20 }} to={{ x: 0 }} delay={delay}>
<div className={s.itemHero_content}>
<Image
className={s.itemHero_img}
src={data.icon}
alt={data.title}
width={45}
height={45}
/>
<p className={s.itemHero_content_title}>{data.title}</p>
<div className={s.itemHero_inner}>
<div className={s.itemHero_content}>
<Image
className={s.itemHero_img}
src={data.icon}
alt={data.title}
width={45}
height={45}
/>
<p className={s.itemHero_content_title}>{data.title}</p>
</div>
</div>
</Fade>
</div>
Expand Down
27 changes: 16 additions & 11 deletions src/modules/landing/Componets/Hero/ItemHero/styles.module.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
.itemHero {
position: relative;
width: 100px;
aspect-ratio: 1;
display: flex;
justify-content: center;
background-color: #ffffff33;
padding-top: 20.85px;
padding-bottom: 12.54px;

@include is-mobile {
background-color: #f6f6f6;
width: calc(33vw - 30px);
align-items: center;
&_inner {
width: 100px;
aspect-ratio: 1;
display: flex;
justify-content: center;
background-color: #ffffff33;
padding-top: 20.85px;
padding-bottom: 12.54px;

@include is-mobile {
background-color: #f6f6f6;
width: calc(33vw - 30px);
align-items: center;
aspect-ratio: 1;
}
}

&_img {
height: 42px;
width: auto;
}

&_content {
display: flex;
flex-direction: column;
Expand Down
2 changes: 2 additions & 0 deletions src/modules/landing/Componets/Hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import Chars from '@/interactive/Chars';
import BorderLine from '@/interactive/BorderLine';
import { Box } from '@chakra-ui/react';
import useWindowSize from '@/hooks/useWindowSize';
import useAnimationStore from '@/stores/useAnimationStore';

export default function Hero() {
const { played } = useAnimationStore();
const { mobileScreen } = useWindowSize();
return (
<div className={s.hero}>
Expand Down
Loading

0 comments on commit fe9970d

Please sign in to comment.