Skip to content

Commit 6741578

Browse files
committed
feat(sidebar): Add external links and icons
- Add HTML Editor, Contribute on GitHub, and Hall of Codes links to the sidebar with corresponding FontAwesome icons - Import faGlobe, faEdit, and faCodeBranch in Navbar.tsx - Open external (http) links in a new tab via target="_blank"
1 parent f82988f commit 6741578

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

app/components/dashboard/Navbar.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import {
1313
faMessage,
1414
faCrown,
1515
faDashboard,
16+
faGlobe,
17+
faEdit,
18+
faCodeBranch,
1619
} from "@fortawesome/free-solid-svg-icons";
1720
import type { IconDefinition } from "@fortawesome/free-solid-svg-icons";
1821

@@ -49,6 +52,24 @@ function Sidebar({ role }: { role: string }) {
4952
icon: faTrophy,
5053
role: "user",
5154
},
55+
{
56+
href: "https://hallofcodes.github.io/html-editor",
57+
label: "HTML Editor",
58+
icon: faEdit,
59+
role: "user",
60+
},
61+
{
62+
href: "https://github.com/hallofcodes/devpulse",
63+
label: "Contribute on GitHub",
64+
icon: faCodeBranch,
65+
role: "user",
66+
},
67+
{
68+
href: "https://hallofcodes.github.io",
69+
label: "Hall of Codes",
70+
icon: faGlobe,
71+
role: "user",
72+
},
5273
];
5374

5475
const getAuthorization = (itemRole: string, userRole: string) => {
@@ -105,6 +126,7 @@ function Sidebar({ role }: { role: string }) {
105126
? "bg-indigo-500/10 text-indigo-400 border border-indigo-500/15"
106127
: "text-gray-500 hover:text-gray-300 hover:bg-white/[0.03]"
107128
}`}
129+
target={item.href.startsWith("http") ? "_blank" : undefined}
108130
title={collapsed ? item.label : undefined}
109131
>
110132
<FontAwesomeIcon

0 commit comments

Comments
 (0)