├── .gitignore ├── .vscode └── settings.json ├── README.md ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── App.css ├── App.js ├── components │ ├── ButtonElements.js │ ├── CoverSection │ │ ├── CoverElements.js │ │ └── index.js │ ├── Footer │ │ ├── FooterElements.js │ │ └── index.js │ ├── InfoSection │ │ ├── Data.js │ │ ├── InfoElements.js │ │ └── index.js │ ├── Navbar │ │ ├── NavbarElements.js │ │ └── index.js │ ├── Services │ │ ├── ServicesElements.js │ │ └── index.js │ └── Sidebar │ │ ├── SidebarElements.js │ │ └── index.js ├── images │ ├── svg-1.svg │ ├── svg-2.svg │ ├── svg-3.svg │ ├── svg-4.svg │ ├── svg-5.svg │ └── svg-6.svg ├── index.js ├── pages │ ├── index.js │ └── signin.js └── videos │ └── video.mp4 └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "javascript.format.semicolons": "insert", 3 | "files.insertFinalNewline": true 4 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Awesome Landing Page 2 | 3 | Laning page with background video and smooth scroll, bootstrapped with [Create React App](https://github.com/facebook/create-react-app) and styled component. 4 | 5 | ## Live Demo 6 | 7 | A live demo is available at [github-pages](https://mazid1.github.io/react-landing-page-with-styled-component-and-smooth-scroll/#/). 8 | 9 | ## Available Scripts 10 | 11 | In the project directory, you can run: 12 | 13 | ### `yarn start` 14 | 15 | Runs the app in the development mode.
16 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 17 | 18 | The page will reload if you make edits.
19 | You will also see any lint errors in the console. 20 | 21 | ### `yarn test` 22 | 23 | Launches the test runner in the interactive watch mode.
24 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 25 | 26 | ### `yarn build` 27 | 28 | Builds the app for production to the `build` folder.
29 | It correctly bundles React in production mode and optimizes the build for the best performance. 30 | 31 | The build is minified and the filenames include the hashes.
32 | Your app is ready to be deployed! 33 | 34 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 35 | 36 | ### `yarn eject` 37 | 38 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 39 | 40 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 41 | 42 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 43 | 44 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 45 | 46 | ## Learn More 47 | 48 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 49 | 50 | To learn React, check out the [React documentation](https://reactjs.org/). 51 | 52 | ### Code Splitting 53 | 54 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting 55 | 56 | ### Analyzing the Bundle Size 57 | 58 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size 59 | 60 | ### Making a Progressive Web App 61 | 62 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app 63 | 64 | ### Advanced Configuration 65 | 66 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration 67 | 68 | ### Deployment 69 | 70 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment 71 | 72 | ### `yarn build` fails to minify 73 | 74 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify 75 | 76 | ## Thanking 77 | 78 | Inspired by [Brian Design](https://www.youtube.com/channel/UCsKsymTY_4BYR-wytLjex7A) 79 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "awesome-landing-page", 3 | "version": "0.1.0", 4 | "private": true, 5 | "homepage": ".", 6 | "dependencies": { 7 | "@testing-library/jest-dom": "^4.2.4", 8 | "@testing-library/react": "^9.3.2", 9 | "@testing-library/user-event": "^7.1.2", 10 | "react": "^16.14.0", 11 | "react-dom": "^16.14.0", 12 | "react-icons": "^3.11.0", 13 | "react-router-dom": "^5.2.0", 14 | "react-scripts": "3.4.3", 15 | "react-scroll": "^1.8.1", 16 | "styled-components": "^5.2.0" 17 | }, 18 | "scripts": { 19 | "start": "react-scripts start", 20 | "build": "react-scripts build", 21 | "test": "react-scripts test", 22 | "eject": "react-scripts eject", 23 | "predeploy": "npm run build", 24 | "deploy": "gh-pages -d build" 25 | }, 26 | "eslintConfig": { 27 | "extends": "react-app" 28 | }, 29 | "browserslist": { 30 | "production": [ 31 | ">0.2%", 32 | "not dead", 33 | "not op_mini all" 34 | ], 35 | "development": [ 36 | "last 1 chrome version", 37 | "last 1 firefox version", 38 | "last 1 safari version" 39 | ] 40 | }, 41 | "devDependencies": { 42 | "gh-pages": "^3.1.0" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazid1/react-landing-page-with-styled-component-and-smooth-scroll/58760065af05f1565672c573cfc9ece358477c6e/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 25 | 26 | React App 27 | 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazid1/react-landing-page-with-styled-component-and-smooth-scroll/58760065af05f1565672c573cfc9ece358477c6e/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazid1/react-landing-page-with-styled-component-and-smooth-scroll/58760065af05f1565672c573cfc9ece358477c6e/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | *{ 2 | box-sizing: border-box; 3 | margin: 0; 4 | padding: 0; 5 | font-family: 'Encode Sans Expanded', sans-serif; 6 | } -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './App.css'; 3 | import { HashRouter as Router, Route, Switch } from 'react-router-dom'; 4 | import Home from './pages'; 5 | import SigninPage from './pages/signin'; 6 | 7 | function App() { 8 | return ( 9 | 10 | 11 | 12 | 13 | 14 | 15 | ); 16 | } 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /src/components/ButtonElements.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { Link } from 'react-scroll'; 3 | 4 | export const Button = styled(Link)` 5 | border-radius: 50px; 6 | background: ${({ primary }) => (primary ? '#01BF71' : '#010606')}; 7 | white-space: nowrap; 8 | padding: ${({ big }) => (big ? '14px 48px' : '12px 30px')}; 9 | color: ${({ dark }) => (dark ? '#010606' : '#fff')}; 10 | font-size: ${({ fontBig }) => (fontBig ? '20px' : '16px')}; 11 | outline: none; 12 | border: none; 13 | cursor: pointer; 14 | display: flex; 15 | justify-content: center; 16 | align-items: center; 17 | transition: all 0.2s ease-in-out; 18 | 19 | &:hover { 20 | transition: all 0.2s ease-in-out; 21 | background: ${({ primary }) => (primary ? '#fff' : '#01BF71')}; 22 | } 23 | `; 24 | -------------------------------------------------------------------------------- /src/components/CoverSection/CoverElements.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { MdArrowForward, MdKeyboardArrowRight } from 'react-icons/md'; 3 | 4 | export const CoverContainer = styled.div` 5 | background: #0c0c0c; 6 | display: flex; 7 | justify-content: center; 8 | align-items: center; 9 | padding: 0 30px; 10 | height: 800px; 11 | position: relative; 12 | z-index: 1; 13 | 14 | :before { 15 | content: ''; 16 | position: absolute; 17 | top: 0; 18 | left: 0; 19 | right: 0; 20 | bottom: 0; 21 | background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%), 22 | linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 100%); 23 | z-index: 2; 24 | } 25 | `; 26 | 27 | export const CoverBg = styled.div` 28 | position: absolute; 29 | top: 0; 30 | right: 0; 31 | bottom: 0; 32 | left: 0; 33 | width: 100%; 34 | height: 100%; 35 | overflow: hidden; 36 | `; 37 | 38 | export const VideoBg = styled.video` 39 | width: 100%; 40 | height: 100%; 41 | -o-object-fit: cover; 42 | object-fit: cover; 43 | background: #232a34; 44 | `; 45 | 46 | export const CoverContent = styled.div` 47 | z-index: 3; 48 | max-width: 1200px; 49 | position: absolute; 50 | padding: 8px 24px; 51 | display: flex; 52 | flex-direction: column; 53 | align-items: center; 54 | `; 55 | 56 | export const CoverH1 = styled.h1` 57 | color: #fff; 58 | font-size: 48px; 59 | text-align: center; 60 | 61 | @media screen and (max-width: 768px) { 62 | font-size: 40px; 63 | } 64 | 65 | @media screen and (max-width: 480px) { 66 | font-size: 32px; 67 | } 68 | `; 69 | 70 | export const CoverP = styled.p` 71 | margin-top: 24px; 72 | color: #fff; 73 | font-size: 24px; 74 | text-align: center; 75 | max-width: 600px; 76 | 77 | @media screen and (max-width: 768px) { 78 | font-size: 22px; 79 | } 80 | 81 | @media screen and (max-width: 480px) { 82 | font-size: 18px; 83 | } 84 | `; 85 | 86 | export const CoverBtnWrapper = styled.div` 87 | margin-top: 32px; 88 | display: flex; 89 | flex-direction: column; 90 | align-items: center; 91 | `; 92 | 93 | export const ArrowForward = styled(MdArrowForward)` 94 | margin-left: 8px; 95 | font-size: 20px; 96 | `; 97 | 98 | export const ArrowRight = styled(MdKeyboardArrowRight)` 99 | margin-left: 8px; 100 | font-size: 20px; 101 | `; 102 | -------------------------------------------------------------------------------- /src/components/CoverSection/index.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import Video from '../../videos/video.mp4'; 3 | import { CoverContainer, CoverBg, VideoBg, CoverContent, CoverH1, CoverP, CoverBtnWrapper, ArrowForward, ArrowRight } from './CoverElements'; 4 | import { Button } from '../ButtonElements'; 5 | 6 | const CoverSection = () => { 7 | const [hover, setHover] = useState(false); 8 | 9 | const onHover = () => { 10 | setHover(!hover); 11 | }; 12 | 13 | return ( 14 | 15 | 16 | 17 | 18 | 19 | Awesome Title Goes Here 20 | Sign up for a new account today and consume awesome features from our website. 21 | 22 | 25 | 26 | 27 | 28 | ); 29 | }; 30 | 31 | export default CoverSection; 32 | -------------------------------------------------------------------------------- /src/components/Footer/FooterElements.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { Link } from 'react-router-dom'; 3 | 4 | export const FooterContainer = styled.footer` 5 | background-color: #101522; 6 | `; 7 | 8 | export const FooterWrapper = styled.div` 9 | padding: 48px 24px; 10 | display: flex; 11 | flex-direction: column; 12 | justify-content: center; 13 | align-items: center; 14 | max-width: 1100px; 15 | margin: 0 auto; 16 | `; 17 | 18 | export const FooterLinksContainer = styled.div` 19 | display: flex; 20 | justify-content: center; 21 | 22 | @media screen and (max-width: 820px) { 23 | padding-top: 32px; 24 | } 25 | `; 26 | 27 | export const FooterLinksWrapper = styled.div` 28 | display: flex; 29 | 30 | @media screen and (max-width: 820px) { 31 | flex-direction: column; 32 | } 33 | `; 34 | 35 | export const FooterLinkItems = styled.div` 36 | display: flex; 37 | flex-direction: column; 38 | align-items: flex-start; 39 | margin: 16px; 40 | text-align: left; 41 | width: 160px; 42 | box-sizing: border-box; 43 | color: #fff; 44 | 45 | @media screen and (max-width: 420px) { 46 | margin: 0; 47 | padding: 10px; 48 | width: 100%; 49 | } 50 | `; 51 | 52 | export const FooterLinkTitle = styled.h1` 53 | font-size: 14px; 54 | margin-bottom: 16px; 55 | `; 56 | 57 | export const FooterLink = styled(Link)` 58 | color: #fff; 59 | text-decoration: none; 60 | margin-bottom: 0.5rem; 61 | font-size: 14px; 62 | 63 | &:hover { 64 | color: #01bf71; 65 | transition: 0.3s ease-out; 66 | } 67 | `; 68 | 69 | export const SocialMedia = styled.section` 70 | max-width: 1000px; 71 | width: 100%; 72 | `; 73 | 74 | export const SocialMediaWrapper = styled.div` 75 | display: flex; 76 | justify-content: space-between; 77 | align-items: center; 78 | max-width: 1100px; 79 | margin: 40px auto 0 auto; 80 | 81 | @media screen and (max-width: 820px) { 82 | flex-direction: column; 83 | } 84 | `; 85 | 86 | export const SocialLogo = styled(Link)` 87 | color: #fff; 88 | justify-self: start; 89 | cursor: pointer; 90 | text-decoration: none; 91 | font-size: 1.5rem; 92 | display: flex; 93 | align-items: center; 94 | margin-bottom: 16px; 95 | font-weight: bold; 96 | `; 97 | 98 | export const WebsiteRights = styled.small` 99 | color: #fff; 100 | margin-bottom: 16px; 101 | `; 102 | 103 | export const SocialIcons = styled.div` 104 | display: flex; 105 | justify-content: space-between; 106 | align-items: center; 107 | width: 240px; 108 | `; 109 | 110 | export const SocialIconLink = styled.a` 111 | color: #fff; 112 | font-size: 24px; 113 | `; 114 | -------------------------------------------------------------------------------- /src/components/Footer/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { animateScroll as scroll } from 'react-scroll'; 3 | import { FaFacebook, FaInstagram, FaYoutube, FaTwitter, FaLinkedin } from 'react-icons/fa'; 4 | import { FooterContainer, FooterWrapper, FooterLinksContainer, FooterLinksWrapper, FooterLinkItems, FooterLinkTitle, FooterLink, SocialMedia, SocialMediaWrapper, SocialLogo, WebsiteRights, SocialIcons, SocialIconLink } from './FooterElements'; 5 | 6 | const Footer = () => { 7 | const toggleHome = () => { 8 | scroll.scrollToTop(); 9 | }; 10 | 11 | return ( 12 | 13 | 14 | 15 | 16 | 17 | 18 | About Us 19 | How it works 20 | Testimonials 21 | Careers 22 | Investors 23 | Terms of Service 24 | 25 | 26 | 27 | About Us 28 | How it works 29 | Testimonials 30 | Careers 31 | Investors 32 | Terms of Service 33 | 34 | 35 | 36 | 37 | 38 | About Us 39 | How it works 40 | Testimonials 41 | Careers 42 | Investors 43 | Terms of Service 44 | 45 | 46 | 47 | About Us 48 | How it works 49 | Testimonials 50 | Careers 51 | Investors 52 | Terms of Service 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | logo 62 | 63 | logo © {new Date().getFullYear()} All rights reserved. 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | ); 86 | }; 87 | 88 | export default Footer; 89 | -------------------------------------------------------------------------------- /src/components/InfoSection/Data.js: -------------------------------------------------------------------------------- 1 | export const aboutObj = { 2 | id: 'about', 3 | lightBg: false, 4 | lightText: true, 5 | lightTextDesc: true, 6 | topLine: 'Title of the Company', 7 | headline: 'Sample headline goes here', 8 | description: 'Here we will place a detailed description of the service we are providing', 9 | buttonLabel: 'Get started', 10 | imgStart: false, 11 | img: require('../../images/svg-1.svg'), 12 | alt: 'Car', 13 | dark: true, 14 | primary: true, 15 | darkText: false 16 | }; 17 | 18 | export const discoverObj = { 19 | id: 'discover', 20 | lightBg: true, 21 | lightText: false, 22 | lightTextDesc: false, 23 | topLine: 'Discover a lot of things', 24 | headline: 'Sample headline about discover goes here', 25 | description: 'Here we will place a detailed description of the service we are providing that you can discover here', 26 | buttonLabel: 'Get started', 27 | imgStart: true, 28 | img: require('../../images/svg-2.svg'), 29 | alt: 'Car', 30 | dark: false, 31 | primary: false, 32 | darkText: true 33 | }; 34 | 35 | export const signupObj = { 36 | id: 'signup', 37 | lightBg: true, 38 | lightText: false, 39 | lightTextDesc: false, 40 | topLine: 'Create a new account', 41 | headline: 'Creating an account is extremely easy', 42 | description: 'Create a new account unless you already have one, and enjoy our offerings', 43 | buttonLabel: 'Get started', 44 | imgStart: false, 45 | img: require('../../images/svg-3.svg'), 46 | alt: 'svg3', 47 | dark: false, 48 | primary: false, 49 | darkText: true 50 | }; 51 | -------------------------------------------------------------------------------- /src/components/InfoSection/InfoElements.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const InfoContainer = styled.div` 4 | color: #fff; 5 | background: ${({ lightBg }) => (lightBg ? '#f9f9f9' : '#010606')}; 6 | 7 | @media screen and (max-width: 768px) { 8 | padding: 100px 0; 9 | } 10 | `; 11 | 12 | export const InfoWrapper = styled.div` 13 | display: grid; 14 | z-index: 1; 15 | height: 860px; 16 | width: 100%; 17 | max-width: 1100px; 18 | margin-right: auto; 19 | margin-left: auto; 20 | padding: 0 24px; 21 | justify-content: center; 22 | `; 23 | 24 | export const InfoRow = styled.div` 25 | display: grid; 26 | grid-auto-columns: minmax(auto, 1fr); 27 | align-items: center; 28 | grid-template-areas: ${({ imgStart }) => (imgStart ? `'col2 col1'` : `'col1 col2'`)}; 29 | 30 | @media screen and (max-width: 768px) { 31 | grid-template-areas: ${({ imgStart }) => (imgStart ? `'col1' 'col2'` : `'col1 col1' 'col2 col2'`)}; 32 | } 33 | `; 34 | 35 | export const Column1 = styled.div` 36 | margin-bottom: 15px; 37 | padding: 0 15px; 38 | grid-area: col1; 39 | `; 40 | 41 | export const Column2 = styled.div` 42 | margin-bottom: 15px; 43 | padding: 0 15px; 44 | grid-area: col2; 45 | `; 46 | 47 | export const TextWrapper = styled.div` 48 | max-width: 540px; 49 | padding-top: 0; 50 | padding-bottom: 60px; 51 | `; 52 | 53 | export const TopLine = styled.p` 54 | color: #01bf71; 55 | font-size: 16px; 56 | line-height: 16px; 57 | font-weight: 700; 58 | letter-spacing: 1.4px; 59 | text-transform: uppercase; 60 | margin-bottom: 16px; 61 | `; 62 | 63 | export const Heading = styled.h1` 64 | margin-bottom: 24px; 65 | font-size: 48px; 66 | line-height: 1.1; 67 | font-weight: 600; 68 | color: ${({ lightText }) => (lightText ? '#f7f8fa' : '#010606')}; 69 | 70 | @media screen and (max-width: 480px) { 71 | font-size: 32px; 72 | } 73 | `; 74 | 75 | export const Subtitle = styled.p` 76 | max-width: 440px; 77 | margin-bottom: 35px; 78 | font-size: 18px; 79 | line-height: 24px; 80 | color: ${({ darkText }) => (darkText ? '#010606' : '#fff')}; 81 | `; 82 | 83 | export const BtnWrap = styled.div` 84 | display: flex; 85 | justify-content: flex-start; 86 | `; 87 | 88 | export const ImgWrap = styled.div` 89 | max-width: 555px; 90 | height: 100%; 91 | `; 92 | 93 | export const Img = styled.img` 94 | width: 100%; 95 | margin: 0 0 10px 0; 96 | padding-right: 0; 97 | `; 98 | -------------------------------------------------------------------------------- /src/components/InfoSection/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Button } from '../ButtonElements'; 3 | import { InfoContainer, InfoWrapper, InfoRow, Column1, Column2, TextWrapper, TopLine, Heading, Subtitle, BtnWrap, Img, ImgWrap } from './InfoElements'; 4 | 5 | const InfoSection = ({ lightBg, id, imgStart, topLine, lightText, headline, darkText, description, buttonLabel, img, alt, primary, dark, dark2 }) => { 6 | return ( 7 | <> 8 | 9 | 10 | 11 | 12 | 13 | {topLine} 14 | {headline} 15 | {description} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {alt} 24 | 25 | 26 | 27 | 28 | 29 | 30 | ); 31 | }; 32 | 33 | export default InfoSection; 34 | -------------------------------------------------------------------------------- /src/components/Navbar/NavbarElements.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { Link as LinkR } from 'react-router-dom'; 3 | import { Link as LinkS } from 'react-scroll'; 4 | 5 | export const Nav = styled.nav` 6 | background: ${({ scrollNav }) => (scrollNav ? '#000' : 'transparent')};; 7 | height: 80px; 8 | margin-top: -80px; 9 | display: flex; 10 | justify-content: center; 11 | align-items: center; 12 | font-size: 1rem; 13 | position: sticky; 14 | top: 0; 15 | z-index: 10; 16 | 17 | @media screen and (max-width: 960px) { 18 | transition: 0.8s all ease; 19 | } 20 | `; 21 | 22 | export const NavbarContainer = styled.div` 23 | display: flex; 24 | justify-content: space-between; 25 | height: 80px; 26 | z-index: 1; 27 | width: 100%; 28 | padding: 0 24px; 29 | max-width: 1100px; 30 | `; 31 | 32 | export const NavLogo = styled(LinkR)` 33 | color: #fff; 34 | justify-self: flex-start; 35 | cursor: pointer; 36 | font-size: 1.5rem; 37 | display: flex; 38 | align-items: center; 39 | margin-left: 24px; 40 | font-weight: bold; 41 | text-decoration: none; 42 | `; 43 | 44 | export const MenuIcon = styled.div` 45 | display: none; 46 | 47 | @media screen and (max-width: 768px) { 48 | display: block; 49 | position: absolute; 50 | top: 0; 51 | right: 0; 52 | transform: translate(-100%, 60%); 53 | font-size: 1.8rem; 54 | cursor: pointer; 55 | color: #fff; 56 | } 57 | `; 58 | 59 | export const NavMenu = styled.ul` 60 | display: flex; 61 | align-items: center; 62 | list-style: none; 63 | text-align: center; 64 | /* margin-right: -22px; */ 65 | 66 | @media screen and (max-width: 768px) { 67 | display: none; 68 | } 69 | `; 70 | 71 | export const NavItem = styled.li` 72 | height: 80px; 73 | `; 74 | 75 | export const NavLink = styled(LinkS)` 76 | color: #fff; 77 | display: flex; 78 | align-items: center; 79 | text-decoration: none; 80 | padding: 0 1rem; 81 | height: 100%; 82 | cursor: pointer; 83 | 84 | &.active { 85 | border-bottom: 3px solid #01bf71; 86 | } 87 | `; 88 | 89 | export const NavBtn = styled.nav` 90 | display: flex; 91 | align-items: center; 92 | 93 | @media screen and (max-width: 768px) { 94 | display: none; 95 | } 96 | `; 97 | 98 | export const NavBtnLink = styled(LinkR)` 99 | border-radius: 50px; 100 | background: #01bf71; 101 | white-space: nowrap; 102 | padding: 10px 22px; 103 | color: #010606; 104 | font-size: 16px; 105 | outline: none; 106 | border: none; 107 | cursor: pointer; 108 | transition: all 0.2s ease-in-out; 109 | text-decoration: none; 110 | 111 | &:hover { 112 | transition: all 0.2s ease-in-out; 113 | background: #fff; 114 | } 115 | `; 116 | -------------------------------------------------------------------------------- /src/components/Navbar/index.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { FaBars } from 'react-icons/fa'; 3 | import { IconContext } from 'react-icons/lib'; 4 | import { animateScroll as scroll } from 'react-scroll'; 5 | import { MenuIcon, Nav, NavbarContainer, NavItem, NavLink, NavLogo, NavMenu, NavBtn, NavBtnLink } from './NavbarElements'; 6 | 7 | const Navbar = ({ toggle }) => { 8 | const [scrollNav, setScrollNav] = useState(false); 9 | 10 | const changeNav = () => { 11 | if (window.scrollY >= 80) { 12 | setScrollNav(true); 13 | } else { 14 | setScrollNav(false); 15 | } 16 | }; 17 | 18 | useEffect(() => { 19 | window.addEventListener('scroll', changeNav); 20 | }, []); 21 | 22 | const toggleHome = () => { 23 | scroll.scrollToTop(); 24 | }; 25 | 26 | return ( 27 | <> 28 | 29 | 56 | 57 | 58 | ); 59 | }; 60 | 61 | export default Navbar; 62 | -------------------------------------------------------------------------------- /src/components/Services/ServicesElements.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const ServicesContainer = styled.div` 4 | height: 800px; 5 | display: flex; 6 | flex-direction: column; 7 | justify-content: center; 8 | align-items: center; 9 | background: #010606; 10 | 11 | @media screen and (max-width: 768px) { 12 | height: 1100px; 13 | } 14 | 15 | @media screen and (max-width: 480px) { 16 | height: 1300px; 17 | } 18 | `; 19 | 20 | export const ServicesWrapper = styled.div` 21 | max-width: 1000px; 22 | margin: 0 auto; 23 | display: grid; 24 | grid-template-columns: 1fr 1fr 1fr; 25 | align-items: center; 26 | grid-gap: 16px; 27 | padding: 0 50px; 28 | 29 | @media screen and (max-width: 1000px) { 30 | grid-template-columns: 1fr 1fr; 31 | } 32 | 33 | @media screen and (max-width: 768px) { 34 | grid-template-columns: 1fr; 35 | padding: 0 20px; 36 | } 37 | `; 38 | 39 | export const ServicesCard = styled.div` 40 | background: #fff; 41 | display: flex; 42 | flex-direction: column; 43 | justify-content: flex-start; 44 | align-items: center; 45 | border-radius: 10px; 46 | max-height: 340px; 47 | padding: 30px; 48 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); 49 | transition: all 0.2s ease-in-out; 50 | 51 | &:hover { 52 | transform: scale(1.02); 53 | transition: all 0.2s ease-in-out; 54 | cursor: pointer; 55 | } 56 | `; 57 | 58 | export const ServicesIcon = styled.img` 59 | height: 160px; 60 | width: 160px; 61 | margin-bottom: 10px; 62 | `; 63 | 64 | export const ServicesH1 = styled.h1` 65 | font-size: 2.5rem; 66 | color: #fff; 67 | margin-bottom: 64px; 68 | 69 | @media screen and (max-width: 480px) { 70 | font-size: 2rem; 71 | } 72 | `; 73 | 74 | export const ServicesH2 = styled.h2` 75 | font-size: 1rem; 76 | margin-bottom: 10px; 77 | `; 78 | 79 | export const ServicesP = styled.p` 80 | font-size: 1rem; 81 | text-align: center; 82 | `; 83 | -------------------------------------------------------------------------------- /src/components/Services/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Icon1 from '../../images/svg-4.svg'; 3 | import Icon2 from '../../images/svg-5.svg'; 4 | import Icon3 from '../../images/svg-6.svg'; 5 | import { ServicesContainer, ServicesH1, ServicesWrapper, ServicesCard, ServicesIcon, ServicesH2, ServicesP } from './ServicesElements'; 6 | 7 | const Services = () => { 8 | return ( 9 | 10 | Our Services 11 | 12 | 13 | 14 | 15 | Reduce expenses 16 | We help reduce your fees and increase your overall revenue 17 | 18 | 19 | 20 | 21 | Virtual Offices 22 | You can access our platform online anywhere in the world 23 | 24 | 25 | 26 | 27 | Premium Benefits 28 | Unlock our special membership card and get 5% cashback 29 | 30 | 31 | 32 | 33 | ); 34 | }; 35 | 36 | export default Services; 37 | -------------------------------------------------------------------------------- /src/components/Sidebar/SidebarElements.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | import { FaTimes } from 'react-icons/fa'; 3 | import { Link as LinkR } from 'react-router-dom'; 4 | import { Link as LinkS } from 'react-scroll'; 5 | 6 | export const SidebarContainer = styled.aside` 7 | position: fixed; 8 | z-index: 999; 9 | width: 100%; 10 | height: 100%; 11 | background: #0d0d0d; 12 | display: grid; 13 | align-items: center; 14 | left: 0; 15 | transition: 0.3s ease-in-out; 16 | opacity: ${({ isOpen }) => (isOpen ? '100%' : '0')}; 17 | top: ${({ isOpen }) => (isOpen ? '0' : '-100%')}; 18 | `; 19 | 20 | export const CloseIcon = styled(FaTimes)` 21 | color: #fff; 22 | `; 23 | 24 | export const Icon = styled.div` 25 | position: absolute; 26 | top: 1.2rem; 27 | right: 1.5rem; 28 | background: transparent; 29 | font-size: 2rem; 30 | cursor: pointer; 31 | outline: none; 32 | `; 33 | 34 | export const SidebarWrapper = styled.div` 35 | color: #fff; 36 | `; 37 | 38 | export const SidebarMenu = styled.ul` 39 | display: grid; 40 | grid-template-colums: 1fr; 41 | grid-template-rows: repeat(6, 80px); 42 | text-align: center; 43 | 44 | @media screen and (max-width: 480px) { 45 | grid-template-rows: repeat(6, 60px); 46 | } 47 | `; 48 | 49 | export const SidebarLink = styled(LinkS)` 50 | display: flex; 51 | align-items: center; 52 | justify-content: center; 53 | font-size: 1.5rem; 54 | text-decoration: none; 55 | list-style: none; 56 | transition: 0.2s ease-in-out; 57 | color: #fff; 58 | cursor: pointer; 59 | 60 | &:hover { 61 | color: #01bf71; 62 | transition: 0.2s ease-in-out; 63 | } 64 | `; 65 | 66 | export const SideBtnWrap = styled.div` 67 | display: flex; 68 | justify-content: center; 69 | `; 70 | 71 | export const SidebarRoute = styled(LinkR)` 72 | border-radius: 50px; 73 | background: #01bf71; 74 | white-space: nowrap; 75 | padding: 16px 64px; 76 | color: #010606; 77 | font-size: 16px; 78 | outline: none; 79 | border: none; 80 | cursor: pointer; 81 | transition: all 0.2s ease-in-out; 82 | text-decoration: none; 83 | 84 | &:hover { 85 | transition: all 0.2s ease-in-out; 86 | background: #fff; 87 | color: #010606; 88 | } 89 | `; 90 | -------------------------------------------------------------------------------- /src/components/Sidebar/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { SidebarContainer, Icon, CloseIcon, SidebarWrapper, SidebarMenu, SidebarLink, SideBtnWrap, SidebarRoute } from "./SidebarElements"; 3 | 4 | const Sidebar = ({ isOpen, toggle }) => { 5 | return ( 6 | 7 | 8 | 9 | 10 | 11 | 12 | About 13 | Discover 14 | Services 15 | Sign Up 16 | 17 | 18 | Sign In 19 | 20 | 21 | 22 | ); 23 | }; 24 | 25 | export default Sidebar; 26 | -------------------------------------------------------------------------------- /src/images/svg-1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/images/svg-3.svg: -------------------------------------------------------------------------------- 1 | Hamburger -------------------------------------------------------------------------------- /src/images/svg-4.svg: -------------------------------------------------------------------------------- 1 | off road -------------------------------------------------------------------------------- /src/images/svg-5.svg: -------------------------------------------------------------------------------- 1 | secure data -------------------------------------------------------------------------------- /src/images/svg-6.svg: -------------------------------------------------------------------------------- 1 | videographer -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | ReactDOM.render( 6 | 7 | 8 | , 9 | document.getElementById('root') 10 | ); 11 | -------------------------------------------------------------------------------- /src/pages/index.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import CoverSection from '../components/CoverSection'; 3 | import Footer from '../components/Footer'; 4 | import InfoSection from '../components/InfoSection'; 5 | import { aboutObj, discoverObj, signupObj } from '../components/InfoSection/Data'; 6 | import Navbar from '../components/Navbar'; 7 | import Services from '../components/Services'; 8 | import Sidebar from '../components/Sidebar'; 9 | 10 | const Home = () => { 11 | const [isOpen, setIsOpen] = useState(false); 12 | 13 | const toggle = () => { 14 | setIsOpen(!isOpen); 15 | }; 16 | 17 | return ( 18 | <> 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |