Skip to content

Commit

Permalink
fixing collapse courses background
Browse files Browse the repository at this point in the history
  • Loading branch information
TeaByte committed Jan 21, 2024
1 parent b828494 commit bbeb6f3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
18 changes: 15 additions & 3 deletions components/Collapse.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ProgressCheck from "@/islands/ProgressCheck.tsx";
import { Course } from "../utils/types.ts";
import CourseCard from "./CourseCard.tsx";

export default function Collapse(
{ title, courses }: { title: string; courses: Course[]; },
{ title, courses }: { title: string; courses: Course[] },
) {
return (
<div class="collapse collapse-arrow bg-base-300">
Expand All @@ -12,7 +12,19 @@ export default function Collapse(
</div>
<div class="collapse-content flex flex-col">
{courses.map((course) => (
<CourseCard key={course.slug} course={course} />
<div key={course.slug}>
<a
title={course.title}
href={`/${course.slug}`}
class="gray-200 hover:opacity-75 list-none"
style={{ order: course.order }}
>
<h3 class="text-gray-500 font-bold flex gap-1 items-centerrounded-btn mt-2 flex gap-1 items-center">
<ProgressCheck slug={course.slug} />
{course.title}
</h3>
</a>
</div>
))}
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion components/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import ProgressCheck from "@/islands/ProgressCheck.tsx";
import { Course, CourseGroup } from "../utils/types.ts";

import Collapse from "./Collapse.tsx";
import CourseCard from "./CourseCard.tsx";

import IconLayoutSidebarLeftCollapse from "https://deno.land/x/[email protected]/tsx/layout-sidebar-left-collapse.tsx";

Expand Down

0 comments on commit bbeb6f3

Please sign in to comment.