├── .env ├── .gitignore ├── README.md ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── App.css ├── App.js ├── App.test.js ├── components │ ├── Home.js │ └── Navbar.js ├── globalStyles.js ├── images │ └── profile.png ├── index.css ├── index.js ├── logo.svg ├── pages │ ├── About.js │ ├── Gmail.js │ ├── HomePage.js │ ├── Images.js │ └── Store.js ├── reportWebVitals.js ├── setupTests.js └── styles │ └── center.js └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | 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. 37 | 38 | 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. 39 | 40 | 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. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "google-homepage-1", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.11.4", 7 | "@testing-library/react": "^11.1.0", 8 | "@testing-library/user-event": "^12.1.10", 9 | "react": "^17.0.2", 10 | "react-dom": "^17.0.2", 11 | "react-router-dom": "^5.2.0", 12 | "react-scripts": "4.0.3", 13 | "styled-components": "^5.3.0", 14 | "web-vitals": "^1.0.1" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject" 21 | }, 22 | "eslintConfig": { 23 | "extends": [ 24 | "react-app", 25 | "react-app/jest" 26 | ] 27 | }, 28 | "browserslist": { 29 | "production": [ 30 | ">0.2%", 31 | "not dead", 32 | "not op_mini all" 33 | ], 34 | "development": [ 35 | "last 1 chrome version", 36 | "last 1 firefox version", 37 | "last 1 safari version" 38 | ] 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/briancodex/google-react-v1/56040cbe6125024eeb3648ffd7ab7618a4fa0db6/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 33 | 34 | 35 | 36 |
37 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/briancodex/google-react-v1/56040cbe6125024eeb3648ffd7ab7618a4fa0db6/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/briancodex/google-react-v1/56040cbe6125024eeb3648ffd7ab7618a4fa0db6/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 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import './App.css'; 2 | import Home from './components/Home'; 3 | import Navbar from './components/Navbar'; 4 | import GlobalStyle from './globalStyles'; 5 | import { Switch, Route } from 'react-router-dom'; 6 | import About from './pages/About'; 7 | import Store from './pages/Store'; 8 | import Gmail from './pages/Gmail'; 9 | import Images from './pages/Images'; 10 | 11 | function App() { 12 | return ( 13 | <> 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ); 25 | } 26 | 27 | export default App; 28 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/components/Home.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | 4 | const Container = styled.div` 5 | display: flex; 6 | flex-direction: column; 7 | `; 8 | 9 | const LogoSection = styled.div` 10 | display: flex; 11 | flex-direction: column; 12 | align-items: center; 13 | min-height: 290px; 14 | height: calc(100% - 560px); 15 | 16 | img { 17 | width: 272px; 18 | height: 92px; 19 | margin-top: auto; 20 | } 21 | `; 22 | 23 | const SearchSection = styled.div` 24 | padding: 20px; 25 | display: flex; 26 | justify-content: center; 27 | flex-direction: column; 28 | `; 29 | 30 | const Form = styled.form``; 31 | 32 | const Search = styled.div` 33 | display: flex; 34 | align-items: center; 35 | padding: 0px 14px; 36 | background: #fff; 37 | border: 1px solid #dfe1e5; 38 | box-shadow: none; 39 | border-radius: 24px; 40 | z-index: 3; 41 | height: 44px; 42 | margin: 0 auto; 43 | max-width: 584px; 44 | `; 45 | 46 | const ButtonSection = styled.div` 47 | display: flex; 48 | justify-content: center; 49 | height: 70px; 50 | padding-top: 18px; 51 | top: 53px; 52 | z-index: 0; 53 | 54 | button { 55 | background-color: #f8f9fa; 56 | border: 1px solid #f8f9fa; 57 | border-radius: 4px; 58 | color: #3c4043; 59 | font-family: Roboto, arial, sans-serif; 60 | font-size: 14px; 61 | margin: 11px 4px; 62 | padding: 0 16px; 63 | line-height: 27px; 64 | height: 36px; 65 | min-width: 54px; 66 | text-align: center; 67 | cursor: pointer; 68 | user-select: none; 69 | } 70 | `; 71 | 72 | const SearchIcon = styled.span` 73 | color: #9aa0a6; 74 | height: 30px; 75 | width: 30px; 76 | padding-right: 10px; 77 | display: flex; 78 | align-items: center; 79 | 80 | & svg { 81 | fill: #9aa0a6; 82 | } 83 | `; 84 | 85 | const SearchInput = styled.input` 86 | display: flex; 87 | flex: 1; 88 | flex-wrap: wrap; 89 | height: 40px; 90 | background-color: transparent; 91 | border: none; 92 | margin: 0; 93 | padding: 0; 94 | color: rgba(0, 0, 0, 0.87); 95 | word-wrap: break-word; 96 | outline: none; 97 | -webkit-tap-highlight-color: transparent; 98 | height: 34px; 99 | font-size: 16px; 100 | `; 101 | 102 | const MicIcon = styled.div` 103 | display: flex; 104 | cursor: pointer; 105 | align-items: center; 106 | border: 0; 107 | background: transparent; 108 | outline: none; 109 | padding: 0 8px; 110 | width: 40px; 111 | line-height: 44px; 112 | height: 44px; 113 | 114 | svg { 115 | height: 24px; 116 | width: 24px; 117 | vertical-align: middle; 118 | } 119 | `; 120 | 121 | const Home = () => { 122 | return ( 123 | 124 | 125 | google-logo 129 | 130 | 131 |
132 | 133 | 134 | 139 | 140 | 141 | 142 | 143 | 144 | 149 | 153 | 154 | 158 | 162 | 163 | 164 | 165 |
166 | 167 | 168 | 169 | 170 |
171 |
172 | ); 173 | }; 174 | 175 | export default Home; 176 | -------------------------------------------------------------------------------- /src/components/Navbar.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components/macro'; 3 | import Profile from '../images/profile.png'; 4 | import { Link } from 'react-router-dom'; 5 | 6 | const Nav = styled.nav` 7 | display: flex; 8 | justify-content: space-between; 9 | align-items: center; 10 | height: 60px; 11 | font-size: 14px; 12 | `; 13 | 14 | const NavLinks = styled(Link)` 15 | padding: 0 8px; 16 | text-decoration: none; 17 | color: #000; 18 | 19 | svg { 20 | height: 24px; 21 | width: 24px; 22 | } 23 | `; 24 | 25 | const LeftLinks = styled.div` 26 | padding: 10px; 27 | margin-left: 10px; 28 | `; 29 | 30 | const RightLinks = styled.div` 31 | padding: 10px; 32 | margin-right: 16px; 33 | display: flex; 34 | align-items: center; 35 | `; 36 | 37 | const Navbar = () => { 38 | return ( 39 | 62 | ); 63 | }; 64 | 65 | export default Navbar; 66 | -------------------------------------------------------------------------------- /src/globalStyles.js: -------------------------------------------------------------------------------- 1 | import { createGlobalStyle } from 'styled-components'; 2 | 3 | const GlobalStyle = createGlobalStyle` 4 | * { 5 | margin: 0; 6 | padding: 0; 7 | box-sizing: border-box; 8 | font-family: 'Roboto', sans-serif; 9 | } 10 | 11 | html, body { 12 | overflow-x: hidden; 13 | } 14 | `; 15 | 16 | export default GlobalStyle; 17 | -------------------------------------------------------------------------------- /src/images/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/briancodex/google-react-v1/56040cbe6125024eeb3648ffd7ab7618a4fa0db6/src/images/profile.png -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | import { BrowserRouter as Router } from 'react-router-dom'; 7 | 8 | ReactDOM.render( 9 | 10 | 11 | 12 | 13 | , 14 | document.getElementById('root') 15 | ); 16 | 17 | // If you want to start measuring performance in your app, pass a function 18 | // to log results (for example: reportWebVitals(console.log)) 19 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 20 | reportWebVitals(); 21 | -------------------------------------------------------------------------------- /src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/About.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Container } from '../styles/center'; 3 | 4 | const About = () => { 5 | return ( 6 | 7 |

About

8 |
9 | ); 10 | }; 11 | 12 | export default About; 13 | -------------------------------------------------------------------------------- /src/pages/Gmail.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Container } from '../styles/center'; 3 | 4 | const Gmail = () => { 5 | return ( 6 | 7 |

Gmail

8 |
9 | ); 10 | }; 11 | 12 | export default Gmail; 13 | -------------------------------------------------------------------------------- /src/pages/HomePage.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const HomePage = () => { 4 | return ; 5 | }; 6 | 7 | export default HomePage; 8 | -------------------------------------------------------------------------------- /src/pages/Images.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Container } from '../styles/center'; 3 | 4 | const Images = () => { 5 | return ( 6 | 7 |

Images

8 |
9 | ); 10 | }; 11 | 12 | export default Images; 13 | -------------------------------------------------------------------------------- /src/pages/Store.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Container } from '../styles/center'; 3 | 4 | const Store = () => { 5 | return ( 6 | 7 |

Store

8 |
9 | ); 10 | }; 11 | 12 | export default Store; 13 | -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /src/styles/center.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const Container = styled.div` 4 | display: flex; 5 | justify-content: center; 6 | align-items: center; 7 | height: 90vh; 8 | `; 9 | --------------------------------------------------------------------------------