Changed around line 1
+ const dishes = [
+ {
+ name: "Kung Pao Chicken",
+ image: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/...", // Base64 image data would go here
+ description: "Spicy diced chicken with peanuts, vegetables, and chili peppers",
+ tags: ["Spicy", "Sichuan", "Chicken"]
+ },
+ {
+ name: "Dim Sum",
+ image: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/...",
+ description: "Variety of small dishes including dumplings and buns",
+ tags: ["Cantonese", "Steamed", "Traditional"]
+ },
+ // Add more dishes here
+ ];
+
+ document.getElementById('generateBtn').addEventListener('click', () => {
+ const randomDish = dishes[Math.floor(Math.random() * dishes.length)];
+ const card = document.getElementById('dishCard');
+
+ card.classList.add('hidden');
+
+ setTimeout(() => {
+ document.getElementById('dishName').textContent = randomDish.name;
+ document.getElementById('dishImage').style.backgroundImage = `url(${randomDish.image})`;
+ document.getElementById('dishDescription').textContent = randomDish.description;
+
+ const tagsContainer = document.getElementById('dishTags');
+ tagsContainer.innerHTML = '';
+ randomDish.tags.forEach(tag => {
+ const tagEl = document.createElement('span');
+ tagEl.classList.add('tag');
+ tagEl.textContent = tag;
+ tagsContainer.appendChild(tagEl);
+ });
+
+ card.classList.remove('hidden');
+ }, 300);
+ });