Add 3 files
Browse files- README.md +7 -5
- index.html +582 -19
- prompts.txt +1 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: hhh
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: pink
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,582 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>FoodDash - Food Delivery App</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
/* Custom scrollbar */
|
| 11 |
+
.custom-scroll::-webkit-scrollbar {
|
| 12 |
+
width: 6px;
|
| 13 |
+
height: 6px;
|
| 14 |
+
}
|
| 15 |
+
.custom-scroll::-webkit-scrollbar-track {
|
| 16 |
+
background: #f1f1f1;
|
| 17 |
+
border-radius: 10px;
|
| 18 |
+
}
|
| 19 |
+
.custom-scroll::-webkit-scrollbar-thumb {
|
| 20 |
+
background: #888;
|
| 21 |
+
border-radius: 10px;
|
| 22 |
+
}
|
| 23 |
+
.custom-scroll::-webkit-scrollbar-thumb:hover {
|
| 24 |
+
background: #555;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
/* Animation for food items */
|
| 28 |
+
@keyframes fadeIn {
|
| 29 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 30 |
+
to { opacity: 1; transform: translateY(0); }
|
| 31 |
+
}
|
| 32 |
+
.animate-fadeIn {
|
| 33 |
+
animation: fadeIn 0.3s ease-out forwards;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
/* Custom checkbox for dietary preferences */
|
| 37 |
+
.diet-checkbox:checked + .diet-label {
|
| 38 |
+
background-color: #f59e0b;
|
| 39 |
+
color: white;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
/* Pulse animation for cart button */
|
| 43 |
+
@keyframes pulse {
|
| 44 |
+
0% { transform: scale(1); }
|
| 45 |
+
50% { transform: scale(1.1); }
|
| 46 |
+
100% { transform: scale(1); }
|
| 47 |
+
}
|
| 48 |
+
.pulse {
|
| 49 |
+
animation: pulse 1.5s infinite;
|
| 50 |
+
}
|
| 51 |
+
</style>
|
| 52 |
+
</head>
|
| 53 |
+
<body class="bg-gray-50 font-sans">
|
| 54 |
+
<!-- App Container -->
|
| 55 |
+
<div class="max-w-md mx-auto bg-white shadow-lg rounded-lg overflow-hidden relative" style="height: 100vh; max-height: 800px;">
|
| 56 |
+
<!-- Header -->
|
| 57 |
+
<div class="bg-orange-500 p-4 flex justify-between items-center">
|
| 58 |
+
<div class="flex items-center space-x-2">
|
| 59 |
+
<i class="fas fa-map-marker-alt text-white"></i>
|
| 60 |
+
<div>
|
| 61 |
+
<p class="text-xs text-white">Delivery to</p>
|
| 62 |
+
<p class="text-white font-medium">Home • 15-20 min</p>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
<div class="relative">
|
| 66 |
+
<button id="cartBtn" class="bg-white text-orange-500 p-2 rounded-full relative">
|
| 67 |
+
<i class="fas fa-shopping-basket"></i>
|
| 68 |
+
<span id="cartCount" class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">0</span>
|
| 69 |
+
</button>
|
| 70 |
+
</div>
|
| 71 |
+
</div>
|
| 72 |
+
|
| 73 |
+
<!-- Search Bar -->
|
| 74 |
+
<div class="p-4">
|
| 75 |
+
<div class="relative">
|
| 76 |
+
<input type="text" placeholder="Search for restaurants or dishes..." class="w-full bg-gray-100 rounded-full py-2 px-4 pl-10 focus:outline-none focus:ring-2 focus:ring-orange-300">
|
| 77 |
+
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
|
| 78 |
+
</div>
|
| 79 |
+
</div>
|
| 80 |
+
|
| 81 |
+
<!-- Categories -->
|
| 82 |
+
<div class="px-4 pb-2 overflow-x-auto custom-scroll">
|
| 83 |
+
<div class="flex space-x-3">
|
| 84 |
+
<button class="category-btn bg-orange-500 text-white px-4 py-1 rounded-full text-sm whitespace-nowrap">All</button>
|
| 85 |
+
<button class="category-btn bg-gray-100 text-gray-700 px-4 py-1 rounded-full text-sm whitespace-nowrap">Burger</button>
|
| 86 |
+
<button class="category-btn bg-gray-100 text-gray-700 px-4 py-1 rounded-full text-sm whitespace-nowrap">Pizza</button>
|
| 87 |
+
<button class="category-btn bg-gray-100 text-gray-700 px-4 py-1 rounded-full text-sm whitespace-nowrap">Sushi</button>
|
| 88 |
+
<button class="category-btn bg-gray-100 text-gray-700 px-4 py-1 rounded-full text-sm whitespace-nowrap">Salad</button>
|
| 89 |
+
<button class="category-btn bg-gray-100 text-gray-700 px-4 py-1 rounded-full text-sm whitespace-nowrap">Dessert</button>
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<!-- Featured Banner -->
|
| 94 |
+
<div class="mx-4 my-2 bg-gradient-to-r from-orange-400 to-orange-600 rounded-xl p-4 text-white relative overflow-hidden">
|
| 95 |
+
<div class="relative z-10">
|
| 96 |
+
<h3 class="font-bold text-lg">Special Offer!</h3>
|
| 97 |
+
<p class="text-sm">Get 20% off on your first order</p>
|
| 98 |
+
<button class="mt-2 bg-white text-orange-500 text-xs px-3 py-1 rounded-full">Order Now</button>
|
| 99 |
+
</div>
|
| 100 |
+
<div class="absolute right-0 bottom-0 opacity-20">
|
| 101 |
+
<i class="fas fa-utensils text-6xl"></i>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<!-- Restaurants/Food Items -->
|
| 106 |
+
<div class="px-4 py-2 overflow-y-auto custom-scroll" style="height: calc(100% - 240px);">
|
| 107 |
+
<h3 class="font-bold text-lg mb-3">Popular Near You</h3>
|
| 108 |
+
|
| 109 |
+
<!-- Restaurant/Food Item Cards -->
|
| 110 |
+
<div class="grid grid-cols-2 gap-3" id="foodItems">
|
| 111 |
+
<!-- Items will be added dynamically -->
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
|
| 115 |
+
<!-- Bottom Navigation -->
|
| 116 |
+
<div class="absolute bottom-0 left-0 right-0 bg-white border-t border-gray-200 flex justify-around py-2">
|
| 117 |
+
<button class="text-orange-500 flex flex-col items-center">
|
| 118 |
+
<i class="fas fa-home"></i>
|
| 119 |
+
<span class="text-xs">Home</span>
|
| 120 |
+
</button>
|
| 121 |
+
<button class="text-gray-500 flex flex-col items-center">
|
| 122 |
+
<i class="fas fa-search"></i>
|
| 123 |
+
<span class="text-xs">Search</span>
|
| 124 |
+
</button>
|
| 125 |
+
<button class="text-gray-500 flex flex-col items-center">
|
| 126 |
+
<i class="fas fa-heart"></i>
|
| 127 |
+
<span class="text-xs">Favorites</span>
|
| 128 |
+
</button>
|
| 129 |
+
<button class="text-gray-500 flex flex-col items-center">
|
| 130 |
+
<i class="fas fa-user"></i>
|
| 131 |
+
<span class="text-xs">Profile</span>
|
| 132 |
+
</button>
|
| 133 |
+
</div>
|
| 134 |
+
|
| 135 |
+
<!-- Cart Modal -->
|
| 136 |
+
<div id="cartModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
| 137 |
+
<div class="bg-white rounded-t-xl w-full max-w-md absolute bottom-0 max-h-[80vh] overflow-hidden">
|
| 138 |
+
<div class="p-4 border-b border-gray-200 flex justify-between items-center">
|
| 139 |
+
<h3 class="font-bold text-lg">Your Order</h3>
|
| 140 |
+
<button id="closeCart" class="text-gray-500">
|
| 141 |
+
<i class="fas fa-times"></i>
|
| 142 |
+
</button>
|
| 143 |
+
</div>
|
| 144 |
+
<div class="overflow-y-auto custom-scroll" style="max-height: 60vh;">
|
| 145 |
+
<div id="cartItems" class="divide-y divide-gray-200">
|
| 146 |
+
<!-- Cart items will be added here -->
|
| 147 |
+
<div class="p-4 text-center text-gray-500">
|
| 148 |
+
<i class="fas fa-shopping-basket text-4xl mb-2 opacity-30"></i>
|
| 149 |
+
<p>Your cart is empty</p>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
<div class="p-4 border-t border-gray-200 bg-white">
|
| 154 |
+
<div class="flex justify-between mb-2">
|
| 155 |
+
<span>Subtotal</span>
|
| 156 |
+
<span id="subtotal">$0.00</span>
|
| 157 |
+
</div>
|
| 158 |
+
<div class="flex justify-between mb-2">
|
| 159 |
+
<span>Delivery Fee</span>
|
| 160 |
+
<span>$2.99</span>
|
| 161 |
+
</div>
|
| 162 |
+
<div class="flex justify-between font-bold text-lg">
|
| 163 |
+
<span>Total</span>
|
| 164 |
+
<span id="total">$2.99</span>
|
| 165 |
+
</div>
|
| 166 |
+
<button id="checkoutBtn" class="w-full bg-orange-500 text-white py-3 rounded-lg mt-3 disabled:opacity-50" disabled>
|
| 167 |
+
Checkout
|
| 168 |
+
</button>
|
| 169 |
+
</div>
|
| 170 |
+
</div>
|
| 171 |
+
</div>
|
| 172 |
+
|
| 173 |
+
<!-- Food Detail Modal -->
|
| 174 |
+
<div id="foodDetailModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
| 175 |
+
<div class="bg-white rounded-xl w-full max-w-md mx-4 max-h-[80vh] overflow-hidden">
|
| 176 |
+
<div class="relative">
|
| 177 |
+
<img id="detailImage" src="https://via.placeholder.com/400x200" alt="Food" class="w-full h-48 object-cover">
|
| 178 |
+
<button id="closeDetail" class="absolute top-2 right-2 bg-white text-gray-800 p-2 rounded-full shadow">
|
| 179 |
+
<i class="fas fa-times"></i>
|
| 180 |
+
</button>
|
| 181 |
+
</div>
|
| 182 |
+
<div class="p-4 overflow-y-auto custom-scroll" style="max-height: calc(80vh - 200px);">
|
| 183 |
+
<div class="flex justify-between items-start">
|
| 184 |
+
<div>
|
| 185 |
+
<h3 id="detailName" class="font-bold text-xl">Food Name</h3>
|
| 186 |
+
<p id="detailDescription" class="text-gray-600 text-sm mt-1">Description goes here</p>
|
| 187 |
+
</div>
|
| 188 |
+
<span id="detailPrice" class="font-bold text-orange-500">$12.99</span>
|
| 189 |
+
</div>
|
| 190 |
+
|
| 191 |
+
<div class="mt-4">
|
| 192 |
+
<h4 class="font-medium mb-2">Dietary Preferences</h4>
|
| 193 |
+
<div class="flex flex-wrap gap-2">
|
| 194 |
+
<div>
|
| 195 |
+
<input type="checkbox" id="vegetarian" class="diet-checkbox hidden">
|
| 196 |
+
<label for="vegetarian" class="diet-label bg-gray-100 text-gray-700 px-3 py-1 rounded-full text-xs flex items-center">
|
| 197 |
+
<i class="fas fa-leaf mr-1"></i> Vegetarian
|
| 198 |
+
</label>
|
| 199 |
+
</div>
|
| 200 |
+
<div>
|
| 201 |
+
<input type="checkbox" id="vegan" class="diet-checkbox hidden">
|
| 202 |
+
<label for="vegan" class="diet-label bg-gray-100 text-gray-700 px-3 py-1 rounded-full text-xs flex items-center">
|
| 203 |
+
<i class="fas fa-seedling mr-1"></i> Vegan
|
| 204 |
+
</label>
|
| 205 |
+
</div>
|
| 206 |
+
<div>
|
| 207 |
+
<input type="checkbox" id="glutenFree" class="diet-checkbox hidden">
|
| 208 |
+
<label for="glutenFree" class="diet-label bg-gray-100 text-gray-700 px-3 py-1 rounded-full text-xs flex items-center">
|
| 209 |
+
<i class="fas fa-bread-slice mr-1"></i> Gluten Free
|
| 210 |
+
</label>
|
| 211 |
+
</div>
|
| 212 |
+
</div>
|
| 213 |
+
</div>
|
| 214 |
+
|
| 215 |
+
<div class="mt-4">
|
| 216 |
+
<h4 class="font-medium mb-2">Special Instructions</h4>
|
| 217 |
+
<textarea placeholder="Any special requests?" class="w-full border border-gray-300 rounded-lg p-2 text-sm focus:outline-none focus:ring-1 focus:ring-orange-300"></textarea>
|
| 218 |
+
</div>
|
| 219 |
+
|
| 220 |
+
<div class="mt-4 flex items-center justify-between">
|
| 221 |
+
<div class="flex items-center border border-gray-300 rounded-lg">
|
| 222 |
+
<button id="decreaseQty" class="px-3 py-1 text-gray-600">
|
| 223 |
+
<i class="fas fa-minus"></i>
|
| 224 |
+
</button>
|
| 225 |
+
<span id="quantity" class="px-3">1</span>
|
| 226 |
+
<button id="increaseQty" class="px-3 py-1 text-gray-600">
|
| 227 |
+
<i class="fas fa-plus"></i>
|
| 228 |
+
</button>
|
| 229 |
+
</div>
|
| 230 |
+
<button id="addToCart" class="bg-orange-500 text-white px-4 py-2 rounded-lg">
|
| 231 |
+
Add to Cart - <span id="totalPrice">$12.99</span>
|
| 232 |
+
</button>
|
| 233 |
+
</div>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
</div>
|
| 237 |
+
</div>
|
| 238 |
+
|
| 239 |
+
<script>
|
| 240 |
+
// Sample food data
|
| 241 |
+
const foodItems = [
|
| 242 |
+
{
|
| 243 |
+
id: 1,
|
| 244 |
+
name: "Classic Burger",
|
| 245 |
+
description: "Beef patty with cheese, lettuce, and special sauce",
|
| 246 |
+
price: 8.99,
|
| 247 |
+
image: "https://images.unsplash.com/photo-1568901346375-23c9450c58cd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8YnVyZ2VyfGVufDB8fDB8fHww&auto=format&fit=crop&w=500&q=60"
|
| 248 |
+
},
|
| 249 |
+
{
|
| 250 |
+
id: 2,
|
| 251 |
+
name: "Pepperoni Pizza",
|
| 252 |
+
description: "Classic pizza with mozzarella and pepperoni",
|
| 253 |
+
price: 12.99,
|
| 254 |
+
image: "https://images.unsplash.com/photo-1628840042765-356cda07504e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8cGVwcGVyb25pJTIwcGl6emF8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60"
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
id: 3,
|
| 258 |
+
name: "California Roll",
|
| 259 |
+
description: "Crab, avocado and cucumber sushi roll",
|
| 260 |
+
price: 10.50,
|
| 261 |
+
image: "https://images.unsplash.com/photo-1617196035154-1ed7f6ac3f91?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8c3VzaGl8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60"
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
id: 4,
|
| 265 |
+
name: "Caesar Salad",
|
| 266 |
+
description: "Romaine lettuce, croutons, parmesan with Caesar dressing",
|
| 267 |
+
price: 7.99,
|
| 268 |
+
image: "https://images.unsplash.com/photo-1546793665-c74683f339c1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NHx8c2FsYWR8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60"
|
| 269 |
+
},
|
| 270 |
+
{
|
| 271 |
+
id: 5,
|
| 272 |
+
name: "Chocolate Brownie",
|
| 273 |
+
description: "Warm chocolate brownie with vanilla ice cream",
|
| 274 |
+
price: 5.99,
|
| 275 |
+
image: "https://images.unsplash.com/photo-1564355808539-22fda35bed7e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8N3x8ZGVzc2VydHxlbnwwfHwwfHx8MA%3D%3D&auto=format&fit=crop&w=500&q=60"
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
id: 6,
|
| 279 |
+
name: "Chicken Wings",
|
| 280 |
+
description: "Crispy fried wings with your choice of sauce",
|
| 281 |
+
price: 9.99,
|
| 282 |
+
image: "https://images.unsplash.com/photo-1567620832903-9fc6e53a2ead?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8Y2hpY2tlbiUyMHdpbmdzfGVufDB8fDB8fHww&auto=format&fit=crop&w=500&q=60"
|
| 283 |
+
}
|
| 284 |
+
];
|
| 285 |
+
|
| 286 |
+
// Cart state
|
| 287 |
+
let cart = [];
|
| 288 |
+
let currentFoodItem = null;
|
| 289 |
+
let quantity = 1;
|
| 290 |
+
|
| 291 |
+
// DOM elements
|
| 292 |
+
const foodItemsContainer = document.getElementById('foodItems');
|
| 293 |
+
const cartModal = document.getElementById('cartModal');
|
| 294 |
+
const cartBtn = document.getElementById('cartBtn');
|
| 295 |
+
const closeCart = document.getElementById('closeCart');
|
| 296 |
+
const cartItems = document.getElementById('cartItems');
|
| 297 |
+
const cartCount = document.getElementById('cartCount');
|
| 298 |
+
const subtotal = document.getElementById('subtotal');
|
| 299 |
+
const total = document.getElementById('total');
|
| 300 |
+
const checkoutBtn = document.getElementById('checkoutBtn');
|
| 301 |
+
const foodDetailModal = document.getElementById('foodDetailModal');
|
| 302 |
+
const closeDetail = document.getElementById('closeDetail');
|
| 303 |
+
const detailName = document.getElementById('detailName');
|
| 304 |
+
const detailDescription = document.getElementById('detailDescription');
|
| 305 |
+
const detailPrice = document.getElementById('detailPrice');
|
| 306 |
+
const detailImage = document.getElementById('detailImage');
|
| 307 |
+
const quantityElement = document.getElementById('quantity');
|
| 308 |
+
const totalPrice = document.getElementById('totalPrice');
|
| 309 |
+
const increaseQty = document.getElementById('increaseQty');
|
| 310 |
+
const decreaseQty = document.getElementById('decreaseQty');
|
| 311 |
+
const addToCart = document.getElementById('addToCart');
|
| 312 |
+
|
| 313 |
+
// Initialize the app
|
| 314 |
+
function init() {
|
| 315 |
+
renderFoodItems();
|
| 316 |
+
setupEventListeners();
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
// Render food items
|
| 320 |
+
function renderFoodItems() {
|
| 321 |
+
foodItemsContainer.innerHTML = '';
|
| 322 |
+
|
| 323 |
+
foodItems.forEach((item, index) => {
|
| 324 |
+
const foodItem = document.createElement('div');
|
| 325 |
+
foodItem.className = 'bg-white rounded-lg overflow-hidden shadow-sm border border-gray-100 animate-fadeIn';
|
| 326 |
+
foodItem.style.animationDelay = `${index * 0.05}s`;
|
| 327 |
+
foodItem.innerHTML = `
|
| 328 |
+
<div class="relative">
|
| 329 |
+
<img src="${item.image}" alt="${item.name}" class="w-full h-32 object-cover">
|
| 330 |
+
<button class="absolute top-2 right-2 bg-white text-orange-500 p-1 rounded-full shadow food-detail-btn" data-id="${item.id}">
|
| 331 |
+
<i class="fas fa-plus text-xs"></i>
|
| 332 |
+
</button>
|
| 333 |
+
</div>
|
| 334 |
+
<div class="p-3">
|
| 335 |
+
<h4 class="font-medium">${item.name}</h4>
|
| 336 |
+
<p class="text-gray-500 text-xs mt-1 truncate">${item.description}</p>
|
| 337 |
+
<div class="flex justify-between items-center mt-2">
|
| 338 |
+
<span class="font-bold text-orange-500">$${item.price.toFixed(2)}</span>
|
| 339 |
+
<span class="text-yellow-500 text-xs">
|
| 340 |
+
<i class="fas fa-star"></i> 4.5
|
| 341 |
+
</span>
|
| 342 |
+
</div>
|
| 343 |
+
</div>
|
| 344 |
+
`;
|
| 345 |
+
foodItemsContainer.appendChild(foodItem);
|
| 346 |
+
});
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
// Setup event listeners
|
| 350 |
+
function setupEventListeners() {
|
| 351 |
+
// Cart modal
|
| 352 |
+
cartBtn.addEventListener('click', () => {
|
| 353 |
+
cartModal.classList.remove('hidden');
|
| 354 |
+
renderCartItems();
|
| 355 |
+
});
|
| 356 |
+
|
| 357 |
+
closeCart.addEventListener('click', () => {
|
| 358 |
+
cartModal.classList.add('hidden');
|
| 359 |
+
});
|
| 360 |
+
|
| 361 |
+
// Food detail modal
|
| 362 |
+
document.querySelectorAll('.food-detail-btn').forEach(btn => {
|
| 363 |
+
btn.addEventListener('click', (e) => {
|
| 364 |
+
const id = parseInt(e.currentTarget.getAttribute('data-id'));
|
| 365 |
+
showFoodDetail(id);
|
| 366 |
+
});
|
| 367 |
+
});
|
| 368 |
+
|
| 369 |
+
closeDetail.addEventListener('click', () => {
|
| 370 |
+
foodDetailModal.classList.add('hidden');
|
| 371 |
+
});
|
| 372 |
+
|
| 373 |
+
// Quantity controls
|
| 374 |
+
increaseQty.addEventListener('click', () => {
|
| 375 |
+
quantity++;
|
| 376 |
+
updateQuantity();
|
| 377 |
+
});
|
| 378 |
+
|
| 379 |
+
decreaseQty.addEventListener('click', () => {
|
| 380 |
+
if (quantity > 1) {
|
| 381 |
+
quantity--;
|
| 382 |
+
updateQuantity();
|
| 383 |
+
}
|
| 384 |
+
});
|
| 385 |
+
|
| 386 |
+
// Add to cart
|
| 387 |
+
addToCart.addEventListener('click', () => {
|
| 388 |
+
if (currentFoodItem) {
|
| 389 |
+
addItemToCart(currentFoodItem, quantity);
|
| 390 |
+
foodDetailModal.classList.add('hidden');
|
| 391 |
+
quantity = 1;
|
| 392 |
+
updateCartCount();
|
| 393 |
+
|
| 394 |
+
// Add pulse animation to cart button
|
| 395 |
+
cartBtn.classList.add('pulse');
|
| 396 |
+
setTimeout(() => {
|
| 397 |
+
cartBtn.classList.remove('pulse');
|
| 398 |
+
}, 3000);
|
| 399 |
+
}
|
| 400 |
+
});
|
| 401 |
+
|
| 402 |
+
// Category buttons
|
| 403 |
+
document.querySelectorAll('.category-btn').forEach(btn => {
|
| 404 |
+
btn.addEventListener('click', (e) => {
|
| 405 |
+
document.querySelectorAll('.category-btn').forEach(b => {
|
| 406 |
+
b.classList.remove('bg-orange-500', 'text-white');
|
| 407 |
+
b.classList.add('bg-gray-100', 'text-gray-700');
|
| 408 |
+
});
|
| 409 |
+
e.currentTarget.classList.remove('bg-gray-100', 'text-gray-700');
|
| 410 |
+
e.currentTarget.classList.add('bg-orange-500', 'text-white');
|
| 411 |
+
// In a real app, we would filter items here
|
| 412 |
+
});
|
| 413 |
+
});
|
| 414 |
+
|
| 415 |
+
// Checkout button
|
| 416 |
+
checkoutBtn.addEventListener('click', () => {
|
| 417 |
+
alert('Order placed successfully!');
|
| 418 |
+
cart = [];
|
| 419 |
+
updateCartCount();
|
| 420 |
+
renderCartItems();
|
| 421 |
+
cartModal.classList.add('hidden');
|
| 422 |
+
});
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
// Show food detail modal
|
| 426 |
+
function showFoodDetail(id) {
|
| 427 |
+
currentFoodItem = foodItems.find(item => item.id === id);
|
| 428 |
+
if (currentFoodItem) {
|
| 429 |
+
detailName.textContent = currentFoodItem.name;
|
| 430 |
+
detailDescription.textContent = currentFoodItem.description;
|
| 431 |
+
detailPrice.textContent = `$${currentFoodItem.price.toFixed(2)}`;
|
| 432 |
+
detailImage.src = currentFoodItem.image;
|
| 433 |
+
quantityElement.textContent = '1';
|
| 434 |
+
totalPrice.textContent = `$${currentFoodItem.price.toFixed(2)}`;
|
| 435 |
+
foodDetailModal.classList.remove('hidden');
|
| 436 |
+
}
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
// Update quantity display
|
| 440 |
+
function updateQuantity() {
|
| 441 |
+
quantityElement.textContent = quantity;
|
| 442 |
+
if (currentFoodItem) {
|
| 443 |
+
const total = (currentFoodItem.price * quantity).toFixed(2);
|
| 444 |
+
totalPrice.textContent = `$${total}`;
|
| 445 |
+
}
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
// Add item to cart
|
| 449 |
+
function addItemToCart(item, qty) {
|
| 450 |
+
const existingItem = cart.find(cartItem => cartItem.id === item.id);
|
| 451 |
+
|
| 452 |
+
if (existingItem) {
|
| 453 |
+
existingItem.quantity += qty;
|
| 454 |
+
} else {
|
| 455 |
+
cart.push({
|
| 456 |
+
...item,
|
| 457 |
+
quantity: qty
|
| 458 |
+
});
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
updateCartCount();
|
| 462 |
+
renderCartItems();
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
// Update cart count
|
| 466 |
+
function updateCartCount() {
|
| 467 |
+
const count = cart.reduce((total, item) => total + item.quantity, 0);
|
| 468 |
+
cartCount.textContent = count;
|
| 469 |
+
|
| 470 |
+
if (count > 0) {
|
| 471 |
+
cartCount.classList.remove('hidden');
|
| 472 |
+
checkoutBtn.disabled = false;
|
| 473 |
+
} else {
|
| 474 |
+
cartCount.classList.add('hidden');
|
| 475 |
+
checkoutBtn.disabled = true;
|
| 476 |
+
}
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
// Render cart items
|
| 480 |
+
function renderCartItems() {
|
| 481 |
+
if (cart.length === 0) {
|
| 482 |
+
cartItems.innerHTML = `
|
| 483 |
+
<div class="p-4 text-center text-gray-500">
|
| 484 |
+
<i class="fas fa-shopping-basket text-4xl mb-2 opacity-30"></i>
|
| 485 |
+
<p>Your cart is empty</p>
|
| 486 |
+
</div>
|
| 487 |
+
`;
|
| 488 |
+
subtotal.textContent = '$0.00';
|
| 489 |
+
total.textContent = '$2.99';
|
| 490 |
+
return;
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
cartItems.innerHTML = '';
|
| 494 |
+
|
| 495 |
+
let subtotalAmount = 0;
|
| 496 |
+
|
| 497 |
+
cart.forEach(item => {
|
| 498 |
+
const itemTotal = item.price * item.quantity;
|
| 499 |
+
subtotalAmount += itemTotal;
|
| 500 |
+
|
| 501 |
+
const cartItem = document.createElement('div');
|
| 502 |
+
cartItem.className = 'p-4 flex items-center';
|
| 503 |
+
cartItem.innerHTML = `
|
| 504 |
+
<div class="flex-shrink-0 w-16 h-16 bg-gray-100 rounded-lg overflow-hidden">
|
| 505 |
+
<img src="${item.image}" alt="${item.name}" class="w-full h-full object-cover">
|
| 506 |
+
</div>
|
| 507 |
+
<div class="ml-3 flex-grow">
|
| 508 |
+
<h4 class="font-medium">${item.name}</h4>
|
| 509 |
+
<div class="flex justify-between items-center mt-1">
|
| 510 |
+
<span class="text-orange-500 font-medium">$${item.price.toFixed(2)}</span>
|
| 511 |
+
<div class="flex items-center">
|
| 512 |
+
<button class="decrease-item px-2 text-gray-500" data-id="${item.id}">
|
| 513 |
+
<i class="fas fa-minus text-xs"></i>
|
| 514 |
+
</button>
|
| 515 |
+
<span class="mx-2">${item.quantity}</span>
|
| 516 |
+
<button class="increase-item px-2 text-gray-500" data-id="${item.id}">
|
| 517 |
+
<i class="fas fa-plus text-xs"></i>
|
| 518 |
+
</button>
|
| 519 |
+
</div>
|
| 520 |
+
</div>
|
| 521 |
+
</div>
|
| 522 |
+
<button class="remove-item ml-2 text-red-500" data-id="${item.id}">
|
| 523 |
+
<i class="fas fa-trash"></i>
|
| 524 |
+
</button>
|
| 525 |
+
`;
|
| 526 |
+
cartItems.appendChild(cartItem);
|
| 527 |
+
});
|
| 528 |
+
|
| 529 |
+
// Add event listeners for cart item controls
|
| 530 |
+
document.querySelectorAll('.increase-item').forEach(btn => {
|
| 531 |
+
btn.addEventListener('click', (e) => {
|
| 532 |
+
const id = parseInt(e.currentTarget.getAttribute('data-id'));
|
| 533 |
+
const item = cart.find(item => item.id === id);
|
| 534 |
+
if (item) {
|
| 535 |
+
item.quantity++;
|
| 536 |
+
updateCartCount();
|
| 537 |
+
renderCartItems();
|
| 538 |
+
}
|
| 539 |
+
});
|
| 540 |
+
});
|
| 541 |
+
|
| 542 |
+
document.querySelectorAll('.decrease-item').forEach(btn => {
|
| 543 |
+
btn.addEventListener('click', (e) => {
|
| 544 |
+
const id = parseInt(e.currentTarget.getAttribute('data-id'));
|
| 545 |
+
const itemIndex = cart.findIndex(item => item.id === id);
|
| 546 |
+
if (itemIndex !== -1) {
|
| 547 |
+
if (cart[itemIndex].quantity > 1) {
|
| 548 |
+
cart[itemIndex].quantity--;
|
| 549 |
+
} else {
|
| 550 |
+
cart.splice(itemIndex, 1);
|
| 551 |
+
}
|
| 552 |
+
updateCartCount();
|
| 553 |
+
renderCartItems();
|
| 554 |
+
}
|
| 555 |
+
});
|
| 556 |
+
});
|
| 557 |
+
|
| 558 |
+
document.querySelectorAll('.remove-item').forEach(btn => {
|
| 559 |
+
btn.addEventListener('click', (e) => {
|
| 560 |
+
const id = parseInt(e.currentTarget.getAttribute('data-id'));
|
| 561 |
+
const itemIndex = cart.findIndex(item => item.id === id);
|
| 562 |
+
if (itemIndex !== -1) {
|
| 563 |
+
cart.splice(itemIndex, 1);
|
| 564 |
+
updateCartCount();
|
| 565 |
+
renderCartItems();
|
| 566 |
+
}
|
| 567 |
+
});
|
| 568 |
+
});
|
| 569 |
+
|
| 570 |
+
// Update totals
|
| 571 |
+
const deliveryFee = 2.99;
|
| 572 |
+
const totalAmount = subtotalAmount + deliveryFee;
|
| 573 |
+
|
| 574 |
+
subtotal.textContent = `$${subtotalAmount.toFixed(2)}`;
|
| 575 |
+
total.textContent = `$${totalAmount.toFixed(2)}`;
|
| 576 |
+
}
|
| 577 |
+
|
| 578 |
+
// Initialize the app
|
| 579 |
+
document.addEventListener('DOMContentLoaded', init);
|
| 580 |
+
</script>
|
| 581 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=chimpuuuu/hhh" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 582 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
make a food delivery app in android
|