feat: dynamic UI texts system + admin panel editor + Vazirmatn local font + bug fixes
- Add getText() system for all homepage sections (Header, Hero, FeaturedProducts, SmartAdvisor, VetGallery, Footer)
- Add UITexts admin page in frontend/admin-panel with search, group collapse, per-key save
- Add seed-ui-texts.ts with 102 texts in 9 groups
- Add local VazirmatnVariable.woff2 font, remove CDN + Inter references
- Fix hero image path, productService return type { data, meta }
- Fix ArchivePage pagination + CATEGORIES list + breadcrumbs
- Fix BlogPage/Wiki page links + brightness-0 invert removal
- Fix IngredientWiki search + product links + placeholder
- Fix all getProducts() callers for { data } destructuring
- Fix sitemap.ts, CartDrawer, B2BPortal, CheckoutPage type issues
- Add .gitignore for /fonts/ and /backend/uploads/
This commit is contained in:
1 parent
ab7ed279c8
commit
1a0c98a34e
26 files changed
+653
-132
No files matched your search
@@ -24,7 +24,7 @@ export default function BlogPage({ blogs = [] }: { blogs: BlogPost[] }) {
|
||||
const [products, setProducts] = React.useState<Product[]>([]);
|
||||
|
||||
React.useEffect(() => {
|
||||
productService.getProducts().then(data => setProducts(data));
|
||||
productService.getProducts({ limit: 10 }).then(res => setProducts(res.data));
|
||||
}, []);
|
||||
|
||||
if (selectedPost) {
|
||||
@@ -100,7 +100,7 @@ export default function BlogPage({ blogs = [] }: { blogs: BlogPost[] }) {
|
||||
{products.slice(4, 7).map(p => (
|
||||
<div
|
||||
key={p.id}
|
||||
onClick={() => router.push(`/shop/${p.id}`)}
|
||||
onClick={() => router.push(`/shop/${p.slug || p.id}`)}
|
||||
className="bg-white/10 border border-white/20 p-4 rounded-3xl flex items-center gap-4 cursor-pointer hover:bg-white/20 transition-all group"
|
||||
>
|
||||
<div className="w-16 h-16 bg-white rounded-2xl p-2 shrink-0 group-hover:scale-110 transition-transform">
|
||||
@@ -305,10 +305,10 @@ export default function BlogPage({ blogs = [] }: { blogs: BlogPost[] }) {
|
||||
{products.slice(0, 2).map((p) => (
|
||||
<div
|
||||
key={p.id}
|
||||
onClick={() => router.push(`/shop/${p.id}`)}
|
||||
className="bg-white/10 border border-white/20 p-6 rounded-3xl cursor-pointer hover:bg-white/20 transition-all text-center group"
|
||||
>
|
||||
<img src={p.image} alt={p.name} className="w-20 h-20 mx-auto mb-4 object-contain filter brightness-0 invert group-hover:scale-110 transition-transform" />
|
||||
onClick={() => router.push(`/shop/${p.slug || p.id}`)}
|
||||
className="bg-white/10 border border-white/20 p-6 rounded-3xl cursor-pointer hover:bg-white/20 transition-all text-center group"
|
||||
>
|
||||
<img src={p.image} alt={p.name} className="w-20 h-20 mx-auto mb-4 object-contain group-hover:scale-110 transition-transform" />
|
||||
<h5 className="text-[10px] font-black">{p.name}</h5>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user