Skip to content

Commit

Permalink
Merge pull request tangly1024#1499 from real-jacket/heo-style-fix
Browse files Browse the repository at this point in the history
style(heo): fix heo style
  • Loading branch information
tangly1024 authored Sep 5, 2023
2 parents 4a53aa2 + 64dbf4d commit 141c3cd
Show file tree
Hide file tree
Showing 4 changed files with 627 additions and 393 deletions.
4 changes: 3 additions & 1 deletion themes/heo/components/CategoryBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default function CategoryBar(props) {
setScrollRight(!scrollRight)
}
}

return <div id='category-bar' className={`flex flex-nowrap justify-between items-center h-12 mb-4 space-x-2 w-full lg:bg-white dark:lg:bg-[#1e1e1e]
${border ? 'lg:border lg:hover:border dark:lg:border-gray-800 hover:border-indigo-600 dark:hover:border-yellow-600 ' : ''} py-2 lg:px-2 rounded-xl transition-colors duration-200`}>

Expand All @@ -54,7 +55,8 @@ export default function CategoryBar(props) {
*/
const MenuItem = ({ href, name }) => {
const router = useRouter()
const selected = router.pathname === href
const { category } = router.query
const selected = category === name
return <div className={`whitespace-nowrap mr-2 duration-200 transition-all font-bold px-2 py-0.5 rounded-md text-gray-900 dark:text-white hover:text-white hover:bg-indigo-600 dark:hover:bg-yellow-600 ${selected ? 'text-white bg-indigo-600 dark:bg-yellow-600' : ''}`}>
<Link href={href}>{name}</Link>
</div>
Expand Down
Loading

0 comments on commit 141c3cd

Please sign in to comment.