|
| 1 | +# 💕 Valentine Hearts |
| 2 | + |
| 3 | +A beautiful Valentine's Day themed web application featuring floating hearts animation with love messages and shareable configurations. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +## ✨ Features |
| 12 | + |
| 13 | +### 🎨 Visual Effects |
| 14 | +- Continuously animated floating hearts rising from the bottom |
| 15 | +- Heart burst effect creating 20 hearts simultaneously |
| 16 | +- Click anywhere to create mini heart explosions |
| 17 | +- Twinkling starry background |
| 18 | +- Smooth CSS animations with transforms and filters |
| 19 | +- Toast notifications for user feedback |
| 20 | + |
| 21 | +### 💬 Love Messages |
| 22 | +- 15 pre-loaded romantic messages |
| 23 | +- Add your own personalized messages |
| 24 | +- Automatic message rotation every 5 seconds |
| 25 | +- Click any floating heart to reveal its message |
| 26 | + |
| 27 | +### ⚙️ Settings Popup |
| 28 | +All customization options in a clean modal interface: |
| 29 | +- **Heart Speed** - Control float duration (5-20 seconds) |
| 30 | +- **Heart Frequency** - Adjust spawn rate (0.5-3 seconds) |
| 31 | +- **Heart Size** - Change dimensions (20-80px) |
| 32 | +- **Auto Messages** - Toggle automatic message rotation |
| 33 | +- **Sound Effects** - Enable/disable click sounds |
| 34 | + |
| 35 | +### 🔗 Shareable URL System |
| 36 | +Create and share unique configurations: |
| 37 | +- Generate URL with all settings encoded |
| 38 | +- Copy URL to clipboard with one click |
| 39 | +- Open configuration in new tab |
| 40 | +- Share via WhatsApp, Telegram, or Email |
| 41 | +- Recipients see exactly what you created |
| 42 | + |
| 43 | +### 🔧 Reset Options |
| 44 | +- **Restore Defaults** - Reset settings while keeping custom messages |
| 45 | +- **Clear All Data** - Complete reset including messages and stats |
| 46 | + |
| 47 | +### 💾 Persistent State |
| 48 | +All data saved to localStorage: |
| 49 | +- Custom settings |
| 50 | +- Personalized messages |
| 51 | +- Statistics (hearts created, clicked, messages shown) |
| 52 | + |
| 53 | +### 📱 Responsive Design |
| 54 | +- Mobile-first approach |
| 55 | +- Portrait mode with stacked layout |
| 56 | +- Landscape mode with side-by-side layout |
| 57 | +- Touch-friendly controls |
| 58 | + |
| 59 | +## 🚀 Demo |
| 60 | + |
| 61 | +Visit the live demo: [https://valentinehearts.github.io](https://valentinehearts.github.io) |
| 62 | + |
| 63 | +### Example Configurations |
| 64 | + |
| 65 | +| Description | Link | |
| 66 | +|-------------|------| |
| 67 | +| Fast & Small Hearts | `?speed=5&freq=500&size=25&auto=1` | |
| 68 | +| Slow & Large Hearts | `?speed=18&freq=2500&size=70&auto=1` | |
| 69 | +| Silent Mode | `?speed=10&freq=1500&size=40&auto=0&sound=0` | |
| 70 | + |
| 71 | +## 📦 Installation |
| 72 | + |
| 73 | +### Option 1: Direct Download |
| 74 | +1. Clone the repository: |
| 75 | + ```bash |
| 76 | + git clone https://github.com/valentinehearts/valentinehearts.github.io.git |
| 77 | + ``` |
| 78 | +2. Open `index.html` in your browser |
| 79 | + |
| 80 | +### Option 2: GitHub Pages |
| 81 | +Fork the repository and enable GitHub Pages in your repository settings. |
| 82 | + |
| 83 | +## 🎮 Usage |
| 84 | + |
| 85 | +### Main Controls |
| 86 | + |
| 87 | +| Button | Action | |
| 88 | +|--------|--------| |
| 89 | +| 💝 **New Message** | Shows random love message | |
| 90 | +| 💖 **Heart Burst** | Creates 20 hearts at once | |
| 91 | +| ⏸️ **Pause/Play** | Toggles heart animation | |
| 92 | +| ⚙️ **Settings** | Opens settings popup | |
| 93 | +| 🔗 **Share** | Opens share popup | |
| 94 | + |
| 95 | +### Interactions |
| 96 | + |
| 97 | +| Action | Result | |
| 98 | +|--------|--------| |
| 99 | +| Click floating heart | Reveals love message | |
| 100 | +| Click anywhere | Creates mini heart explosion | |
| 101 | +| Press Escape | Closes any open popup | |
| 102 | + |
| 103 | +## 🔗 URL Parameters |
| 104 | + |
| 105 | +Create custom configurations using URL parameters: |
| 106 | + |
| 107 | +| Parameter | Description | Values | Default | |
| 108 | +|-----------|-------------|--------|---------| |
| 109 | +| `speed` | Heart float duration | 5-20 | 10 | |
| 110 | +| `freq` | Spawn frequency (ms) | 500-3000 | 1500 | |
| 111 | +| `size` | Heart size (px) | 20-80 | 40 | |
| 112 | +| `auto` | Auto messages | 0, 1 | 1 | |
| 113 | +| `sound` | Sound effects | 0, 1 | 0 | |
| 114 | +| `msgs` | Custom messages | JSON array | - | |
| 115 | + |
| 116 | +### URL Examples |
| 117 | + |
| 118 | +**Basic configuration:** |
| 119 | +``` |
| 120 | +https://valentinehearts.github.io/?speed=8&freq=1000&size=50 |
| 121 | +``` |
| 122 | + |
| 123 | +**With custom message:** |
| 124 | +``` |
| 125 | +https://valentinehearts.github.io/?speed=10&msgs=%5B%22I%20love%20you%22%5D |
| 126 | +``` |
| 127 | + |
| 128 | +**Full configuration:** |
| 129 | +``` |
| 130 | +https://valentinehearts.github.io/?speed=12&freq=2000&size=45&auto=1&sound=0&msgs=%5B%22Forever%20yours%22%2C%22My%20heart%22%5D |
| 131 | +``` |
| 132 | + |
| 133 | +## 📁 Project Structure |
| 134 | + |
| 135 | +``` |
| 136 | +valentinehearts.github.io/ |
| 137 | +│ |
| 138 | +├── index.html # Main application (HTML + CSS + JS) |
| 139 | +├── README.md # Documentation |
| 140 | +└── LICENSE # MIT License |
| 141 | +``` |
| 142 | + |
| 143 | +## 🛠️ Technologies |
| 144 | + |
| 145 | +- **HTML5** - Structure and semantics |
| 146 | +- **CSS3** - Styling, animations, and responsive design |
| 147 | +- **Vanilla JavaScript** - Application logic and state management |
| 148 | +- **LocalStorage API** - Data persistence |
| 149 | +- **Web Audio API** - Sound effects |
| 150 | +- **URL Search Params API** - Shareable configurations |
| 151 | + |
| 152 | +## 📊 Statistics Tracked |
| 153 | + |
| 154 | +| Stat | Description | |
| 155 | +|------|-------------| |
| 156 | +| Hearts Created | Total floating hearts generated | |
| 157 | +| Hearts Clicked | Number of hearts clicked by user | |
| 158 | +| Messages Shown | Total messages displayed | |
| 159 | + |
| 160 | +## 🎨 Color Palette |
| 161 | + |
| 162 | +| Color | Hex | Usage | |
| 163 | +|-------|-----|-------| |
| 164 | +| Primary Pink | `#ff6b9d` | Main accent color | |
| 165 | +| Deep Pink | `#c44569` | Gradients and shadows | |
| 166 | +| Light Pink | `#ffb8d0` | Text highlights | |
| 167 | +| Red | `#e74c3c` | Secondary buttons | |
| 168 | +| Gold | `#f39c12` | Special buttons | |
| 169 | +| Purple | `#9b59b6` | Settings button | |
| 170 | +| Blue | `#3498db` | Share button | |
| 171 | + |
| 172 | +## ⌨️ Keyboard Shortcuts |
| 173 | + |
| 174 | +| Key | Action | |
| 175 | +|-----|--------| |
| 176 | +| `Escape` | Close open popup | |
| 177 | + |
| 178 | +## 🤝 Contributing |
| 179 | + |
| 180 | +Contributions are welcome! Feel free to: |
| 181 | + |
| 182 | +1. Fork the repository |
| 183 | +2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
| 184 | +3. Commit changes (`git commit -m 'Add amazing feature'`) |
| 185 | +4. Push to branch (`git push origin feature/amazing-feature`) |
| 186 | +5. Open a Pull Request |
| 187 | + |
| 188 | +## 📝 License |
| 189 | + |
| 190 | +MIT |
| 191 | + |
| 192 | +## 💖 Acknowledgments |
| 193 | + |
| 194 | +- Inspired by the spirit of Valentine's Day |
| 195 | +- Created with love for spreading joy |
| 196 | + |
| 197 | +--- |
| 198 | + |
| 199 | +<p align="center"> |
| 200 | + Made with 💕 for Valentine's Day |
| 201 | +</p> |
| 202 | + |
| 203 | +<p align="center"> |
| 204 | + <a href="https://github.com/valentinehearts/valentinehearts.github.io">⭐ Star this repo if you like it!</a> |
| 205 | +</p> |
0 commit comments