feat: add winking expression (v0.1.1)
Buddy now has a fourth mood tone — wink — with one eye closed, an asymmetric smirk, and rosier cheeks. Renders as a small variant inside the existing inline-SVG sprite (still zero image files, no new assets). When overall mood is >= 75, there's a 30% chance on each page render that the wink replaces the standard happy face — gives the pet a touch of unpredictable personality. Why this commit exists: v0.1.0 had three tones (happy / neutral / sad). Adding wink is the smallest possible demo that the SVG expression engine is properly extensible — every future mood, state, accessory or species can land via the same pattern. ~20 lines of PHP, ~2 lines of CSS, no bundle weight, no dependencies. CHANGES - inc/sprite.php: wink added to allowed-tones list. Left eye renders as a closed-eye arc instead of the open circle. Mouth shifts to an asymmetric smirk. Cheek opacity 0.55 → 0.75 for extra cheekiness. - inc/state.php: buddy_mood_label() returns wink ~30% of the time when mood >= 75. - assets/css/buddy.css: new .buddy-widget__mood--wink and .buddy-main__mood--wink rules — warm amber pill. - About-page version-history leads with v0.1.1; v0.1.0 demoted. VERSION - buddy.php header 0.1.0 → 0.1.1 - BUDDY_VERSION constant 0.1.0 → 0.1.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
vertical-align: middle;
|
||||
}
|
||||
.buddy-widget__mood--happy { background:#e8f5ea; color:#1b6f2d; }
|
||||
.buddy-widget__mood--wink { background:#fef3c7; color:#92400e; }
|
||||
.buddy-widget__mood--neutral { background:#f0f0f1; color:#3c434a; }
|
||||
.buddy-widget__mood--sad { background:#fcf0f1; color:#8a2424; }
|
||||
|
||||
@@ -138,6 +139,7 @@
|
||||
vertical-align: middle;
|
||||
}
|
||||
.buddy-main__mood--happy { background:#e8f5ea; color:#1b6f2d; }
|
||||
.buddy-main__mood--wink { background:#fef3c7; color:#92400e; }
|
||||
.buddy-main__mood--neutral { background:#f0f0f1; color:#3c434a; }
|
||||
.buddy-main__mood--sad { background:#fcf0f1; color:#8a2424; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user