Skip to content

Commit 6433f7d

Browse files
committed
Comments
1 parent 02edef0 commit 6433f7d

File tree

3 files changed

+74
-2
lines changed

3 files changed

+74
-2
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
"use client";
2+
import { FEATURE_FLAGS, isFlagEnabled } from "@/utils/flags";
3+
import { CheckCircle, CircleCheck, PlayCircle, SquarePlay } from "lucide-react";
4+
import { type Session } from "next-auth";
5+
import { notFound } from "next/navigation";
6+
import { mockContentList, mockVideoSrc } from "../../mock";
7+
8+
const Content = ({ session }: { session: Session | null }) => {
9+
const flagEnabled = isFlagEnabled(FEATURE_FLAGS.COURSE_VIDEO);
10+
11+
if (!flagEnabled) {
12+
notFound();
13+
}
14+
15+
return (
16+
<div className="flex w-full flex-grow flex-col">
17+
<div className="w-full divide-x divide-gray-700 lg:grid lg:grid-cols-12">
18+
{/* Video container */}
19+
<div className="col-span-9">
20+
<div className="bg-black">
21+
<iframe
22+
className="aspect-video w-full"
23+
src="https://www.youtube.com/embed/Q68wOyeG5lc"
24+
title="YouTube video"
25+
></iframe>
26+
</div>
27+
</div>
28+
29+
{/* Sidebar */}
30+
<div className="col-span-3 flex w-full flex-col overflow-auto">
31+
<ul className="divide-y divide-gray-700">
32+
{mockContentList && mockContentList.length > 0 ? (
33+
mockContentList.map((item, index) => (
34+
<li
35+
key={index}
36+
className="flex flex-row items-center justify-between px-2 py-2 "
37+
>
38+
<div className="flex flex-row items-center">
39+
<SquarePlay
40+
className="mr-4 h-5 w-5 text-white group-hover:text-white"
41+
aria-hidden="true"
42+
/>
43+
<p>{item.title}</p>
44+
</div>
45+
<CircleCheck
46+
className={
47+
item.watched
48+
? "mr-2 h-5 w-5 text-pink-600"
49+
: "mr-2 h-5 w-5 text-white"
50+
}
51+
aria-hidden="true"
52+
/>
53+
</li>
54+
))
55+
) : (
56+
<li className="text-center text-gray-500">
57+
No content available
58+
</li>
59+
)}
60+
</ul>
61+
</div>
62+
</div>
63+
<div className="flex-none">
64+
<div>Video title</div>
65+
<div>descritpion</div>
66+
</div>
67+
</div>
68+
);
69+
};
70+
71+
export default Content;

app/(app)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Home = async () => {
5555
<div className="mb-8 mt-2 rounded border border-neutral-300 bg-white text-neutral-900 dark:border-neutral-600 dark:bg-neutral-900 dark:text-neutral-50">
5656
<Link href="/articles/join-our-6-week-writing-challenge-quohtgqb">
5757
<Image
58-
className="w-full"
58+
className="w-full rounded-t"
5959
src={challenge}
6060
alt={`"Codú Writing Challenge" text on white background`}
6161
/>

components/ArticlePreview/ArticlePreview.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ const ArticlePreview: NextPage<Props> = ({
8484
};
8585

8686
return (
87-
<article className="my-2 rounded border border-l-4 border-neutral-300 border-l-pink-600 bg-white p-4 dark:border-neutral-600 dark:border-l-pink-600 dark:bg-neutral-900">
87+
<article className="relative my-2 rounded border border-l-0 border-l-4 border-neutral-300 bg-white p-4 dark:border-neutral-600 dark:border-l-pink-600 dark:bg-neutral-900">
88+
<div className="absolute bottom-0 left-0 top-0 flex justify-between border-l-4 border-l-pink-500 dark:border-l-pink-500"></div>
8889
<div className="flex justify-between">
8990
<div className="mb-4 flex items-center">
9091
<span className="sr-only">{name}</span>

0 commit comments

Comments
 (0)