Skip to content

Commit 2401377

Browse files
authored
feat(navbar): add direct anchor link to customization studio (JhaSourav07#945)
## Description Fixes JhaSourav07#888 This PR introduces a "Customization Studio" shortcut link directly to the top navigation bar and responsive mobile drawer menu. This ensures that users don't have to scroll all the way to the bottom of the landing page to discover or access the interactive fine-tuning tool, improving overall feature engagement and user experience. Key changes: - Centralized the link configuration within the `NAV_LINKS` array inside `navbar.tsx`. - Updated desktop and mobile mapping loops to handle internal section smooth-scrolling links vs external target links safely. - Added matching `id="customization-studio"` to the root `<motion.div>` element of `CustomizeCTA.tsx` to serve as a precise scrolling anchor point. ## Pillar - [ ] 🎨 Pillar 1 — New Theme Design - [ ] 📐 Pillar 2 — Geometric SVG Improvement - [ ] 🕐 Pillar 3 — Timezone Logic Optimization - [x] 🛠️ Other (Bug fix, refactoring, docs) ## Visual Preview - Added a new functional text link in the header row. - Clicking smoothly scrolls the layout down to the target block container. <img width="1280" height="832" alt="Screenshot 2026-05-28 at 5 47 26 PM" src="https://github.com/user-attachments/assets/522c5774-689e-4aab-8923-22bbccbbd318" /> ## Checklist before requesting a review: - [x] I have read the `CONTRIBUTING.md` file. - [x] I have tested these changes locally (`localhost:3000/api/streak?user=YOUR_USERNAME`). - [x] I have run `npm run format` and `npm run lint` locally and resolved all errors (CI will fail otherwise). - [x] My commits follow the Conventional Commits format (e.g., `feat(themes): ...`, `fix(calculate): ...`). - [ ] I have updated `README.md` if I added a new theme or URL parameter. - [x] I have started the repo. (This means a lot to us ❤️) - [x] I have made sure that i have only one commit to merge in this PR. - [x] The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts) - [x] (Recommended) I joined the CommitPulse Discord server for faster collaboration, mentorship, and PR support.
2 parents 0315e85 + dcbdb8d commit 2401377

2 files changed

Lines changed: 13 additions & 6 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>

0 commit comments

Comments
 (0)