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:
+5
-1
@@ -98,7 +98,11 @@ function buddy_render_about_page() {
|
||||
<h2><?php esc_html_e( 'Version history', 'buddy' ); ?></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="ver">v0.1.0</span> — 25 May 2026 <span class="latest">latest</span><br>
|
||||
<span class="ver">v0.1.1</span> — 25 May 2026 <span class="latest">latest</span><br>
|
||||
<?php esc_html_e( 'Cheeky face! New wink expression that occasionally appears when Buddy is in a good mood — one eye closed, asymmetric smirk, rosier cheeks. Pure SVG, no image files. Proof that the expression engine is properly extensible.', 'buddy' ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<span class="ver">v0.1.0</span> — 25 May 2026<br>
|
||||
<?php esc_html_e( 'First release. Phase A complete: Buddy exists. Dashboard widget + dedicated admin page show the SVG character, name, mood label, four stats bars. Self-hosted update checker wired up to Gitea from commit 1. No interactions yet — that\'s next.', 'buddy' ); ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user