Polish Hedena brand, home layout, and user-app chrome.
Switch the customer app to IRANSans, restyle home featured/newest and cart note sheet, refresh brand icons across apps, and add the PWA install prompt. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
"""
|
||||
Legacy Python generator — prefer scripts/generate-brand-icons.mjs when Node + sharp are available.
|
||||
|
||||
Point `src` at the icon-only master (scripts/brand-assets/hedena-icon.webp), then run from repo root.
|
||||
"""
|
||||
from PIL import Image
|
||||
from pathlib import Path
|
||||
|
||||
# Point `src` at your Hedena Gold master logo, then run from the repo root.
|
||||
src = Path(r"path/to/hedena-gold-logo.webp")
|
||||
src = Path(__file__).resolve().parent / "brand-assets" / "hedena-icon.webp"
|
||||
img = Image.open(src).convert("RGBA")
|
||||
print("source size", img.size)
|
||||
|
||||
@@ -10,10 +14,13 @@ root = Path(__file__).resolve().parents[1]
|
||||
(root / "apps/user-app/public/img").mkdir(parents=True, exist_ok=True)
|
||||
(root / "apps/user-app/src/assets/img").mkdir(parents=True, exist_ok=True)
|
||||
(root / "apps/admin-panel/src/assets/images/logo").mkdir(parents=True, exist_ok=True)
|
||||
(root / "apps/admin-panel/public").mkdir(parents=True, exist_ok=True)
|
||||
|
||||
img.save(root / "apps/user-app/public/img/brand-logo.webp", "WEBP")
|
||||
img.save(root / "apps/user-app/public/img/brand-logo.png", "PNG")
|
||||
img.save(root / "apps/user-app/src/assets/img/brand-logo.png", "PNG")
|
||||
img.save(root / "apps/user-app/public/img/no-items.png", "PNG")
|
||||
img.save(root / "apps/user-app/src/assets/img/no-items.png", "PNG")
|
||||
img.save(root / "apps/admin-panel/src/assets/images/logo/brand-icon.webp", "WEBP")
|
||||
img.save(root / "apps/admin-panel/src/assets/images/logo/brand-icon.png", "PNG")
|
||||
img.save(root / "apps/admin-panel/src/assets/images/logo/brand-horizontal.png", "PNG")
|
||||
@@ -23,8 +30,9 @@ for size, path in [
|
||||
(512, root / "apps/user-app/public/icon-512.png"),
|
||||
(192, root / "apps/admin-panel/public/icon-192.png"),
|
||||
(512, root / "apps/admin-panel/public/icon-512.png"),
|
||||
(32, root / "apps/admin-panel/public/favicon.png"),
|
||||
]:
|
||||
icon = Image.new("RGBA", (size, size), (0, 0, 0, 0))
|
||||
icon = Image.new("RGBA", (size, size), (0, 0, 0, 255))
|
||||
fitted = img.copy()
|
||||
fitted.thumbnail((size, size), Image.Resampling.LANCZOS)
|
||||
x = (size - fitted.width) // 2
|
||||
@@ -32,3 +40,5 @@ for size, path in [
|
||||
icon.paste(fitted, (x, y), fitted)
|
||||
icon.save(path, "PNG")
|
||||
print("wrote", path)
|
||||
|
||||
print("Note: favicon.ico is generated by scripts/generate-brand-icons.mjs (to-ico).")
|
||||
|
||||
Reference in New Issue
Block a user