Skip to content

Commit

Permalink
updating
Browse files Browse the repository at this point in the history
  • Loading branch information
TeaByte committed Jan 7, 2024
1 parent 8942bf5 commit 85bb551
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
[ TODO LIST ]

- [ ] Quizes System
- [ ] Fixing janky ts-types
- [ ] Main-Page ( Better design )
- [ ] Login and save progress
- [ ] Markdown and cache ( Better code )
- [ ] Login || LocalStorage and save progress
- [ ] Themes, theme settings

---
Expand Down
2 changes: 1 addition & 1 deletion components/Collapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function Collapse(
return (
<div
tabindex={1}
class="collapse collapse-plus border border-base-300 bg-base-200"
class="collapse collapse-plus border border-base-300 bg-base-100"
>
<input type="checkbox" />
<div class="collapse-title text-xl font-medium">
Expand Down
41 changes: 24 additions & 17 deletions routes/group/[slug].tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Course, CourseGroup } from "../../utils/types.ts";
import { getCourse } from "../../utils/course.ts";
import { CourseGroup } from "../../utils/types.ts";
import { Handlers } from "$fresh/server.ts";
import { PageProps } from "$fresh/server.ts";
import { CSS, render } from "$gfm";
import { Head } from "$fresh/runtime.ts";
import { cache, populateCache } from "../../utils/course-cache.ts";
import CourseCard from "../../components/CourseCard.tsx";
import Footer from "../../components/Footer.tsx";

import IconChevronDown from "https://deno.land/x/[email protected]/tsx/chevron-down.tsx";

Expand All @@ -25,20 +24,28 @@ export const handler: Handlers<CourseGroup> = {

export default function CoursePage(props: PageProps<CourseGroup>) {
const foundCourseGroup = props.data;

return (
<main class="max-w-screen-md px-4 pt-12 mx-auto mb-6">
<div class="flex gap-1 items-center">
<h2 class="text-3xl font-bold">
{foundCourseGroup.label}
</h2>
<IconChevronDown />
</div>
<div class="flex flex-col mt-2 pr-3">
{foundCourseGroup.courses.map((innerCourse) => (
<CourseCard key={innerCourse.slug} course={innerCourse} />
))}
</div>
</main>
<>
<Head>
<title>نخلة - {foundCourseGroup.label}</title>
<meta property="og:title" content="نخلة جي أس" />
</Head>
<main class="flex flex-col h-full-minus-bar">
<div class="max-w-screen-md px-4 pt-12 mx-auto mb-6 grow">
<div class="flex gap-1 items-center">
<h2 class="text-3xl font-bold">
{foundCourseGroup.label}
</h2>
<IconChevronDown />
</div>
<div class="flex flex-col mt-2 pr-3">
{foundCourseGroup.courses.map((innerCourse) => (
<CourseCard key={innerCourse.slug} course={innerCourse} />
))}
</div>
</div>
<Footer />
</main>
</>
);
}

0 comments on commit 85bb551

Please sign in to comment.