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:
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import Icon from './Icon.svelte';
|
||||
import type { Photo } from '$lib/types';
|
||||
|
||||
interface Props {
|
||||
@@ -34,9 +35,22 @@
|
||||
</span>
|
||||
{/if}
|
||||
<span
|
||||
class="bg-bg/70 text-text absolute right-1 bottom-1 rounded px-1.5 py-0.5 text-xs"
|
||||
class="bg-bg/70 text-text absolute right-1 bottom-1 flex items-center gap-1.5 rounded px-1.5 py-0.5 text-xs"
|
||||
>
|
||||
♥ {photo.likes_count} · 💬 {photo.comments_count}
|
||||
<span class="inline-flex items-center gap-0.5" aria-label="{photo.likes_count} лайков">
|
||||
<Icon
|
||||
name={photo.liked_by_me ? 'favorite' : 'favorite_outline'}
|
||||
class="size-3.5"
|
||||
/>
|
||||
{photo.likes_count}
|
||||
</span>
|
||||
<span
|
||||
class="inline-flex items-center gap-0.5"
|
||||
aria-label="{photo.comments_count} комментариев"
|
||||
>
|
||||
<Icon name="mode_comment" class="size-3.5" />
|
||||
{photo.comments_count}
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user