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

Adds active menu highlight on sidebar && fixes few minor UI bugs #1170

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run format:fix
npm run lint:fix

Expand Down
2 changes: 1 addition & 1 deletion src/components/Appbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const Appbar = () => {
className="fixed left-0 top-0 z-[999] hidden h-full flex-col border-r border-primary/10 bg-background dark:bg-background 2xl:flex"
>
<div className="flex h-full flex-col gap-4">
<div className="flex w-full items-center border-b border-primary/10 p-4">
<div className="flex w-full items-center justify-center border-b border-primary/10 p-4">
{!isCollapsed && (
<>
<h3 className="text-xl font-bold tracking-tighter text-primary lg:text-2xl">
Expand Down
5 changes: 1 addition & 4 deletions src/components/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ export const CourseCard = ({
onClick: () => void;
}) => {
const router = useRouter();
const imageUrl =
course.imageUrl
? course.imageUrl
: 'banner_placeholder.png';
const imageUrl = course.imageUrl ? course.imageUrl : 'banner_placeholder.png';
return (
<div
className={`flex w-full cursor-pointer flex-col rounded-2xl bg-primary/5 transition-all duration-300 hover:-translate-y-2 hover:border-primary/20`}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export function Sidebar({
variants={sidebarVariants}
className="fixed right-0 top-0 z-[99999] flex h-screen w-full flex-col gap-4 overflow-y-auto rounded-r-lg border-l border-primary/10 bg-neutral-50 dark:bg-neutral-900 md:max-w-[30vw]"
>
<div className="sticky top-0 z-10 flex items-center justify-between border-b border-primary/10 p-5">
<div className="sticky top-0 z-10 flex items-center justify-between border-b border-primary/10 bg-neutral-900 p-5">
<h4 className="text-xl font-bold tracking-tighter text-primary lg:text-2xl">
Course Content
</h4>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/sidebar-items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const SidebarItems = ({
return (
<>
{items.map((item) => {
const isActive = pathname === item.href;
const isActive = pathname.startsWith(item.href);
return (
<TooltipProvider key={item.id}>
<Tooltip>
Expand Down
Loading