Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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 # links in the project.

The Login and # 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 # 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/# 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 # 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/# 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 # 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 # 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.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant