Spaces:
Running
Running
Download script.js from Tawd/cupid-s-command-center: direct link, hf CLI and curl.
- Browser
- Download file 3.37 kB
-
https://huggingface.co/spaces/Tawd/cupid-s-command-center/resolve/main/script.js
- Command line
-
hf download hf://spaces/Tawd/cupid-s-command-center/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Tawd/cupid-s-command-center/resolve/main/script.js
3.37 kB
| // 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!'); | |
| }); |