Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #181 from bvhpatel/ishanibhansali-documentation-we…
Browse files Browse the repository at this point in the history
…bsite

Website First Commit
  • Loading branch information
bvhpatel committed Dec 16, 2020
2 parents 82ebc01 + c507d50 commit 472ffef
Show file tree
Hide file tree
Showing 36 changed files with 18,233 additions and 0 deletions.
16,668 changes: 16,668 additions & 0 deletions website/package-lock.json

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "website",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.2.2",
"@testing-library/user-event": "^12.3.0",
"framer-motion": "^2.9.5",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-icons": "^4.1.0",
"react-reveal": "^1.2.2",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"react-scroll": "^1.8.1",
"styled-components": "^5.2.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Binary file added website/public/favicon.ico
Binary file not shown.
44 changes: 44 additions & 0 deletions website/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900" rel="stylesheet" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file added website/public/logo192.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 website/public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions website/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions website/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
6 changes: 6 additions & 0 deletions website/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Avenir Next", "Avenir", sans-serif;
}
16 changes: 16 additions & 0 deletions website/src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'
import './App.css';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'
import Home from './pages';

function App() {
return (
<Router>
<Switch>
<Route path='/' component={Home} exact />
</Switch>
</Router>
);
}

export default App;
97 changes: 97 additions & 0 deletions website/src/components/AboutSection/AboutElements.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import styled from 'styled-components'
import { animate } from 'framer-motion';

export const AboutContainer = styled.div`
color: #fff;
background: ${(lightBg) => (lightBg ? '#fff' : '010606')};
@media screen and (max-width: 816px) {
padding: 100px 0;
}
`;

export const AboutWrapper = styled.div`
opacity: ${({ animate }) => (animate ? '1' : '0')};
transition: opacity 1s ease-in-out;
z-index: 1;
width: 100%;
height: 860px;
max-width: 1100px;
padding: 0px 24px;
display: grid;
margin-right: auto;
margin-left: auto;
justify-content: center;
`;

export const AboutRow = styled.div`
display: grid;
grid-auto-columns: minmax(auto,1fr);
align-items: center;
grid-template-areas: ${({imgStart}) => (imgStart ? `'col2 col1'` : `'col1 col2'`)};
@media screen and (max-width: 818px) {
grid-template-areas: ${({imgStart}) => (imgStart ? `'col1' 'col2'` : `'col1 col1' 'col2 col2'`)};
}
`;

export const Column1 = styled.div`
margin-bottom: 15px;
padding: 0 15px;
grid-area: col1;
`;

export const Column2 = styled.div`
margin-bottom: 15px;
padding: 0 15px;
grid-area: col2;
`;

export const TextWrapper = styled.div`
max-width: 540px;
padding-top: 0;
padding-bottom: 60px;
`;

export const TopLine = styled.p`
color: #01bf71
font-size: 16x;
text-transform: uppercase;
letter-spacing: 1.4px;
margin-bottom: 16px;
line-height: 16px;
font-weight: 700;
`;

export const Heading = styled.h1`
margin-bottom: 24px;
font-size: 30px;
line-height: 1.1;
font-weight: 600;
color: #000;
`;

export const Description = styled.p`
margin-bottom: 16px;
font-size: 16px;
line-height: 24px;
max-width: 540px;
color: grey;
`;

export const ImgWrap = styled.div`
max-width: 555px;
height: 100%
`;

export const Img = styled.img`
width: 100%;
margin: 0 0 10px 0;
padding-right: 0;
`






60 changes: 60 additions & 0 deletions website/src/components/AboutSection/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import React, { useLayoutEffect, useRef, useState } from 'react'
import {
AboutContainer,
AboutRow,
Column1,
TextWrapper,
Heading,
Description,
Column2,
ImgWrap,
Img,
AboutWrapper
} from './AboutElements'

const AboutSection = ({id, imgStart, heading, para1, para2, para3, img}) => {

const [show, doShow] = useState({
itemOne: false
});
const ourRef = useRef(null);

useLayoutEffect(() => {
const topPosition = ourRef.current.getBoundingClientRect().top;
const onScroll = () => {
const scrollPosition = window.scrollY + window.innerHeight;
if(topPosition < scrollPosition) {
doShow(state => ({ ...state, itemOne: true }));
}
};

window.addEventListener("scroll", onScroll);
return () => window.removeEventListener("scroll", onScroll);
}, []);

return (
<div>
<AboutContainer id={id}>
<AboutWrapper animate={show.itemOne} ref={ourRef}>
<AboutRow imgStart={imgStart}>
<Column1>
<TextWrapper>
<Heading>{heading}</Heading>
<Description>{para1}</Description>
<Description>{para2}</Description>
<Description>{para3}</Description>
</TextWrapper>
</Column1>
<Column2>
<ImgWrap>
<Img src={img} />
</ImgWrap>
</Column2>
</AboutRow>
</AboutWrapper>
</AboutContainer>
</div>
)
}

export default AboutSection
25 changes: 25 additions & 0 deletions website/src/components/ButtonElement.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import styled from 'styled-components'
import { Link } from 'react-scroll'

export const Button = styled(Link)`
border-radius: 50px;
background: ${({ primary }) => (primary ? '#20b2aa' : '#000')};
white-space: nowrap;
padding: ${({ big }) => (big ? '14px 48px' : '12px 30px')};
color: ${({ dark }) => (dark ? '#000' : '#fff')};
font-size: ${({ fontBig }) => (fontBig ? '20px' : '16px')};
outline: none;
border: none;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
transition: all 0.2s ease-in-out;
&:hover {
transition: all 0.2s ease-in-out;
background: ${({ primary }) => (primary ? '#fff' : '#20b2aa')};
}
`;

Loading

0 comments on commit 472ffef

Please sign in to comment.