Skip to content

Commit e9c5ee7

Browse files
authored
Merge pull request #420 from singh-odyssey/fix-icon-visibility
Fix icon visibility in dark mode , Remove title , Improve the UI
2 parents a2e07f5 + b199988 commit e9c5ee7

File tree

2 files changed

+64
-9
lines changed

2 files changed

+64
-9
lines changed

docusaurus.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ const config: Config = {
100100
type: "html",
101101
value: `<div class="grid grid-cols-3 gap-4 w-xl">
102102
<a class="border-r col-span-1" href="/docs/">Tutorials</a>
103-
<a class="border-r col-span-1" href="/docs/category/technical">Technical Docs</a>
104103
<div class="grid grid-cols-4 col-span-2">
105104
<a href="/docs/sql/intro-sql" class="nav__icons"> <img src="/icons/sql.svg" title="SQL" alt="SQL" /> </a>
106105
<a href="/docs/python/intro-python" class="nav__icons"> <img src="/icons/python.svg" title="Python" alt="Python" /> </a>
@@ -117,7 +116,6 @@ const config: Config = {
117116
type: "html",
118117
value: `<div class="grid grid-cols-3 gap-4">
119118
<a class="border-r col-span-1" href="/courses/">Courses</a>
120-
<a class="border-r col-span-1" href="/blog">Blog Posts</a>
121119
<div class="grid grid-cols-4 col-span-2">
122120
<a href="https://www.youtube.com/watch?v=GrTV59Y84S8&list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63&ab_channel=RecodeHive" class="nav__icons"> <img src="/icons/git.svg" alt="git" /> </a>
123121
<a href="https://www.youtube.com/watch?v=O1ahDsq8DU0&list=PLrLTYhoDFx-k62rLLajSB-jeqKwLkDrkF&ab_channel=RecodeHive" class="nav__icons"> <img src="/icons/postman.svg" alt="Postman" /> </a>
@@ -133,9 +131,8 @@ const config: Config = {
133131
type: "html",
134132
value: `<div class="grid grid-cols-3 gap-4">
135133
<a class="border-r col-span-1" href="/interview-prep/" target="_self">Interview Prep</a>
136-
<a class="border-r col-span-1" href="/showcase" target="_self">Showcase</a>
137134
<div class="grid grid-cols-1 col-span-2">
138-
<a href="/interview-prep/" target="_self" class="nav__icons"> 🧩Technical </a> <br />
135+
<a href="/interview-prep/" target="_self" class="nav__icons"> 🧩Technical </a>
139136
<a href="/interview-prep/" target="_self" class="nav__icons"> 💡Behavioral </a>
140137
</div>
141138
</div>`,

src/css/custom.css

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,17 @@ html[data-theme="dark"] .menu__link--active::after {
295295
left: 0 !important;
296296
z-index: 9999 !important;
297297
display: none !important;
298-
min-width: 50px !important;
299-
max-width: 420px !important;
298+
min-width: 50px !important;
299+
/* Give a little more room so icons never clip */
300+
max-width: 520px !important;
301+
box-sizing: border-box !important;
300302
width: max-content !important;
301303
background: var(--ifm-background-color) !important;
302304
border: 1px solid var(--ifm-color-emphasis-300) !important;
303305
border-radius: 8px !important;
304306
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
305-
padding: 0.75rem !important;
307+
/* Slightly more breathing room inside dropdown */
308+
padding: 1rem !important;
306309
margin-top: 8px !important;
307310
overflow: visible !important;
308311
}
@@ -611,24 +614,79 @@ body {
611614
border-radius: 50%;
612615
}
613616

617+
/* Ensure monochrome icons (GitHub, Next.js) are visible in dark mode */
618+
[data-theme="dark"] .dropdown-content .nav__icons img[alt="GitHub"],
619+
[data-theme="dark"] .dropdown-content .nav__icons img[alt="Nextjs"],
620+
[data-theme="dark"] .dropdown-content img[src$="/icons/github.svg"],
621+
[data-theme="dark"] .dropdown-content img[src$="/icons/nextjs.svg"],
622+
[data-theme="dark"] .dropdown__menu .nav__icons img[alt="GitHub"],
623+
[data-theme="dark"] .dropdown__menu .nav__icons img[alt="Nextjs"],
624+
[data-theme="dark"] .dropdown__menu img[src$="/icons/github.svg"],
625+
[data-theme="dark"] .dropdown__menu img[src$="/icons/nextjs.svg"] {
626+
filter: invert(1) brightness(1.1) contrast(1.05) !important;
627+
}
628+
614629
.dropdown-content {
615630
position: absolute !important;
616631
top: 100% !important;
617632
left: 0 !important;
618633
min-width: 250px !important;
619-
max-width: 320px !important;
634+
max-width: 380px !important;
635+
box-sizing: border-box !important;
620636
width: max-content !important;
621637
z-index: 9999 !important;
622638
background: var(--ifm-background-color) !important;
623639
border: 1px solid var(--ifm-color-emphasis-300) !important;
624640
border-radius: 8px !important;
625641
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
626-
padding: 1rem !important;
642+
padding: 1.1rem !important;
627643
margin-top: 8px !important;
628644
display: none;
629645
overflow: visible !important;
630646
}
631647

648+
/* Give dividers a touch more space inside dropdowns */
649+
.dropdown__menu hr,
650+
.dropdown-content hr {
651+
margin: 0.6rem 0 !important;
652+
}
653+
654+
/* Prevent grid content from forcing overflow in the dropdown rows */
655+
.dropdown__menu .grid > .col-span-2,
656+
.dropdown-content .grid > .col-span-2 {
657+
min-width: 0 !important; /* allow the icon column to shrink inside the 3-col grid */
658+
}
659+
660+
/* Ensure grid rows use full available width for internal layout */
661+
.dropdown__menu .grid,
662+
.dropdown-content .grid {
663+
width: 100% !important;
664+
/* Comfortable space between the label column and icons column */
665+
column-gap: 1rem !important;
666+
/* Subtle vertical space per row */
667+
padding: 0.35rem 0 !important;
668+
}
669+
670+
/* Add spacing between the individual icons within the 4-col icon grid */
671+
.dropdown__menu .grid .grid,
672+
.dropdown-content .grid .grid {
673+
gap: 0.6rem !important; /* slightly tighter to reduce big gaps */
674+
}
675+
676+
/* Add breathing room between the left label and the vertical separator */
677+
.dropdown__menu .grid > .border-r.col-span-1,
678+
.dropdown-content .grid > .border-r.col-span-1 {
679+
padding-right: 0.5rem !important;
680+
}
681+
682+
/* Interview Prep links are stacked; keep them tighter */
683+
.dropdown__menu .grid .col-span-2 .nav__icons,
684+
.dropdown-content .grid .col-span-2 .nav__icons {
685+
display: inline-flex !important;
686+
align-items: center !important;
687+
padding: 0.2rem 0 !important; /* reduce extra space between Technical & Behavioral */
688+
}
689+
632690
.dropdown:hover .dropdown-content,
633691
.navbar__item:hover .dropdown-content,
634692
.dropdown .dropdown-content:hover,

0 commit comments

Comments
 (0)