8000 Modify external links in sidebar · anshvert/TheAlgorithms-Website@ed21265 · GitHub
[go: up one dir, main page]

Skip to content

Commit ed21265

Browse files
committed
Modify external links in sidebar
1 parent 05873d3 commit ed21265

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

components/navbar/index.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,15 @@ export default function Navbar({
151151
<SearchBar query={query} setQuery={setQuery} small />
152152
</ListItem>
153153
{menu.map((item) => (
154-
<NextLink key={item.name} href={item.href}>
155-
<MenuItem>{item.name}</MenuItem>
156-
</NextLink>
154+
<MenuItem key={item.name}>
155+
<Button href={item.href} target={item.target} className={classes.sidebarLink}>
156+
{item.name}
157+
</Button>
158+
</MenuItem>
157159
))}
158-
<NextLink href="https://github.com/TheAlgorithms">
159-
<MenuItem>GitHub</MenuItem>
160-
</NextLink>
160+
<MenuItem>
161+
<a className={classes.unstyledLink} href="https://github.com/TheAlgorithms" target="_blank">GitHub</a>
162+
</MenuItem>
161163
<MenuItem onClick={() => switchTheme()}>
162164
{darkTheme ? t("lightModeNavbar") : t("darkModeNavbar")}
163165
</MenuItem>

components/navbar/style.module.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,13 @@
6464
width: 1em;
6565
height: 1em;
6666
}
67+
68+
.sidebarLink {
69+
padding: 0px !important;
70+
min-width: auto !important;
71+
}
72+
73+
.unstyledLink {
74+
color: #fff;
75+
text-decoration: none;
76+
}

0 commit comments

Comments
 (0)
0