├── src ├── App.css ├── index.css ├── components │ ├── Logo │ │ └── index.jsx │ ├── HeroImage │ │ └── index.jsx │ ├── HeroButtons │ │ ├── Bg.jsx │ │ └── outline.jsx │ ├── HeroTitle │ │ └── index.jsx │ ├── HeroContent │ │ └── index.jsx │ ├── HeroInfo │ │ └── index.jsx │ ├── Nav │ │ └── index.jsx │ ├── Button │ │ └── index.jsx │ ├── Btns │ │ └── index.jsx │ ├── icons │ │ ├── Menu.jsx │ │ ├── Call.jsx │ │ └── Basket.jsx │ ├── Hero │ │ └── index.jsx │ └── Navigation │ │ └── index.jsx ├── App.jsx └── main.jsx ├── public └── images │ ├── hero-img.webp │ └── logo │ └── logo.webp ├── postcss.config.js ├── vite.config.js ├── .gitignore ├── index.html ├── .eslintrc.cjs ├── tailwind.config.js └── package.json /src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/hero-img.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isopouya1/React-food/HEAD/public/images/hero-img.webp -------------------------------------------------------------------------------- /public/images/logo/logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isopouya1/React-food/HEAD/public/images/logo/logo.webp -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | body{ 6 | background-color: #FFF4F5; 7 | } -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /src/components/Logo/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Logo() { 4 | return ( 5 | 6 | ) 7 | } 8 | 9 | export default Logo -------------------------------------------------------------------------------- /src/components/HeroImage/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function HeroImage() { 4 | return ( 5 | 6 | ) 7 | } 8 | 9 | export default HeroImage -------------------------------------------------------------------------------- /src/components/HeroButtons/Bg.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Bg() { 4 | return ( 5 | Order Now 6 | ) 7 | } 8 | 9 | export default Bg -------------------------------------------------------------------------------- /src/components/HeroTitle/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function HeroTitle() { 4 | return ( 5 |

Welcome to Fofood

6 | ) 7 | } 8 | 9 | export default HeroTitle -------------------------------------------------------------------------------- /src/components/HeroButtons/outline.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Outline() { 4 | return ( 5 | Learn More 6 | ) 7 | } 8 | 9 | export default Outline -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Navigation from './components/Navigation' 3 | import Hero from './components/Hero' 4 | 5 | function App() { 6 | return ( 7 | <> 8 | 9 | 10 | 11 | ) 12 | } 13 | 14 | export default App -------------------------------------------------------------------------------- /src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.jsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /src/components/HeroContent/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function HeroContent() { 4 | return ( 5 |

6 | Super Delicious Food Special for You 7 |

8 | ) 9 | } 10 | 11 | export default HeroContent -------------------------------------------------------------------------------- /src/components/HeroInfo/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Info() { 4 | return ( 5 |

6 | Order your favorites food from anywhere and get delivery at your door 7 |

8 | ) 9 | } 10 | 11 | export default Info -------------------------------------------------------------------------------- /src/components/Nav/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Nav() { 4 | return ( 5 | 11 | ) 12 | } 13 | 14 | export default Nav -------------------------------------------------------------------------------- /src/components/Button/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Button(props) { 4 | return ( 5 | 6 | {props.icon} 7 | {props.content} 8 | 9 | ) 10 | } 11 | 12 | export default Button -------------------------------------------------------------------------------- /src/components/Btns/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Bg from '../HeroButtons/Bg' 3 | import Outline from '../HeroButtons/outline' 4 | 5 | function Btns() { 6 | return ( 7 |
8 | 9 | 10 |
11 | ) 12 | } 13 | 14 | export default Btns -------------------------------------------------------------------------------- /src/components/icons/Menu.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function Menu() { 4 | return ( 5 |
6 |
7 |
8 |
9 |
10 | ); 11 | } 12 | 13 | export default Menu; 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Food 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { browser: true, es2020: true }, 3 | extends: [ 4 | 'eslint:recommended', 5 | 'plugin:react/recommended', 6 | 'plugin:react/jsx-runtime', 7 | 'plugin:react-hooks/recommended', 8 | ], 9 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 10 | settings: { react: { version: '18.2' } }, 11 | plugins: ['react-refresh'], 12 | rules: { 13 | 'react-refresh/only-export-components': 'warn', 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | colors :{ 9 | "primary" : "#DB6885", 10 | "secondary" : "#2F3137", 11 | "white" : "#ffffff", 12 | "gray" : "#2F3137" 13 | }, 14 | container:{ 15 | center :true, 16 | padding:{ 17 | DEFAULT : '1rem', 18 | sm : "2rem", 19 | lg : "4rem", 20 | xl: "5rem", 21 | } 22 | }, 23 | extend: {}, 24 | }, 25 | plugins: [], 26 | } 27 | 28 | -------------------------------------------------------------------------------- /src/components/Hero/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import HeroImage from '../HeroImage' 3 | import HeroTitle from '../HeroTitle' 4 | import HeroContent from '../HeroContent' 5 | import Info from '../HeroInfo' 6 | 7 | import Btns from '../Btns' 8 | 9 | function Hero() { 10 | return ( 11 |
12 |
13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | ) 21 | } 22 | 23 | export default Hero -------------------------------------------------------------------------------- /src/components/Navigation/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Logo from '../Logo' 3 | import Button from '../Button' 4 | import Menu from '../icons/Menu' 5 | import Basket from '../icons/Basket' 6 | import Nav from '../Nav' 7 | import Call from '../icons/Call' 8 | 9 | function Navigation() { 10 | return ( 11 |
12 | 13 |
14 |
17 |
22 | ) 23 | } 24 | 25 | export default Navigation -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learn-react", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0" 15 | }, 16 | "devDependencies": { 17 | "@types/react": "^18.0.37", 18 | "@types/react-dom": "^18.0.11", 19 | "@vitejs/plugin-react": "^4.0.0", 20 | "autoprefixer": "^10.4.14", 21 | "eslint": "^8.38.0", 22 | "eslint-plugin-react": "^7.32.2", 23 | "eslint-plugin-react-hooks": "^4.6.0", 24 | "eslint-plugin-react-refresh": "^0.3.4", 25 | "postcss": "^8.4.24", 26 | "tailwindcss": "^3.3.2", 27 | "vite": "^4.3.9" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/components/icons/Call.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Call() { 4 | return ( 5 | 6 | 7 | 8 | 9 | ) 10 | } 11 | 12 | export default Call -------------------------------------------------------------------------------- /src/components/icons/Basket.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function Basket() { 4 | return ( 5 | 12 | 18 | 19 | ); 20 | } 21 | 22 | export default Basket; 23 | --------------------------------------------------------------------------------