-
Notifications
You must be signed in to change notification settings - Fork 6
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
20 changed files
with
98 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
import { Course } from "@/utils/types.ts"; | ||
|
||
import ProgressCheck from "@/islands/ProgressCheck.tsx"; | ||
|
||
export default function CourseCard(props: { course: Course }) { | ||
interface CourseCardProps { | ||
course: Course; | ||
} | ||
|
||
export default function CourseCard(props: CourseCardProps) { | ||
const { course } = props; | ||
return ( | ||
<a | ||
title={course.title} | ||
href={`/${course.slug}`} | ||
class="gray-200 hover:opacity-75 list-none" | ||
className="gray-200 hover:opacity-75 list-none" | ||
style={{ order: course.order }} | ||
> | ||
<h3 class="text-gray-500 font-bold flex gap-1 items-center bg-base-200 rounded-btn px-2 py-4"> | ||
<ProgressCheck slug={props.course.slug} /> | ||
<h3 className="text-gray-500 font-bold flex gap-1 items-center bg-base-200 rounded-btn px-2 py-4"> | ||
<ProgressCheck slug={course.slug} /> | ||
{course.title} | ||
</h3> | ||
</a> | ||
); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,8 +6,12 @@ import Collapse from "./Collapse.tsx"; | |
import IconLayoutSidebarLeftCollapse from "https://deno.land/x/[email protected]/tsx/layout-sidebar-left-collapse.tsx"; | ||
import IconChevronDown from "https://deno.land/x/[email protected]/tsx/chevron-down.tsx"; | ||
|
||
interface DrawerProps { | ||
courses: (Course | CourseGroup)[]; | ||
} | ||
|
||
export default function Drawer( | ||
{ courses }: { courses: (Course | CourseGroup)[] }, | ||
{ courses }: DrawerProps, | ||
) { | ||
return ( | ||
<div class="drawer"> | ||
|
@@ -36,12 +40,13 @@ export default function Drawer( | |
<p class="text-lg">قائمة الدروس</p> | ||
<IconChevronDown /> | ||
</div> | ||
{courses.map((course, index) => { | ||
{courses.map((course) => { | ||
// Group of courses | ||
if ("courses" in course) { | ||
return ( | ||
<Collapse | ||
title={course.label || "بدون عنوان"} | ||
key={course.label} | ||
title={course.label} | ||
courses={course.courses} | ||
/> | ||
); | ||
|
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,22 +1,26 @@ | ||
import { render } from "https://deno.land/x/gfm/mod.ts"; | ||
import { render } from "$gfm"; | ||
import { Course } from "../utils/types.ts"; | ||
|
||
import EditButton from "../components/EditButton.tsx"; | ||
|
||
import IconPlayerTrackNext from "https://deno.land/x/[email protected]/tsx/player-track-next.tsx"; | ||
import IconPlayerTrackPrev from "https://deno.land/x/[email protected]/tsx/player-track-prev.tsx"; | ||
import EditButton from "../components/EditButton.tsx"; | ||
|
||
interface MarkdownSplitProps { | ||
course: Course; | ||
lable: string | undefined; | ||
lableSlug: string | undefined; | ||
nextCourse: string | undefined; | ||
prevCourse: string | undefined; | ||
} | ||
|
||
export default function MarkdownSplit({ | ||
course, | ||
lable, | ||
lableSlug, | ||
nextCourse, | ||
prevCourse, | ||
}: { | ||
course: Course; | ||
lable: string | undefined; | ||
lableSlug: string | undefined; | ||
nextCourse: string | undefined; | ||
prevCourse: string | undefined; | ||
}) { | ||
}: MarkdownSplitProps) { | ||
return ( | ||
<> | ||
<div class="flex px-2 pt-2 gap-2"> | ||
|
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
"tailwindcss/": "npm:/[email protected]/", | ||
"tailwindcss/plugin": "npm:/[email protected]/plugin.js", | ||
"$std/": "https://deno.land/[email protected]/", | ||
"$gfm": "https://deno.land/x/gfm@0.1.26/mod.ts", | ||
"$gfm": "https://deno.land/x/gfm@0.6.0/mod.ts", | ||
"daisyui": "npm:daisyui@latest" | ||
}, | ||
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" }, | ||
|
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,7 +2,12 @@ import IconCircleCheckFilled from "https://deno.land/x/[email protected]/ts | |
import IconCircle from "https://deno.land/x/[email protected]/tsx/circle.tsx"; | ||
import { useEffect, useState } from "preact/hooks"; | ||
import { newPassSignal } from "./signals/store.ts"; | ||
export default function ProgressCheck(props: { slug: string }) { | ||
|
||
interface ProgressCheckProps { | ||
slug: string; | ||
} | ||
|
||
export default function ProgressCheck(props: ProgressCheckProps) { | ||
const [isPassed, setIsPassed] = useState<boolean>(false); | ||
useEffect(() => { | ||
const passedTEXT = localStorage.getItem("passedCourses"); | ||
|
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
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ import { Head } from "$fresh/runtime.ts"; | |
import Footer from "../components/Footer.tsx"; | ||
import IconArrowBigRightLines from "https://deno.land/x/[email protected]/tsx/arrow-big-right-lines.tsx"; | ||
import AboutIcons from "@/components/AboutIcons.tsx"; | ||
// import CodeBox from "@/islands/CodeBox.tsx"; | ||
|
||
export default function IndexPage() { | ||
return ( | ||
|
@@ -30,7 +29,6 @@ export default function IndexPage() { | |
<span class="bg-gradient-to-br from-yellow-500 to-yellow-300 bg-clip-text text-transparent font-bold">JS</span> | ||
<span class="ml-2 bg-gradient-to-bl from-base-content to-base-content/80 bg-clip-text text-transparent font-bold">نخلة</span> | ||
</h1> | ||
{/* <CodeBox /> | It don't really look good and in small screen its an issue */} | ||
<p class="text-3xl mb-2"> | ||
تعلم بسهولة وفعالية | ||
</p> | ||
|
Oops, something went wrong.