Skip to content

Commit

Permalink
chore: some minor fixes regarding UI and accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ovflowd committed Feb 28, 2024
1 parent 2f3f8ae commit 842ed68
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions components/Common/CrossLink/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
border-neutral-300
bg-white
p-3
no-underline
dark:border-neutral-900
dark:bg-neutral-950;

Expand Down
9 changes: 3 additions & 6 deletions components/Common/Search/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
@apply relative
w-52
rounded-md
bg-neutral-100
bg-neutral-200
py-2
pl-9
pr-4
text-left
text-sm
text-neutral-700
transition-colors
duration-200
ease-in-out
hover:bg-neutral-200
hover:text-neutral-800
hover:bg-neutral-300
hover:text-neutral-900
dark:bg-neutral-900
dark:text-neutral-600
dark:hover:bg-neutral-800
Expand Down
2 changes: 2 additions & 0 deletions components/Common/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export const SearchButton: FC = () => {
className={styles.searchButton}
>
<MagnifyingGlassIcon className={styles.magnifyingGlassIcon} />

{t('components.search.searchBox.placeholder')}
</button>

{isOpen ? <WithSearchBox onClose={closeSearchBox} /> : null}
</>
);
Expand Down
2 changes: 2 additions & 0 deletions hooks/react-client/useBottomScrollListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const useBottomScrollListener = (

useEffect(() => {
window.addEventListener('scroll', handleScroll, { passive: true });

return () => window.removeEventListener('scroll', handleScroll);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

return bottomReached;
Expand Down
2 changes: 1 addition & 1 deletion hooks/react-client/useKeyboardCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const useKeyboardCommands = (fn: KeyboardCommandCallback) => {
});

return () => document.removeEventListener('keydown', () => {});
}, []);
}, [fn]);
};

export default useKeyboardCommands;
2 changes: 1 addition & 1 deletion i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
"platform": "Platform"
},
"codeBox": {
"communityWarning": "Package Managers and their installation scripts are not maintained by the Node.js project.s"
"communityWarning": "Package managers and their installation scripts are not maintained by the Node.js project."
}
}
},
Expand Down
6 changes: 5 additions & 1 deletion pages/en/about/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ layout: about.hbs
---

<div className="my-4 flex items-center justify-center">
<img src="/static/images/node-mascot.svg" className="w-[100px]" />
<img
alt="Node.js mascot"
src="/static/images/node-mascot.svg"
className="w-[100px]"
/>
</div>

---
Expand Down

0 comments on commit 842ed68

Please sign in to comment.