Skip to content

Commit

Permalink
fix: setup guide
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Dec 10, 2024
1 parent 4bcc57a commit 852e3a7
Show file tree
Hide file tree
Showing 15 changed files with 281 additions and 34 deletions.
40 changes: 40 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,44 @@
<lastmod>2025-01-10</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://ekokedao.com/guide/faq</loc>
<lastmod>2025-01-10</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://ekokedao.com/guide/whitepaper</loc>
<lastmod>2025-01-10</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://ekokedao.com/guide/canisters/deferred-data</loc>
<lastmod>2025-01-10</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://ekokedao.com/guide/canisters/deferred-minter</loc>
<lastmod>2025-01-10</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://ekokedao.com/guide/contracts/deferred</loc>
<lastmod>2025-01-10</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://ekokedao.com/guide/contracts/ekoke</loc>
<lastmod>2025-01-10</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://ekokedao.com/guide/contracts/marketplace</loc>
<lastmod>2025-01-10</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://ekokedao.com/guide/contracts/reward-pool</loc>
<lastmod>2025-01-10</lastmod>
<priority>1.00</priority>
</url>
</urlset>
6 changes: 6 additions & 0 deletions src/js/components/App/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const ProfileContracts = React.lazy(
() => import('./pages/Profile/pages/Contracts'),
);

// Guide
const Guide = React.lazy(() => import('./pages/Guide'));

