├── .gitignore ├── 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 ├── App.test.js ├── assets ├── gifs │ ├── on-scroll.gif │ └── responsive.gif ├── travel-01.jpg ├── travel-02.jpg └── travel-03.jpg ├── components ├── Hero.css ├── Hero.js ├── Navbar.css ├── Navbar.js ├── Slider.css └── Slider.js ├── index.css ├── index.js ├── logo.svg ├── reportWebVitals.js └── setupTests.js /.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 | # 🌴travell 2 | 3 | ## Overview 4 | 5 | This project is a simple landing page built with React. 6 | 7 | React 8 | 9 | ## Animation (onScroll) 10 | ###### Using [`Intersection Observer`](https://github.com/thebuilder/react-intersection-observer#readme) 11 | 12 | 13 | ## Responsive 14 | 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-landing-page-v1", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.14.1", 7 | "@testing-library/react": "^11.2.7", 8 | "@testing-library/user-event": "^12.8.3", 9 | "react": "^17.0.2", 10 | "react-dom": "^17.0.2", 11 | "react-icons": "^4.2.0", 12 | "react-intersection-observer": "^8.32.0", 13 | "react-scripts": "4.0.3", 14 | "web-vitals": "^1.1.2" 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/DLabbate/react-landing-page-v1/0d8aa47817beb10cdf18e77a146aa6f2a1acf574/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | 28 | 29 | 33 | 37 | React App 38 | 39 | 40 | 41 |
42 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DLabbate/react-landing-page-v1/0d8aa47817beb10cdf18e77a146aa6f2a1acf574/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DLabbate/react-landing-page-v1/0d8aa47817beb10cdf18e77a146aa6f2a1acf574/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: "Montserrat", sans-serif; 6 | } 7 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import "./App.css"; 2 | import travel_01 from "./assets/travel-01.jpg"; 3 | import travel_02 from "./assets/travel-02.jpg"; 4 | import travel_03 from "./assets/travel-03.jpg"; 5 | import Hero from "./components/Hero"; 6 | import Navbar from "./components/Navbar"; 7 | import Slider from "./components/Slider"; 8 | 9 | function App() { 10 | const navbarLinks = [ 11 | { url: "#", title: "Home" }, 12 | { url: "#", title: "Trips" }, 13 | { url: "#", title: "Rewards" }, 14 | ]; 15 | 16 | return ( 17 |
18 | 19 | 20 | 27 | 33 |
34 | ); 35 | } 36 | 37 | export default App; 38 | -------------------------------------------------------------------------------- /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/assets/gifs/on-scroll.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DLabbate/react-landing-page-v1/0d8aa47817beb10cdf18e77a146aa6f2a1acf574/src/assets/gifs/on-scroll.gif -------------------------------------------------------------------------------- /src/assets/gifs/responsive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DLabbate/react-landing-page-v1/0d8aa47817beb10cdf18e77a146aa6f2a1acf574/src/assets/gifs/responsive.gif -------------------------------------------------------------------------------- /src/assets/travel-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DLabbate/react-landing-page-v1/0d8aa47817beb10cdf18e77a146aa6f2a1acf574/src/assets/travel-01.jpg -------------------------------------------------------------------------------- /src/assets/travel-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DLabbate/react-landing-page-v1/0d8aa47817beb10cdf18e77a146aa6f2a1acf574/src/assets/travel-02.jpg -------------------------------------------------------------------------------- /src/assets/travel-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DLabbate/react-landing-page-v1/0d8aa47817beb10cdf18e77a146aa6f2a1acf574/src/assets/travel-03.jpg -------------------------------------------------------------------------------- /src/components/Hero.css: -------------------------------------------------------------------------------- 1 | .hero { 2 | position: relative; 3 | width: 100%; 4 | height: 100vh; 5 | } 6 | 7 | .hero__image { 8 | width: 100%; 9 | height: 100%; 10 | object-fit: cover; 11 | position: absolute; 12 | } 13 | 14 | .hero__title { 15 | position: absolute; 16 | bottom: 15%; 17 | right: 10%; 18 | color: white; 19 | font-size: 4rem; 20 | padding: 15px; 21 | } 22 | -------------------------------------------------------------------------------- /src/components/Hero.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "./Hero.css"; 3 | 4 | const Hero = ({ imageSrc }) => { 5 | return ( 6 |
7 | Travel 8 |

Travel made simple.

9 |
10 | ); 11 | }; 12 | 13 | export default Hero; 14 | -------------------------------------------------------------------------------- /src/components/Navbar.css: -------------------------------------------------------------------------------- 1 | .navbar { 2 | position: sticky; 3 | top: 0px; 4 | height: 70px; 5 | background-color: black; 6 | opacity: 0.75; 7 | display: flex; 8 | justify-content: space-between; 9 | align-items: center; 10 | padding: 0px 30px 0px 30px; 11 | margin-bottom: -70px; 12 | z-index: 5; 13 | } 14 | 15 | .navbar__logo { 16 | color: white; 17 | font-family: "MonteCarlo", cursive; 18 | font-size: 2.5rem; 19 | } 20 | 21 | /* 22 | This is the container for all the navbar links (