Skip to content

bla #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: react-mini
Choose a base branch
from
Open

bla #19

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"styled-components": "^5.3.10"
},
"devDependencies": {
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@vitejs/plugin-react": "^3.0.0",
"vite": "^4.0.0"
}
}
}
Binary file added public/img/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 26 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
import styled from "styled-components"
import Hero from "./components/Hero"
import Who from "./components/Who"
import Works from "./components/Works"
import Contact from "./components/Contact"

const Container = styled.div`
height: 100vh;
scroll-snap-type: y mandatory;
scroll-behavior: smooth;
overflow-y: auto;
scrollbar-width: none;
color: #000;
background: url("./public/img/background.png");
&::-webkit-scrollbar {
display: none;
}

`

function App() {

return (
<div>
Hello world!
</div>
<Container>
<Hero />
<Who />
<Works />
<Contact />
</Container>
)
}

Expand Down
15 changes: 15 additions & 0 deletions src/components/Contact.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react'
import styled from 'styled-components'

const Section = styled.div`
height: 100vh;
scroll-snap-align: center;
`

const Contact = () => {
return (
<Section>Contact</Section>
)
}

export default Contact
105 changes: 105 additions & 0 deletions src/components/Hero.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import React from 'react'
import styled from 'styled-components'
import Navbar from './Navbar'

const Section = styled.div`
height: 100vh;
scroll-snap-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
`

const Container = styled.div`
height: 100vh;
scroll-snap-align: center;
width: 75rem;
display: flex;
justify-content: space-between;
`

const Left = styled.div`
flex: 2;
display: flex;
flex-direction: column;
justify-content: center;
gap: 20px;
`
const Title = styled.h1`
font-size: 3rem;
`;
const WhatWeDo = styled.div`
display: flex;
align-items: center;
gap: 10px;
`;
const Line = styled.img`
height: 5px;
`;

const Subtitle = styled.h3`
color: #da4ea2;
`;
const Desc = styled.p`
font-size: 24px;
color: #000;
`;

const Button = styled.button`
width: 100px;
padding: 10px;
cursor: pointer;
background-color: #000;
color: #fff;
border: none;
border-radius: 5px;
`

const Right = styled.div`
flex: 3;
position: relative;
`
const Img = styled.img`
width: 800px;
height: 600px;
object-fit: contain;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
animation: animate 2s infinite ease alternate;

@keyframes animate {
to {
transform: translateY(50px);
}
}
`;

const Hero = () => {
return (
<Section>
<Navbar />
<Container>
<Left>
<Title>Lorem. Ipsum. Dolor.</Title>
<WhatWeDo>
<Line src="/img.line.png" />
<Subtitle>What we do</Subtitle>
</WhatWeDo>
<Desc>Lorem ipsum dolor sit amet consectetur adipisicing elit.</Desc>
<Button>Learn more</Button>
</Left>
<Right>
{/* 3d model */}
<Img src="/img/3d.png" />
</Right>
</Container >
</Section >
)
}

export default Hero
76 changes: 76 additions & 0 deletions src/components/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import React from 'react'
import styled from 'styled-components'

const Section = styled.div`
display: flex;
justify-content: center;
`

const Container = styled.div`
width: 75rem;
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0px;
`

const Links = styled.div`
display: flex;
align-items: center;
Gap: 50px;
`;
const Icons = styled.div`
display: flex;
align-items: center;
Gap: 20px;`;

const Logo = styled.img`
height: 50px;
`;
const List = styled.ul`
display: flex;
gap: 20px;
list-style: none;
`;

const ListItem = styled.li`
cursor: pointer;`;

const Icon = styled.img`
width: 20px;
cursor: pointer;`;

const Button = styled.button`
width: 100px;
padding: 10px;
cursor: pointer;
background-color: #000;
color: #fff;
border: none;
border-radius: 5px;
`

const Navbar = () => {
return (
<Section>
<Container>
<Links>
<Logo src="./public/img/logo.png" />
<List>
<ListItem>Home</ListItem>
<ListItem>About</ListItem>
<ListItem>Works</ListItem>
<ListItem>Contact</ListItem>
</List>
</Links>
<Icons>
<Icon src="./public/img/search.png" />
<Button>Hire now</Button>
</Icons>

</Container>
</Section>
)
}

export default Navbar
81 changes: 81 additions & 0 deletions src/components/Who.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import React from 'react'
import styled from 'styled-components'

const Section = styled.div`
height: 100vh;
scroll-snap-align: center;
display: flex;
justify-content: center;
`

const Container = styled.div`
height: 100vh;
scroll-snap-align: center;
width: 75rem;
display: flex;
justify-content: space-between;
`

const Left = styled.div`
flex: 1;

`
const Title = styled.h1`
font-size: 3rem;
`;

const Right = styled.div`
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
gap: 20px;
`
const WhatWeDo = styled.div`
display: flex;
align-items: center;
gap: 10px;
`;
const Line = styled.img`
height: 5px;
`;

const Subtitle = styled.h3`
color: #da4ea2;
`;
const Desc = styled.p`
font-size: 24px;
color: lightgray;
`;

const Button = styled.button`
width: 100px;
padding: 10px;
cursor: pointer;
background-color: #000;
color: #fff;
border: none;
border-radius: 5px;
`

const Who = () => {
return (
<Section>
<Container>
<Left>
</Left>
<Right>
<Title>think outside the box.</Title>
<WhatWeDo>
<Line src="/img.line.png" />
<Subtitle>Who we are</Subtitle>
</WhatWeDo>
<Desc>Lorem ipsum dolor sit amet consectetur adipisicing elit.</Desc>
<Button>Zie werken</Button>
</Right>
</Container >
</Section >
)
}

export default Who
15 changes: 15 additions & 0 deletions src/components/Works.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react'
import styled from 'styled-components'

const Section = styled.div`
height: 100vh;
scroll-snap-align: center;
`

const Works = () => {
return (
<Section>Works</Section>
)
}

export default Works