Use bundled logo from public/ instead of the API

Header, footer and og:image now read public/images/logo.png via
LOGO_SRC in config.ts. The API's /website/favicon returned another
business's mark, so getFavicon()/BrandAssets are removed and the tab
icon is the bundled favicon.png. Footer logo is now 70px like the
header (108px was sized for the old square mark; the new 200x48
wordmark would be 450px wide).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
amirhosein.ashourloo
2026-09-20 00:13:53 +03:30
co-authored by Claude Sonnet 5
parent 8e82370b64
commit 7089078b4c
8 changed files with 36 additions and 78 deletions
+10 -17
View File
@@ -31,7 +31,7 @@ fallbacks should update it.
| `/website/sliders`, `/website/category-groups` | **empty** |
| `/website/static-images` | **filled** — `slider` (2), `categories` (8 of 15), `one/two/three-banner-bg` all have real images. Verified live and rendering correctly; if a future check finds otherwise, suspect a stale build/deploy before suspecting the wiring. |
| `/blogs` | **empty** (module enabled) |
| `/website/business-info` | phones/addresses/socialMedia still empty; `logoUrl`/`faviconUrl` are now set but point to a **different business's** mark (see "Brand") |
| `/website/business-info` | phones/addresses/socialMedia still empty; `logoUrl`/`faviconUrl` point to a **different business's** mark and are deliberately unused (see "Brand") |
| `/products/by-id/{id}/technical-info` | `{ form: null, values: [] }` — empty on every product checked so far |
| `/comments` | **empty**, but `POST` works (no bearer required by the API itself) |
@@ -42,7 +42,6 @@ fallbacks should update it.
| No prices | `src/lib/demoPricing.ts`, gated by `NEXT_PUBLIC_DEMO_PRICING=1` — deterministic price per product id | store-items exist |
| No blog posts | `src/data/fallbackBlogs.ts` — the real posts from moalem.shop/articles, shown on the homepage and `/blog` as square-thumbnail cards that link to a real local `/blog/{id}/{slug}` page (`getFallbackBlogById()`); that page shows title/category/image plus a "coming soon" note since only those three fields are real, no scraped body content | `/blogs` returns items |
| No category art past slot position 8 | placeholder SVGs in `public/images/categories/{id}.svg`, generated by `scripts/gen-category-placeholders.mjs` for every category at every level, not just level-2 | the `categories` slot has an image for that position |
| Wrong logo/favicon in API | `getFavicon()` is wired live (see "Brand") but the uploaded asset itself is wrong; no code fallback needed once the dashboard upload is fixed | the correct asset is uploaded |
## Brand
@@ -50,21 +49,15 @@ Colors taken from the live moalem.shop theme, not invented:
primary `#E51E22`, dark `#B10123`, ink `#2E2E2E`, body `#7C7C7C`.
Fonts: IRANYekan (fa, local `public/fonts`) + Montserrat (latin, next/font).
- Logo/favicon: `getFavicon()` in `src/lib/api.ts` reads
`GET /tenants/moalem.shop/website/favicon` — the documented single source —
and `Header.tsx`/`Footer.tsx`/`generateMetadata()` in `layout.tsx` all use
it, falling back to the bundled `/images/logo.png` / `/favicon.png` only
when the API field is null. **As of 2026-09-06 the dashboard has a logo/
favicon uploaded, but it's the wrong business's** (a home-appliances store's
mark, not موبایل معلم) — the wiring is correct and will pick up the right
asset automatically the moment it's replaced in the dashboard; don't
"fix" this by hardcoding the local fallback again.
- Header (desktop) logo renders at `h-[70px]`; footer logo stays at
`h-[108px]` (3x the original `h-9`/36px, on request) — the two were sized
independently, on request, so don't assume they should match. If the wrong
logo above still looks small at either size, it's because that specific
PNG has a lot of baked-in transparent padding around the mark —
`object-contain` can't fix that, only the replacement asset can.
- Logo: **bundled, not from the API** — `public/images/logo.png` (200x48
wordmark, supplied by the business), referenced via `LOGO_SRC`/`LOGO_WIDTH`/
`LOGO_HEIGHT` in `src/lib/config.ts` by `Header.tsx`, `Footer.tsx` and the
og:image in `layout.tsx`. This was an explicit decision (2026-09-20): the
API's `/website/favicon` returned another business's mark, so
`getFavicon()` was removed entirely — don't re-add it. Tab icon is the
bundled `public/favicon.png`. To change the logo, replace the file (keep
the same name; update `LOGO_WIDTH`/`LOGO_HEIGHT` if its shape changes).
- Header (desktop) and footer logos both render at `h-[70px] w-auto`.
- Contact data (phone, mobile, branch addresses, Instagram/Telegram) in
`src/data/site.ts` is real, pulled from the live theme's footer — `GET
/website/business-info` still returns empty `phoneNumbers`/`addresses`/