diff --git a/frontend/package.json b/frontend/package.json
index 03d9bf632..de1382696 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -17,6 +17,7 @@
"axios": "^1.6.0",
"crypto-browserify": "^3.12.0",
"eslint": "^8.48.0",
+ "framer-motion": "^10.16.4",
"json5": "^2.2.1",
"konva": "^9.2.0",
"react": "^18.1.0",
diff --git a/frontend/src/assets/icons/arrow-up.svg b/frontend/src/assets/icons/arrow-up.svg
new file mode 100644
index 000000000..fb4eaeb93
--- /dev/null
+++ b/frontend/src/assets/icons/arrow-up.svg
@@ -0,0 +1 @@
+
diff --git a/frontend/src/assets/icons/index.ts b/frontend/src/assets/icons/index.ts
index 4ac3ec4a4..8d16d202b 100644
--- a/frontend/src/assets/icons/index.ts
+++ b/frontend/src/assets/icons/index.ts
@@ -1,6 +1,7 @@
import { ReactComponent as ErrorIcon } from "./error.svg";
import { ReactComponent as SelectArrowIcon } from "./select-arrow.svg";
import { ReactComponent as ArrowUpRightIcon } from "./arrow-up-right.svg";
+import { ReactComponent as ArrowUpIcon } from "./arrow-up.svg";
import { ReactComponent as MenuIcon } from "./menu.svg";
import { ReactComponent as CloseIcon } from "./close.svg";
import { ReactComponent as ExpandIcon } from "./expand.svg";
@@ -46,6 +47,7 @@ import { ReactComponent as StoreIcon } from "./store.svg";
export {
StoreIcon,
+ ArrowUpIcon,
ISTIcon,
KeplerIcon,
DiagonalIcon,
diff --git a/frontend/src/assets/text/general.ts b/frontend/src/assets/text/general.ts
index a7ebda237..5216f3213 100644
--- a/frontend/src/assets/text/general.ts
+++ b/frontend/src/assets/text/general.ts
@@ -26,7 +26,7 @@ export const general = {
toolTipTitle: "tool tip title",
toolTipInfo: "maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum.",
thisFieldIsRequired: "this field is required",
- mintNew: `mint new (IST)`,
+ mintNew: "mint new (IST)",
theMinimiumAmountIs: "the minimum amount is IST 1",
moreInfo: "more info",
thereAreNoAssetsAvailable: "there are no assets available",
@@ -34,7 +34,7 @@ export const general = {
aCharcterBuilderApp:
"KREAd is a character builder dApp, where all the characters and their items are dynamic NFTs. You have the freedom to build your character and the ownership of all the equipment attached to it. So feel free to sell them, trade them, or even burn them!",
sagesBy: "SAGES by KREAd",
- sagesIsTheFirst: "SAGES is the first collection\nlaunched on the KREAd dApp.\nStart collecting SAGES NFTs to\nshape your own saga.",
+ sagesIsTheFirst: "SAGES is the first collection launched on the KREAd dApp. Start collecting SAGES NFTs to shape your own saga.",
explore: "explore",
connectWallet: "connect Keplr Wallet",
activateWallet: "activate Wallet",
@@ -48,7 +48,7 @@ export const general = {
kryha: "Kryha",
contactUs: "contact us",
questionsBug: "questions, bug reports, \nfeedback... ? We are here for it all.",
- sendEmailTo: "send an email to",
+ sendEmailTo: "send an email to ",
contactEmail: "kread@kryha.io",
followUs: "Follow us",
discord: "Discord",
diff --git a/frontend/src/components/atoms/image.ts b/frontend/src/components/atoms/image.ts
index c9761e60d..dc408f28f 100644
--- a/frontend/src/components/atoms/image.ts
+++ b/frontend/src/components/atoms/image.ts
@@ -1,5 +1,4 @@
import styled from "@emotion/styled";
-import { EXTRA_LARGE_SCREEN_SIZE, LARGE_SCREEN_SIZE, MEDIUM_SCREEN_SIZE, SMALL_SCREEN_SIZE } from "../../constants";
export interface ImageProps {
src?: string;
@@ -22,28 +21,15 @@ export const Img = styled.img`
`;
export interface CharacterImageProps {
- width: number;
- height: number;
zIndex?: number;
src?: string;
}
export const CharacterImgs = styled.img`
- ${({ height }): string => `height: ${height}px;`};
- ${({ width }): string => {
- if (width <= SMALL_SCREEN_SIZE) {
- return "width: 600px;";
- }
- if (width <= MEDIUM_SCREEN_SIZE && width >= SMALL_SCREEN_SIZE) {
- return "width: 742px; ";
- }
- if (width <= LARGE_SCREEN_SIZE && width >= MEDIUM_SCREEN_SIZE) {
- return "width: 764px; ";
- }
- if (width >= EXTRA_LARGE_SCREEN_SIZE && width >= LARGE_SCREEN_SIZE) {
- return "width: 1018px; ";
- } else {
- return "width: 742px; ";
- }
- }};
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ object-fit: contain;
`;
diff --git a/frontend/src/components/footer/styles.ts b/frontend/src/components/footer/styles.ts
index 28250d0eb..bc8772271 100644
--- a/frontend/src/components/footer/styles.ts
+++ b/frontend/src/components/footer/styles.ts
@@ -1,6 +1,6 @@
import styled from "@emotion/styled";
import { NavLink } from "react-router-dom";
-import { color } from "../../design";
+import { breakpoints, color } from "../../design";
import { ButtonText } from "../atoms";
interface FooterProps {
@@ -9,14 +9,17 @@ interface FooterProps {
export const FooterWrapper = styled.div`
display: flex;
+ position: relative;
flex-direction: row;
- justify-content: space-between;
- margin-left: 16px;
- margin-top: 16px;
- align-items: flex-start;
- width: 100%;
+ justify-content: flex-end;
+ align-items: center;
z-index: 1000;
- border-radius: 100px;
+ flex-grow: 1;
+
+ @media (max-width: ${breakpoints.tablet}) {
+ align-items: center;
+ justify-content: center;
+ }
`;
export const FooterContainer = styled.div`
diff --git a/frontend/src/components/main-container/styles.ts b/frontend/src/components/main-container/styles.ts
index 3c694f220..0bdd875dd 100644
--- a/frontend/src/components/main-container/styles.ts
+++ b/frontend/src/components/main-container/styles.ts
@@ -6,10 +6,9 @@ interface MainProps {
export const MainWrap = styled.div`
display: flex;
- width: 100%;
+ width: 100vw;
height: 100vh;
flex-direction: column;
overflow: hidden;
position: relative;
- // ${({ height }): string => `height: ${height}px;`};
`;
diff --git a/frontend/src/components/onboarding-character/onboarding-character.tsx b/frontend/src/components/onboarding-character/onboarding-character.tsx
index 5d625a5b0..2e0cf8e8c 100644
--- a/frontend/src/components/onboarding-character/onboarding-character.tsx
+++ b/frontend/src/components/onboarding-character/onboarding-character.tsx
@@ -1,6 +1,6 @@
import { FC, useEffect, useState } from "react";
-import { CharacterContainer, CharacterSwitchIcon, CharacterWrapper, FifthIcon, FirstIcon, FourthIcon, ThirdIcon } from "./styles";
+import { CharacterContainer, CharacterSwitchIcon, FifthIcon, FirstIcon, FourthIcon, ThirdIcon } from "./styles";
import { useViewport } from "../../hooks";
import {
ArmaCitizen,
@@ -27,11 +27,7 @@ const perk1Images = [ArmaPerk_I6, ArmaPerk_I7, Empty];
const maskImages = [Mask_Mount_3, Mask_Elephia_24, Mask_Elephia_32];
const garmentImages = [Legendary_Garment_Arma_7, Rare_Garment_Arma_2, Uncommon_Garment_Arma_1];
-interface Props {
- size?: "mini" | "medium" | "half" | "normal" | "large" | "extraLarge";
- isZoomed?: boolean;
-}
-export const OnboardingCharacter: FC = ({ size, isZoomed }) => {
+export const OnboardingCharacter: FC = () => {
const { width, height } = useViewport();
const [currentIndex, setCurrentIndex] = useState(0);
@@ -44,32 +40,12 @@ export const OnboardingCharacter: FC = ({ size, isZoomed }) => {
}, []);
return (
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
);
};
diff --git a/frontend/src/components/onboarding-character/styles.ts b/frontend/src/components/onboarding-character/styles.ts
index 48a12738a..9c8fee010 100644
--- a/frontend/src/components/onboarding-character/styles.ts
+++ b/frontend/src/components/onboarding-character/styles.ts
@@ -1,160 +1,18 @@
import styled from "@emotion/styled";
-
-import { margins } from "../../design";
-import { CharacterImgs, SecondaryButton, sequentialFadeIn, zoomClothing, zoomIn } from "../atoms";
+import { CharacterImgs, sequentialFadeIn } from "../atoms";
import { zIndex as zIndexProps } from "../../design/spacing";
-import { EXTRA_LARGE_SCREEN_SIZE, LARGE_SCREEN_SIZE, MEDIUM_SCREEN_SIZE, SMALL_SCREEN_SIZE } from "../../constants";
-import { css } from "@emotion/react";
-
-interface ImageProps {
- width: number;
- height: number;
- zIndex?: number;
- isZoomed?: boolean;
- size?: "mini" | "medium" | "half" | "normal" | "large" | "extraLarge";
- isClothing?: boolean;
-}
+import { breakpoints } from "../../design";
-interface ViewProps {
- width: number;
-}
-
-export const ExpandButton = styled(SecondaryButton)`
+export const CharacterContainer = styled.div`
position: absolute;
- z-index: 300;
- ${({ width }): string => {
- if (width <= SMALL_SCREEN_SIZE) {
- return "left: 45%;";
- }
- if (width <= MEDIUM_SCREEN_SIZE && width >= SMALL_SCREEN_SIZE) {
- return "left: 48%;";
- }
- if (width <= LARGE_SCREEN_SIZE && width >= MEDIUM_SCREEN_SIZE) {
- return "left: 46%;";
- }
- if (width >= EXTRA_LARGE_SCREEN_SIZE && width >= LARGE_SCREEN_SIZE) {
- return "left: 47%;";
- } else {
- return "left: 48%;";
- }
- }};
- bottom: ${margins.big};
- padding: 8px 16px;
- > svg {
- margin-left: 0;
+ height: 100%;
+ width: 100%;
+ z-index: -1;
+ @media (max-width: ${breakpoints.tablet}) {
+ opacity: 0.5;
}
`;
-export const CharacterIcon = styled(CharacterImgs)`
- position: absolute;
- top: 0;
- ${({ zIndex }): string => `z-index: ${zIndex || zIndexProps.character};`};
-`;
-
-export const CharacterWrapper = styled.div`
- position: absolute;
- right: 0;
- top: 0;
- margin: 0;
- pointer-events: none;
- ${({ isZoomed }) =>
- isZoomed
- ? css`
- right: -45%;
- `
- : css`
- right: 0;
- `};
-`;
-
-export const CharacterContainer = styled.div`
- ${({ size, width, height }): string => {
- if (size === "mini") {
- if (width <= SMALL_SCREEN_SIZE) {
- return `zoom: 0.18;
- -moz-transform: scale(0.18);
- -moz-transform-origin: 0 0;
- `;
- }
- if (width >= EXTRA_LARGE_SCREEN_SIZE && width >= LARGE_SCREEN_SIZE) {
- return `zoom: 0.055;
- -moz-transform: scale(0.055);
- -moz-transform-origin: 0 0;
- `;
- }
- return `zoom:0.075;
- -moz-transform: scale(0.1);
- -moz-transform-origin: 0 0;
- `;
- } else if (size === "medium") {
- if (width <= SMALL_SCREEN_SIZE) {
- return `zoom: 0.36;
- -moz-transform: scale(0.36);
- -moz-transform-origin: 0 0;
- `;
- }
- if (width <= MEDIUM_SCREEN_SIZE && width >= SMALL_SCREEN_SIZE) {
- return `zoom: 0.304;
- -moz-transform: scale(0.304);
- -moz-transform-origin: 0 0;
- `;
- }
- if (width <= LARGE_SCREEN_SIZE && width >= MEDIUM_SCREEN_SIZE) {
- return `zoom: 0.295;
- -moz-transform: scale(0.295);
- -moz-transform-origin: 0 0;
- `;
- }
- if (width >= EXTRA_LARGE_SCREEN_SIZE && width >= LARGE_SCREEN_SIZE) {
- return `zoom: 0.222;
- -moz-transform: scale(0.222);
- -moz-transform-origin: 0 0;
- `;
- } else {
- return `zoom: 0.304;
- -moz-transform: scale(0.304);
- -moz-transform-origin: 0 0;
- `;
- }
- } else if (size === "half") {
- return `zoom: 0.5;
- -moz-transform: scale(0.5);
- -moz-transform-origin: 0 0;
- `;
- } else if (size === "normal") {
- return `width: ${width * 0.4}px; height: ${height}px;`;
- } else if (size === "large") {
- return `zoom: 2.5;
- -moz-transform: scale(2.5);
- -moz-transform-origin: 0 0;
- transform: translateY(-40vh);
-
- `;
- } else if (size === "extraLarge") {
- return `
- zoom: 2.5;
- -moz-transform: scale(2.5);
- -moz-transform-origin: 0 0;
-
- `;
- } else {
- return `width: ${width * 0.4}px; height: ${height}px;`;
- }
- }};
- ${({ size, isClothing }) =>
- size === "extraLarge" && !isClothing
- ? css`
- animation: ${zoomIn} 5s ease-out 1 forwards;
- `
- : css``};
- ${({ size, isClothing }) =>
- size === "extraLarge" && isClothing
- ? css`
- animation: ${zoomClothing} 5s ease-out 1 forwards;
- `
- : css``};
-`;
-
export const CharacterSwitchIcon = styled(CharacterImgs)`
opacity: 0;
animation: ${sequentialFadeIn} 5s ease-in-out;
@@ -162,9 +20,6 @@ export const CharacterSwitchIcon = styled(CharacterImgs)`
animation-delay: 1.5s;
`;
export const FirstIcon = styled(CharacterImgs)`
- position: absolute;
- top: 0;
- left: 0;
${({ zIndex }): string => `z-index: ${zIndex || zIndexProps.mid};`};
opacity: 0;
animation: ${sequentialFadeIn} 5s ease-in-out;
diff --git a/frontend/src/design/sizes.ts b/frontend/src/design/sizes.ts
index 4170ecb81..2def28e22 100644
--- a/frontend/src/design/sizes.ts
+++ b/frontend/src/design/sizes.ts
@@ -4,4 +4,4 @@ export const breakpoints = {
desktop: "1024px",
desktopLarge: "1440px",
desktopWide: "1920px",
-};
+} as const;
diff --git a/frontend/src/navigation/routes.tsx b/frontend/src/navigation/routes.tsx
index 57686291b..312d9504c 100644
--- a/frontend/src/navigation/routes.tsx
+++ b/frontend/src/navigation/routes.tsx
@@ -30,20 +30,22 @@ export const InternalAppRoutes: FC = () => {
if (service.isLoading) return ;
return (
- navigate(routes.character)}>
-
- } />
- } />
- } />
- : } />
- : } />
- } />
- } />
- } />
- } />
- } />
-
-
+
+ navigate(routes.character)}>
+
+ } />
+ } />
+ } />
+ : } />
+ : } />
+ } />
+ } />
+ } />
+ } />
+ } />
+
+
+
);
};
@@ -52,13 +54,11 @@ export const ExternalAppRoutes: FC = () => {
return (
navigate(routes.character)}>
-
-
- } />
- } />
- } />
-
-
+
+ } />
+ } />
+ } />
+
);
};
diff --git a/frontend/src/pages/connect-wallet/connect-wallet.tsx b/frontend/src/pages/connect-wallet/connect-wallet.tsx
index c99ea39ad..567ad4a64 100644
--- a/frontend/src/pages/connect-wallet/connect-wallet.tsx
+++ b/frontend/src/pages/connect-wallet/connect-wallet.tsx
@@ -1,7 +1,7 @@
-import React, { FC, useRef, useState } from "react";
+import React, { FC, useState } from "react";
import { useNavigate } from "react-router-dom";
import { KeplerIcon, text } from "../../assets";
-import { breakpoints, color } from "../../design";
+import { color } from "../../design";
import {
ButtonText,
FadeInOut,
@@ -9,45 +9,40 @@ import {
Kado,
KeplerIconWrapper,
LoadingPage,
- MenuText,
NotificationDetail,
OnboardingCharacter,
Overlay,
PrimaryButton,
- TitleText,
} from "../../components";
+import { ArrowUp, FooterContainer } from "./styles";
+import { useViewport } from "../../hooks";
+import { useAgoricContext } from "../../context/agoric";
import {
- ArrowUp,
- ButtonContainer,
- FooterContainer,
- InfoText,
+ ButtonRow,
KreadLogo,
+ LeftContent,
LogoContainer,
OnboardingContainer,
OnboardingWrapper,
- SectionContainer,
-} from "./styles";
-import { useIsMobile, useOnScreen, useViewport } from "../../hooks";
-import { useAgoricContext } from "../../context/agoric";
-import { routes } from "../../navigation";
-import { ButtonRow } from "../onboarding/styles";
+ RightContent,
+ SectionHeading,
+ SectionText,
+} from "../onboarding/styles";
import { NotificationWrapper } from "../../components/notification-detail/styles";
+import { Section } from "../onboarding";
+import { routes } from "../../navigation";
export const ConnectWallet: FC = () => {
const [service, _] = useAgoricContext();
const navigate = useNavigate();
- const { width, height } = useViewport();
+ const { height } = useViewport();
const [isLoading, setIsLoading] = useState(false);
- const ref = useRef(null);
- const isConnectButtonVisible = useOnScreen(ref);
- const isMobile = useIsMobile(breakpoints.tablet);
const [showWidget, setShowWidget] = useState(false);
const [showToast, setShowToast] = useState(false);
const toggleWidget = () => {
setShowWidget(!showWidget);
};
- const showAnimation = false;
const provisionWallet = async () => {
setIsLoading(true);
@@ -63,9 +58,19 @@ export const ConnectWallet: FC = () => {
if (service.status.walletProvisioned) navigate(routes.character);
return (
- <>
-
-
+
+
+
+
+
+
+
+ {text.general.activateSmartWallet}
+ {text.general.activateSmartWalletDescription}
+
+
+
+
provisionWallet()}>
@@ -79,23 +84,11 @@ export const ConnectWallet: FC = () => {
-
-
-
-
- {text.general.activateSmartWallet}
- {text.general.activateSmartWalletDescription}
-
-
-
- {!isMobile && }
+
-
-
-
@@ -111,6 +104,6 @@ export const ConnectWallet: FC = () => {
/>
- >
+
);
};
diff --git a/frontend/src/pages/onboarding/onboarding.tsx b/frontend/src/pages/onboarding/onboarding.tsx
index 61d02ba10..3fa9f27ee 100644
--- a/frontend/src/pages/onboarding/onboarding.tsx
+++ b/frontend/src/pages/onboarding/onboarding.tsx
@@ -1,67 +1,53 @@
import React, { FC, useEffect, useRef, useState } from "react";
import { useNavigate } from "react-router-dom";
-
-import { DiscordIcon, KeplerIcon, text, TwitterIcon } from "../../assets";
-import { breakpoints, color } from "../../design";
-import {
- AnimatedLogo,
- ButtonText,
- FadeInOut,
- Footer,
- Kado,
- KeplerIconWrapper,
- MenuText,
- OnboardingCharacter,
- Overlay,
- PrimaryButton,
- TitleText,
-} from "../../components";
+import { color } from "../../design";
+import { AnimatedLogo, ButtonText, Footer, OnboardingCharacter, PrimaryButton } from "../../components";
import {
- ArrowDown,
ArrowUp,
- ButtonContainer,
ButtonRow,
+ Discord,
EndContent,
FooterContainer,
- GeneralSectionContainer,
- InfoText,
KreadContainer,
KreadLogo,
KryhaLink,
+ LeftContent,
Link,
LogoContainer,
- MiddleContent,
OnboardingContainer,
OnboardingWrapper,
- ScrollContainer,
+ RightContent,
SectionContainer,
+ SectionHeading,
+ SectionText,
+ SectionWrapper,
+ SocialLink,
SocialsContainer,
TextContainer,
+ Twitter,
} from "./styles";
-import { useIsMobile, useOnScreen, useTimer, useViewport } from "../../hooks";
+import { useTimer, useViewport } from "../../hooks";
import { routes } from "../../navigation";
import { AGORIC_LINK, DISCORD_LINK, FIRST_TIME, KRYHA_LINK, SLIDER_TIME, TWITTER_LINK } from "../../constants";
+import { useInView } from "framer-motion";
+import { KeplerIcon, text } from "../../assets";
export const Onboarding: FC = () => {
const navigate = useNavigate();
const { width, height } = useViewport();
const [showSlider] = useTimer(SLIDER_TIME, true);
- const isMobile = useIsMobile(breakpoints.tablet);
- const ref = useRef(null);
- const isConnectButtonVisible = useOnScreen(ref);
const [showAnimation, setShowAnimation] = useState(true);
const isFirstTime = localStorage.getItem(FIRST_TIME) === null;
- const [showWidget, setShowWidget] = useState(false);
-
- const toggleWidget = () => {
- setShowWidget(!showWidget);
- };
useEffect(() => {
+ if (showSlider) {
+ setShowAnimation(false);
+ }
+
if (!isFirstTime) {
setShowAnimation(false);
}
- }, [isFirstTime]);
+ }, [showSlider, isFirstTime]);
const connectWallet = () => {
navigate(routes.connectWallet);
@@ -70,93 +56,124 @@ export const Onboarding: FC = () => {
};
return (
- <>
-
-
-
- connectWallet()}>
-
-
-
- {text.general.connectWallet}
-
-
-
-
-
-
-
- {text.general.logo}
- {text.general.aCharcterBuilderApp}
-
-
- {text.general.sagesBy}
- {text.general.sagesIsTheFirst}
-
-
- {text.general.scroll}
-
-
-
-
-
- {text.general.whoWeAre}
-
- {text.general.isPartOfAgoric}
-
- {text.general.agoric}
-
- {text.general.anOpenSource}
-
- {text.general.kryha}.
-
-
- {text.general.theSagesArt}
- {text.general.ourLeadership}
-
-
-
-
- {text.general.contactUs}
- {text.general.questionsBug}
-
- {text.general.sendEmailTo}
- {text.general.contactEmail}
-
-
-
- {text.general.followUs}
-
-
-
- {text.general.discord}
-
-
-
- {text.general.twitter}
-
-
-
-
-
- {!isMobile && }
-
-
-
-
+
{showAnimation ? (
-
+
) : (
-
-
-
+ <>
+
+
+
+
+
+
+
+ {text.general.logo}
+ {text.general.aCharcterBuilderApp}
+
+
+
+
+
+
+
+ {text.general.sagesBy}
+ {text.general.sagesIsTheFirst}
+
+
+
+
+ {text.general.whoWeAre}
+
+ {text.general.isPartOfAgoric}
+
+ {text.general.agoric}
+
+ {text.general.anOpenSource}
+
+ {text.general.kryha}.
+
+
+ {text.general.theSagesArt}
+ {text.general.ourLeadership}
+
+
+
+
+ {text.general.contactUs}
+ {text.general.questionsBug}
+
+ {text.general.sendEmailTo}
+ {text.general.contactEmail}
+
+
+
+
+
+ {text.general.followUs}
+
+
+
+
+ {text.general.discord}
+
+
+
+
+
+ {text.general.twitter}
+
+
+
+
+
+
+
+
+
+ >
)}
-
-
-
-
- >
+
+ );
+};
+
+interface SectionProps {
+ children: React.ReactNode;
+ last?: boolean;
+}
+export const Section: FC = ({ children, last = false }) => {
+ const ref = useRef(null);
+ const isInView = useInView(ref, { once: true });
+
+ return (
+
+
+ {children}
+
+
+ );
+};
+
+interface ConnectButton {
+ connectWallet: () => void;
+}
+export const ConnectButton: FC = ({ connectWallet }) => {
+ return (
+
+ connectWallet()}>
+
+ {text.general.connectWallet}
+
+
+
);
};
diff --git a/frontend/src/pages/onboarding/styles.ts b/frontend/src/pages/onboarding/styles.ts
index bfd2c26bf..178621c7d 100644
--- a/frontend/src/pages/onboarding/styles.ts
+++ b/frontend/src/pages/onboarding/styles.ts
@@ -1,7 +1,7 @@
import { css } from "@emotion/react";
import styled from "@emotion/styled";
-import { ArrowDownIcon, ArrowUpRightIcon } from "../../assets";
-import { bounce, changeSize, CharacterImgs, disappear, fadeIn, PrimaryButton, slideUp, TitleText } from "../../components";
+import { ArrowUpIcon, ArrowUpRightIcon, DiscordIcon, TwitterIcon } from "../../assets";
+import { ButtonText, changeSize, disappear, fadeIn, PrimaryButton, slideUp, TitleText } from "../../components";
import { KreadIcon } from "../../components/logo/styles";
import { breakpoints, color, fontWeight, zIndex } from "../../design";
@@ -10,12 +10,128 @@ interface HeightProps {
}
export const OnboardingWrapper = styled.div`
+ display: flex;
position: relative;
- width: 100%;
+ flex-direction: column;
+ width: 100vw;
height: 100vh;
- scroll-behavior: smooth;
- overflow: auto;
- scroll-snap-type: y mandatory;
+`;
+
+export const SectionHeading = styled.h1`
+ font-weight: ${fontWeight.medium};
+ font-size: 32px;
+ line-height: 41px;
+ word-break: keep-all;
+ white-space: pre-wrap;
+ :first-letter {
+ text-transform: capitalize;
+ }
+`;
+
+interface TextProps {
+ customColor?: string;
+}
+
+export const SectionText = styled.p`
+ margin-top: 16px;
+ font-weight: ${fontWeight.light};
+ font-size: 24px;
+ line-height: 32px;
+ white-space: pre-line;
+ max-width: 100%;
+ :first-letter {
+ text-transform: capitalize;
+ }
+ ${({ customColor }): string => `color: ${customColor || color.black};`};
+
+ @media screen and (max-width: ${breakpoints.tablet}) {
+ max-width: 100%;
+ font-size: 16px;
+ line-height: 24px;
+ }
+`;
+
+interface SectionProps {
+ last?: boolean;
+}
+export const SectionWrapper = styled.div`
+ display: flex;
+ scroll-snap-align: center;
+ padding: 0 40px;
+ overflow: hidden;
+ width: 100%;
+ height: 100%;
+ ${({ last }): string => (last ? "flex-direction: row;" : "flex-direction: column;")};
+
+ @media (max-width: ${breakpoints.tablet}) {
+ padding: 24px 24px;
+ flex-direction: row;
+ }
+
+ @media (max-width: ${breakpoints.mobile}) {
+ padding: 24px 16px;
+ flex-direction: row;
+ }
+`;
+
+export const SectionContainer = styled.div`
+ display: flex;
+ width: 100%;
+ height: 100%;
+ transform: translateX(-100px);
+ opacity: 0;
+ gap: 0;
+ ${({ last }): string => (last ? "flex-direction: column; justify-content: space-between" : "flex-direction: row;")};
+
+ @media (max-width: ${breakpoints.tablet}) {
+ flex-direction: column;
+ gap: 16px;
+ }
+`;
+
+export const EndContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ width: 100%;
+`;
+export const LeftContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 50%;
+
+ @media screen and (max-width: ${breakpoints.tablet}) {
+ width: 100%;
+ }
+`;
+
+export const RightContent = styled.div`
+ display: flex;
+ position: relative;
+ width: 50%;
+
+ @media screen and (max-width: ${breakpoints.tablet}) {
+ display: flex;
+ position: relative;
+ width: 100%;
+ height: 800px;
+ }
+
+ @media screen and (max-width: ${breakpoints.mobile}) {
+ display: flex;
+ position: relative;
+ width: 100%;
+ height: 500px;
+ }
+`;
+
+export const TopContent = styled.div`
+ position: relative;
+ width: 50%;
+`;
+export const BottomContent = styled.div`
+ position: relative;
+ width: 50%;
`;
export const InfoText = styled.div`
@@ -40,9 +156,24 @@ export const ArrowUp = styled(ArrowUpRightIcon)`
`;
export const ButtonRow = styled.div`
- position: relative;
+ position: absolute;
display: flex;
gap: 16px;
+ margin-top: auto;
+ margin-bottom: auto;
+ top: 70%;
+ left: 25%;
+ transform: translate(-50%, -50%);
+ z-index: 100;
+
+ @media (max-width: ${breakpoints.tablet}) {
+ justify-content: center;
+ flex-direction: column;
+ top: 60%;
+ left: 50%;
+ width: 70%;
+ transform: translate(-50%, -50%);
+ }
`;
interface ButtonProps {
isVisible: boolean;
@@ -51,7 +182,8 @@ interface ButtonProps {
export const ButtonContainer = styled.div`
display: flex;
flex-direction: row;
- align-items: flex-start;
+ align-items: center;
+ justify-content: center;
padding: 0;
gap: 16px;
z-index: 100;
@@ -110,38 +242,47 @@ export const ArrowUpRight = styled(ArrowUpRightIcon)`
margin: 0 0 0 13px !important;
`;
-export const EndContent = styled.div`
- ${({ height }): string => `height: ${height - 100}px; min-height: ${height - 100}px;`};
- ${TitleText} {
- margin-top: 16px;
- }
+export const ScrollUp = styled(ArrowUpIcon)`
+ width: 24px;
+ height: 24px;
+`;
+
+export const FooterContainer = styled.div`
display: flex;
flex-direction: column;
width: 100%;
- height: 100vh;
- background-size: cover;
- scroll-snap-align: start;
- padding-top: 110px;
- gap: 80px;
+ bottom: 0;
+ position: relative;
+ z-index: ${zIndex.overCharacter};
`;
-export const MiddleContent = styled.div`
- ${({ height }): string => `height: ${height}px; min-height: ${height}px;`};
- ${TitleText} {
- margin-top: 16px;
+export const ScrollButton = styled.div`
+ display: flex;
+ align-items: center;
+ gap: 8px;
+
+ &:hover {
+ ${ButtonText} {
+ color: ${color.black};
+ }
+ ${ScrollUp} {
+ path {
+ stroke: ${color.black};
+ }
+ }
}
- width: 100%;
- height: 100vh;
- background-size: cover;
- scroll-snap-align: start;
- padding-top: 110px;
-`;
-export const FooterContainer = styled.div`
- position: absolute;
- right: 0;
- bottom: 0;
- z-index: ${zIndex.overCharacter};
+ ${ButtonText} {
+ color: ${color.grey};
+ }
+
+ ${ScrollUp} {
+ width: 24px;
+ height: 24px;
+ path {
+ stroke: ${color.grey};
+ }
+ }
`;
interface ViewProps {
@@ -150,32 +291,13 @@ interface ViewProps {
showSlider?: boolean;
showAnimation?: boolean;
}
-export const OnboardingContainer = styled.div`
- ${({ height }): string => `height: ${height}px;`};
- scroll-snap-type: y mandatory;
- max-height: 100vh;
- transition: all 0.4s;
- animation: ${disappear}, ${fadeIn};
- animation-duration: 5s, 0.5s;
- animation-delay: 0s, 5s;
- ${({ showAnimation }) =>
- showAnimation
- ? css`
- animation: ${disappear}, ${fadeIn};
- animation-duration: 5s, 0.5s;
- animation-delay: 0s, 5s;
- `
- : css`
- animation: ${disappear}, ${fadeIn};
- animation-duration: 0.8s, 0.5s;
- animation-delay: 0s, 0.8s;
- `};
-`;
-export const DefaultImage = styled(CharacterImgs)`
- position: absolute;
- right: 358px;
- top: 0;
+interface OnboardingProps {
+ height: number;
+}
+export const OnboardingContainer = styled.div`
+ overflow-y: scroll;
+ ${({ height }): string => `height: ${height - 64}px;`};
`;
export const Link = styled.a`
@@ -222,30 +344,32 @@ export const KreadLogo = styled(KreadIcon)`
animation: ${disappear}, ${fadeIn};
animation-duration: 0.8s, 0.5s;
animation-delay: 0s, 0.8s;
+ width: 100px;
+ height: 24px;
`;
export const LogoContainer = styled.div`
+ display: flex;
+ flex: 1;
+ justify-content: center;
+ margin-top: 40px;
${KreadLogo} {
- position: absolute;
- left: 50%;
- transform: translate(-45%, 0);
- top: 40px;
- bottom: 50%;
width: 100px;
height: 24px;
- right: 50%;
}
`;
export const KreadContainer = styled.div`
+ display: flex;
+ position: relative;
+ flex: 1;
+ justify-content: center;
+ align-items: center;
+ margin: auto;
+ height: 100%;
+ padding: 0 40px;
${KreadIcon} {
- top: 0;
- bottom: 0;
- margin: auto;
- position: absolute;
- left: 0;
- right: 0;
- width: 500px;
+ width: 100%;
height: 150px;
animation: ${changeSize} 4s 1;
animation-fill-mode: forwards;
@@ -258,89 +382,46 @@ export const KreadContainer = styled.div`
animation-duration: 0.7s;
animation-delay: 0s;
animation-fill-mode: forwards;
- ${KreadIcon} {
- position: absolute;
- left: 0;
- transform: translate(-45%, 0);
- top: 50%;
- bottom: 50%;
- width: 100px;
- height: 24px;
- }
`};
`;
-export const ArrowDown = styled(ArrowDownIcon)`
- position: absolute;
- left: 40px;
- bottom: -2px;
- -webkit-animation: ${bounce} 2s;
- animation: ${bounce} 2s;
- -webkit-animation-iteration-count: 2;
- animation-iteration-count: 2;
- animation-fill-mode: backwords;
- -webkit-animation-fill-mode: backwords;
- animation-delay: 6s;
- -webkit-animation-delay: 6s;
- path {
- stroke: ${color.black};
- }
- width: 24px;
- height: 24px;
-`;
-
-export const SectionContainer = styled.div`
- padding-left: 40px;
- padding-top: 50px;
- width: 460px;
- @media screen and (max-width: ${breakpoints.tablet}) {
- padding-left: 16px;
- width: 100%;
- }
+export const SocialsContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 16px;
+ margin-top: 16px;
+ height: 100%;
`;
-export const ScrollContainer = styled.div`
- position: absolute;
- left: 40px;
- bottom: 73px;
+export const Twitter = styled(TwitterIcon)`
+ width: 32px;
+ height: 32px;
`;
-
-export const GeneralSectionContainer = styled.div`
- padding-left: 40px;
- width: 460px;
-`;
-
-export const ConnectContainer = styled.div`
- ${({ isVisible }): string => {
- return isVisible
- ? `
- background: rgba(255, 255, 255, 0.46);
- backdrop-filter: blur(4px);
- z-index: 100;
- width: 460px;
- padding-top: 40px;
- padding-bottom: 40px;
- position: relative;
- `
- : "";
- }};
- ${({ isVisible }) =>
- isVisible === true
- ? css``
- : css`
- animation: ${disappear}, ${fadeIn};
- animation-duration: 0.5s, 0.5s;
- animation-delay: 0s, 0.5s;
- `};
-`;
-
-export const SocialsContainer = styled.div`
- display: flex;
- flex-direction: column;
+export const Discord = styled(DiscordIcon)`
+ width: 32px;
+ height: 32px;
`;
export const SocialLink = styled.div`
display: flex;
+ flex-direction: column;
align-items: center;
gap: 8px;
+
+ &:hover {
+ ${ButtonText} {
+ color: ${color.black};
+ }
+ ${Twitter} {
+ path {
+ fill: ${color.black};
+ }
+ }
+ ${Discord} {
+ path {
+ fill: ${color.black};
+ }
+ }
+ }
`;