-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Navbar links issue on the login page #944
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,15 +16,23 @@ | |
<!-- Navbar section --> | ||
<header> | ||
<a href="index.html"><h1>Resum Resume<span>.</span></h1></a> | ||
<nav> | ||
<ul id="nav-menu"> | ||
<li><a href="#home">Home</a></li> | ||
<li><a href="#about.html">About Us</a></li> | ||
<li><a href="#resume.html">Resume</a></li> | ||
<li><a href="#signup.html">Sign Up</a></li> | ||
<li><a href="login.html">Login</a></li> | ||
</ul> | ||
</nav> | ||
<nav> | ||
<ul id="nav-menu"> | ||
<li><a href="index.html">Home</a></li> | ||
<li><a href="about.html">About Us</a></li> | ||
<li><a href="resume.html">Resume</a></li> | ||
<li><a href="signup.html">Sign Up</a></li> | ||
<li id="login-link"><a href="login.html">Login</a></li> | ||
</ul> | ||
</nav> | ||
|
||
<script> | ||
// Hide the "Login" link if the user is on the login page | ||
if (window.location.pathname.endsWith("login.html")) { | ||
document.getElementById("login-link").style.display = "none"; | ||
} | ||
</script> | ||
|
||
Comment on lines
+19
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Several navigation inconsistencies need attention
🔗 Analysis chainVerify navbar functionality across pages. The changes look good, but let's verify the implementation across different scenarios. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify navbar implementation across pages
# Expected results: All pages should have consistent navbar structure and working links
# Check for any remaining hash-only href attributes
echo "Checking for remaining hash-only hrefs..."
rg 'href="#"' --type html
# Verify that all referenced HTML files exist
echo "Verifying referenced HTML files..."
for file in index.html about.html resume.html signup.html cv.html Faqs.html comment.html privacy-policy.html; do
if [ ! -f "$file" ]; then
echo "Warning: Referenced file $file does not exist"
fi
done
# Check for consistent login-link implementation across pages
echo "Checking login link implementation..."
rg 'id="login-link"' --type html
Length of output: 7730 |
||
<div class="nav-controls"> | ||
<a href="about.html" class="fas fa-info-circle"></a> | ||
<a href="login.html" id="loginIcon" class="fas fa-user"></a> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improve login link visibility handling.
The current implementation has several potential issues:
Consider this more robust implementation: