File size: 3,372 Bytes
b9da434
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// Valentine's themed data
const valentineData = {
  sections: [
    {
      title: "Romantic Bouquets",
      color: "valentine-600",
      items: [
        { label: "Love Letters", value: 1218 },
        { label: "Cupid's Arrow", value: 560 },
        { label: "Sweetheart", value: 485 },
        { label: "Be Mine", value: 545 },
        { label: "Forever Yours", value: 104 }
      ]
    },
    {
      title: "Chocolate Arrangements",
      color: "love-600",
      items: [
        { label: "Truffle Delight", value: 1450 },
        { label: "Berry Chocolate", value: 1000 },
        { label: "Caramel Kiss", value: 744 },
        { label: "White Chocolate", value: 485 },
        { label: "Dark Fantasy", value: 1585 }
      ]
    },
    {
      title: "Rose Collections",
      color: "valentine-700",
      items: [
        { label: "Red Roses", value: 790 },
        { label: "Pink Roses", value: 372 },
        { label: "Rainbow Roses", value: 216 },
        { label: "Rose Petals", value: 20 }
      ]
    },
    {
      title: "Special Valentine's",
      color: "love-700",
      items: [
        { label: "Heart Box", value: 276 },
        { label: "Teddy Combo", value: 216 },
        { label: "Proposal Set", value: 20 },
        { label: "Luxury Package", value: 20 }
      ]
    }
  ],
  targets: {
    small: "40/hr",
    large: "25/hr"
  }
};

// Create floating hearts decoration
function createHearts() {
  for (let i = 0; i < 15; i++) {
    const heart = document.createElement('div');
    heart.className = 'heart-decoration';
    heart.innerHTML = '❀';
    heart.style.left = `${Math.random() * 100}%`;
    heart.style.top = `${Math.random() * 100}%`;
    heart.style.fontSize = `${Math.random() * 30 + 20}px`;
    document.body.appendChild(heart);
  }
}

document.addEventListener('DOMContentLoaded', () => {
  createHearts();
  
  // Initialize components with Valentine's data
  document.querySelector('.stats-container').innerHTML = `
    <custom-stats 
      weekly="9924" 
      daily="4962" 
      today="0" 
      remaining="4962"
      theme="valentine"
    ></custom-stats>
  `;
  
  const dashboard = document.querySelector('.dashboard');
  valentineData.sections.forEach(section => {
    const sectionEl = document.createElement('custom-section');
    sectionEl.setAttribute('title', section.title);
    sectionEl.setAttribute('color', section.color);
    sectionEl.setAttribute('items', JSON.stringify(section.items));
    dashboard.appendChild(sectionEl);
  });
  
  // Set up break times for Valentine's day
  const now = new Date();
  const morningStart = new Date(now);
  morningStart.setHours(9, 44, 0);
  
  const lunchStart = new Date(now);
  lunchStart.setHours(11, 59, 0);
  
  const afternoonStart = new Date(now);
  afternoonStart.setHours(13, 59, 0);
  
  // Valentine's special messages
  document.getElementById('comment-popup').setAttribute('message', 'πŸ’ Special Valentine Note: Use extra red roses for all arrangements today!');
  document.getElementById('lunch-popup').setAttribute('message', 'πŸ’– Romantic Lunch Break! Enjoy some chocolate hearts!');
  document.getElementById('morning-popup').setAttribute('message', 'β˜• Sweet Morning Coffee Break with heart-shaped cookies!');
  document.getElementById('afternoon-popup').setAttribute('message', '🍫 Afternoon Chocolate Break - Love is in the air!');
});