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

Made a navbar #37

Closed

Conversation

RashiJyotishi
Copy link

@RashiJyotishi RashiJyotishi commented Jun 1, 2024

Description

For the nav bar, I have used "sticky" in Tailwind CSS for it to always be on the top of the page. On the left side, there is a logo, and on the right side, there are nav links. For screens 1024px and above, the nav links look different, while for 768px to 1024px, they are underlined, and a white box appears on hovering over them. For less than 768px screen size, a hamburger menu appears, and the nav links toggle from the right side of the page.

fixes: #19

Motivation and Context

The motivation behind this was to provide access to different tabs in an organized manner. The different navbar styles according to different screen sizes aim to offer a better user experience and responsiveness. This prevents the logo and nav links from overlapping as the screen size decreases.

How to Test

  1. Hover over the nav links, setting different screen sizes.
  2. Click on the logo and nav links.
  3. Type lorem300 and click on tab, then check the navbar for different screen sizes.
  4. There is a video below, you can see that too.

Related Issues

You can customize the background color, the logo, or any other aspect. My aim was to provide better navbar functionalities.

Checklist

  • I have tested these changes locally.
  • I have reviewed the code and ensured it follows the project's coding guidelines.
  • I have updated the documentation, if necessary.
  • I have assigned reviewers to this pull request.

Screenshots (if applicable)

Screenshot from 2024-06-01 17-18-56
Screenshot from 2024-06-01 17-19-16
Screenshot from 2024-06-01 17-19-30
Screenshot from 2024-06-01 17-11-06
Screencast from 01-06-24 05:53:40 PM IST.webm

@RashiJyotishi
Copy link
Author

fixes: #19

@kuv2707
Copy link
Collaborator

kuv2707 commented Jun 1, 2024

fixes: #19

Add this in the PR description.

@@ -70,3 +72,61 @@ button:focus-visible {
background-color: #f9f9f9;
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since these rules are only for the Navbar, please move them to "Navbar.module.css". You can read about how to use css modules.

Copy link
Collaborator

@kuv2707 kuv2707 left a comment

Choose a reason for hiding this comment

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

At a cursory glance, this looks great!
@shivansh-bhatnagar18 @Varun-Kolanu @ApoorvDubey23 Please have a detailed look.

{ title: "Play Options", link: "/play" },
{ title: "Game", link: "/game" },
{ title: "About", link: "/about" },
]; // using the default ons here just for example... you can use your links as per need
Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment seems unnecessary


function Navbar() {
return <div className="flex flex-row">Navbar</div>;
interface NavbarProps {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good job on the props!

@kuv2707
Copy link
Collaborator

kuv2707 commented Jun 1, 2024

Please squash the commits into one and follow the commit message format as specified in the docs.

Also make sure the frontend checks pass. Run npm run fix-format to format the files.

@kuv2707 kuv2707 added area: Frontend (structure) Issues related to the react frontend area: Frontend (design) labels Jun 1, 2024
@RashiJyotishi RashiJyotishi force-pushed the RJ-navbar branch 6 times, most recently from 1d23196 to b12b0c4 Compare June 2, 2024 06:05
@shivansh-bhatnagar18
Copy link
Owner

Thanks @RashiJyotishi for this amazing PR but I think that there is a better design to the navbar given to us in the PR #40. So I am closing this issue for now but kuddos to ur contribution and hard work. 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Frontend (design) area: Frontend (structure) Issues related to the react frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Design a Navbar component
3 participants