Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed public/stroopy.webp
Binary file not shown.
171 changes: 139 additions & 32 deletions src/components/awards/awards-ballot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,19 +281,7 @@ function ConnectedWallet({
className="absolute right-0 mt-2 w-64 rounded-2xl border border-[#2f2f2f] bg-[#1c1c1c] p-2 shadow-[0_12px_40px_rgba(0,0,0,0.5)] z-50"
>
<div className="flex items-center gap-3 px-2.5 pb-2.5 pt-2">
{wallet ? (
<Image
src={wallet.icon}
alt=""
width={38}
height={38}
className="h-[38px] w-[38px] flex-shrink-0 rounded-full ring-1 ring-[#3a3a3a]"
/>
) : (
<span className="flex h-[38px] w-[38px] flex-shrink-0 items-center justify-center rounded-full bg-[#242424] ring-1 ring-[#3a3a3a]">
<Wallet className="h-4 w-4 text-neutral-400" />
</span>
)}
<Stroopy size={44} badge={wallet?.icon} />
<div className="min-w-0">
<p className="text-sm font-medium text-neutral-100">
{wallet?.name ?? "Connected wallet"}
Expand Down Expand Up @@ -454,7 +442,18 @@ function BallotArt({ step }: { step: number }) {
</span>
<span className="sm-clickring" />
<span className="sm-cursor">
<i />
<i>
<svg viewBox="-2 -2 19 25" role="presentation">
<path
d="M0 0 0 15.96 3.75 12.18 6.75 21 9.9 18.9 7.05 10.5 11.7 10.08Z"
fill="#fafafa"
stroke="#171327"
strokeWidth="2.6"
strokeLinejoin="round"
paintOrder="stroke"
/>
</svg>
</i>
</span>
</div>
)}
Expand Down Expand Up @@ -1757,21 +1756,135 @@ function AwardsToast({
);
}

/** Stroopy, the Stellar mascot — the wallet picker's greeter. */
function Stroopy({ size }: { size: number }) {
/**
* Stroopy, drawn in vector so he can move. An interpretation in the Stellar
* mascot's spirit — visor face, pixel eyes, antenna — not the official art.
* Sized by the caller; the badge is the connected wallet's own mark.
*/
function Stroopy({ size, badge }: { size: number; badge?: string }) {
return (
<span
className="sm-stroopy"
style={{ width: size, height: size }}
aria-hidden="true"
>
<Image src="/stroopy.webp" alt="" width={size * 2} height={size * 2} />
{[0, 1, 2, 3].map((n) => (
<span
key={n}
className="sm-spark"
style={{
["--sr-rot" as string]: `${n * 78 - 40}deg`,
["--sr-d" as string]: `${n * 70}ms`,
}}
/>
))}
<span className="sm-sr-window">
<svg className="sm-sr-rise" viewBox="0 0 64 64" role="presentation">
<g className="sm-sr-bob">
{/* shoulders first, so the head sits over them */}
<path
d="M13 64v-13a19 13 0 0 1 38 0v13z"
fill="#F5C518"
stroke="#2A2140"
strokeWidth="2"
/>
<g className="sm-sr-ant">
<path
d="M32 15V9"
stroke="#2A2140"
strokeWidth="2.6"
strokeLinecap="round"
/>
<circle
cx="32"
cy="5.8"
r="4"
fill="#F5C518"
stroke="#2A2140"
strokeWidth="1.8"
/>
</g>
{/* head, with a lighter cap over the crown */}
<rect
x="10"
y="13"
width="44"
height="39"
rx="19"
fill="#C6B6F0"
stroke="#2A2140"
strokeWidth="2"
/>
<path
d="M13.5 26a18.5 12 0 0 1 37 0z"
fill="#E6DEFA"
stroke="#2A2140"
strokeWidth="1.6"
/>
{/* the visor, wider than the head the way the real one is */}
<rect x="7" y="25" width="50" height="22" rx="11" fill="#15111F" />
<rect
className="sm-sr-eye"
x="19"
y="29.5"
width="7.6"
height="8.8"
rx="3.5"
fill="#F5C518"
/>
<rect
className="sm-sr-eye"
x="37.4"
y="29.5"
width="7.6"
height="8.8"
rx="3.5"
fill="#F5C518"
/>
{/* a glint in each eye, and pixel blush on the cheeks */}
<circle cx="21.5" cy="32.1" r="1.4" fill="#FFF6D6" />
<circle cx="39.9" cy="32.1" r="1.4" fill="#FFF6D6" />
<rect
x="14.4"
y="39.4"
width="5.6"
height="3.4"
rx="1.7"
fill="#FF8FB4"
opacity="0.85"
/>
<rect
x="44"
y="39.4"
width="5.6"
height="3.4"
rx="1.7"
fill="#FF8FB4"
opacity="0.85"
/>
{/* pixel smile */}
<rect x="27" y="40.6" width="3.3" height="3.3" fill="#F5C518" />
<rect x="30.35" y="42.4" width="3.3" height="3.3" fill="#F5C518" />
<rect x="33.7" y="40.6" width="3.3" height="3.3" fill="#F5C518" />
</g>
</svg>
<span className="sm-sr-gloss" />
<span className="sm-sr-shutter sm-sr-shutter-l" />
<span className="sm-sr-shutter sm-sr-shutter-r" />
</span>
{badge && (
<Image
src={badge}
alt=""
width={Math.round(size * 0.42)}
height={Math.round(size * 0.42)}
className="sm-stroopy-badge"
/>
)}
</span>
);
}

// ── Wallet picker (RainbowKit pattern: modal on desktop, drawer on mobile) ──

function WalletList({
connecting,
onPick,
Expand Down Expand Up @@ -1847,9 +1960,6 @@ function WalletPicker({
<Drawer open={open} onOpenChange={onOpenChange}>
<DrawerContent>
<DrawerHeader className="text-center sm:text-center">
<span className="mx-auto mb-3 block">
<Stroopy size={76} />
</span>
<DrawerTitle className="text-xl font-semibold">
Connect a wallet
</DrawerTitle>
Expand Down Expand Up @@ -1897,16 +2007,13 @@ function WalletPicker({
className="relative w-full max-w-sm rounded-2xl border border-[#2f2f2f] bg-[#1c1c1c] p-6 shadow-[0_20px_60px_rgba(0,0,0,0.5)]"
>
<div className="flex items-start justify-between gap-4 mb-6">
<div className="flex items-start gap-3.5">
<Stroopy size={54} />
<div>
<h2 className="text-lg font-semibold tracking-tight text-neutral-100">
Connect a wallet
</h2>
<p className="mt-1.5 text-sm leading-relaxed text-neutral-400">
You'll sign a Stellar testnet transaction — no real funds.
</p>
</div>
<div>
<h2 className="text-lg font-semibold tracking-tight text-neutral-100">
Connect a wallet
</h2>
<p className="mt-1.5 text-sm leading-relaxed text-neutral-400">
You'll sign a Stellar testnet transaction — no real funds.
</p>
</div>
<button
type="button"
Expand Down
Loading
Loading