Skip to content

Commit 13dcdfd

Browse files
authored
Merge branch 'main' into feature/issue-#252
2 parents 0ade181 + 10a6842 commit 13dcdfd

File tree

11 files changed

+519
-239
lines changed

11 files changed

+519
-239
lines changed

docusaurus.config.ts

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ const config: Config = {
6767
theme: {
6868
customCss: require.resolve("./src/css/custom.css"),
6969
},
70+
gtag: {
71+
trackingID: 'G-W02Z2VJYCR',
72+
anonymizeIP: false,
73+
},
7074
} satisfies Preset.Options,
7175
],
7276
],
@@ -87,13 +91,13 @@ const config: Config = {
8791
items: [
8892
{
8993
type: "dropdown",
90-
html: '<span class="nav-emoji">📚</span> Docs',
94+
html: '<span id="nav-docs"></span> Docs',
9195
position: "left",
9296
items: [
9397
{
9498
type: "html",
9599
value: `<div class="grid grid-cols-3 gap-4 w-xl">
96-
<a class="border-r col-span-1" href="/courses/">Tutorials</a>
100+
<a class="border-r col-span-1" href="/courses/" style="color:black ; ">Tutorials</a>
97101
<div class="grid grid-cols-4 col-span-2">
98102
<a href="/docs/category/sql/" class="nav__icons"> <img src="/icons/sql.svg" title="SQL" alt="SQL" /> </a>
99103
<a href="/docs/category/python/" class="nav__icons"> <img src="/icons/python.svg" title="Python" alt="Python" /> </a>
@@ -109,7 +113,7 @@ const config: Config = {
109113
{
110114
type: "html",
111115
value: `<div class="grid grid-cols-3 gap-4">
112-
<a class="border-r col-span-1" href="/courses/"> Courses </a>
116+
<a class="border-r col-span-1" href="/courses/" style="color:black"> Courses </a>
113117
<div class="grid grid-cols-4 col-span-2">
114118
<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>
115119
<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 +128,73 @@ const config: Config = {
124128
{
125129
type: "html",
126130
value: `<div class="grid grid-cols-3 gap-4">
127-
<a class="border-r col-span-1" href="#" target="_self"> Interview Prep </a>
131+
<a class="border-r col-span-1" href="#" target="_self" style="color:black"> Interview Prep </a>
128132
<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>
133+
<a href="/interview-prep/" target="_self" class="nav__icons"><span id="nav-technical" style="display:inline-flex;align-items:center;"></span> Technical</a> <br />
134+
<a href="/interview-prep/" target="_self" class="nav__icons"><span id="nav-behavioral" style="display:inline-flex;align-items:center;"></span> Behavioral</a>
131135
</div>
132136
</div>`,
133137
},
134138
],
135139
},
136140
{
137141
to: "/showcase",
138-
html: '<span class="nav-emoji">🌍</span> Showcase',
142+
html: '<span id="nav-showcase"></span> Showcase',
139143
position: "left",
140144
},
141145
{
142146
to: "/dashboard",
143-
html: '<span class="nav-emoji">📊</span> Dashboard',
147+
html: '<span id="nav-dashboard"></span> Dashboard',
144148
position: "left",
145149
},
146150
{
147151
to: "/our-sponsors/",
148-
html: '<span class="nav-emoji">💰</span> Donate',
152+
html: '<span id="nav-donate"></span> Donate',
149153
position: "left",
150154
},
151155
{
152156
type: "dropdown",
153-
html: '<span class="nav-emoji">👩🏻‍💻</span> Devfolio',
157+
html: '<span id="nav-devfolio"></span> Devfolio',
154158
position: "left",
155159
items: [
156160
{
157-
label: "💻GitHub Profiles",
161+
html: '<span id="nav-github" style="display:inline-flex;align-items:center;"></span> GitHub Profiles',
158162
to: "https://dev.recodehive.com/devfolio",
159163
},
160164
{
161-
label: "🎖️ GitHub Badges",
165+
html: '<span id="nav-badges" style="display:inline-flex;align-items:center;"></span> GitHub Badges',
162166
to: "/badges/github-badges/",
163167
},
164168
],
165169
},
166170
{
167171
to: "/blogs",
168-
html: '<span class="nav-emoji">📰</span> Blogs',
172+
html: '<span id="nav-blogs"></span> Blogs',
169173
position: "left",
170174
},
171175
{
172176
type: "dropdown",
173-
html: '<span class="nav-emoji">🔗</span> More',
177+
html: '<span id="nav-more"></span> More',
174178
position: "left",
175179
items: [
176180
{
177-
label: "📚 E-books",
181+
html: '<span id="nav-ebooks" style="display:inline-flex;align-items:center;"></span> E-books',
178182
to: "https://learn.recodehive.com/datascience",
179183
},
180184
{
181-
label: "🛣️ Roadmap",
185+
html: '<span id="nav-roadmap" style="display:inline-flex;align-items:center;"></span> Roadmap',
182186
to: "#",
183187
},
184188
{
185-
label: "🤝 Community",
189+
html: '<span id="nav-community" style="display:inline-flex;align-items:center;"></span> Community',
186190
to: "/community",
187191
},
188192
{
189-
label: "📺 Broadcast",
193+
html: '<span id="nav-broadcast" style="display:inline-flex;align-items:center;"></span> Broadcast',
190194
to: "/broadcasts/",
191195
},
192196
{
193-
label: "🎙️ Podcast",
197+
html: '<span id="nav-podcast" style="display:inline-flex;align-items:center;"></span> Podcast',
194198
to: "/podcasts/",
195199
},
196200
],

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)