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

[Fix]: Fixed Navbar dark mode navigation #1059

Merged
merged 13 commits into from
Dec 21, 2024
4 changes: 2 additions & 2 deletions components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ const MainNavLink = ({
href={uri}
className={classnames(
className,
'font-semibold p-2 md:p-4 dark:text-slate-300',
'font-semibold p-2 md:p-4',
// `${
// router.asPath === uri
// ? 'text-primary hover:text-primary'
// : 'text-slate-600 hover:text-primary'
// }`,
`${extractPathWithoutFragment(router.asPath) === uri ? 'text-primary hover:text-primary' : 'text-slate-600 hover:text-primary'}`,
`${extractPathWithoutFragment(router.asPath) === uri ? ' dark:text-[#0064FF] text-primary dark:hover:text-[#0064FF] text hover:text-primary' : 'text-slate-600 hover:text-primary dark:hover:text-[#0064FF] '}`,
)}
>
{label}
Expand Down
2 changes: 1 addition & 1 deletion package.json
DhairyaMajmudar marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.4.0",
"husky": "^9.1.5",
"husky": "^9.1.6",
"nyc": "^17.0.0",
"postcss": "^8.4.41",
"prettier": "3.3.3",
Expand Down
4 changes: 4 additions & 0 deletions styles/globals.css
Copy link
Member

Choose a reason for hiding this comment

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

It seems like this class is no longer used, if it is so you can remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dhairya, I changed the grey color to white in response to Benjamin's request.

Looks great, Thanks!!

However I do prefer the white color for the navbar fonts instead that light grey. Can we change that?

I also added a new CSS property to show an underline on the current page, so some additional CSS properties need to be added. 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This class is used when there are 6 community meetings, and events are available.

Without class :
Screenshot 2024-10-23 at 5 00 04 PM

with class :
Screenshot 2024-10-23 at 5 02 02 PM

Copy link
Member

Choose a reason for hiding this comment

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

Awsm! With that then keep it don't remove

Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ border-radius: 4px; */
background-color: #fddf4784;
}

.bg-index-5 {
background-color: #773cff84;
}

@layer base {
body {
@apply dark:bg-slate-800 bg-white;
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
DhairyaMajmudar marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6318,12 +6318,12 @@ __metadata:
languageName: node
linkType: hard

"husky@npm:^9.1.5":
version: 9.1.5
resolution: "husky@npm:9.1.5"
"husky@npm:^9.1.6":
version: 9.1.6
resolution: "husky@npm:9.1.6"
bin:
husky: bin.js
checksum: 10c0/f42efb95a026303eb880898760f802d88409780dd72f17781d2dfc302177d4f80b641cf1f1694f53f6d97c536c7397684133d8c8fe4a4426f7460186a7d1c6b8
checksum: 10c0/705673db4a247c1febd9c5df5f6a3519106cf0335845027bb50a15fba9b1f542cb2610932ede96fd08008f6d9f49db0f15560509861808b0031cdc0e7c798bac
languageName: node
linkType: hard

Expand Down Expand Up @@ -7163,7 +7163,7 @@ __metadata:
file-saver: "npm:^2.0.5"
fuse.js: "npm:^7.0.0"
gray-matter: "npm:^4.0.3"
husky: "npm:^9.1.5"
husky: "npm:^9.1.6"
js-yaml: "npm:^4.1.0"
jsonpath: "npm:^1.1.1"
jszip: "npm:^3.10.1"
Expand Down
Loading