Skip to content

Commit ad048c2

Browse files
committed
fix: doc sidebar design issue resolve
1 parent cedd79d commit ad048c2

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

src/css/custom.css

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,13 @@
7373

7474
/* ================= SECTION 3: ACTIVE INDICATORS ================= */
7575

76-
/* Add bright indicators */
77-
.menu__link--active::before {
78-
content: "•";
79-
position: absolute;
80-
left: -2px;
81-
top: 50%;
82-
transform: translateY(-50%);
83-
font-size: 24px;
84-
color: #38a169; /* Green dot */
76+
/* Style the existing dot for active pages */
77+
a.menu__link.menu__link--active div span:first-child {
78+
background-color: #38a169 !important; /* Green dot */
79+
opacity: 1 !important;
80+
width: 8px !important;
81+
height: 8px !important;
82+
box-shadow: 0 0 6px #38a169 !important; /* Add glow effect */
8583
animation: breatheGreen 2s infinite;
8684
}
8785

@@ -203,8 +201,13 @@ html[data-theme="dark"] .menu__link--active span {
203201
color: #9ae6b4;
204202
}
205203

204+
/* Dark mode dot styling */
205+
html[data-theme="dark"] a.menu__link.menu__link--active div span:first-child {
206+
background-color: #9ae6b4 !important;
207+
box-shadow: 0 0 8px #68d391 !important;
208+
}
209+
206210
/* Dark mode indicator colors */
207-
html[data-theme="dark"] .menu__link--active::before,
208211
html[data-theme="dark"] .menu__link--active::after {
209212
color: #68d391;
210213
}

src/theme/DocSidebarItems/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ export default function DocSidebarItems({ items, activePath, level = 0 }) {
2323
typeof window !== "undefined" ? window.location.pathname : "";
2424

2525
// Check if we're at the docs root page
26-
const isDocsRootPath =
27-
currentPath === "/" ||
28-
currentPath === "/docs" ||
29-
currentPath === "/docs/" ||
30-
currentPath.startsWith("/docs/GitHub/intro-github");
26+
const isDocsRootPath = currentPath === "/";
3127

3228
// If we're at the docs root, force an empty active path
3329
const effectiveActivePath = isDocsRootPath ? "" : activePath;

0 commit comments

Comments
 (0)