├── menu ├── php ├── Readme ├── style ├── script └── index /menu: -------------------------------------------------------------------------------- 1 | [ 2 | { "name": "Pizza", "price": "$10" }, 3 | { "name": "Burger", "price": "$6" }, 4 | { "name": "Pasta", "price": "$8" }, 5 | { "name": "Sushi", "price": "$12" }, 6 | { "name": "Salad", "price": "$5" } 7 | ] 8 | -------------------------------------------------------------------------------- /php: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /Readme: -------------------------------------------------------------------------------- 1 | # Online Food Delivery Website 2 | 3 | **DelishDrop** is a simple responsive web app for food ordering. 4 | 5 | ## Features 6 | - HTML5/CSS3 and JavaScript 7 | - Menu display from JSON 8 | - Order form with confirmation 9 | 10 | ## Files 11 | - `index.html` — Main page 12 | - `style.css` — Styling 13 | - `script.js` — Interaction logic 14 | - `menu.json` — Sample menu data 15 | - `README.md` — Project guide 16 | 17 | ## How to Run 18 | Open `index.html` in a browser. JavaScript dynamically loads the menu and handles order submission. 19 | 20 | ## License 21 | MIT 22 | -------------------------------------------------------------------------------- /style: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | margin: 0; 4 | padding: 0; 5 | background-color: #f8f8f8; 6 | } 7 | 8 | header { 9 | background-color: #ff5722; 10 | color: white; 11 | padding: 10px 20px; 12 | display: flex; 13 | justify-content: space-between; 14 | align-items: center; 15 | } 16 | 17 | nav a { 18 | color: white; 19 | margin-left: 15px; 20 | text-decoration: none; 21 | } 22 | 23 | main { 24 | padding: 20px; 25 | } 26 | 27 | section { 28 | margin-bottom: 30px; 29 | } 30 | 31 | form input, form button { 32 | display: block; 33 | margin: 10px 0; 34 | padding: 10px; 35 | width: 100%; 36 | max-width: 400px; 37 | } 38 | 39 | footer { 40 | background-color: #333; 41 | color: white; 42 | text-align: center; 43 | padding: 10px; 44 | } 45 | -------------------------------------------------------------------------------- /script: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function () { 2 | const menuItems = [ 3 | { name: 'Pizza', price: '$10' }, 4 | { name: 'Burger', price: '$6' }, 5 | { name: 'Pasta', price: '$8' } 6 | ]; 7 | 8 | const menuContainer = document.getElementById('menu-items'); 9 | menuItems.forEach(item => { 10 | const div = document.createElement('div'); 11 | div.textContent = `${item.name} - ${item.price}`; 12 | menuContainer.appendChild(div); 13 | }); 14 | 15 | const form = document.getElementById('order-form'); 16 | const confirmation = document.getElementById('confirmation'); 17 | 18 | form.addEventListener('submit', function (e) { 19 | e.preventDefault(); 20 | const name = document.getElementById('name').value; 21 | const item = document.getElementById('item').value; 22 | const quantity = document.getElementById('quantity').value; 23 | 24 | confirmation.textContent = `Thank you ${name}, your order of ${quantity} ${item}(s) has been placed!`; 25 | form.reset(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /index: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Online Food Delivery 7 | 8 | 9 | 10 |
11 |

DelishDrop

12 | 17 |
18 | 19 |
20 | 24 | 25 |
26 |

About Us

27 |

DelishDrop delivers your favorite meals hot and fresh to your doorstep.

28 |
29 | 30 |
31 |

Contact

32 |
33 | 34 | 35 | 36 | 37 |
38 |

39 |
40 |
41 | 42 | 45 | 46 | 47 | 48 | 49 | --------------------------------------------------------------------------------