From 18e226ad47698bc0ed7da8867a955e00ffb4f7d2 Mon Sep 17 00:00:00 2001
From: aramesh-site deploy
Date: Mon, 28 Sep 2026 11:06:51 +0000
Subject: [PATCH] =?UTF-8?q?fix(toc):=20=D8=AD=D8=B0=D9=81=20=D9=86=D9=88?=
=?UTF-8?q?=D8=A7=D8=B1=20=D8=A7=D8=B3=DA=A9=D8=B1=D9=88=D9=84=20=D9=81?=
=?UTF-8?q?=D9=87=D8=B1=D8=B3=D8=AA=20=D9=85=D8=B7=D8=A7=D9=84=D8=A8=20?=
=?UTF-8?q?=D9=88=20=D9=BE=D9=87=D9=86=E2=80=8C=DA=A9=D8=B1=D8=AF=D9=86=20?=
=?UTF-8?q?=D8=B3=D8=AA=D9=88=D9=86=20=D8=A2=D9=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- ستون فهرست در دسکتاپ از ۱۷rem به ۲۱rem پهنتر شد تا تیترهای بلند جا شوند
- نوار اسکرول بومی مرورگر (با فلش) مخفی شد؛ اسکرول با چرخ ماوس/لمس سر جایش است
---
frontend/src/components/TableOfContents.tsx | 2 +-
frontend/src/index.css | 9 +++++++++
frontend/src/pages/ArticleDetail.tsx | 2 +-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/frontend/src/components/TableOfContents.tsx b/frontend/src/components/TableOfContents.tsx
index b5973a1..a1dee53 100644
--- a/frontend/src/components/TableOfContents.tsx
+++ b/frontend/src/components/TableOfContents.tsx
@@ -110,7 +110,7 @@ export function TableOfContents({ items, title = 'فهرست مطالب', classN
{/* ارتفاع فهرست به ارتفاع در دسترس صفحه (زیر نوار چسبان) محدود میشود تا بریده نشود */}
-
+
{items.map((item) => {
const isActive = item.id === activeId
return (
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 56b144a..72b42a7 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -256,6 +256,15 @@ html[lang='en'] .article-body h3 {
border: 1px solid rgba(245, 243, 239, 0.1);
object-fit: cover;
}
+/* فهرست مطالب: اسکرول بدون نوار اسکرول — چرخ ماوس و لمس کار میکنند */
+.no-scrollbar {
+ scrollbar-width: none; /* Firefox */
+ -ms-overflow-style: none; /* IE/Edge legacy */
+}
+.no-scrollbar::-webkit-scrollbar {
+ display: none; /* Chrome / Safari / Edge */
+}
+
/* ---------- تصویر کپشندار:
---------- */
.article-body figure {
margin-top: 2rem;
diff --git a/frontend/src/pages/ArticleDetail.tsx b/frontend/src/pages/ArticleDetail.tsx
index 543489f..f4d9e6a 100644
--- a/frontend/src/pages/ArticleDetail.tsx
+++ b/frontend/src/pages/ArticleDetail.tsx
@@ -92,7 +92,7 @@ export function ArticleDetail() {
*/
const hasToc = toc.length > 0;
// در چیدمان راستبهچپ ستون شماره ۱ سمت راست است؛ پس ستونها صریح شماره میخورند
- const gridColumns = hasToc ? 'lg:grid-cols-[17rem_minmax(0,1fr)]' : '';
+ const gridColumns = hasToc ? 'lg:grid-cols-[21rem_minmax(0,1fr)]' : '';
const bodyColumns = 'lg:col-start-2';
const tocColumns = 'lg:col-start-1';