const AppRouter = () => (
<>
<SeoEngine />
Expand Down Expand Up @@ -52,6 +55,9 @@ const AppRouter = () => (
element={<ProfileContracts />}
/>

{/* Guide */}
<RouterRoute path={Route.url(Route.GUIDE)} element={<Guide />} />

{/* 404 */}
<RouterRoute path="*" element={<NotFound />} />
</Routes>
Expand Down
7 changes: 7 additions & 0 deletions src/js/components/App/pages/Guide.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from 'react';

import Wrapper from './Guide/Wrapper';

const Guide = () => <Wrapper></Wrapper>;

export default Guide;
121 changes: 121 additions & 0 deletions src/js/components/App/pages/Guide/Wrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import * as React from 'react';
import { useLocation } from 'react-router-dom';
import * as IconMd from 'react-icons/md';
import * as FaIcon from 'react-icons/fa6';

import { Route } from '../../../../utils/routes';
import Container from '../../../reusable/Container';
import Link from '../../../reusable/Link';

enum Item {
Architecture = Route.GUIDE_ARCHITECTURE,
Faq = Route.GUIDE_FAQ,
DeferredData = Route.GUIDE_CANISTERS_DATA,
DeferredMinter = Route.GUIDE_CANISTERS_MINTER,
DeferredContracts = Route.GUIDE_CONTRACTS_DEFERRED,
EkokeContracts = Route.GUIDE_CONTRACTS_EKOKE,
MarketplaceContracts = Route.GUIDE_CONTRACTS_MARKETPLACE,
RewardPoolContracts = Route.GUIDE_CONTRACTS_REWARD_POOL,
Whitepaper = Route.GUIDE_WHITEPAPER,
}

const menu = {
[Item.Faq]: {
title: 'F.A.Q.',
url: Route.GUIDE_FAQ,
icon: <IconMd.MdQuestionMark className="inline mr-2" size={24} />,
},
[Item.Architecture]: {
title: 'Architecture',
url: Route.GUIDE_ARCHITECTURE,
icon: <IconMd.MdAccountTree className="inline mr-2" size={24} />,
},
[Item.DeferredData]: {
title: 'Deferred Data',
url: Route.GUIDE_CANISTERS_DATA,
icon: <FaIcon.FaInfinity className="inline mr-2" size={24} />,
},
[Item.DeferredMinter]: {
title: 'Deferred Minter',
url: Route.GUIDE_CANISTERS_MINTER,
icon: <FaIcon.FaInfinity className="inline mr-2" size={24} />,
},
[Item.DeferredContracts]: {
title: 'Deferred Contracts',
url: Route.GUIDE_CONTRACTS_DEFERRED,
icon: <FaIcon.FaEthereum className="inline mr-2" size={24} />,
},
[Item.EkokeContracts]: {
title: 'Ekoke Contracts',
url: Route.GUIDE_CONTRACTS_EKOKE,
icon: <FaIcon.FaEthereum className="inline mr-2" size={24} />,
},
[Item.MarketplaceContracts]: {
title: 'Marketplace Contracts',
url: Route.GUIDE_CONTRACTS_MARKETPLACE,
icon: <FaIcon.FaEthereum className="inline mr-2" size={24} />,
},
[Item.RewardPoolContracts]: {
title: 'Reward Pool Contracts',
url: Route.GUIDE_CONTRACTS_REWARD_POOL,
icon: <FaIcon.FaEthereum className="inline mr-2" size={24} />,
},
[Item.Whitepaper]: {
title: 'Whitepaper',
url: Route.GUIDE_WHITEPAPER,
icon: <IconMd.MdDescription className="inline mr-2" size={24} />,
},
};

const routeToItems = {
[Route.url(Route.GUIDE_FAQ)]: Item.Faq,
[Route.url(Route.GUIDE_ARCHITECTURE)]: Item.Architecture,
[Route.url(Route.GUIDE_CANISTERS_DATA)]: Item.DeferredData,
[Route.url(Route.GUIDE_CANISTERS_MINTER)]: Item.DeferredMinter,
[Route.url(Route.GUIDE_CONTRACTS_DEFERRED)]: Item.DeferredContracts,
[Route.url(Route.GUIDE_CONTRACTS_EKOKE)]: Item.EkokeContracts,
[Route.url(Route.GUIDE_CONTRACTS_MARKETPLACE)]: Item.MarketplaceContracts,
[Route.url(Route.GUIDE_CONTRACTS_REWARD_POOL)]: Item.RewardPoolContracts,
[Route.url(Route.GUIDE_WHITEPAPER)]: Item.Whitepaper,
};

interface Props {
children?: React.ReactNode | React.ReactNode[] | string;
}

const Wrapper = ({ children }: Props) => (
<Container.FlexRow className="w-full">
<Container.Container className="w-3/12 xl:w-2/12">
<Menu />
</Container.Container>
<Container.Container className="w-9/12 xl:w-10/12 bg-white">
{children}
</Container.Container>
</Container.FlexRow>
);

const Menu = () => {
const { pathname } = useLocation();
const current: Item = routeToItems[pathname];

return (
<Container.FlexCols className="min-h-screen gap-2 border-r-2">
{Object.entries(menu).map(([key, value]) => (
<Container.Container key={key}>
<Link.Default
className={`${(key as unknown as Item) === current ? 'border-b-4 border-brandRed text-brand bg-gray-200 hover:bg-gray-300' : 'text-text border-b-2 border-transparent'}
hover:border-brandRed hover:text-text hover:no-underline flex-1`}
href={value.url}
>
<span className="block text-lg py-3 px-4 hover:bg-gray-300">
{value.icon}
{value.title}
</span>
</Link.Default>
</Container.Container>
))}
</Container.FlexCols>
);
};

export default Wrapper;
2 changes: 1 addition & 1 deletion src/js/components/App/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Presale from './Home/Presale';
const Home = () => (
<Container.FlexCols className="gap-8 items-center">
<Intro />
<Container.Container className="w-3/6">
<Container.Container className="w-3/6 sm:w-full">
<Presale />
</Container.Container>
<Tokenomics />
Expand Down
1 change: 1 addition & 0 deletions src/js/components/App/pages/Home/Intro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const Intro = () => (
powered <strong>Deferred NFT</strong> system, buyers can pay for their
homes in manageable installments. Each NFT represents a payment, and
once all are completed, ownership of the property is fully transferred.
{' '}
<strong>EKOKE DAO</strong> empowers members to invest in these NFTs,
earning deflationary <strong>EKOKE</strong> tokens as{' '}
<strong>rewards</strong> while supporting buyers with transparent and
Expand Down
8 changes: 6 additions & 2 deletions src/js/components/App/pages/Home/Roadmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const Roadmap = () => (
</Container.Container>
<Container.FlexCols className="gap-4 w-full">
<Container.Container>
<span className="text-xl font-bold text-brandRed">2025</span>
<span className="block sm:text-center text-xl font-bold text-brandRed">
2025
</span>
<Container.FlexResponsiveRow className="gap-4">
<Milestone title="EKOKE Presale" date="Q1">
EKOKE Presale will be the first step to start the project. The goal
Expand Down Expand Up @@ -48,7 +50,9 @@ const Roadmap = () => (
</Container.FlexResponsiveRow>
</Container.Container>
<Container.Container>
<span className="text-xl font-bold text-brandRed">2026</span>
<span className="block sm:text-center text-xl font-bold text-brandRed">
2026
</span>
<Container.FlexResponsiveRow className="gap-4">
<Milestone title="First EKOKE-DAO partners" date="Q1">
We aim to start building the real-estate network in the first
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/App/pages/Home/Tokenomics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const Tokenomics = () => (
</span>
</Container.Container>
</Container.FlexCols>
<EkokeTokenomics className="gap-4 flex-1" />
<EkokeTokenomics className="sm:items-center sm:justify-center gap-4 flex-1" />
</Container.FlexResponsiveRow>
</Container.FlexCols>
);
Expand Down
15 changes: 3 additions & 12 deletions src/js/components/App/pages/Presale/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Container from '../../../reusable/Container';
import Paragraph from '../../../reusable/Paragraph';
import Heading from '../../../reusable/Heading';
import Input from '../../../reusable/Input';
import YoutubeVideo from '../../../reusable/YoutubeVideo';

const EKOKE_ADDRESS = '0x0';

Expand All @@ -18,17 +19,7 @@ const Info = () => {

return (
<Container.Container>
<Container.Container>
<iframe
className="w-full"
height={420}
src="https://www.youtube.com/embed/R_B4AAOyARI"
title="Zelda but Literally EVERYTHING is Randomized (FULL RUN PART 2)"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerPolicy="strict-origin-when-cross-origin"
/>
</Container.Container>
<YoutubeVideo url="https://www.youtube.com/watch?v=R_B4AAOyARI" />
<Container.FlexCols className="p-4 gap-4 w-full">
<Container.FlexCols className="text-center">
<Heading.H2 className="text-center">
Expand All @@ -40,7 +31,7 @@ const Info = () => {
type="text"
value={EKOKE_ADDRESS}
readOnly
className="!p-2 text-center text-xl"
className="!p-2 text-center text-xl sm:text-sm"
containerClassName="mb-0"
/>
<button onClick={onAddressCopy}>
Expand Down
28 changes: 17 additions & 11 deletions src/js/components/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ import Footer from './Footer';
import Routes from './App/Routes';
import { BrowserRouter } from 'react-router-dom';

const AppLayout = () => (
<Page.BlankPage>
<Header />
<Container.PageContent className="bg-page w-page min-h-[80vh] pb-16 mt-[80px] pt-[20px] sm:pt-[80px]">
<BrowserRouter>
<Routes />
</BrowserRouter>
</Container.PageContent>
<Footer />
</Page.BlankPage>
);
const AppLayout = () => {
const fullSize = window.location.pathname.startsWith('/guide');

return (
<Page.BlankPage>
<Header />
<Container.PageContent
className={`bg-page ${fullSize ? 'w-screen' : 'w-page pt-[20px] sm:pt-[40px] pb-16'} min-h-[80vh] mt-[80px] sm:mt-[140px]`}
>
<BrowserRouter>
<Routes />
</BrowserRouter>
</Container.PageContent>
<Footer />
</Page.BlankPage>
);
};

export default AppLayout;
17 changes: 14 additions & 3 deletions src/js/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import X from './svg/X';
import TikTok from './svg/TikTok';
import Telegram from './svg/Telegram';
import { Route } from '../utils/routes';
import Paragraph from './reusable/Paragraph';

const Footer = () => {
const year = new Date().getFullYear();
Expand All @@ -16,7 +17,7 @@ const Footer = () => {
<Container.Container className="bg-brandRed text-white m-0 p-8">
<div className="bg-white content-none h-[1px] mx-auto w-page"></div>
<Container.FlexResponsiveRow className="justify-between w-page sm:w-full mx-auto">
<Container.FlexCols className="gap-4">
<Container.FlexCols className="gap-4 flex-1">
<Heading.H2 className="text-white">EKOKE Token</Heading.H2>
<Link.Default href={Route.HOME} className="text-white">
Home
Expand All @@ -31,7 +32,7 @@ const Footer = () => {
About
</Link.Default>
</Container.FlexCols>
<Container.FlexCols className="gap-4">
<Container.FlexCols className="gap-4 flex-1">
<Heading.H2 className="text-white">Contacts</Heading.H2>
<Link.Default
href={'mailto:[email protected]'}
Expand All @@ -46,7 +47,7 @@ const Footer = () => {
Piazzale Brescia, 16, 20149 Milano MI, Italy
</Link.Default>
</Container.FlexCols>
<Container.FlexCols className="gap-4">
<Container.FlexCols className="gap-4 flex-1">
<Heading.H2 className="text-white">Follow Us On</Heading.H2>
<Link.IconLink
href={'https://github.com/EKOKEtoken'}
Expand Down Expand Up @@ -97,6 +98,16 @@ const Footer = () => {
<span className="ml-2">X.com</span>
</Link.IconLink>
</Container.FlexCols>
<Container.FlexCols className="gap-4 flex-1">
<Heading.H2 className="text-white">Disclaimer</Heading.H2>
<Paragraph.Default className="text-white">
Cryptocurrency may be unregulated in your jurisdiction. The value
of cryptocurrencies may go down as well as up. Profits may be
subject to capital gains or other taxes applicable in your
jurisdiction. It is your responsibility to ensure that you comply
with tax and other legal obligations in your jurisdiction.
</Paragraph.Default>
</Container.FlexCols>
</Container.FlexResponsiveRow>
<p className="text-xs text-center text-white my-4">
Copyright © {year} by ekoke token | Powered and secured by ICP
Expand Down
10 changes: 8 additions & 2 deletions src/js/components/Header/Desktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ import { MetamaskProfile } from '../MetamaskConnect';
import { Route } from '../../utils/routes';
import TopbarLink from './TopbarLink';

import EkokeLogo from '../../../assets/images/ekoke-logo.webp';

const Desktop = () => (
<div className="fixed block sm:hidden left-0 top-0 h-[80px] w-full bg-page z-40 shadow-sm">
<Container.FlexRow className="justify-between items-center py-4 px-4">
<Container.Container className="flex-1" />
<Container.Container className="hidden xl:block xl:flex-1" />
<Container.FlexRow className="items-center justify-center gap-8 flex-1">
<TopbarLink name={'Home'} href={Route.HOME} />
<Container.FlexRow className="items-center gap-4">
<img src={EkokeLogo} alt="EKOKE DAO" height={40} width={40} />
<TopbarLink name={'Home'} href={Route.HOME} />
</Container.FlexRow>
<TopbarLink name={'Marketplace'} href={Route.MARKETPLACE} />
<TopbarLink name={'EKOKE Presale'} href={Route.PRESALE} />
<TopbarLink name={'About'} href={Route.ABOUT} />
<TopbarLink name={'Guide'} href={Route.GUIDE} />
</Container.FlexRow>
<Container.Container className="flex-1">
<MetamaskProfile />
Expand Down
Loading

0 comments on commit 852e3a7

Please sign in to comment.