Skip to content

Commit dcbdb8d

Browse files
committed
feat(navbar): add shortcut anchor link to customization studio
1 parent 9b64cab commit dcbdb8d

3 files changed

Lines changed: 25 additions & 34 deletions

File tree

app/components/CustomizeCTA.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { motion } from 'framer-motion';
66
export function CustomizeCTA() {
77
return (
88
<motion.div
9+
id="customization-studio"
910
initial={{ opacity: 0, y: 20 }}
1011
animate={{ opacity: 1, y: 0 }}
1112
transition={{ duration: 0.5, ease: 'easeOut' }}

app/components/navbar.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ function GithubMark() {
1414
}
1515

1616
const NAV_LINKS = [
17+
{
18+
label: 'Customization Studio',
19+
href: '#customization-studio',
20+
isExternal: false,
21+
},
1722
{
1823
label: 'GitHub Repo',
1924
href: 'https://github.com/JhaSourav07/commitpulse',
25+
isExternal: true,
2026
},
2127
];
2228

@@ -131,11 +137,11 @@ export default function Navbar() {
131137
<a
132138
key={link.href}
133139
href={link.href}
134-
target="_blank"
135-
rel="noopener noreferrer"
140+
target={link.isExternal ? '_blank' : undefined}
141+
rel={link.isExternal ? 'noopener noreferrer' : undefined}
136142
className="inline-flex items-center gap-2 rounded-xl border border-white/15 bg-white/5 px-4 py-2 text-sm font-medium text-white/90 transition hover:border-white/45 hover:bg-white/10"
137143
>
138-
<GithubMark />
144+
{link.isExternal && <GithubMark />}
139145
{link.label}
140146
</a>
141147
))}
@@ -159,12 +165,12 @@ export default function Navbar() {
159165
<li key={link.href}>
160166
<a
161167
href={link.href}
162-
target="_blank"
163-
rel="noopener noreferrer"
168+
target={link.isExternal ? '_blank' : undefined}
169+
rel={link.isExternal ? 'noopener noreferrer' : undefined}
164170
onClick={() => setOpen(false)}
165171
className="inline-flex w-full items-center gap-2 rounded-xl border border-white/15 bg-white/5 px-4 py-2 text-sm font-medium text-white/90 transition hover:border-white/45 hover:bg-white/10"
166172
>
167-
<GithubMark />
173+
{link.isExternal && <GithubMark />}
168174
{link.label}
169175
</a>
170176
</li>

package-lock.json

Lines changed: 12 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)