feat(frontend): replace emoji with inline Material Symbols icon system

Add a self-contained icon system: vendored Material Symbols registry, an
<Icon> component that references a single <symbol> sprite via <use>, plus
IconButton/IconSprite. Replace every emoji/Unicode glyph (logo, theme
switcher, cover placeholder, like/comment counts, lightbox controls, back
links) and add leading icons to key controls. Decorative icons are
aria-hidden; icon-only buttons get labels; theme toggles expose
aria-pressed; counters get accessible names.

Recorded in openspec change material-icons-ui (all tasks complete).
This commit is contained in:
iu
2026-10-10 13:19:29 +03:00
parent 84ce4d1930
commit 997ec5e6c1
21 changed files with 582 additions and 69 deletions
+27
View File
@@ -0,0 +1,27 @@
<script lang="ts">
import { icons, type IconName } from '$lib/icons/registry';
interface Props {
name: IconName;
label?: string;
class?: string;
}
let { name, label, class: className = 'size-5' }: Props = $props();
const known = $derived(name in icons);
</script>
{#if known}
<svg
viewBox="0 0 24 24"
fill="currentColor"
class={className}
role={label ? 'img' : undefined}
aria-label={label}
aria-hidden={label ? undefined : 'true'}
focusable="false"
>
<use href="#i-{name}" />
</svg>
{/if}