diff --git a/lannguyen/images/Banh khot.jpeg b/lannguyen/images/Banh khot.jpeg new file mode 100644 index 0000000..a05dda8 Binary files /dev/null and b/lannguyen/images/Banh khot.jpeg differ diff --git a/lannguyen/images/Banh xeo.jpg b/lannguyen/images/Banh xeo.jpg new file mode 100644 index 0000000..b464120 Binary files /dev/null and b/lannguyen/images/Banh xeo.jpg differ diff --git a/lannguyen/images/Beef & rice.avif b/lannguyen/images/Beef & rice.avif new file mode 100644 index 0000000..af5b87d Binary files /dev/null and b/lannguyen/images/Beef & rice.avif differ diff --git a/lannguyen/images/Beef salad.jpeg b/lannguyen/images/Beef salad.jpeg new file mode 100644 index 0000000..55bcf78 Binary files /dev/null and b/lannguyen/images/Beef salad.jpeg differ diff --git a/lannguyen/images/Canh chua.jpeg b/lannguyen/images/Canh chua.jpeg new file mode 100644 index 0000000..9988718 Binary files /dev/null and b/lannguyen/images/Canh chua.jpeg differ diff --git a/lannguyen/images/Che ba mau.jpeg b/lannguyen/images/Che ba mau.jpeg new file mode 100644 index 0000000..37d9935 Binary files /dev/null and b/lannguyen/images/Che ba mau.jpeg differ diff --git a/lannguyen/images/Claims especial.avif b/lannguyen/images/Claims especial.avif new file mode 100644 index 0000000..a4224fd Binary files /dev/null and b/lannguyen/images/Claims especial.avif differ diff --git a/lannguyen/images/Crep.jpeg b/lannguyen/images/Crep.jpeg new file mode 100644 index 0000000..8c3446d Binary files /dev/null and b/lannguyen/images/Crep.jpeg differ diff --git a/lannguyen/images/Egg rolls.avif b/lannguyen/images/Egg rolls.avif new file mode 100644 index 0000000..32c3b13 Binary files /dev/null and b/lannguyen/images/Egg rolls.avif differ diff --git a/lannguyen/images/Fruit bow.jpeg b/lannguyen/images/Fruit bow.jpeg new file mode 100644 index 0000000..10e645c Binary files /dev/null and b/lannguyen/images/Fruit bow.jpeg differ diff --git a/lannguyen/images/Fruit cocktail.avif b/lannguyen/images/Fruit cocktail.avif new file mode 100644 index 0000000..d975e18 Binary files /dev/null and b/lannguyen/images/Fruit cocktail.avif differ diff --git a/lannguyen/images/Grilled Rice.avif b/lannguyen/images/Grilled Rice.avif new file mode 100644 index 0000000..ea45526 Binary files /dev/null and b/lannguyen/images/Grilled Rice.avif differ diff --git a/lannguyen/images/Hen wings.avif b/lannguyen/images/Hen wings.avif new file mode 100644 index 0000000..6596897 Binary files /dev/null and b/lannguyen/images/Hen wings.avif differ diff --git a/lannguyen/images/Sunrise Bistro restaurant.png b/lannguyen/images/Sunrise Bistro restaurant.png new file mode 100644 index 0000000..6d94248 Binary files /dev/null and b/lannguyen/images/Sunrise Bistro restaurant.png differ diff --git a/lannguyen/images/banh mi.webp b/lannguyen/images/banh mi.webp new file mode 100644 index 0000000..693c69e Binary files /dev/null and b/lannguyen/images/banh mi.webp differ diff --git a/lannguyen/images/cafe.webp b/lannguyen/images/cafe.webp new file mode 100644 index 0000000..93299ec Binary files /dev/null and b/lannguyen/images/cafe.webp differ diff --git a/lannguyen/images/khoai lang.jpg b/lannguyen/images/khoai lang.jpg new file mode 100644 index 0000000..98148a9 Binary files /dev/null and b/lannguyen/images/khoai lang.jpg differ diff --git a/lannguyen/images/pho bo.webp b/lannguyen/images/pho bo.webp new file mode 100644 index 0000000..7257f6e Binary files /dev/null and b/lannguyen/images/pho bo.webp differ diff --git a/lannguyen/images/pho ga.webp b/lannguyen/images/pho ga.webp new file mode 100644 index 0000000..3b4a390 Binary files /dev/null and b/lannguyen/images/pho ga.webp differ diff --git a/lannguyen/images/salad bow.jpg b/lannguyen/images/salad bow.jpg new file mode 100644 index 0000000..92f68d1 Binary files /dev/null and b/lannguyen/images/salad bow.jpg differ diff --git a/lannguyen/images/samon.jpg b/lannguyen/images/samon.jpg new file mode 100644 index 0000000..45b0ae7 Binary files /dev/null and b/lannguyen/images/samon.jpg differ diff --git a/lannguyen/images/sinh to.jpg b/lannguyen/images/sinh to.jpg new file mode 100644 index 0000000..13159ce Binary files /dev/null and b/lannguyen/images/sinh to.jpg differ diff --git a/lannguyen/images/sping rolls.avif b/lannguyen/images/sping rolls.avif new file mode 100644 index 0000000..30d6f7e Binary files /dev/null and b/lannguyen/images/sping rolls.avif differ diff --git a/lannguyen/images/vermicelli noodle salad.avif b/lannguyen/images/vermicelli noodle salad.avif new file mode 100644 index 0000000..b7be168 Binary files /dev/null and b/lannguyen/images/vermicelli noodle salad.avif differ diff --git a/lannguyen/index.html b/lannguyen/index.html new file mode 100644 index 0000000..f2f5c56 --- /dev/null +++ b/lannguyen/index.html @@ -0,0 +1,41 @@ + + + + + + Interactive Restaurant Menu + + + +
+
+

