main
tuanpep 2 years ago
parent 96eb279d11
commit e577a90e65
  1. 82
      package-lock.json
  2. 2
      package.json
  3. BIN
      src/assets/images/robot-logo.png
  4. 176
      src/pages/Animated.tsx
  5. 10
      src/shared/components/Header.tsx
  6. 73
      src/shared/components/animated/Introduction.tsx
  7. 30
      src/shared/components/animated/Trail.tsx
  8. 53
      src/shared/components/home/FirstSection.tsx
  9. 4
      src/shared/components/home/RoadMap.tsx
  10. 8
      src/shared/components/home/TokenomicsSection.tsx
  11. 1
      src/shared/components/layouts/HomeLayout.tsx
  12. 9
      src/shared/providers/RouterProviderComponent.tsx

82
package-lock.json generated

@ -8,6 +8,8 @@
"name": "spgt-landing-page",
"version": "0.0.0",
"dependencies": {
"@react-spring/parallax": "^9.7.1",
"@react-spring/web": "^9.7.1",
"localforage": "^1.10.0",
"match-sorter": "^6.3.1",
"react": "^18.2.0",
@ -427,6 +429,86 @@
"node": ">= 8"
}
},
"node_modules/@react-spring/animated": {
"version": "9.7.1",
"resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.7.1.tgz",
"integrity": "sha512-EX5KAD9y7sD43TnLeTNG1MgUVpuRO1YaSJRPawHNRgUWYfILge3s85anny4S4eTJGpdp5OoFV2kx9fsfeo0qsw==",
"dependencies": {
"@react-spring/shared": "~9.7.1",
"@react-spring/types": "~9.7.1"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@react-spring/core": {
"version": "9.7.1",
"resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.7.1.tgz",
"integrity": "sha512-8K9/FaRn5VvMa24mbwYxwkALnAAyMRdmQXrARZLcBW2vxLJ6uw9Cy3d06Z8M12kEqF2bDlccaCSDsn2bSz+Q4A==",
"dependencies": {
"@react-spring/animated": "~9.7.1",
"@react-spring/rafz": "~9.7.1",
"@react-spring/shared": "~9.7.1",
"@react-spring/types": "~9.7.1"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/react-spring/donate"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@react-spring/parallax": {
"version": "9.7.1",
"resolved": "https://registry.npmjs.org/@react-spring/parallax/-/parallax-9.7.1.tgz",
"integrity": "sha512-1wBgDYaewB8CHdMWa2O3C2Cfvq2mt+neQLZz3+zHTH0CRUlbzC8Hsm78BCDiK8I1QzpLCtgwvv2rYAJchQuZ1A==",
"dependencies": {
"@react-spring/shared": "~9.7.1",
"@react-spring/web": "~9.7.1"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@react-spring/rafz": {
"version": "9.7.1",
"resolved": "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.7.1.tgz",
"integrity": "sha512-JSsrRfbEJvuE3w/uvU3mCTuWwpQcBXkwoW14lBgzK9XJhuxmscGo59AgJUpFkGOiGAVXFBGB+nEXtSinFsopgw=="
},
"node_modules/@react-spring/shared": {
"version": "9.7.1",
"resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.7.1.tgz",
"integrity": "sha512-R2kZ+VOO6IBeIAYTIA3C1XZ0ZVg/dDP5FKtWaY8k5akMer9iqf5H9BU0jyt3Qtxn0qQY7whQdf6MTcWtKeaawg==",
"dependencies": {
"@react-spring/rafz": "~9.7.1",
"@react-spring/types": "~9.7.1"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@react-spring/types": {
"version": "9.7.1",
"resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.7.1.tgz",
"integrity": "sha512-yBcyfKUeZv9wf/ZFrQszvhSPuDx6Py6yMJzpMnS+zxcZmhXPeOCKZSHwqrUz1WxvuRckUhlgb7eNI/x5e1e8CA=="
},
"node_modules/@react-spring/web": {
"version": "9.7.1",
"resolved": "https://registry.npmjs.org/@react-spring/web/-/web-9.7.1.tgz",
"integrity": "sha512-6uUE5MyKqdrJnIJqlDN/AXf3i8PjOQzUuT26nkpsYxUGOk7c+vZVPcfrExLSoKzTb9kF0i66DcqzO5fXz/Z1AA==",
"dependencies": {
"@react-spring/animated": "~9.7.1",
"@react-spring/core": "~9.7.1",
"@react-spring/shared": "~9.7.1",
"@react-spring/types": "~9.7.1"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@remix-run/router": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.3.3.tgz",

@ -9,6 +9,8 @@
"preview": "vite preview"
},
"dependencies": {
"@react-spring/parallax": "^9.7.1",
"@react-spring/web": "^9.7.1",
"localforage": "^1.10.0",
"match-sorter": "^6.3.1",
"react": "^18.2.0",

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

@ -0,0 +1,176 @@
import React, { useRef } from "react";
import { Parallax, ParallaxLayer, IParallax } from "@react-spring/parallax";
import Introduction from "../shared/components/animated/Introduction";
// Little helpers ...
const url = (name: string, wrap = false) =>
`${
wrap ? "url(" : ""
}https://awv3node-homepage.surge.sh/build/assets/${name}.svg${
wrap ? ")" : ""
}`;
function Animated() {
const parallax = useRef<IParallax>(null!);
return (
<div className="w-full min-h-screen bg-[#253237]">
<Parallax ref={parallax} pages={3}>
<ParallaxLayer
offset={1}
speed={1}
style={{ backgroundColor: "#805E73" }}
/>
<ParallaxLayer
offset={2}
speed={1}
style={{ backgroundColor: "#87BCDE" }}
/>
<ParallaxLayer
offset={0}
speed={0}
factor={3}
style={{
backgroundImage: url("stars", true),
backgroundSize: "cover",
}}
/>
<ParallaxLayer
offset={1.3}
speed={-0.3}
style={{ pointerEvents: "none" }}
>
<img
src={url("satellite4")}
style={{ width: "15%", marginLeft: "70%" }}
/>
</ParallaxLayer>
<ParallaxLayer offset={1} speed={0.8} style={{ opacity: 0.1 }}>
<img
src={url("cloud")}
style={{ display: "block", width: "20%", marginLeft: "55%" }}
/>
<img
src={url("cloud")}
style={{ display: "block", width: "10%", marginLeft: "15%" }}
/>
</ParallaxLayer>
<ParallaxLayer offset={1.75} speed={0.5} style={{ opacity: 0.1 }}>
<img
src={url("cloud")}
style={{ display: "block", width: "20%", marginLeft: "70%" }}
/>
<img
src={url("cloud")}
style={{ display: "block", width: "20%", marginLeft: "40%" }}
/>
</ParallaxLayer>
<ParallaxLayer offset={1} speed={0.2} style={{ opacity: 0.2 }}>
<img
src={url("cloud")}
style={{ display: "block", width: "10%", marginLeft: "10%" }}
/>
<img
src={url("cloud")}
style={{ display: "block", width: "20%", marginLeft: "75%" }}
/>
</ParallaxLayer>
<ParallaxLayer offset={1.6} speed={-0.1} style={{ opacity: 0.4 }}>
<img
src={url("cloud")}
style={{ display: "block", width: "20%", marginLeft: "60%" }}
/>
<img
src={url("cloud")}
style={{ display: "block", width: "25%", marginLeft: "30%" }}
/>
<img
src={url("cloud")}
style={{ display: "block", width: "10%", marginLeft: "80%" }}
/>
</ParallaxLayer>
<ParallaxLayer offset={2.6} speed={0.4} style={{ opacity: 0.6 }}>
<img
src={url("cloud")}
style={{ display: "block", width: "20%", marginLeft: "5%" }}
/>
<img
src={url("cloud")}
style={{ display: "block", width: "15%", marginLeft: "75%" }}
/>
</ParallaxLayer>
<ParallaxLayer
offset={2.5}
speed={-0.4}
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
pointerEvents: "none",
}}
>
<img src={url("earth")} style={{ width: "60%" }} />
</ParallaxLayer>
<ParallaxLayer
offset={2}
speed={-0.3}
style={{
backgroundSize: "80%",
backgroundPosition: "center",
backgroundImage: url("clients", true),
}}
/>
{/* section 1 */}
<ParallaxLayer
offset={0}
speed={0.1}
onScroll={() => parallax.current.scrollTo(1)}
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<Introduction />
</ParallaxLayer>
<ParallaxLayer
offset={1}
speed={0.1}
onClick={() => parallax.current.scrollTo(2)}
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<img src={url("bash")} style={{ width: "40%" }} />
</ParallaxLayer>
<ParallaxLayer
offset={2}
speed={-0}
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
onClick={() => parallax.current.scrollTo(0)}
>
<img src={url("clients-main")} style={{ width: "40%" }} />
</ParallaxLayer>
</Parallax>
</div>
);
}
export default Animated;

@ -1,6 +1,6 @@
import React from "react";
import Button from "./Button";
import robotLogo from "../../assets/images/logo-robot.png";
import robotLogo from "../../assets/images/robot-logo.png";
import { BsNewspaper, BsGithub } from "react-icons/bs";
import Whitepaper from "../../assets/Whitepaper.pdf";
type Props = {};
@ -60,10 +60,10 @@ const Header = (props: Props) => {
<div className="fixed w-full z-30 p-1 transition-all duration-150 bg-gray-800">
<div className="container mx-auto flex justify-between items-center">
<div className="flex gap-2 items-center">
<div className="bg-white rounded-full overflow-hidden p-1">
<div className="bg-white w-8 rounded-full overflow-hidden p-1">
<img
src={robotLogo}
className="w-6 transition-all duration-150 rounded-full"
className="w-full transition-all duration-150 rounded-full"
alt=""
/>
</div>
@ -108,10 +108,10 @@ const Header = (props: Props) => {
<div className="fixed z-30 w-full p-5 transition-all duration-150">
<div className="container mx-auto flex justify-between items-center">
<div className="flex gap-2 items-center">
<div className="bg-white rounded-full overflow-hidden p-1">
<div className="bg-white w-12 rounded-full overflow-hidden p-1">
<img
src={robotLogo}
className="w-10 transition-all duration-150 rounded-full"
className="w-full transition-all duration-150 rounded-full"
alt=""
/>
</div>

@ -0,0 +1,73 @@
import { useTrail } from "@react-spring/web";
import React from "react";
import {
BsDiscord,
BsFacebook,
BsInstagram,
BsTelegram,
BsTwitter,
} from "react-icons/bs";
import Button from "../Button";
import Trail from "./Trail";
type Props = {};
const Introduction = (props: Props) => {
return (
<div className="flex flex-col gap-10 items-center text-white lg:w-3/4 max-w-4xl">
<h4 className="lg:text-8xl md:text-7xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-600">
<Trail open={true}>
<span>A digital currency</span>
<span>payment for SGPT</span>
<span>chat bot services</span>
</Trail>
</h4>
<p className="w-full font-body text-transparent bg-clip-text bg-gradient-to-r from-sky-400 to-purple-300">
The SGPT Token is a digital currency designed to facilitate payments for
services provided by the SGPT chat bot. The chat bot is a powerful tool
that utilizes artificial intelligence to communicate with users and
provide valuable information and services.
</p>
<div className="flex flex-col justify-center mt-[15vh]">
<h2 className="text-3xl mb-4 font-bold text-center">
Join Our Community
</h2>
<div className="flex flex-wrap gap-4">
<Button bgColor="bg-telegram">
<div className="flex items-center gap-2">
<BsTelegram size={18} />
Telegram
</div>
</Button>
<Button bgColor="bg-discord">
<div className="flex items-center gap-2">
<BsDiscord size={18} />
Discord
</div>
</Button>
<Button bgColor="bg-facebook">
<div className="flex items-center gap-2">
<BsFacebook size={18} />
Facebook
</div>
</Button>
<Button bgColor="bg-twitter">
<div className="flex items-center gap-2">
<BsTwitter size={18} />
Twitter
</div>
</Button>
<Button bgColor="bg-instagram">
<div className="flex items-center gap-2">
<BsInstagram size={18} />
Instagram
</div>
</Button>
</div>
</div>
</div>
);
};
export default Introduction;

@ -0,0 +1,30 @@
import { a, useTrail } from "@react-spring/web";
import React from "react";
import styles from "./styles.module.css";
type Props = {
open: boolean;
children: React.ReactNode;
};
const Trail: React.FC<Props> = ({ open, children }) => {
const items = React.Children.toArray(children);
const trail = useTrail(items.length, {
config: { mass: 5, tension: 2000, friction: 200 },
opacity: open ? 1 : 0,
x: open ? 0 : 20,
height: open ? 110 : 0,
from: { opacity: 0, x: 20, height: 0 },
});
return (
<div>
{trail.map(({ height, ...style }, index) => (
<a.div key={index} className="will-change-auto" style={style}>
<a.div style={{ height }}>{items[index]}</a.div>
</a.div>
))}
</div>
);
};
export default Trail;

@ -11,6 +11,7 @@ import {
} from "react-icons/bs";
import { MdContentCopy } from "react-icons/md";
import { useSprings, useSpring, animated } from "@react-spring/web";
const FirstSection = () => {
const address = "0x3c97331438e90680a17c35905ffc2b8ef760f844";
@ -21,10 +22,16 @@ const FirstSection = () => {
const copyToClipboard = (address: string) => {
navigator.clipboard.writeText(address);
};
const springs = useSpring({
from: { opacity: 0 },
to: { opacity: 1 },
});
return (
<div
className="min-h-screen flex bg-cover bg-center bg-no-repeat relative"
<animated.div
className="lg:min-h-screen px-10 lg:px-0 flex bg-cover bg-center bg-no-repeat relative"
id="home"
style={springs}
>
<div
style={{ backgroundImage: `url(${robotBgr})` }}
@ -32,12 +39,12 @@ const FirstSection = () => {
></div>
<div className="absolute top-0 left-0 w-full h-full bg-black opacity-60"></div>
<div className="container flex mx-auto min-h-[70vh] text-white z-20 mt-20">
<div className="md:w-4/5 flex flex-col justify-center lg:pb-48 gap-14 pb-20 z-50">
<div className="lg:w-4/5 flex flex-col justify-center lg:pb-48 gap-14 pb-20 z-50">
<div className="flex flex-col gap-10">
<h4 className="w-3/4 lg:text-8xl text-7xl font-bold">
A digital currency payment for SGPT chat bot services.
<h4 className="lg:w-3/4 lg:text-8xl md:text-7xl text-5xl font-bold">
A digital currency payment for SGPT chat bot services
</h4>
<p className="lg:w-2/3 font-body">
<p className="lg:w-2/3 w-full font-body">
The SGPT Token is a digital currency designed to facilitate
payments for services provided by the SGPT chat bot. The chat bot
is a powerful tool that utilizes artificial intelligence to
@ -48,7 +55,7 @@ const FirstSection = () => {
<div>
<h2 className="text-3xl mb-4 font-bold">Join Our Community</h2>
<div className="flex w-2/3 flex-wrap gap-4">
<div className="flex lg:w-2/3 flex-wrap gap-4">
<Button bgColor="bg-telegram">
<div className="flex items-center gap-2">
<BsTelegram size={18} />
@ -82,7 +89,7 @@ const FirstSection = () => {
</div>
</div>
</div>
<div className="md:w-1/5 flex justify-center items-center relative">
<div className="lg:w-1/5 hidden lg:flex justify-center items-center relative">
<img
src={robotImage2}
className="object-cover absolute -left-40 border-4 backdrop-blur-sm shadow-2xl shadow-cyan-300 border-cyan-500 rounded-full w-full aspect-square"
@ -99,35 +106,7 @@ const FirstSection = () => {
<div className="absolute w-10 aspect-square bg-[radial-gradient(ellipse_at_bottom,_var(--tw-gradient-stops))] from-sky-400 to-indigo-900 blur-sm rounded-full bottom-56 right-10"></div>
</div>
</div>
{/* <div className="w-full h-full bg-black absolute opacity-75 z-10"></div> */}
<div className="absolute z-50 rounded-full border-2 p-7 overflow-hidden text-white flex gap-4 items-center bottom-10 left-1/2 -translate-x-1/2 max-w-4xl min-h-[80px] mx-auto container">
<div className="w-1/3 flex items-center gap-3 justify-center font-semibold">
<p>{truncateAddress(address)}</p>
<button
className="hover:cursor-pointer bg-white/50 text-white rounded-full p-2"
onClick={() => copyToClipboard(address)}
type="button"
>
<MdContentCopy size={18} />
</button>
</div>
<div className="w-1/3 flex justify-center items-center gap-3 font-semibold">
<p>{truncateAddress(address)}</p>
<button
className="hover:cursor-pointer bg-white/50 text-white rounded-full p-2"
onClick={() => copyToClipboard(address)}
type="button"
>
<MdContentCopy size={18} />
</button>
</div>
<div className="w-1/3 flex justify-center font-semibold">
Audited By
</div>
</div>
</div>
</animated.div>
);
};

@ -44,12 +44,12 @@ const RoadMap = (props: Props) => {
<div className="container mx-auto text-white md:min-h-[60vh]" id="roadmap">
<h1 className="text-5xl font-bold text-center">RoadMap</h1>
<div className="flex gap-10 mt-20 justify-center">
<div className="flex flex-col gap-10 mt-20 justify-center px-10 lg:px-0">
{roadMapData.map((item, index) => {
return (
<div
key={index}
className="w-1/4 bg-[conic-gradient(at_left,_var(--tw-gradient-stops))] from-orange-400 to-rose-400 rounded-lg min-h-[250px] p-5"
className="lg:w-1/4 bg-[conic-gradient(at_left,_var(--tw-gradient-stops))] from-orange-400 to-rose-400 rounded-lg min-h-[250px] p-5"
>
<h4 className="text-center text-3xl text-gray-100 font-semibold mb-6">
{item.phase}

@ -53,18 +53,18 @@ const TokenomicsSection = (props: Props) => {
Tokenomics
</h1>
<div className="w-full flex flex-col md:flex-row">
<div className="md:w-1/2">
<div className="w-full flex flex-col lg:flex-row">
<div className="lg:w-1/2">
<img src={tokenomicChart} alt="" />
</div>
<div className="md:w-1/2">
<div className="lg:w-1/2">
<ul className="flex flex-col items-end justify-center h-full gap-3 px-3">
{tokenomics.map((item, index) => {
return (
<li
key={index}
className={`text-center w-full md:w-2/3 bg-slate-200 py-3 relative`}
className={`text-center w-full lg:w-2/3 bg-slate-200 py-3 relative`}
>
<div
className={`absolute h-full top-0 w-2 ${item.color}`}

@ -11,7 +11,6 @@ const HomeLayout = (props: Props) => {
<div className="w-full">
<Outlet />
</div>
<Footer />
</div>
);
};

@ -1,4 +1,5 @@
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import Animated from "../../pages/Animated";
import Home from "../../pages/Home";
import HomeLayout from "../components/layouts/HomeLayout";
@ -6,7 +7,13 @@ const router = createBrowserRouter([
{
path: "/",
element: <HomeLayout />,
children: [{ path: "", element: <Home /> }],
children: [
{ path: "", element: <Home /> },
{
path: "fuck",
element: <Animated />,
},
],
},
]);
const RouterProviderComponent = () => {

Loading…
Cancel
Save