Skip to content

refactor: refine hero UI, header, and light mode visibility#21

Merged
RamuuXfree merged 3 commits into
mainfrom
feature/home-header-polish
Jun 27, 2026
Merged

refactor: refine hero UI, header, and light mode visibility#21
RamuuXfree merged 3 commits into
mainfrom
feature/home-header-polish

Conversation

@nitinmohan18

@nitinmohan18 nitinmohan18 commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

Refined the Hero section and Header to deliver a more polished, premium, and responsive user experience. Improved visual hierarchy, typography, spacing, CTA consistency, and light mode visibility while preserving the existing design system.


Related Issue

Closes #18


Type of Change

  • Feature
  • Bug Fix
  • Documentation
  • Refactor
  • Performance Improvement
  • CI / Build
  • Other

What Changed?

  • Refined the Header with improved spacing, alignment, and navigation polish.
  • Enhanced the Hero section's typography, spacing, and overall visual hierarchy.
  • Updated the hero badge and improved CTA button consistency.
  • Refined the AI demo card with better spacing and content balance.
  • Improved the statistics section for better readability and presentation.
  • Fixed visibility and contrast issues in Light Mode.
  • Polished overall UI/UX while maintaining the existing branding and design language.
  • Preserved full responsiveness across desktop, tablet, and mobile devices.

Screenshots (UI Changes Only)

Attached updated screenshots of the Header and Hero section.


Testing

  • Tested locally in development.
  • Verified responsiveness on mobile, tablet, laptop, and desktop.
  • Confirmed Light Mode and Dark Mode visibility.
  • Verified navigation, CTA buttons, and Hero interactions.
  • Ensured no existing functionality was affected.

Checklist

  • My branch is up to date with the latest main.
  • My code follows the project's coding standards.
  • I have formatted the modified files.
  • npm run format:check passes.
  • npm run lint passes.
  • npm run typecheck passes.
  • npm run build passes.
  • I have updated documentation if required.
  • I have tested my changes locally.
  • This Pull Request focuses on a single feature or improvement.

Additional Notes

This PR focuses on refining the Hero and Header experience by improving visual consistency, responsiveness, accessibility, and overall UI quality without introducing functional changes.

Summary by CodeRabbit

  • New Features

    • Added a more polished dark-mode experience across the app.
    • Introduced animated hero statistics and a shimmering badge effect for the landing page.
    • Improved navbar behavior so the current section stays highlighted while scrolling.
  • Bug Fixes

    • Navigation now more reliably handles hash links, smooth scrolling, and mobile menu closing.
    • Landing page cards, search, and chat-style panels received visual updates for better clarity and consistency.

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyper-learning-tech Ready Ready Preview, Comment Jun 27, 2026 8:12pm

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@RamuuXfree, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 39 minutes and 14 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6d8498e0-0573-4300-bfac-489d41c239ed

📥 Commits

Reviewing files that changed from the base of the PR and between 1721208 and 50444dc.

📒 Files selected for processing (3)
  • app/globals.css
  • components/navbar.tsx
  • features/landing/hero.tsx
📝 Walkthrough

Walkthrough

Adds scroll-aware active-section highlighting to the navbar with a framer-motion indicator, introduces an animated Counter component in the hero stats section, adds a badge-shimmer CSS animation with dark-mode support, and re-themes the hero mockup card, university cards, and search bar using updated Tailwind color tokens.

Changes

Landing Page UI Refresh

