-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
|
||
|
@@ -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> | ||
</> | ||
); | ||
} |