Skip to content

Fix: Sticky Navbar, AOSSIE Logo Visibility & Image Aspect Ratio Warnings#598

Open
reach2saksham wants to merge 2 commits intoAOSSIE-Org:mainfrom
reach2saksham:fix/navbar-sticky-logo-issue
Open

Fix: Sticky Navbar, AOSSIE Logo Visibility & Image Aspect Ratio Warnings#598
reach2saksham wants to merge 2 commits intoAOSSIE-Org:mainfrom
reach2saksham:fix/navbar-sticky-logo-issue

Conversation

@reach2saksham
Copy link

@reach2saksham reach2saksham commented Feb 26, 2026

Addressed Issues:

Fixes #597

Changes Made

  • Implemented proper sticky positioning for Navbar.
  • Ensured AOSSIE logo remains visible and functional as Home button.
  • Fixed image styling by adding appropriate w-auto / h-auto to maintain aspect ratios.

Screenshots/Recordings:

Before:
image
image

After:
image
image

Additional Notes:

  • Verified Navbar remains fixed during scroll.
  • Verified logo redirects correctly to homepage.
  • Confirmed no image dimension warnings in console.
  • Tested on desktop and mobile viewports.

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.

AI Usage Disclosure

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have tested the code locally and I am responsible for it.

Summary by CodeRabbit

  • Style
    • Header redesigned to a fixed position with a spacer to prevent content overlap.
    • Logo now visible on all pages with smoother hover interaction.
    • Header layout simplified for consistent navigation presentation on mobile and desktop.
    • Image sizing made more responsive across pages for improved layout stability.

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

Header changed from a scroll-reactive, multi-layer layout to a fixed top header with the AOSSIE logo always visible; several Image components received explicit sizing classes to preserve aspect ratios and remove console warnings.

Changes

Cohort / File(s) Summary
Header Restructuring
src/components/Header.jsx
Replaced scroll-driven header/avatar behavior with a fixed-position header and spacer; always render the Home/AOSSIE logo; simplified layout and nav container structure; removed useEffect, refs, and dynamic positioning logic; adjusted classNames and hover transform on logo.
Image Responsive Sizing
src/pages/apply.jsx, src/pages/index.jsx, src/pages/projects.jsx
Applied explicit sizing classes to Next/Image components: w-auto h-auto on timeline images, w-80 h-80 on home logo, and w-20 h-20 on project logos to maintain aspect ratios and eliminate image-size warnings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A header fixed, no more roam,
The logo hops back to every home,
Images stretch with graceful ease,
No warnings now, just gentle breeze,
I nibble bugs and code with glee.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes all three main changes: sticky navbar implementation, AOSSIE logo visibility fixes, and image aspect ratio warnings resolution.
Linked Issues check ✅ Passed All coding requirements from issue #597 are met: navbar is now fixed/sticky, AOSSIE logo renders consistently on all pages including homepage, and image aspect ratio warnings are addressed with w-auto/h-auto classes.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #597 requirements: header repositioning, logo visibility, and image sizing fixes address the stated objectives without extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/Header.jsx`:
- Line 152: In the Header component, the gradient class on the underline span
has a typo: replace the invalid "to-aus-[`#00843D`]/0" token in the span's
className with the correct Tailwind utility "to-[`#00843D`]/0" so the gradient end
color applies (inspect the span element inside Header.jsx where the underline is
rendered to update the className).

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f344f8 and 0d172ee.

📒 Files selected for processing (4)
  • src/components/Header.jsx
  • src/pages/apply.jsx
  • src/pages/index.jsx
  • src/pages/projects.jsx

