Skip to content
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

Remove redundant Login and Sign Up links from home.html #195

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Omkar1279
Copy link

This PR addresses the redundancy of the Login and Sign Up links in the project.

The Login and Sign Up links are already included in the base.html file for unauthenticated users, specifically in the navigation bar. These links were unintentionally duplicated in home.html under the {% if user.is_authenticated %} block for unauthenticated users. This redundancy led to unnecessary repetition in the UI.

Changes:

  • Removed the duplicate Login and Sign Up links from home.html, as they were already being handled by base.html.
  • This update improves the overall UI by preventing the repetition of these links and ensures that the Login/Sign Up functionality is only shown once in the global navigation.

Reason for Change:

  • The base.html template already contains the necessary logic to display Login and Sign Up buttons for unauthenticated users. Therefore, having these links again in home.html was redundant and unnecessary.

Result:

  • Cleaner and more maintainable code.
  • Improved UI with only one set of Login/Sign Up links visible to unauthenticated users.

Before:
image

After:
image

Redundant Login/Sign-Up Links: In the base.html, the navigation bar already contains links for Login and Sign Up for unauthenticated users, and these links are being repeated in the home.html file under the {% if user.is_authenticated %} block for unauthenticated users as well. This redundancy can lead to unnecessary repetition in the UI.

Specifically:
In the base.html file, there's a Login and Sign Up button for users who are not authenticated.
In home.html, similar logic is implemented, but those links are not needed because the base template already handles this.
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.

1 participant