mirror of
https://github.com/Such-Software/such.software.git
synced 2026-10-17 05:32:05 +02:00
feat(apps): the Hash Bags icon draws itself on
An animated icon has to still BE the icon, so the geometry is copied verbatim from the app's own icon source (hash-wallet assets/images/hash_wallet_app_icon_source.svg): full-bleed #1a5c38, four white lines at stroke-width 80 with square caps, horizontals at y=412/612, verticals at x=412/612, all spanning 212..812. It draws on in 850ms and settles into a frame that is pixel-for-pixel the static PNG. Not hash.boats/splash.svg, which was the obvious candidate and is wrong twice: its # is slanted where the shipped icon is upright, and it insets its green box inside a transparent margin. The site rounds icons with a 22% CSS radius, so that margin would have shown card background at the corners, which is the exact artifact we just finished removing from the icon set. CSS rather than SMIL, for the reason the brand pack already documents: prefers-reduced-motion is a media query and cannot reach inside a SMIL <animate>. Under reduced motion this is just the finished icon. Draws once and holds, rather than looping. Five icons looping forever on a directory page is a distraction, and an app icon's resting state should be an app icon. `animatedIcon` is optional per app and `unoptimized` is set only when it is used, because the image optimizer would rasterise the SVG and throw the animation away.
This commit is contained in:
@@ -23,6 +23,8 @@ const apps = [
|
||||
name: "Hash Bags",
|
||||
tagline: "Non-custodial multi-chain wallet. Wownero-first.",
|
||||
icon: "/images/products/hash-bags.png",
|
||||
// Draws itself on once, then settles into exactly the static icon.
|
||||
animatedIcon: "/images/products/hash-bags-animated.svg",
|
||||
color: "text-emerald-600 dark:text-emerald-400",
|
||||
borderColor: "border-emerald-500/20",
|
||||
href: "/products/hash-bags",
|
||||
@@ -107,10 +109,11 @@ export default function LinksPage() {
|
||||
<div className={`h-full rounded-xl border ${app.borderColor} bg-card p-6`}>
|
||||
<div className="flex items-center gap-4 mb-3">
|
||||
<Image
|
||||
src={app.icon}
|
||||
src={app.animatedIcon ?? app.icon}
|
||||
alt={`${app.name} icon`}
|
||||
width={56}
|
||||
height={56}
|
||||
unoptimized={!!app.animatedIcon}
|
||||
className="rounded-[22%]"
|
||||
/>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user