Add Cultural Activity
\n \nActivities to Rate
\n \nFamily Scores Visualization
\n\n \n
\n Plan memorable cultural experiences together
Plan memorable cultural experiences together
\nLocation: ${activity.location}
\nCategory: ${activity.category}
\nCost: $${activity.cost}
\n \nAverage Score: ${activity.averageScore.toFixed(1)}
\n `;\n activitiesContainer.appendChild(card);\n \n // Add event listeners to stars\n const stars = card.querySelectorAll('.rating-star');\n stars.forEach((star, starIndex) => {\n star.addEventListener('click', () => rateActivity(index, starIndex + 1));\n });\n });\n \n updateChart();\n }\n\n function generateStarRating(activityIndex) {\n return Array(5).fill(0).map((_, i) => \n ` `\n ).join('');\n }\n\n function rateActivity(activityIndex, score) {\n activities[activityIndex].scores.push(score);\n activities[activityIndex].averageScore = \n activities[activityIndex].scores.reduce((a, b) => a + b, 0) / \n activities[activityIndex].scores.length;\n renderActivities();\n }\n\n function updateChart() {\n const canvas = document.getElementById('score-chart');\n const ctx = canvas.getContext('2d');\n \n // Clear previous chart\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n \n // Set canvas size\n canvas.width = 600;\n canvas.height = 400;\n \n // Draw chart\n if (activities.length > 0) {\n const barWidth = (canvas.width - 100) / activities.length;\n const maxScore = 5;\n \n activities.forEach((activity, index) => {\n const barHeight = (activity.averageScore / maxScore) * (canvas.height - 100);\n const x = 50 + (index * barWidth);\n const y = canvas.height - 50;\n \n // Draw bar\n ctx.fillStyle = '#e74c3c';\n ctx.fillRect(x, y - barHeight, barWidth - 10, barHeight);\n \n // Draw label\n ctx.fillStyle = '#2c3e50';\n ctx.font = '12px Arial';\n ctx.textAlign = 'center';\n ctx.fillText(activity.name, x + (barWidth - 10) / 2, y + 20);\n });\n \n // Draw y-axis\n ctx.beginPath();\n ctx.moveTo(40, 50);\n ctx.lineTo(40, canvas.height - 50);\n ctx.stroke();\n \n // Draw x-axis\n ctx.beginPath();\n ctx.moveTo(40, canvas.height - 50);\n ctx.lineTo(canvas.width - 40, canvas.height - 50);\n ctx.stroke();\n }\n }\n});\n\n---end---\n\nThis website features:\n1. A form to add cultural activities with details\n2. Interactive rating system with star ratings\n3. Beautiful animated cards for each activity\n4. Real-time score visualization using Canvas\n5. Mobile-responsive design\n6. Smooth animations and transitions\n7. Professional color scheme\n8. Accessible form controls and semantic HTML\n9. Clean, modular JavaScript\n10. Modern CSS with variables and flexbox/grid layouts\n\nThe design is both functional and visually appealing, with careful attention to user experience and accessibility. The visualization updates automatically as family members rate activities, making it easy to see which activities are most popular."Location: ${activity.location}
Category: ${activity.category}
Cost: $${activity.cost}
Average Score: ${activity.averageScore.toFixed(1)}