{children}
{isActive && (
<span className="absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[#00843D]/0 via-[#00843D]/40 to-aus-[#00843D]/0 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
<span className="to-aus-[#00843D]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[#00843D]/0 via-[#00843D]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, check the file exists and view the area around line 152
wc -l src/components/Header.jsx

Repository: AOSSIE-Org/website

Length of output: 91


🏁 Script executed:

# View line 152 with context
sed -n '145,160p' src/components/Header.jsx

Repository: AOSSIE-Org/website

Length of output: 549


🏁 Script executed:

# Run the verification script to search for the typo pattern
rg -nP 'to-aus\[`#00843D`\]/0'

Repository: AOSSIE-Org/website

Length of output: 44


🏁 Script executed:

# Search for the to-aus- pattern (with dash) across the codebase
rg -n 'to-aus-'

Repository: AOSSIE-Org/website

Length of output: 294


🏁 Script executed:

# Also check if there are any other gradient utility patterns that might be similar issues
rg -n 'to-\[.*\]/' src/components/

Repository: AOSSIE-Org/website

Length of output: 44


Fix Tailwind gradient class typo in active nav underline.

Line 152 uses to-aus-[#00843D]/0, which is invalid Tailwind syntax and prevents the gradient end color from applying. The to- utility should be used without the aus- prefix.

🎯 Proposed fix
-          <span className="to-aus-[`#00843D`]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[`#00843D`]/0 via-[`#00843D`]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
+          <span className="to-[`#00843D`]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[`#00843D`]/0 via-[`#00843D`]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
📝 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
<span className="to-aus-[#00843D]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[#00843D]/0 via-[#00843D]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
<span className="to-[`#00843D`]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[`#00843D`]/0 via-[`#00843D`]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/Header.jsx` at line 152, In the Header component, the gradient
class on the underline span has a typo: replace the invalid "to-aus-[`#00843D`]/0"
token in the span's className with the correct Tailwind utility "to-[`#00843D`]/0"
so the gradient end color applies (inspect the span element inside Header.jsx
where the underline is rendered to update the className).

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/components/Header.jsx (1)

252-252: Prefer sticky positioning over fixed + hardcoded spacer.

Line 252 + Line 284 works today, but the fixed h-24 spacer is brittle if header height changes. Using sticky top-0 removes the need for magic spacing and better matches the stated sticky-navbar objective.

♻️ Suggested refactor
-      <header
-        className="fixed top-0 left-0 right-0 z-50 pt-6"
-      >
+      <header
+        className="sticky top-0 z-50 pt-6"
+      >
...
-      {/* 
-         Spacer: Because the header is now "fixed", it floats over the content. 
-         This empty div pushes your page content down so it isn't hidden behind the header. 
-         Adjust 'h-24' if you need more or less space.
-      */}
-      <div className="h-24" />

Also applies to: 279-284

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/Header.jsx` at line 252, The header is using fixed positioning
plus a hardcoded spacer; change the header element's className from "fixed top-0
left-0 right-0 z-50 pt-6" to "sticky top-0 left-0 right-0 z-50 pt-6" (in the
Header component in src/components/Header.jsx) and remove the companion
fixed-height spacer div that uses "h-24" so spacing is no longer hardcoded;
apply the same change to the other occurrence that currently mirrors this
pattern (the other element using "fixed ..."/the spacer with "h-24").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/Header.jsx`:
- Line 152: The Tailwind arbitrary color tokens in the className on the span
(the string containing to-[`#00843D`]/0, from-[`#00843D`]/0, via-[`#00843D`]/40)
use backticks which are invalid; update the className in the span element to
remove the backticks so the tokens become to-[`#00843D`]/0, from-[`#00843D`]/0,
via-[`#00843D`]/40 (leave the dark: tokens unchanged), ensuring the className
string still contains the same gradient classes and spacing utilities used by
that span.

---

Nitpick comments:
In `@src/components/Header.jsx`:
- Line 252: The header is using fixed positioning plus a hardcoded spacer;
change the header element's className from "fixed top-0 left-0 right-0 z-50
pt-6" to "sticky top-0 left-0 right-0 z-50 pt-6" (in the Header component in
src/components/Header.jsx) and remove the companion fixed-height spacer div that
uses "h-24" so spacing is no longer hardcoded; apply the same change to the
other occurrence that currently mirrors this pattern (the other element using
"fixed ..."/the spacer with "h-24").

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d172ee and 869558f.

📒 Files selected for processing (1)
  • src/components/Header.jsx

{children}
{isActive && (
<span className="absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[#00843D]/0 via-[#00843D]/40 to-aus-[#00843D]/0 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
<span className="to-[`#00843D`]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[`#00843D`]/0 via-[`#00843D`]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Tailwind CSS arbitrary color syntax backticks v3 to-[] from-[] via-[]

💡 Result:

In Tailwind CSS v3+, gradient stop utilities support arbitrary colors/values using square bracketsno backticks are part of Tailwind’s syntax:

<div class="bg-gradient-to-r from-[`#0ea5e9`] via-[rgb(34,197,94)] to-[hsl(330_81%_60%)]"></div>

If you’re using a CSS variable and Tailwind can’t infer the “type”, add a type hint (works for any arbitrary value, including gradient stops):

<div class="bg-gradient-to-r from-[color:var(--start)] via-[color:var(--mid)] to-[color:var(--end)]"></div>

Tailwind generates CSS by scanning your source as plain text, so avoid building these class names dynamically at runtime (that’s when you might see people wrap class strings in JS backticks only because they’re using template literals, not because Tailwind requires them). If you must generate them dynamically, you’ll need a safelist/other approach so the classes still exist at build time. [1] [2] [3]

Sources: Tailwind gradient color stops + “custom value” examples [1], Tailwind arbitrary value type-hint syntax ([color:...]) [2], Tailwind class detection behavior [3].


🏁 Script executed:

# First, let's locate and read the Header.jsx file
find . -name "Header.jsx" -type f

Repository: AOSSIE-Org/website

Length of output: 89


🏁 Script executed:

# Read Header.jsx to see line 152 and surrounding context
head -n 160 ./src/components/Header.jsx | tail -n 20

Repository: AOSSIE-Org/website

Length of output: 657


Remove backticks from Tailwind arbitrary color tokens on Line 152.

The to-[#00843D]/0, from-[#00843D]/0, and via-[#00843D]/40 syntax is invalid. Tailwind CSS arbitrary values use square brackets without backticks: to-[#00843D]/0, from-[#00843D]/0, via-[#00843D]/40.

🎯 Proposed fix
-          <span className="to-[`#00843D`]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[`#00843D`]/0 via-[`#00843D`]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
+          <span className="to-[`#00843D`]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[`#00843D`]/0 via-[`#00843D`]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
📝 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
<span className="to-[`#00843D`]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[`#00843D`]/0 via-[`#00843D`]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
<span className="to-[`#00843D`]/0 absolute inset-x-1 -bottom-px h-px bg-gradient-to-r from-[`#00843D`]/0 via-[`#00843D`]/40 dark:from-yellow-400/0 dark:via-yellow-400/40 dark:to-yellow-400/0" />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/Header.jsx` at line 152, The Tailwind arbitrary color tokens
in the className on the span (the string containing to-[`#00843D`]/0,
from-[`#00843D`]/0, via-[`#00843D`]/40) use backticks which are invalid; update
the className in the span element to remove the backticks so the tokens become
to-[`#00843D`]/0, from-[`#00843D`]/0, via-[`#00843D`]/40 (leave the dark: tokens
unchanged), ensuring the className string still contains the same gradient
classes and spacing utilities used by that span.

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]: Navbar not sticking to top & AOSSIE logo (Home button) disappearing from navbar

1 participant