replace raster assets with CSS: emoji gradient cards, mock windows (add forge), gradient wallpaper

This commit is contained in:
dvorakmortonxd 2026-10-05 14:28:41 +02:00
commit dae4f1c414
47 changed files with 333 additions and 184 deletions

View file

@ -7,7 +7,7 @@ import WinWindow, { type WinState } from "./WinWindow";
import Clock from "./Clock";
import { useTheme } from "./useTheme";
import { useDesktopIcons } from "./useDesktopIcons";
import { WALLPAPER, friends } from "../data";
import { friends } from "../data";
// The panel sits at `bottom: 10px` with a height of 44px, so its top edge is
// 54px above the viewport bottom. Windows clamp 5px above that (59), so a
@ -24,7 +24,6 @@ interface Shortcut {
url?: string;
appId?: string;
desc?: string;
image?: string;
/** Show the real site in an iframe. Only for sites that allow framing. */
embed?: boolean;
/** Frame src when it differs from `url` (e.g. a local mirror of a blocking site). */
@ -37,7 +36,6 @@ interface IconEntry {
title: string;
glyph: ReactNode;
color?: string;
image?: string;
onOpen: () => void;
}
@ -224,7 +222,6 @@ export default function WindowsDesktop() {
url: s.url,
desc: s.desc,
icon: s.icon,
image: s.image,
embed: s.embed,
embedUrl: s.embedUrl,
});
@ -336,8 +333,6 @@ export default function WindowsDesktop() {
}
};
const wallpaper = `url('${WALLPAPER}')`;
const iconClick = (id: string, action: () => void) => {
if (consumeDrag()) return;
activateIcon(id, action);
@ -389,18 +384,7 @@ export default function WindowsDesktop() {
className="win-icon-glyph"
style={entry.color ? { background: entry.color } : undefined}
>
{entry.image ? (
<Image
src={entry.image}
alt={entry.label}
width={38}
height={38}
className="win-icon-img"
draggable={false}
/>
) : (
entry.glyph
)}
{entry.glyph}
</span>
<span className="win-icon-label">{entry.label}</span>
</button>
@ -411,7 +395,6 @@ export default function WindowsDesktop() {
<div
ref={desktopRef}
className="win-desktop"
style={{ backgroundImage: wallpaper }}
onPointerDown={(e) => {
if (e.target === e.currentTarget) {
closeStart();