Skip to content

Commit 8b5811a

Browse files
authored
Merge pull request #315 from Richajaishwal0/main
Replaced navibar and dashboard emojis with Professional Icons
2 parents 18fc80e + 34869f0 commit 8b5811a

File tree

10 files changed

+510
-237
lines changed

10 files changed

+510
-237
lines changed

docusaurus.config.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ const config: Config = {
8787
items: [
8888
{
8989
type: "dropdown",
90-
html: '<span class="nav-emoji">📚</span> Docs',
90+
html: '<span id="nav-docs"></span> Docs',
9191
position: "left",
9292
items: [
9393
{
9494
type: "html",
9595
value: `<div class="grid grid-cols-3 gap-4 w-xl">
96-
<a class="border-r col-span-1" href="/courses/">Tutorials</a>
96+
<a class="border-r col-span-1" href="/courses/" style="color:black ; ">Tutorials</a>
9797
<div class="grid grid-cols-4 col-span-2">
9898
<a href="/docs/category/sql/" class="nav__icons"> <img src="/icons/sql.svg" title="SQL" alt="SQL" /> </a>
9999
<a href="/docs/category/python/" class="nav__icons"> <img src="/icons/python.svg" title="Python" alt="Python" /> </a>
@@ -109,7 +109,7 @@ const config: Config = {
109109
{
110110
type: "html",
111111
value: `<div class="grid grid-cols-3 gap-4">
112-
<a class="border-r col-span-1" href="/courses/"> Courses </a>
112+
<a class="border-r col-span-1" href="/courses/" style="color:black"> Courses </a>
113113
<div class="grid grid-cols-4 col-span-2">
114114
<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>
115115
<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>
@@ -124,73 +124,73 @@ const config: Config = {
124124
{
125125
type: "html",
126126
value: `<div class="grid grid-cols-3 gap-4">
127-
<a class="border-r col-span-1" href="#" target="_self"> Interview Prep </a>
127+
<a class="border-r col-span-1" href="#" target="_self" style="color:black"> Interview Prep </a>
128128
<div class="grid grid-cols-1 col-span-2">
129-
<a href="/interview-prep/" target="_self" class="nav__icons"> 🧩Technical </a> <br />
130-
<a href="/interview-prep/" target="_self" class="nav__icons"> 💡Behavioral </a>
129+
<a href="/interview-prep/" target="_self" class="nav__icons"><span id="nav-technical" style="display:inline-flex;align-items:center;"></span> Technical</a> <br />
130+
<a href="/interview-prep/" target="_self" class="nav__icons"><span id="nav-behavioral" style="display:inline-flex;align-items:center;"></span> Behavioral</a>
131131
</div>
132132
</div>`,
133133
},
134134
],
135135
},
136136
{
137137
to: "/showcase",
138-
html: '<span class="nav-emoji">🌍</span> Showcase',
138+
html: '<span id="nav-showcase"></span> Showcase',
139139
position: "left",
140140
},
141141
{
142142
to: "/dashboard",
143-
html: '<span class="nav-emoji">📊</span> Dashboard',
143+
html: '<span id="nav-dashboard"></span> Dashboard',
144144
position: "left",
145145
},
146146
{
147147
to: "/our-sponsors/",
148-
html: '<span class="nav-emoji">💰</span> Donate',
148+
html: '<span id="nav-donate"></span> Donate',
149149
position: "left",
150150
},
151151
{
152152
type: "dropdown",
153-
html: '<span class="nav-emoji">👩🏻‍💻</span> Devfolio',
153+
html: '<span id="nav-devfolio"></span> Devfolio',
154154
position: "left",
155155
items: [
156156
{
157-
label: "💻GitHub Profiles",
157+
html: '<span id="nav-github" style="display:inline-flex;align-items:center;"></span> GitHub Profiles',
158158
to: "https://dev.recodehive.com/devfolio",
159159
},
160160
{
161-
label: "🎖️ GitHub Badges",
161+
html: '<span id="nav-badges" style="display:inline-flex;align-items:center;"></span> GitHub Badges',
162162
to: "/badges/github-badges/",
163163
},
164164
],
165165
},
166166
{
167167
to: "/blogs",
168-
html: '<span class="nav-emoji">📰</span> Blogs',
168+
html: '<span id="nav-blogs"></span> Blogs',
169169
position: "left",
170170
},
171171
{
172172
type: "dropdown",
173-
html: '<span class="nav-emoji">🔗</span> More',
173+
html: '<span id="nav-more"></span> More',
174174
position: "left",
175175
items: [
176176
{
177-
label: "📚 E-books",
177+
html: '<span id="nav-ebooks" style="display:inline-flex;align-items:center;"></span> E-books',
178178
to: "https://learn.recodehive.com/datascience",
179179
},
180180
{
181-
label: "🛣️ Roadmap",
181+
html: '<span id="nav-roadmap" style="display:inline-flex;align-items:center;"></span> Roadmap',
182182
to: "#",
183183
},
184184
{
185-
label: "🤝 Community",
185+
html: '<span id="nav-community" style="display:inline-flex;align-items:center;"></span> Community',
186186
to: "/community",
187187
},
188188
{
189-
label: "📺 Broadcast",
189+
html: '<span id="nav-broadcast" style="display:inline-flex;align-items:center;"></span> Broadcast',
190190
to: "/broadcasts/",
191191
},
192192
{
193-
label: "🎙️ Podcast",
193+
html: '<span id="nav-podcast" style="display:inline-flex;align-items:center;"></span> Podcast',
194194
to: "/podcasts/",
195195
},
196196
],

src/components/CustomSidebar.module.css

Whitespace-only changes.

src/components/CustomSidebar.tsx

Whitespace-only changes.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import React from "react";
2+
import {
3+
Book,
4+
Eye,
5+
LayoutDashboard,
6+
DollarSign,
7+
User,
8+
Newspaper,
9+
MoreHorizontal,
10+
Github,
11+
BadgeCheck,
12+
FileText,
13+
Users,
14+
Tv,
15+
Mic,
16+
Lightbulb,
17+
Puzzle,
18+
} from "lucide-react";
19+
20+
const iconMap: Record<string, React.ReactNode> = {
21+
Docs: <Book size={18} style={{ verticalAlign: "middle" }} />,
22+
Showcase: <Eye size={18} style={{ verticalAlign: "middle" }} />,
23+
Dashboard: <LayoutDashboard size={18} style={{ verticalAlign: "middle" }} />,
24+
Donate: <DollarSign size={18} style={{ verticalAlign: "middle" }} />,
25+
Devfolio: <User size={18} style={{ verticalAlign: "middle" }} />,
26+
Blogs: <Newspaper size={18} style={{ verticalAlign: "middle" }} />,
27+
More: <MoreHorizontal size={18} style={{ verticalAlign: "middle" }} />,
28+
GitHub: <Github size={18} style={{ verticalAlign: "middle" }} />,
29+
Badges: <BadgeCheck size={18} style={{ verticalAlign: "middle" }} />,
30+
Ebooks: <FileText size={18} style={{ verticalAlign: "middle" }} />,
31+
Roadmap: <LayoutDashboard size={18} style={{ verticalAlign: "middle" }} />,
32+
Community: <Users size={18} style={{ verticalAlign: "middle" }} />,
33+
Broadcast: <Tv size={18} style={{ verticalAlign: "middle" }} />,
34+
Podcast: <Mic size={18} style={{ verticalAlign: "middle" }} />,
35+
Behavioral: <Lightbulb size={18} style={{ verticalAlign: "middle" }} />,
36+
Technical: <Puzzle size={18} style={{ verticalAlign: "middle" }} />,
37+
};
38+
39+
export default function NavbarIcon({ name }: { name: string }) {
40+
return (
41+
<span
42+
style={{
43+
display: "inline-flex",
44+
alignItems: "center",
45+
gap: 4,
46+
marginRight: 2,
47+
}}
48+
>
49+
{iconMap[name] || null}
50+
</span>
51+
);
52+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React, { useEffect } from "react";
2+
import NavbarIcon from "./NavbarIcon";
3+
4+
const iconMap = [
5+
{ id: "nav-docs", name: "Docs" },
6+
{ id: "nav-showcase", name: "Showcase" },
7+
{ id: "nav-dashboard", name: "Dashboard" },
8+
{ id: "nav-donate", name: "Donate" },
9+
{ id: "nav-devfolio", name: "Devfolio" },
10+
{ id: "nav-blogs", name: "Blogs" },
11+
{ id: "nav-more", name: "More" },
12+
// Sub nav items
13+
{ id: "nav-github", name: "GitHub" },
14+
{ id: "nav-badges", name: "Badges" },
15+
{ id: "nav-ebooks", name: "Ebooks" },
16+
{ id: "nav-roadmap", name: "Roadmap" },
17+
{ id: "nav-community", name: "Community" },
18+
{ id: "nav-broadcast", name: "Broadcast" },
19+
{ id: "nav-podcast", name: "Podcast" },
20+
{ id: "nav-technical", name: "Technical" },
21+
{ id: "nav-behavioral", name: "Behavioral" },
22+
];
23+
24+
export default function NavbarIconInjector() {
25+
useEffect(() => {
26+
iconMap.forEach(({ id, name }) => {
27+
const el = document.getElementById(id);
28+
if (el && el.childNodes.length === 0) {
29+
import("react-dom").then((ReactDOM) => {
30+
(ReactDOM.default as any).render(<NavbarIcon name={name} />, el);
31+
});
32+
}
33+
});
34+
}, []);
35+
return null;
36+
}

0 commit comments

Comments
 (0)