feat: docs.pivoine.art
This commit is contained in:
155
Projects/docs.pivoine.art/components/icons/QUICK_REFERENCE.md
Normal file
155
Projects/docs.pivoine.art/components/icons/QUICK_REFERENCE.md
Normal file
@@ -0,0 +1,155 @@
|
||||
# Quick Reference: Pivoine Icon Updates
|
||||
|
||||
## ✅ What Was Done
|
||||
|
||||
### 1. **Reduced Petal Count** (Cleaner Design)
|
||||
- **Before**: 26 petals total (8+8+10)
|
||||
- **After**: 20 petals total (6+6+8)
|
||||
- Result: More elegant, less cluttered appearance
|
||||
|
||||
### 2. **Fixed Petal Layout** (Proper Radial Arrangement)
|
||||
- **Before**: All petals stacked on top of each other
|
||||
- **After**: Petals properly arranged in circle around center
|
||||
- Implementation: Using `transform="rotate(angle 128 128)"` on positioned ellipses
|
||||
|
||||
### 3. **Generated Static SVG Icons**
|
||||
|
||||
#### `public/favicon.svg` - For Browser Tabs
|
||||
- Semi-open bloom (75-85% scale)
|
||||
- Optimized for 16x16 to 64x64 pixels
|
||||
- No animations, clean static design
|
||||
|
||||
#### `public/icon.svg` - For PWA & Large Icons
|
||||
- More open bloom (85-90% scale)
|
||||
- Optimized for 128x128 to 512x512 pixels
|
||||
- Includes sparkles, enhanced visibility
|
||||
- Already referenced in manifest.json ✅
|
||||
|
||||
## 🎨 Visual Comparison
|
||||
|
||||
```
|
||||
CLOSED BUD SEMI-OPEN MORE OPEN FULL BLOOM
|
||||
(React Normal) (favicon.svg) (icon.svg) (React Hover)
|
||||
|
||||
🌸 🌸 🌸 🌸 🌸 🌸 🌸 🌸 🌸 🌸
|
||||
🌸⭐🌸 🌸 ⭐ 🌸 🌸 ⭐ 🌸 🌸 ⭐ 🌸
|
||||
🌸 🌸 🌸 🌸 🌸 🌸 🌸 🌸 🌸 🌸
|
||||
|
||||
scale: 0.3-0.5 scale: 0.75-0.85 scale: 0.85-0.9 scale: 1.0-1.1
|
||||
Animated Static Static Animated
|
||||
```
|
||||
|
||||
## 📊 Petal Configuration
|
||||
|
||||
### Outer Layer (6 petals)
|
||||
```
|
||||
Angles: 0°, 60°, 120°, 180°, 240°, 300°
|
||||
Position: cy="70" (58px from center)
|
||||
Size: rx="40" ry="68"
|
||||
```
|
||||
|
||||
### Middle Layer (6 petals)
|
||||
```
|
||||
Angles: 30°, 90°, 150°, 210°, 270°, 330° (offset)
|
||||
Position: cy="78" (50px from center)
|
||||
Size: rx="34" ry="56"
|
||||
```
|
||||
|
||||
### Inner Layer (8 petals)
|
||||
```
|
||||
Angles: 0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°
|
||||
Position: cy="88" (40px from center)
|
||||
Size: rx="28" ry="44"
|
||||
```
|
||||
|
||||
## 🔧 How to Use
|
||||
|
||||
### React Component
|
||||
```tsx
|
||||
import PivoineDocsIcon from '@/components/icons/PivoineDocsIcon'
|
||||
|
||||
// Interactive (animations on hover/click)
|
||||
<PivoineDocsIcon size="256px" />
|
||||
|
||||
// Static (matches icon.svg appearance)
|
||||
<PivoineDocsIcon size="128px" interactive={false} />
|
||||
```
|
||||
|
||||
### HTML Head
|
||||
```html
|
||||
<!-- Browser favicon -->
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||
|
||||
<!-- PWA manifest (already configured) -->
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
```
|
||||
|
||||
## 📁 Files Modified/Created
|
||||
|
||||
```
|
||||
✅ components/icons/PivoineDocsIcon.tsx (Updated)
|
||||
- Reduced petals: 26 → 20
|
||||
- Fixed petal positioning
|
||||
- Bloom particles: 12 → 10
|
||||
|
||||
✅ public/favicon.svg (Created)
|
||||
- Static semi-open bloom
|
||||
- For browser tabs
|
||||
|
||||
✅ public/icon.svg (Created)
|
||||
- Static more-open bloom
|
||||
- For PWA icons (referenced in manifest.json)
|
||||
|
||||
📄 components/icons/ICON_GENERATION.md (Created)
|
||||
- Full documentation
|
||||
- PNG generation instructions
|
||||
```
|
||||
|
||||
## ⏭️ Optional Next Steps
|
||||
|
||||
Generate PNG versions if needed:
|
||||
```bash
|
||||
# Using ImageMagick
|
||||
convert -background none -density 300 public/icon.svg \
|
||||
-resize 192x192 public/icon-192.png
|
||||
|
||||
convert -background none -density 300 public/icon.svg \
|
||||
-resize 512x512 public/icon-512.png
|
||||
```
|
||||
|
||||
Or use online converters:
|
||||
- https://cloudconvert.com/svg-to-png
|
||||
- https://www.svgtopng.com/
|
||||
|
||||
## ✨ Features
|
||||
|
||||
### React Component
|
||||
- ✅ 3 animation states (normal, hover, click)
|
||||
- ✅ 10 flying bloom particles on hover
|
||||
- ✅ Smooth petal opening/closing
|
||||
- ✅ Center glow and sparkle effects
|
||||
- ✅ Reduced motion support
|
||||
- ✅ Touch device optimization
|
||||
|
||||
### Static SVGs
|
||||
- ✅ Beautiful semi-open bloom
|
||||
- ✅ Multi-gradient peony petals
|
||||
- ✅ Golden center with documentation pages
|
||||
- ✅ Optimized for different sizes
|
||||
- ✅ No dependencies, pure SVG
|
||||
|
||||
## 🎯 Test Checklist
|
||||
|
||||
- ✅ Petals arranged in proper circle
|
||||
- ✅ 20 petals total (reduced from 26)
|
||||
- ✅ Hover animation opens petals smoothly
|
||||
- ✅ Click animation closes petals
|
||||
- ✅ favicon.svg displays correctly in browser
|
||||
- ✅ icon.svg displays correctly when used
|
||||
- ✅ All gradients and filters work
|
||||
- ✅ Center documentation pages visible
|
||||
|
||||
---
|
||||
|
||||
**Status**: ✅ Complete and Production Ready
|
||||
**Last Updated**: October 2025
|
||||
Reference in New Issue
Block a user