Layer / File(s) Summary
Dark variant and badge-shimmer CSS
app/globals.css
Adds @custom-variant dark and badge-shimmer keyframes/class with a dark-mode gradient override.
Navbar active-section scroll tracking and render
components/navbar.tsx
Adds usePathname, activeSection state, isClickScrolling ref, reworked scroll handler scanning DOM elements at 120px threshold, updated handleNavClick with 800ms click-scroll guard, and full desktop/mobile render overhaul including a motion.div active indicator.
Hero Counter helper and UI restyle
features/landing/hero.tsx
Introduces Counter using useInView+animate; replaces static stats with three animated counters; restyles badge, headings, CTA buttons, mockup card, chat bubbles, ping-dot status, and PYQ panel.
Universities search bar and card re-theming
features/landing/universities.tsx
Swaps search bar wrapper/icon color tokens, updates university card container to bg-card with dark-mode gradient and absolute overlay border, and re-themes branch chips to muted/text-muted-foreground.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • imuniqueshiv

🐇 Hop hop, the sections glow,
A shimmer badge puts on a show,
The navbar tracks where you've been,
Counters spin on every screen,
Dark mode cards in muted hue —
The landing page is fresh and new! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main UI refactor across the hero, header, and light-mode polish changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/home-header-polish

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/navbar.tsx`:
- Around line 102-115: The fallback navigation in navbar.tsx drops the hash by
pushing only “/”, which breaks section links from other pages. Update the
navigation logic in the relevant click handler so it preserves the full href
(including the “#section”) or only intercepts same-page hash clicks, and keep
the existing scroll behavior tied to the targetId lookup and
isClickScrolling/current activeSection updates.
- Around line 274-287: The mobile theme toggle button in Navbar is icon-only and
lacks an accessible name, so add an aria-label to the button in the theme toggle
block so assistive tech can announce it properly. Update the button used with
setTheme and setIsOpen(false) to expose a clear label like “Toggle theme” while
keeping the existing icon rendering and click behavior unchanged.

In `@features/landing/hero.tsx`:
- Around line 135-138: The anchor in hero.tsx is triggering both the onClick
handler and the default href fragment jump, which can cause a second scroll.
Update the link around scrollToUniversities to prevent the default navigation
behavior in the click handler while keeping the existing smooth scroll logic, so
the href does not fire after scrollIntoView.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dc4d5d38-5b58-48fb-a8b4-33d5d1df1edf

📥 Commits

Reviewing files that changed from the base of the PR and between 93b2c93 and 1721208.

📒 Files selected for processing (4)
  • app/globals.css
  • components/navbar.tsx
  • features/landing/hero.tsx
  • features/landing/universities.tsx

Comment thread components/navbar.tsx
Comment on lines 102 to 115
} else {
// If element not found, navigate to home and then scroll
router.push("/");
setTimeout(() => {
const el = document.getElementById(targetId);
if (el) {
isClickScrolling.current = true;
setActiveSection(href);
el.scrollIntoView({ behavior: "smooth", block: "start" });
setTimeout(() => {
isClickScrolling.current = false;
}, 800);
}
}, 100);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve the hash when navigating from other pages.

This fallback pushes / and then hopes the target exists 100ms later, so section links from /about or /subjects can land on the home page without ever scrolling. Push href itself (or only intercept same-page hashes) so the #section survives navigation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/navbar.tsx` around lines 102 - 115, The fallback navigation in
navbar.tsx drops the hash by pushing only “/”, which breaks section links from
other pages. Update the navigation logic in the relevant click handler so it
preserves the full href (including the “#section”) or only intercepts same-page
hash clicks, and keep the existing scroll behavior tied to the targetId lookup
and isClickScrolling/current activeSection updates.

Comment thread components/navbar.tsx
Comment on lines 274 to 287
<button
onClick={() => {
setTheme(theme === "dark" ? "light" : "dark");
setIsOpen(false);
}}
className="flex items-center justify-center rounded-xl border border-white/20 px-4 py-3 text-[#F4F5F7] transition-all duration-200 hover:bg-white/10"
className="flex w-full items-center justify-center rounded-xl border border-border px-4 py-3 text-foreground/90 transition-all duration-200 hover:bg-black/5 hover:text-foreground dark:border-white/15 dark:text-white/90 dark:hover:bg-white/5 dark:hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1D4ED8]/50 dark:focus-visible:ring-white/50"
>
{mounted &&
(theme === "dark" ? (
<Sun className="h-5 w-5" />
<Sun className="h-[18px] w-[18px]" />
) : (
<Moon className="h-5 w-5" />
<Moon className="h-[18px] w-[18px]" />
))}
</button>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add an accessible name to the mobile theme toggle.

Unlike the desktop toggle, this icon-only button has no aria-label, so assistive tech will announce it as an unlabeled button.

Suggested fix
                 <button
                   onClick={() => {
                     setTheme(theme === "dark" ? "light" : "dark");
                     setIsOpen(false);
                   }}
+                  aria-label="Toggle theme"
                   className="flex w-full items-center justify-center rounded-xl border border-border px-4 py-3 text-foreground/90 transition-all duration-200 hover:bg-black/5 hover:text-foreground dark:border-white/15 dark:text-white/90 dark:hover:bg-white/5 dark:hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[`#1D4ED8`]/50 dark:focus-visible:ring-white/50"
                 >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<button
onClick={() => {
setTheme(theme === "dark" ? "light" : "dark");
setIsOpen(false);
}}
className="flex items-center justify-center rounded-xl border border-white/20 px-4 py-3 text-[#F4F5F7] transition-all duration-200 hover:bg-white/10"
className="flex w-full items-center justify-center rounded-xl border border-border px-4 py-3 text-foreground/90 transition-all duration-200 hover:bg-black/5 hover:text-foreground dark:border-white/15 dark:text-white/90 dark:hover:bg-white/5 dark:hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1D4ED8]/50 dark:focus-visible:ring-white/50"
>
{mounted &&
(theme === "dark" ? (
<Sun className="h-5 w-5" />
<Sun className="h-[18px] w-[18px]" />
) : (
<Moon className="h-5 w-5" />
<Moon className="h-[18px] w-[18px]" />
))}
</button>
<button
onClick={() => {
setTheme(theme === "dark" ? "light" : "dark");
setIsOpen(false);
}}
aria-label="Toggle theme"
className="flex w-full items-center justify-center rounded-xl border border-border px-4 py-3 text-foreground/90 transition-all duration-200 hover:bg-black/5 hover:text-foreground dark:border-white/15 dark:text-white/90 dark:hover:bg-white/5 dark:hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[`#1D4ED8`]/50 dark:focus-visible:ring-white/50"
>
{mounted &&
(theme === "dark" ? (
<Sun className="h-[18px] w-[18px]" />
) : (
<Moon className="h-[18px] w-[18px]" />
))}
</button>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/navbar.tsx` around lines 274 - 287, The mobile theme toggle button
in Navbar is icon-only and lacks an accessible name, so add an aria-label to the
button in the theme toggle block so assistive tech can announce it properly.
Update the button used with setTheme and setIsOpen(false) to expose a clear
label like “Toggle theme” while keeping the existing icon rendering and click
behavior unchanged.

Comment thread features/landing/hero.tsx
Comment on lines 135 to +138
<a
href="#Universities"
onClick={scrollToUniversities}
className="group relative inline-flex items-center justify-center gap-2 overflow-hidden rounded-xl bg-[#1D4ED8] px-8 py-4 font-semibold text-white shadow-lg shadow-blue-500/25 transition-all duration-300 hover:bg-[#1E40AF] hover:shadow-blue-500/40 hover:-translate-y-0.5"
className="group relative inline-flex items-center justify-center gap-2 overflow-hidden rounded-xl bg-[#1D4ED8] px-8 py-3.5 font-semibold text-white shadow-lg shadow-blue-500/25 transition-all duration-300 hover:bg-[#1E40AF] hover:shadow-blue-500/40 hover:-translate-y-0.5 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1D4ED8] focus-visible:ring-offset-2 focus-visible:ring-offset-background"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Prevent the anchor's default jump here.

scrollToUniversities already calls scrollIntoView, but this <a> still follows href="#Universities" afterward. That can cause a second jump and interrupt the smooth scroll in some browsers.

Suggested fix
               <a
                 href="`#Universities`"
-                onClick={scrollToUniversities}
+                onClick={(e) => {
+                  e.preventDefault();
+                  scrollToUniversities();
+                }}
                 className="group relative inline-flex items-center justify-center gap-2 overflow-hidden rounded-xl bg-[`#1D4ED8`] px-8 py-3.5 font-semibold text-white shadow-lg shadow-blue-500/25 transition-all duration-300 hover:bg-[`#1E40AF`] hover:shadow-blue-500/40 hover:-translate-y-0.5 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[`#1D4ED8`] focus-visible:ring-offset-2 focus-visible:ring-offset-background"
               >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<a
href="#Universities"
onClick={scrollToUniversities}
className="group relative inline-flex items-center justify-center gap-2 overflow-hidden rounded-xl bg-[#1D4ED8] px-8 py-4 font-semibold text-white shadow-lg shadow-blue-500/25 transition-all duration-300 hover:bg-[#1E40AF] hover:shadow-blue-500/40 hover:-translate-y-0.5"
className="group relative inline-flex items-center justify-center gap-2 overflow-hidden rounded-xl bg-[#1D4ED8] px-8 py-3.5 font-semibold text-white shadow-lg shadow-blue-500/25 transition-all duration-300 hover:bg-[#1E40AF] hover:shadow-blue-500/40 hover:-translate-y-0.5 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1D4ED8] focus-visible:ring-offset-2 focus-visible:ring-offset-background"
<a
href="`#Universities`"
onClick={(e) => {
e.preventDefault();
scrollToUniversities();
}}
className="group relative inline-flex items-center justify-center gap-2 overflow-hidden rounded-xl bg-[`#1D4ED8`] px-8 py-3.5 font-semibold text-white shadow-lg shadow-blue-500/25 transition-all duration-300 hover:bg-[`#1E40AF`] hover:shadow-blue-500/40 hover:-translate-y-0.5 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[`#1D4ED8`] focus-visible:ring-offset-2 focus-visible:ring-offset-background"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@features/landing/hero.tsx` around lines 135 - 138, The anchor in hero.tsx is
triggering both the onClick handler and the default href fragment jump, which
can cause a second scroll. Update the link around scrollToUniversities to
prevent the default navigation behavior in the click handler while keeping the
existing smooth scroll logic, so the href does not fire after scrollIntoView.

@RamuuXfree RamuuXfree merged commit a2f09be into main Jun 27, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @nitinmohan18!

Thank you for contributing to HyperLearningTech.

Your pull request has been successfully merged into main.

📦 Merge Summary

🚀 Keep Contributing

  • Follow the CONTRIBUTING.md guidelines.
  • Keep each Pull Request focused on a single feature or fix.
  • Run formatting, linting, type checking, and a production build before opening a PR.

Thank you for helping make HyperLearningTech better.

Happy Coding! 🚀

@RamuuXfree RamuuXfree left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nitinmohan18,

Thanks for your contribution! Overall, the Hero section improvements, spacing, typography, and other UI refinements look good.

I have one request for future PRs:

  • Please keep each PR focused on one specific change or feature. It makes reviewing, testing, and reverting changes much easier if needed.

  • Please revert the Header background to its original color:

    background-color: #00008B;
    /* Tailwind */
    sticky top-0 z-50 transition-all duration-300 bg-[#00008B] border-transparent

    During testing, I noticed the updated Header color doesn't stay visually consistent across Light and Dark modes, whereas the original color works well in both themes.

  • Similarly, please restore the original Footer color. Since the Footer change is unrelated to the Hero/Header refinement, it would be better to submit it in a separate PR if you'd like to redesign it later.

The rest of your improvements look good. Thanks again for the effort!

@imuniqueshiv Could you please review this approach as well? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Remove Universities Page Grid Background Pattern and Align with Global Design System

2 participants