-
Notifications
You must be signed in to change notification settings - Fork 1
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
11 changed files
with
338 additions
and
35 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 |
---|---|---|
@@ -1,3 +1,25 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
:root { | ||
--primary: #6640d5; | ||
} | ||
|
||
::-webkit-scrollbar { | ||
width: 10px; | ||
height: 10px; | ||
} | ||
|
||
::-webkit-scrollbar-thumb { | ||
background-color: var(--primary); | ||
border-radius: 10px; | ||
} | ||
|
||
::-webkit-scrollbar-thumb:hover { | ||
background: #4d31a1; | ||
} | ||
|
||
::-webkit-scrollbar-thumb:active { | ||
background: #4d31a1; | ||
} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import ArticleIcon from "./icons/ArticleIcon"; | ||
import BookIcon from "./icons/BookIcon"; | ||
import VideoIcon from "./icons/VideoIcon"; | ||
|
||
interface InterfacePipResource { | ||
title: string; | ||
description: string; | ||
type: string; | ||
link: string; | ||
} | ||
|
||
const PipResource = ({ | ||
title, | ||
description, | ||
type, | ||
link, | ||
}: InterfacePipResource) => { | ||
const renderIcon = () => { | ||
switch (type) { | ||
case "video": | ||
return <VideoIcon size="h-10 w-10" color="text-primary" />; | ||
case "book": | ||
return <BookIcon size="h-10 w-10" color="text-primary" />; | ||
case "article": | ||
return <ArticleIcon size="h-10 w-10" color="text-primary" />; | ||
default: | ||
return <ArticleIcon size="h-10 w-10" color="text-primary" />; | ||
} | ||
}; | ||
|
||
const renderButtonLabel = () => { | ||
switch (type) { | ||
case "video": | ||
return "Watch it"; | ||
case "book": | ||
return "Get it"; | ||
case "article": | ||
return "Read it"; | ||
default: | ||
return "Read it"; | ||
} | ||
}; | ||
|
||
return ( | ||
<div className="box-border flex h-48 w-52 shrink-0 flex-col rounded-xl bg-white p-3 shadow-lg"> | ||
<header className="flex items-center"> | ||
{renderIcon()} | ||
<p className="text-md ms-3 text-wrap font-semibold">{title}</p> | ||
</header> | ||
<p className="font-regular mb-2 mt-3 h-full overflow-hidden text-ellipsis text-xs text-[#9E9E9E]"> | ||
{description} | ||
</p> | ||
<button className="mx-auto w-fit rounded-full bg-primary px-7 py-1 text-xs font-medium text-white"> | ||
<a href={link}>{renderButtonLabel()}</a> | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PipResource; |
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,39 @@ | ||
"use client"; | ||
import { useState } from "react"; | ||
|
||
interface InterfacePipTask { | ||
title: string; | ||
description: string; | ||
isDone: boolean; | ||
} | ||
|
||
const PipTask = ({ title, description, isDone }: InterfacePipTask) => { | ||
const [done, setIsDone] = useState<boolean>(isDone); | ||
const handleDone = () => { | ||
setIsDone(!done); | ||
}; | ||
return ( | ||
<div className="box-border h-48 w-52 shrink-0 rounded-xl bg-white px-2 py-9 shadow-lg"> | ||
<header className="flex items-center"> | ||
<p className="text-md text-wrap font-semibold">{title}</p> | ||
<div className="ml-auto inline-flex items-center"> | ||
<label | ||
className="relative flex cursor-pointer items-center" | ||
htmlFor="checkbox-pip-input" | ||
> | ||
<input | ||
type="checkbox" | ||
className="h-6 w-6 cursor-pointer appearance-none rounded-full border border-primary border-primary/80 bg-primary-light/20 outline-primary transition-all checked:bg-primary checked:before:bg-primary hover:scale-105" | ||
id="checkbox-pip-input" | ||
/> | ||
</label> | ||
</div> | ||
</header> | ||
<p className="font-regular mt-2 text-ellipsis text-wrap text-xs text-[#9E9E9E]"> | ||
{description} | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PipTask; |
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,17 @@ | ||
interface InterfaceProgressBar { | ||
width: number; // percentage | ||
height: number; // height in talwindcss | ||
} | ||
|
||
const ProgressBar = ({ width, height }: InterfaceProgressBar) => { | ||
return ( | ||
<div className="w-100 rounded-full bg-gray-200 p-1.5"> | ||
<div | ||
className={`h-${height} rounded-full bg-gradient-to-r from-primary to-secondary`} | ||
style={{ width: `${width}%` }} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ProgressBar; |
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,23 @@ | ||
interface InterfaceArticle { | ||
size: string; | ||
color: string; | ||
} | ||
|
||
const ArticleIcon = ({ size, color }: InterfaceArticle) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
strokeWidth={1.5} | ||
stroke="currentColor" | ||
className={`${color} ${size}`} | ||
> | ||
<path | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z" | ||
/> | ||
</svg> | ||
); | ||
|
||
export default ArticleIcon; |
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,22 @@ | ||
interface InterfaceBookIcon { | ||
color: string; | ||
size: string; | ||
} | ||
const BookIcon = ({ color, size }: InterfaceBookIcon) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
strokeWidth={1.5} | ||
stroke="currentColor" | ||
className={`${size} ${color}`} | ||
> | ||
<path | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
d="M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25" | ||
/> | ||
</svg> | ||
); | ||
|
||
export default BookIcon; |
Oops, something went wrong.