Skip to content

Commit

Permalink
fix: bug content heading spacing (#1534)
Browse files Browse the repository at this point in the history
* fixed breadcrumb spacing and sidebar toggle spacing

* removed visual aid colours for meself

* removed unnecessary changes

---------

Co-authored-by: deauthe <[email protected]>
  • Loading branch information
deauthe and deauthe authored Dec 3, 2024
1 parent 96ea2d7 commit cd00189
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
22 changes: 11 additions & 11 deletions src/components/CourseView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ export const CourseView = ({
rest: string[];
course: any;
courseContent:
| {
folder: true;
value: ChildCourseContent[];
}
| {
folder: false;
value: ChildCourseContent;
}
| null;
| {
folder: true;
value: ChildCourseContent[];
}
| {
folder: false;
value: ChildCourseContent;
}
| null;
nextContent: any;
searchParams: QueryParams;
possiblePath: string;
Expand All @@ -39,8 +39,8 @@ export const CourseView = ({
: courseContent?.value.type;

return (
<div className="flex w-full flex-col gap-8 pb-16 pt-8 xl:pt-[9px] relative">
<div className="flex flex-col gap-4 xl:pt-2 sticky z-10 top-[120px] py-2 bg-background">
<div className="relative flex w-full flex-col gap-8 pb-16 pt-8 xl:pt-[9px]">
<div className="sticky top-[90px] z-10 flex flex-col gap-4 bg-background py-2 xl:pt-2">
<BreadCrumbComponent
course={course}
contentType={contentType}
Expand Down
15 changes: 10 additions & 5 deletions src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,14 @@ export function Sidebar({
);

return (
<div className="sticky top-[72px] z-20 bg-background py-2">

<div className="sticky top-[55px] z-20 bg-background py-2">


<Button
ref={buttonRef}
onClick={() => setSidebarOpen((s) => !s)}
className="w-fit gap-2"
className="w-fit gap-2 transition-all duration-200 active:scale-95"
>
{sidebarOpen ? <X className="size-5" /> : <Menu className="size-5" />}
<span>{sidebarOpen ? 'Hide Contents' : 'Show Contents'}</span>
Expand All @@ -206,9 +209,11 @@ 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 pt-20 z-10 flex items-center justify-between border-b border-primary/10 bg-neutral-50 p-5 dark:bg-neutral-900">
{''}
<h4 className="text-xl font-bold tracking-tighter text-primary lg:text-2xl">

<div className="sticky top-0 z-10 flex items-center justify-between border-b border-primary/10 bg-neutral-50 p-5 dark:bg-neutral-900">
{' '}
<h4 className="text-xl font-bold tracking-tighter text-primary lg:text-2xl">

Course Content
</h4>
<Button
Expand Down

0 comments on commit cd00189

Please sign in to comment.