Skip to content

Commit

Permalink
Merge branch 'sett/landing-v2' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sett committed Jan 11, 2024
2 parents f0ff274 + a5d1e47 commit 3bf8aa2
Show file tree
Hide file tree
Showing 35 changed files with 851 additions and 174 deletions.
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.
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 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.
2 changes: 1 addition & 1 deletion public/landing/svg/frame_tool_fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/landing/svg/frame_tool_mid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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;
}
12 changes: 6 additions & 6 deletions src/modules/landing/Componets/Article/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ export default function Article() {
<div className={s.article}>
<div className="container">
<div className={s.article_inner}>
<div className={s.article_inner_heading}>
<h3 className={s.article_inner_heading}>
Oh, and the <span>press loves us too!</span>
</div>
</h3>
<div className={s.article_inner_content}>
<div className={s.article_inner_content_top}>
{DATA_ARTICLE.top.map((item) => {
return <ItemArticle data={item} />;
{DATA_ARTICLE.top.map((item, index) => {
return <ItemArticle data={item} key={index} />;
})}
</div>
<div className={s.article_inner_content_divide}></div>
<div className={s.article_inner_content_bottom}>
{DATA_ARTICLE.bottom.map((item) => {
return <ItemArticle data={item} />;
{DATA_ARTICLE.bottom.map((item, index) => {
return <ItemArticle data={item} key={index} />;
})}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,21 @@
color: #fff;
font-weight: 500;
line-height: 26.4px;

@include is-mobile {
font-size: 18px;
line-height: 19.8px;
}
}

&_sub {
line-height: 25.2px;
font-size: 18px;
color: rgba(255, 255, 255, 0.7);
@include is-mobile {
font-size: 14px;
line-height: 19.6px;
}
}
}
&_listInfo {
Expand All @@ -41,12 +50,22 @@
font-size: 18px;
line-height: 25.2px;
color: rgba(255, 255, 255, 0.7);

@include is-mobile {
font-size: 14px;
line-height: 19.6px;
}
}
}
&__right {
font-size: 18px;
line-height: 25.2px;
font-weight: 400;

@include is-mobile {
font-size: 14px;
line-height: 19.6px;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@
width: 33.333%;
cursor: pointer;

@include is-mobile {
width: 90vw;
flex-shrink: 0;
padding: 7.64px;
flex-grow: 1;
}

:global {

.fade {
width: 100%;
}

.sectionTop_img {
transition: transform .4s var(--easeOutQuart);
transition: transform 0.4s var(--easeOutQuart);
}
}

Expand Down
Loading

0 comments on commit 3bf8aa2

Please sign in to comment.