From c5d975e0c7f2d12b6152f009afddc63898c307f1 Mon Sep 17 00:00:00 2001 From: parsa aghaei Date: Sun, 6 Sep 2026 11:42:10 +0330 Subject: [PATCH] feat(catalog): add breadcrumb, back button, micro-scrollbar and eliminate white gap --- .../components/catalog/FlipbookCatalog.tsx | 34 +- graphify-out/.graphify_labels.json | 19 +- graphify-out/.graphify_labels.json.sig | 2 +- graphify-out/2026-09-06/.graphify_labels.json | 18 +- graphify-out/2026-09-06/GRAPH_REPORT.md | 118 +- graphify-out/2026-09-06/graph.json | 4066 +++++++++-------- graphify-out/2026-09-06/manifest.json | 1286 +++--- graphify-out/GRAPH_REPORT.md | 97 +- graphify-out/cache/stat-index.json | 2 +- graphify-out/graph.html | 6 +- graphify-out/graph.json | 2886 ++++++------ graphify-out/manifest.json | 1264 ++--- 12 files changed, 4945 insertions(+), 4853 deletions(-) diff --git a/frontend/application/components/catalog/FlipbookCatalog.tsx b/frontend/application/components/catalog/FlipbookCatalog.tsx index c4cdbde..3b21294 100644 --- a/frontend/application/components/catalog/FlipbookCatalog.tsx +++ b/frontend/application/components/catalog/FlipbookCatalog.tsx @@ -2,6 +2,7 @@ import React, { useState, useEffect, useRef, useMemo } from "react"; import Image from "next/image"; +import { useRouter } from "next/navigation"; import CatalogPageSpread, { CategoryMeta } from "./CatalogPageSpread"; import { Product } from "../../lib/data/products"; import { useSettingsStore } from "../../lib/store/settingsStore"; @@ -18,7 +19,8 @@ import { ShieldCheck, Zap, Baby, - X + X, + ArrowRight } from "lucide-react"; interface FlipbookCatalogProps { @@ -36,6 +38,7 @@ const normalizeSearchText = (str: string) => { }; export default function FlipbookCatalog({ products }: FlipbookCatalogProps) { + const router = useRouter(); const [currentPage, setCurrentPage] = useState(1); const [searchQuery, setSearchQuery] = useState(""); const [isFullscreen, setIsFullscreen] = useState(false); @@ -406,12 +409,35 @@ export default function FlipbookCatalog({ products }: FlipbookCatalogProps) { className={`w-full bg-slate-950 font-vazir text-slate-100 flex flex-col justify-between select-none print:bg-white print:p-0 print:m-0 print:h-auto ${ isFullscreen ? "h-screen p-3" - : "h-[calc(100vh-140px)] min-h-[580px] max-h-[880px] py-2 px-3 sm:px-6" + : "min-h-[calc(100vh-64px)] py-3 px-3 sm:px-6" }`} dir="rtl" onTouchStart={handleTouchStart} onTouchEnd={handleTouchEnd} > + {/* ========================================================================= */} + {/* 0. BREADCRUMB NAVIGATION & BACK BUTTON (Standard across all pages) */} + {/* ========================================================================= */} + {!isFullscreen && ( +
+ {/* Breadcrumb path */} +
+ router.push('/')}>خانه + + کاتالوگ آنلاین محصولات +
+ + {/* Integrated Back Button */} + +
+ )} + {/* ========================================================================= */} {/* 1. TOP TOOLBAR (Controls, Search, Print, Fullscreen) - Fixed Height */} {/* ========================================================================= */} @@ -769,8 +795,8 @@ export default function FlipbookCatalog({ products }: FlipbookCatalogProps) { - {/* Category Jump Pills */} -
+ {/* Category Jump Pills with Micro Scrollbar */} +
-
4258 nodes · 7827 edges · 333 communities
+
4258 nodes · 7827 edges · 332 communities