PEP-70: clay-style chibi pug with a terminal-screen face
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5f1b1b4212
commit
06b3501427
@ -102,12 +102,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* PEP-70: pug mascot — gentle breathing while asleep, a curious head tilt when agents ask. */
|
||||
/* PEP-70: pug mascot — breathing while asleep, a curious head tilt and a blinking cursor when agents ask. */
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.pug-sleep .pug-head { animation: pug-breathe 3.2s ease-in-out infinite; }
|
||||
.pug-sleep .pug-body { animation: pug-breathe 3.2s ease-in-out infinite; }
|
||||
.pug-sleep .pug-zzz { animation: pug-zzz 3.2s ease-in-out infinite; }
|
||||
.pug-alert .pug-head { animation: pug-tilt 2.4s ease-in-out infinite; }
|
||||
.pug-alert .pug-cursor { animation: pug-blink 1s steps(1) infinite; }
|
||||
}
|
||||
@keyframes pug-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03, 0.98); } }
|
||||
@keyframes pug-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02, 0.985); } }
|
||||
@keyframes pug-zzz { 0%, 100% { opacity: 0.25; transform: translateY(2px); } 50% { opacity: 0.6; transform: translateY(-2px); } }
|
||||
@keyframes pug-tilt { 0%, 60%, 100% { transform: rotate(0deg); } 70% { transform: rotate(-9deg); } 85% { transform: rotate(5deg); } }
|
||||
@keyframes pug-tilt { 0%, 60%, 100% { transform: rotate(0deg); } 70% { transform: rotate(-7deg); } 85% { transform: rotate(4deg); } }
|
||||
@keyframes pug-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
|
||||
|
||||
@ -1,61 +1,108 @@
|
||||
// PEP-70: Peppa's mascot — a cartoon pug next to the agents' questions. Pure SVG (no external
|
||||
// images), fixed fawn/black colours that read on both themes; motion only without reduced-motion.
|
||||
// PEP-70: Peppa's mascot — a soft "clay" chibi pug whose face is a terminal screen (`> _`).
|
||||
// Pure SVG (no external images), fixed colours that read on both themes; motion only without
|
||||
// reduced-motion (see .pug-* in app.css).
|
||||
import { useId } from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type Mood = "sleep" | "alert";
|
||||
|
||||
export function PugMascot({ mood, size = 72, className }: { mood: Mood; size?: number; className?: string }) {
|
||||
export function PugMascot({ mood, size = 96, className }: { mood: Mood; size?: number; className?: string }) {
|
||||
const awake = mood === "alert";
|
||||
const id = useId().replace(/[^a-zA-Z0-9]/g, "");
|
||||
const fur = `pf${id}`, furDark = `pd${id}`, ear = `pe${id}`, screen = `ps${id}`, glow = `pg${id}`, soft = `po${id}`;
|
||||
return (
|
||||
<svg
|
||||
viewBox="0 0 120 120"
|
||||
width={size}
|
||||
viewBox="0 0 120 140"
|
||||
width={(size * 120) / 140}
|
||||
height={size}
|
||||
role="img"
|
||||
aria-label={awake ? "Мопс Пеппы ждёт твоего ответа" : "Мопс Пеппы спит"}
|
||||
className={cn("shrink-0 overflow-visible", awake ? "pug-alert" : "pug-sleep", className)}
|
||||
>
|
||||
<g className="pug-head" style={{ transformOrigin: "60px 70px" }}>
|
||||
{/* head */}
|
||||
<ellipse cx="60" cy="66" rx="45" ry="41" fill="#ebcb9e" stroke="#c9a06e" strokeWidth="2" />
|
||||
{/* folded "button" ears flop over the head */}
|
||||
<path d="M38 30 C26 22 10 26 9 42 C9 50 15 53 21 48 C26 43 31 39 40 36 Z" fill="#4a3a35" />
|
||||
<path d="M82 30 C94 22 110 26 111 42 C111 50 105 53 99 48 C94 43 89 39 80 36 Z" fill="#4a3a35" />
|
||||
{/* forehead wrinkles */}
|
||||
<path d="M47 40 Q60 33 73 40" fill="none" stroke="#c49a68" strokeWidth="2.5" strokeLinecap="round" />
|
||||
<path d="M51 47 Q60 42 69 47" fill="none" stroke="#c49a68" strokeWidth="2.5" strokeLinecap="round" />
|
||||
{/* cheeks */}
|
||||
<ellipse cx="25" cy="80" rx="7" ry="4" fill="#f4a3a8" opacity="0.7" />
|
||||
<ellipse cx="95" cy="80" rx="7" ry="4" fill="#f4a3a8" opacity="0.7" />
|
||||
{/* black mask */}
|
||||
<ellipse cx="60" cy="83" rx="25" ry="19" fill="#4a3a35" />
|
||||
{/* eyes */}
|
||||
{awake ? (
|
||||
<>
|
||||
<circle cx="39" cy="62" r="12" fill="#2b2220" />
|
||||
<circle cx="81" cy="62" r="12" fill="#2b2220" />
|
||||
<circle cx="43.5" cy="57.5" r="4.5" fill="#fff" />
|
||||
<circle cx="85.5" cy="57.5" r="4.5" fill="#fff" />
|
||||
<circle cx="35.5" cy="66" r="2" fill="#fff" />
|
||||
<circle cx="77.5" cy="66" r="2" fill="#fff" />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<path d="M28 63 Q39 70 50 63" fill="none" stroke="#2b2220" strokeWidth="3.5" strokeLinecap="round" />
|
||||
<path d="M70 63 Q81 70 92 63" fill="none" stroke="#2b2220" strokeWidth="3.5" strokeLinecap="round" />
|
||||
</>
|
||||
)}
|
||||
{/* nose */}
|
||||
<ellipse cx="60" cy="75" rx="9" ry="5.5" fill="#1d1716" />
|
||||
<ellipse cx="57" cy="73.5" rx="3" ry="1.5" fill="#fff" opacity="0.55" />
|
||||
{/* mouth + tongue */}
|
||||
<path d="M60 80 L60 85 M51 85 Q55.5 90 60 85 Q64.5 90 69 85" fill="none" stroke="#1d1716" strokeWidth="2.5" strokeLinecap="round" />
|
||||
{awake && <path d="M55.5 88 Q60 101 64.5 88 Z" fill="#f28b9b" stroke="#d96a7c" strokeWidth="1.5" />}
|
||||
<defs>
|
||||
<radialGradient id={fur} cx="35%" cy="28%" r="80%">
|
||||
<stop offset="0" stopColor="#fbe6c4" />
|
||||
<stop offset="0.55" stopColor="#e8bd86" />
|
||||
<stop offset="1" stopColor="#b98550" />
|
||||
</radialGradient>
|
||||
<radialGradient id={furDark} cx="35%" cy="25%" r="85%">
|
||||
<stop offset="0" stopColor="#f3d3a4" />
|
||||
<stop offset="0.6" stopColor="#dcaa6e" />
|
||||
<stop offset="1" stopColor="#a77443" />
|
||||
</radialGradient>
|
||||
<radialGradient id={ear} cx="35%" cy="30%" r="80%">
|
||||
<stop offset="0" stopColor="#6b544b" />
|
||||
<stop offset="1" stopColor="#2a201d" />
|
||||
</radialGradient>
|
||||
<linearGradient id={screen} x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stopColor="#2b3157" />
|
||||
<stop offset="1" stopColor="#11142a" />
|
||||
</linearGradient>
|
||||
<filter id={glow} x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur stdDeviation="1.6" result="b" />
|
||||
<feMerge>
|
||||
<feMergeNode in="b" />
|
||||
<feMergeNode in="SourceGraphic" />
|
||||
</feMerge>
|
||||
</filter>
|
||||
<filter id={soft} x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feDropShadow dx="0" dy="2" stdDeviation="1.5" floodColor="#000" floodOpacity="0.25" />
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
{/* floor shadow */}
|
||||
<ellipse cx="60" cy="135" rx="30" ry="4" fill="#000" opacity="0.28" />
|
||||
|
||||
<g className="pug-body" style={{ transformOrigin: "60px 135px" }} filter={`url(#${soft})`}>
|
||||
{/* curly tail */}
|
||||
<path d="M82 108 C99 108 103 92 93 89 C86 87 84 96 91 97" fill="none" stroke="#d29c63" strokeWidth="7" strokeLinecap="round" />
|
||||
{/* legs */}
|
||||
<rect x="42" y="110" width="15" height="22" rx="7.5" fill={`url(#${furDark})`} />
|
||||
<rect x="63" y="110" width="15" height="22" rx="7.5" fill={`url(#${furDark})`} />
|
||||
{/* body */}
|
||||
<ellipse cx="60" cy="102" rx="27" ry="22" fill={`url(#${fur})`} />
|
||||
{/* arms */}
|
||||
<ellipse cx="34" cy="101" rx="7" ry="11" transform="rotate(22 34 101)" fill={`url(#${furDark})`} />
|
||||
<ellipse cx="86" cy="101" rx="7" ry="11" transform="rotate(-22 86 101)" fill={`url(#${furDark})`} />
|
||||
{/* belly prompt */}
|
||||
<g stroke="#e9f6ff" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" fill="none" opacity="0.9">
|
||||
<path d="M52 100 L57 104 L52 108" />
|
||||
<path d="M61 108 L69 108" />
|
||||
</g>
|
||||
|
||||
<g className="pug-head" style={{ transformOrigin: "60px 88px" }}>
|
||||
{/* head */}
|
||||
<ellipse cx="60" cy="54" rx="47" ry="40" fill={`url(#${fur})`} />
|
||||
{/* folded button ears */}
|
||||
<path d="M34 22 C22 12 5 17 4 34 C3 43 10 47 16 41 C21 36 27 31 37 28 Z" fill={`url(#${ear})`} />
|
||||
<path d="M86 22 C98 12 115 17 116 34 C117 43 110 47 104 41 C99 36 93 31 83 28 Z" fill={`url(#${ear})`} />
|
||||
{/* forehead wrinkles */}
|
||||
<path d="M47 24 Q60 18 73 24" fill="none" stroke="#c08a55" strokeWidth="2.5" strokeLinecap="round" opacity="0.8" />
|
||||
<path d="M51 30 Q60 26 69 30" fill="none" stroke="#c08a55" strokeWidth="2.5" strokeLinecap="round" opacity="0.8" />
|
||||
{/* cheeks */}
|
||||
<ellipse cx="20" cy="66" rx="6" ry="3.5" fill="#f29aa3" opacity="0.6" />
|
||||
<ellipse cx="100" cy="66" rx="6" ry="3.5" fill="#f29aa3" opacity="0.6" />
|
||||
{/* screen face (the pug's black mask) */}
|
||||
<rect x="27" y="36" width="66" height="44" rx="15" fill={`url(#${screen})`} stroke="#0b0d1c" strokeWidth="1.5" />
|
||||
<path d="M35 42 Q44 38 60 39" fill="none" stroke="#fff" strokeWidth="2.5" strokeLinecap="round" opacity="0.18" />
|
||||
{awake ? (
|
||||
<g filter={`url(#${glow})`} stroke="#a6f0ff" strokeWidth="5" strokeLinecap="round" strokeLinejoin="round" fill="none">
|
||||
<path d="M42 50 L52 58 L42 66" />
|
||||
<path className="pug-cursor" d="M61 66 L77 66" />
|
||||
</g>
|
||||
) : (
|
||||
<g stroke="#a6f0ff" strokeWidth="4" strokeLinecap="round" fill="none" opacity="0.45">
|
||||
<path d="M39 58 Q46 63 53 58" />
|
||||
<path d="M67 58 Q74 63 81 58" />
|
||||
</g>
|
||||
)}
|
||||
</g>
|
||||
</g>
|
||||
|
||||
{!awake && (
|
||||
<g className="pug-zzz" fill="currentColor" fontFamily="inherit" fontWeight="700" opacity="0.55">
|
||||
<text x="100" y="22" fontSize="14">z</text>
|
||||
<text x="110" y="10" fontSize="10">z</text>
|
||||
<g className="pug-zzz" fill="currentColor" fontWeight="700" opacity="0.55">
|
||||
<text x="104" y="16" fontSize="13">z</text>
|
||||
<text x="113" y="5" fontSize="9">z</text>
|
||||
</g>
|
||||
)}
|
||||
</svg>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user