Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Menu Toggle
+ const menuToggle = document.querySelector('.menu-toggle');
+ const navMenu = document.querySelector('.nav-menu');
+
+ menuToggle?.addEventListener('click', () => {
+ navMenu.style.display = navMenu.style.display === 'flex' ? 'none' : 'flex';
+ });
+
+ // Simple Chart Implementation
+ const canvas = document.getElementById('performanceChart');
+ if (canvas) {
+ const ctx = canvas.getContext('2d');
+ const data = [30, 45, 25, 60, 40, 75, 50];
+ const width = canvas.width = canvas.offsetWidth;
+ const height = canvas.height = 200;
+
+ // Draw chart
+ ctx.strokeStyle = '#6366f1';
+ ctx.lineWidth = 2;
+ ctx.beginPath();
+ data.forEach((value, index) => {
+ const x = (width / (data.length - 1)) * index;
+ const y = height - (value / 100 * height);
+ if (index === 0) ctx.moveTo(x, y);
+ else ctx.lineTo(x, y);
+ });
+ ctx.stroke();
+
+ // Add gradient
+ const gradient = ctx.createLinearGradient(0, 0, 0, height);
+ gradient.addColorStop(0, 'rgba(99, 102, 241, 0.2)');
+ gradient.addColorStop(1, 'rgba(99, 102, 241, 0)');
+ ctx.fillStyle = gradient;
+ ctx.lineTo(width, height);
+ ctx.lineTo(0, height);
+ ctx.fill();
+ }
+
+ // Task Checkbox Animation
+ document.querySelectorAll('.task-item input[type="checkbox"]').forEach(checkbox => {
+ checkbox.addEventListener('change', function() {
+ const label = this.nextElementSibling;
+ if (this.checked) {
+ label.style.textDecoration = 'line-through';
+ label.style.color = 'var(--text-light)';
+ } else {
+ label.style.textDecoration = 'none';
+ label.style.color = 'var(--text)';
+ }
+ });
+ });
+ });