Skip to content

Commit

Permalink
Merge pull request vechain#4 from zayLatt25/home
Browse files Browse the repository at this point in the history
Home page
  • Loading branch information
Ckodrad authored Sep 14, 2024
2 parents 2e96f4d + 238f7bd commit 48db691
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 40 deletions.
Binary file added apps/frontend/public/hill.png
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 apps/frontend/public/offset.png
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 apps/frontend/public/reduce.png
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 apps/frontend/public/sky.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 11 additions & 16 deletions apps/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import { DAppKitProvider } from "@vechain/dapp-kit-react";
import { ChakraProvider, Container, Flex } from "@chakra-ui/react";
import {
Dropzone,
Footer,
InfoCard,
Instructions,
Navbar,
SubmissionModal,
} from "./components";
import { ChakraProvider } from "@chakra-ui/react";
import { Footer, Navbar, SubmissionModal } from "./components";
import { lightTheme } from "./theme";
import { Routes, Route, BrowserRouter } from 'react-router-dom'
import { Routes, Route, BrowserRouter } from "react-router-dom";

import Home from "./routes/home";
import Protected from './routes/protected'
import Settings from './routes/settings'
import Login from './routes/login'
import Protected from "./routes/protected";
import Settings from "./routes/settings";
import Login from "./routes/login";

function App() {
const path = location.pathname;

return (
<BrowserRouter>
<ChakraProvider theme={lightTheme}>
Expand All @@ -27,8 +22,8 @@ function App() {
nodeUrl="https://testnet.vechain.org/"
logLevel={"DEBUG"}
>
<div className="bg-emerald-700">
<Navbar />
<div className="">
{path != "/" ? <Navbar /> : <></>}
<div className="min-h-[80vh] relative">
<Routes>
<Route path="/" element={<Home />} />
Expand All @@ -37,7 +32,7 @@ function App() {
<Route path="/login" element={<Login />} />
</Routes>
</div>
<Footer />
{path != "/" ? <Footer /> : <></>}
</div>
{/* MODALS */}
<SubmissionModal />
Expand Down
14 changes: 14 additions & 0 deletions apps/frontend/src/routes/home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.parallax {
min-height: 70px;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}

.scroll-container {
height: 870px;
background-color: #4e6b4c;
font-size: 36px;
padding: 40px;
}
122 changes: 98 additions & 24 deletions apps/frontend/src/routes/home.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,102 @@
import React from "react";
import { Container, Flex } from "@chakra-ui/react";
import {
Dropzone,
InfoCard,
Instructions,
} from "../components";
import { Card, CardBody, Flex, Button, Image, Text } from "@chakra-ui/react";
import "./home.css";

export default function Home() {
return (
<Flex flex={1}>
<Container
mt={{ base: 4, md: 10 }}
maxW={"container.xl"}
mb={{ base: 4, md: 10 }}
display={"flex"}
flex={1}
alignItems={"center"}
justifyContent={"flex-start"}
flexDirection={"column"}
return (
<div style={{ backgroundColor: "#c5dcc2" }}>
<div style={{ position: "absolute", top: "10px", right: "10px" }}>
<Button
bg="#2a3d29"
color="#c5dcc2"
_hover={{ bg: "#c5dcc2", color: "#2a3d29" }}
width="100px"
margin="3"
>
Profile
</Button>
</div>
<div className="parallax"></div>
<Image src="/hill.png" />

<div className="scroll-container">
<Flex justifyContent="center" alignItems="center" height="100%" gap={8}>
<div>
<Text color="#efefef" fontSize="5xl">
REDUCE
</Text>
<Card
bg="#efefef"
minHeight="350"
paddingTop="200"
borderRadius="25"
>
<InfoCard />
<Instructions />
<Dropzone />
</Container>
<Image
src="/reduce.png"
position="absolute"
top="-80px"
left="50%"
transform="translateX(-50%)"
width="300px"
/>

<CardBody>
<Text fontSize="md">
View a summary of all your customers over the last month.
</Text>

<Flex justify="center" mt="4">
<Button
bg="#2a3d29"
color="#c5dcc2"
_hover={{ bg: "#c5dcc2", color: "#2a3d29" }}
width="200px"
>
Button
</Button>
</Flex>
</CardBody>
</Card>
</div>

<div>
<Text color="#efefef" fontSize="5xl" textAlign="right">
OFFSET
</Text>
<Card
bg="#efefef"
minHeight="350"
paddingTop="200"
borderRadius="25"
>
<Image
src="/offset.png"
position="absolute"
top="-90px"
left="50%"
transform="translateX(-70%)"
width="300px"
/>

<CardBody>
<Text fontSize="md">
View a summary of all your customers over the last month.
</Text>

<Flex justify="center" mt="4">
<Button
bg="#2a3d29"
color="#c5dcc2"
_hover={{ bg: "#c5dcc2", color: "#2a3d29" }}
width="200px"
>
Button
</Button>
</Flex>
</CardBody>
</Card>
</div>
</Flex>
);
}
</div>
</div>
);
}

0 comments on commit 48db691

Please sign in to comment.