-
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
13 changed files
with
178 additions
and
139 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Course } from "../utils/types.ts"; | ||
|
||
export default function Collapse( | ||
{ titile, courses }: { titile: string; courses: Course[] }, | ||
) { | ||
return ( | ||
<div | ||
tabindex={1} | ||
class="collapse collapse-plus border border-base-300 bg-base-200" | ||
> | ||
<input type="checkbox" /> | ||
<div class="collapse-title text-xl font-medium"> | ||
{titile} | ||
</div> | ||
<div class="collapse-content"> | ||
{courses.map((course) => ( | ||
<li key={course.slug}> | ||
<a title={course.title} href={`/${course.slug}`}>{course.title}</a> | ||
</li> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import IconAdjustmentsDown from "https://deno.land/x/[email protected]/tsx/adjustments-down.tsx"; | ||
|
||
import { Course, CourseGroup } from "../utils/types.ts"; | ||
import Collapse from "./Collapse.tsx"; | ||
|
||
export default function Drawer( | ||
{ courses }: { courses: (Course | CourseGroup)[] }, | ||
) { | ||
return ( | ||
<div class="drawer"> | ||
<input | ||
id="my-drawer-4" | ||
type="checkbox" | ||
class="drawer-toggle" | ||
/> | ||
<div class="drawer-content"> | ||
<label | ||
for="my-drawer-4" | ||
class="drawer-button btn btn-active btn-ghost top-[-24px] left-0 absolute" | ||
> | ||
<IconAdjustmentsDown aria-hidden="true" /> | ||
</label> | ||
</div> | ||
<div class="drawer-side z-50"> | ||
<label | ||
for="my-drawer-4" | ||
aria-label="close sidebar" | ||
class="drawer-overlay" | ||
> | ||
</label> | ||
<ul class="menu p-4 w-80 min-h-full bg-base-200 text-base-content"> | ||
{courses.map((course, index) => { | ||
if ("courses" in course) { | ||
return ( | ||
<Collapse | ||
titile={course.label || "بدون عنوان"} | ||
courses={course.courses} | ||
/> | ||
); | ||
} else { | ||
return ( | ||
<li class="" key={course.slug}> | ||
<a title={course.title} href={`/${course.slug}`}> | ||
{course.title} | ||
</a> | ||
</li> | ||
); | ||
} | ||
})} | ||
</ul> | ||
</div> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import BrandGithub from "https://deno.land/x/[email protected]/tsx/brand-github.tsx"; | ||
|
||
export default function Footer() { | ||
const menus = [ | ||
{ | ||
title: "الصفحات", | ||
children: [ | ||
{ name: "الصفحة الرئيسية", href: "#" }, | ||
{ name: "المدونة", href: "#" }, | ||
{ name: "الدروس", href: "#" }, | ||
], | ||
}, | ||
{ | ||
title: "المجتمع", | ||
children: [ | ||
{ name: "قناه", href: "https://t.me/NakhlahJS" }, | ||
{ name: "جروب", href: "https://t.me/Unassisted" }, | ||
], | ||
}, | ||
]; | ||
|
||
return ( | ||
<div class="bg-base-300 flex flex-col md:flex-row w-full gap-8 md:gap-16 px-8 py-8 text-sm"> | ||
<div class="flex-1"> | ||
<div class="flex items-center gap-1"> | ||
<div class="font-bold text-2xl"> | ||
نخلة جي أس | ||
</div> | ||
</div> | ||
<div class="text-gray-500 mt-1"> | ||
اكتسب مهارات جافاسكربت بسهولة وفعالية | ||
</div> | ||
</div> | ||
|
||
{menus.map((item) => ( | ||
<div class="mb-4" key={item.title}> | ||
<div class="font-bold">{item.title}</div> | ||
<ul class="mt-2"> | ||
{item.children.map((child) => ( | ||
<li class="mt-2" key={child.name}> | ||
<a | ||
class="text-gray-500 hover:text-gray-700" | ||
href={child.href} | ||
> | ||
{child.name} | ||
</a> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
))} | ||
|
||
<div class="text-gray-500 space-y-2"> | ||
<a | ||
href="https://github.com/TeaByte/NakhlahJS" | ||
class="inline-block hover:text-black" | ||
aria-label="GitHub" | ||
> | ||
<BrandGithub aria-hidden="true" /> | ||
</a> | ||
</div> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
|
@@ -30,7 +30,8 @@ | |
"tailwindcss/": "npm:/[email protected]/", | ||
"tailwindcss/plugin": "npm:/[email protected]/plugin.js", | ||
"$std/": "https://deno.land/[email protected]/", | ||
"$gfm": "https://deno.land/x/[email protected]/mod.ts" | ||
"$gfm": "https://deno.land/x/[email protected]/mod.ts", | ||
"daisyui": "npm:daisyui@latest" | ||
}, | ||
"compilerOptions": { | ||
"jsx": "react-jsx", | ||
|
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,30 +1,34 @@ | ||
import { Head } from "$fresh/runtime.ts"; | ||
import Footer from "../components/Footer.tsx"; | ||
|
||
export default function Error404() { | ||
return ( | ||
<> | ||
<Head> | ||
<title>الصفحه غير موجوده</title> | ||
</Head> | ||
<div class="px-4 py-8 mx-auto"> | ||
<div class="max-w-screen-md mx-auto flex flex-col items-center justify-center"> | ||
<img | ||
class="my-6" | ||
src="/logo.webp" | ||
width="128" | ||
height="128" | ||
title="NakhlahJS Logo" | ||
alt="Website logo" | ||
/> | ||
<h1 class="text-4xl font-bold">الصفحه غير موجوده</h1> | ||
<p class="my-4"> | ||
الصفحة التي تبحث عنها غير موجودة. | ||
</p> | ||
<a title="العودى الى الصفحة الرئيسية" href="/" class="underline"> | ||
العودى الى الصفحة الرئيسية | ||
</a> | ||
<main class="flex flex-col h-full-minus-bar"> | ||
<div class="px-4 py-8 mx-auto grow"> | ||
<div class="max-w-screen-md mx-auto flex flex-col md:mt-8 items-center justify-center"> | ||
<img | ||
class="my-6" | ||
src="/logo.webp" | ||
width="128" | ||
height="128" | ||
title="لوغو نخلة جي اس" | ||
alt="Website logo" | ||
/> | ||
<h1 class="text-4xl font-bold">الصفحه غير موجوده</h1> | ||
<p class="my-4"> | ||
تأكد من صحه الرابط. | ||
</p> | ||
<a title="العودى الى الصفحة الرئيسية" href="/" class="underline"> | ||
العودى الى الصفحة الرئيسية | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
<Footer /> | ||
</main> | ||
</> | ||
); | ||
} |
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 |
---|---|---|
|
@@ -9,11 +9,6 @@ export default function App({ Component }: PageProps) { | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Nakhlahjs</title> | ||
<link rel="stylesheet" href="/styles.css" /> | ||
<link | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/full.min.css" | ||
rel="stylesheet" | ||
type="text/css" | ||
/> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link | ||
rel="preconnect" | ||
|
Oops, something went wrong.