last penguin ui port
Some checks failed
CI / Check Style (push) Has been cancelled
CI / Run Clippy (push) Has been cancelled
CI / Run Tests (push) Has been cancelled

This commit is contained in:
Priec
2026-06-18 16:42:51 +02:00
parent 1cd2b86b74
commit 7af0a48e92
4 changed files with 42 additions and 31 deletions

View File

@@ -378,26 +378,27 @@ from the build. If the build ever balloons, check that exclusion is intact.
---
## 19. Inline SVG Icons — LOW PRIORITY
## 19. Inline SVG Icons — MOSTLY DONE
**Penguin UI: none (Penguin uses Heroicons-equivalent inline SVGs)**
> **Priority: LOW** | ~50 lines,8 distinct icons.
> Penguin doesn't provide an icon library. Icons are already inlined where used.
> Possible follow-up: extract into a `ui::icon(name)` macro for dedup, but
> this is purely cosmetic — no functional gain.
> **Priority: LOW.** Penguin ships no icon library, so this is dedup, not a port.
> The repeated hamburger / close / cart SVGs are now centralized in the
> `ui::icon(name, size, extra, attrs)` macro (`macros/ui.html`); call sites use
> `{{ ui::icon(name="cart") }}` etc. The chevron dropdown arrows stay inline by
> design — they carry nested-quote Alpine `:class` / `x-bind:class` bindings,
> which Tera macro args can't pass cleanly (see the attrs note atop `ui.html`).
| # | Location | Icon | Occurrences |
|---|----------|------|-------------|
| 55 | `base.html:70-72,168-170` | Hamburger (3-line menu) | 2 |
| 56 | `base.html:104-105` | Shopping cart | 1 |
| 57 | `base.html:116-121` | Gear/cog (settings) | 1 |
| # | Location | Icon | Status |
|---|----------|------|--------|
| 55 | `base.html` (categories + mobile toggle), `admin/base.html` (sidebar toggle) | Hamburger (3-line menu) | ✅ `ui::icon(name="hamburger")` |
| 56 | `base.html` (mobile toggle), `admin/base.html` (sidebar toggle) | Close (X) | ✅ `ui::icon(name="close")` |
| 57 | `base.html` (cart link) | Shopping cart | ✅ `ui::icon(name="cart")` |
| 58 | ~~`base.html:220-221`~~ | Checkmark (toast success) | ✅ removed — now in vendored toast component |
| 59 | `checkout.html:62-64,115-117` | Chevron-down (dropdown arrow) | 2 |
| 60 | `_sidebar.html:30-33` | Chevron-right (accordion expand) | 1 |
| 61 | `admin/base.html:106-108` | Hamburger (admin sidebar toggle) | 1 |
| 62 | `admin/base.html:121-125` | Gear/cog (admin settings) | 1 |
| 59 | `checkout.html:61,110` | Chevron-down (dropdown arrow) | inline — nested-quote `:class` binding |
| 60 | `_sidebar.html:35` | Chevron-down (accordion expand, rotates) | inline — nested-quote `x-bind:class` binding |
| 61 | `settings_dropdown.html` | Gear/cog (settings) | inline in `ui::icon_button` call (shared partial; single use) |
All are raw inline `<svg>` with hardcoded `<path d="...">` — no icon library, no partials.
Remaining inline `<svg>` are the rotating chevrons (kept inline on purpose, above).
---