Homemade Vietnamese Restaurant

+

Fresh • Authentic • Made with love

+
+ +
+ + + + + +
+ + + + + +
+ + + + \ No newline at end of file diff --git a/lannguyen/script.js b/lannguyen/script.js new file mode 100644 index 0000000..377900c --- /dev/null +++ b/lannguyen/script.js @@ -0,0 +1,255 @@ + + +const buttons = document.querySelectorAll(".menu-btn"); +const menuTitle = document.querySelector("#menu-title"); +const menuDisplay = document.querySelector("#menu-display"); + +const menuData = { + breakfast: [ + { + name: "Beef noodle soup", + description: "Beef noodle soup with fresh herbs", + price: "$18", + image: "./images/pho bo.webp" + + }, + { + name: "Chicken noodle soup", + description: "Chicken noodle soup with fresh herbs", + price: "$15", + image: "./images/pho ga.webp" + }, + { + name: "Fruit Bowl", + description: "Fresh seasonal fruit served chilled", + price: "$8", + image: "./images/Fruit bow.jpeg" + + } + ], + + + lunch: [ + { + name: "Pork banh mi", + description: "Crispy baguette with pork & veggies", + price: "$12", + image: "./images/banh mi.webp" + }, + { + name: "Egg rolls", + description: "Crispy rolls with dipping sauce", + price: "$11", + image: "./images/Egg rolls.avif" + }, + { + name: "Hot & Sour Soup", + description: "Spicy soup with herbs", + price: "$17", + image: "./images/Canh chua.jpeg" + } + ], + + + + brunch: [ + { + name: "Crispy rice paper wrap", + description: "Crispy rice paper wrapped around seasoned meat and vegetables", + price: "$14", + image: "./images/Banh xeo.jpg" + }, + { + name: "Avocado crepse", + description: "Toasted bread topped with avocado and eggs", + price: "$10", + image: "./images/Crep.jpeg" + }, + { + name: "Brunch Special", + description: "Sparkling brunch favorite", + price: "$9", + image: "./images/Banh khot.jpeg" + } + ], + dinner: [ + { + name: "Grilled Salmon", + description: "Salmon served with rice and vegetables", + price: "$28", + image: "./images/samon.jpg" + }, + + { + name: "Steak with vegetables", + description: "Sliced steak over mixed vegetables", + price: "$19", + image: "./images/Beef salad.jpeg" + + }, + { + name: "Veggie Bowl", + description: "Roasted vegetables over tufou with a savory sauce", + price: "$15", + image: "./images/vermicelli noodle salad.avif" + + } + ], + happyHour: [ + { + name: "Spring rolls", + description: "Crispy rolls filled with vegetables and served with dipping sauce", + price: "$6", + image: "./images/sping rolls.avif" + }, + { + name: "Sweet Potato Fries", + description: "Fries topped with sinemon and coconutflakes", + price: "$7", + image: "./images/khoai lang.jpg" + }, + { + name: " Salad bowl", + description: "Mixed salad with marinara sauce", + price: "$6", + image: "./images/salad bow.jpg" + } + ], + drinks: [ + { + name: "Three color dessert", + description: "Three color dessert with beans, jelly, and coconut milk", + price: "$8", + image: "./images/Che ba mau.jpeg" + }, + { + name: "Iced Coffee", + description: "Cold brew coffee over ice", + price: "$7", + image: "./images/cafe.webp" + }, + { + name: "Berry Smoothie", + description: "Mixed berries blended with yogurt", + price: "$16", + image: "./images/sinh to.jpg" + + } + ] +}; +function displayMenu(category) { + menuDisplay.innerHTML = ""; + + const categoryTitles = { + breakfast: "Breakfast Menu", + lunch: "Lunch Menu", + brunch: "Brunch Menu", + dinner: "Dinner Menu", + happyHour: "Happy Hour Menu", + drinks: "Drinks Menu" + }; + + menuTitle.textContent = categoryTitles[category]; + + menuData[category].forEach(item => { + const menuItem = document.createElement("div"); + menuItem.classList.add("menu-item"); + + menuItem.innerHTML = ` +

${item.name}

+

${item.description}

+

${item.price}

+ `; + + menuDisplay.appendChild(menuItem); + }); +} + +displayMenu("breakfast"); +buttons[0].classList.add("active"); + +buttons.forEach(button => { + button.addEventListener("click", function () { + buttons.forEach(btn => btn.classList.remove("active")); + button.classList.add("active"); + + const selectedCategory = button.dataset.category; + displayMenu(selectedCategory); + }); +}); + + + +menuItem.innerHTML = ` + + ${item.name} +

${item.name}

+

${item.description}

+

${item.price}

+ menuItem.innerHTML += ` + +`; +`; +console.log(buttons); +console.log(menuTitle); +console.log(menuDisplay); + + let cart = []; + +function addToCart(name) { + cart.push(name); + alert(name + " added to cart"); +} + +function displayMenu(category) { + menuDisplay.innerHTML = ""; + + const categoryTitles = { + breakfast: "Breakfast Menu", + lunch: "Lunch Menu", + brunch: "Brunch Menu", + dinner: "Dinner Menu", + happyHour: "Happy Hour Menu", + drinks: "Drinks Menu" + }; + + menuTitle.textContent = categoryTitles[category]; + + menuData[category].forEach(item => { + const menuItem = document.createElement("div"); + menuItem.classList.add("menu-item"); + + menuItem.innerHTML = ` + +

${item.name}

+

${item.description}

+

${item.price}

+`; + + menuDisplay.appendChild(menuItem); + }); +} + + + +displayMenu("breakfast"); + +buttons.forEach(button => { + button.addEventListener("click", function () { + const selectedCategory = button.dataset.category; + displayMenu(selectedCategory); + }); +}); + +buttons.forEach(button => { + button.addEventListener("click", function () { + buttons.forEach(btn => btn.classList.remove("active")); + button.classList.add("active"); + + const selectedCategory = button.dataset.category; + displayMenu(selectedCategory); + }); +}); + +buttons[0].classList.add("active"); + diff --git a/lannguyen/style.css b/lannguyen/style.css new file mode 100644 index 0000000..d15b925 --- /dev/null +++ b/lannguyen/style.css @@ -0,0 +1,179 @@ +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { +font-family: Georgia, serif; + background-color: #edeb84; + color: #2d2d2d; + line-height: 1.6; + padding: 20px; +} + +.hero { + text-align: center; + margin-bottom: 30px; +} + +.hero h1 { + font-size: 2.5rem; + margin-bottom: 10px; +} + +.hero p { + font-size: 1.1rem; + color: #666; +} + +.menu-controls { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 10px; + margin-bottom: 30px; +} + +.menu-btn { + padding: 12px 18px; + border: none; + background-color: #2d6a4f; + color: white; + border-radius: 8px; + cursor: pointer; + font-size: 1rem; +} + +.menu-btn:hover { + background-color: #1b4332; +} + +.menu-btn.active { + background-color: #d97706; +} + +.menu-section { + max-width: 900px; + margin: 0 auto; +} + +#menu-title { + text-align: center; + margin-bottom: 20px; +} + +.menu-display { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 20px; +} + +#menu-display { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 20px; +} + +.menu-item { + background-color: white; + border-radius: 12px; + padding: 18px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + min-height: 320px; + display: flex; + flex-direction: column; + justify-content: space-between; + overflow: hidden; + transition: 0.3s; +} + +@media (max-width: 600px) { + .menu-display { + grid-template-columns: 1fr; + } +} + +.food-img { + width: 100%; + height: 180px; + object-fit: cover; +} + +.menu-item { + animation: fadeIn 0.5s ease-in; +} + +@keyframes fadeIn { + from { opacity: 0; transform: translateY(10px); } + to { opacity: 1; transform: translateY(0); } +} + +.menu-item:hover { + transform: scale(1.03); +} + +.menu-item img { + width: 100%; + height: 180px; + object-fit: cover; + border-radius: 10px; +} + +#menu-display { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 25px; +} + +.menu-item h3 { + margin-bottom: 8px; +} + +.menu-item p { + margin-bottom: 10px; + color: #555; +} + +.price { + font-weight: bold; + color: #d97706; +} + +#categories { + display: flex; + gap: 20px; + margin-bottom: 20px; +} + +.category { + cursor: pointer; + text-align: center; +} + +.category img { + width: 150px; + height: 100px; + object-fit: cover; + border-radius: 10px; +} + +#items { + display: flex; + gap: 20px; +} + +.item img { + width: 120px; + height: 100px; + object-fit: cover; + border-radius: 10px; +} + +.menu-item img.food-img { + width: 100%; + height: 150px; + object-fit: cover; + border-radius: 10px; + margin-bottom: 10px; +} \ No newline at end of file