-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(view-course): implement layout of course block and content display
- Loading branch information
Showing
7 changed files
with
227 additions
and
6 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,22 @@ | ||
export const whatYouWillLearn = [ | ||
{ | ||
title: 'Крок за кроком детально вивчите основні теми SQL', | ||
text: 'Ви матимете змогу розглянути різні аспекти SQL, такі як створення, зчитування, оновлення і видалення даних в базі даних крок за кроком.', | ||
}, | ||
{ | ||
title: 'Навчитеся писати SELECT-и різної складності', | ||
text: 'SQL використовується для роботи з базами даних, і запити типу SELECT використовуються для вибірки даних з бази даних.', | ||
}, | ||
{ | ||
title: "Зможете працювати з безліччю різних об'єктів у базах даних", | ||
text: 'Ви вивчите мову баз даних, будете вміти з’єднувати таблиці, працювати зі специфічними видами даних та вміти автиматизувати їх обробку.', | ||
}, | ||
{ | ||
title: 'Повністю підготуєтеся до іспиту Oracle SQL 1Z0-071', | ||
text: 'Цей іспит є сертифікаційним тестом від Oracle, який оцінює ваші знання та навички у сфері SQL, зокрема в Oracle Database', | ||
}, | ||
{ | ||
title: 'Навчитеся змінювати, додавати, видаляти інформацію в базах даних', | ||
text: 'Ви опануєте навички роботи з базами даних. Це важлива навичка для управління і зберігання інформації в структурованому вигляді.', | ||
}, | ||
] |
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,78 @@ | ||
import clsx from 'clsx' | ||
import { useState } from 'react' | ||
import { DeleteIcon, EditIcon } from 'assets/icons' | ||
Check failure on line 3 in app/features/course-element.tsx GitHub Actions / pipeline (21.x)
Check failure on line 3 in app/features/course-element.tsx GitHub Actions / pipeline (21.x)
Check failure on line 3 in app/features/course-element.tsx GitHub Actions / pipeline (21.x)
|
||
import { useDispatch } from 'react-redux' | ||
Check failure on line 4 in app/features/course-element.tsx GitHub Actions / pipeline (21.x)
|
||
import type { ThunkDispatch } from '@reduxjs/toolkit' | ||
Check failure on line 5 in app/features/course-element.tsx GitHub Actions / pipeline (21.x)
|
||
import toast from 'react-hot-toast' | ||
Check failure on line 6 in app/features/course-element.tsx GitHub Actions / pipeline (21.x)
|
||
import { removeBlock } from '~/redux/slices/course' | ||
import { delay } from '~/widgets/helpers/delay' | ||
import { ToasterWithOptions, TransparentButton } from '~/shared' | ||
import { Link } from '@remix-run/react' | ||
|
||
interface Props { | ||
header: string | ||
index: number | ||
id: string | ||
className?: string | ||
items: any | ||
lecturesCount: string | ||
} | ||
|
||
export function CourseElement({ | ||
header, | ||
index, | ||
className, | ||
id, | ||
items, | ||
lecturesCount, | ||
}: Props) { | ||
const [isVisibly, setVisibly] = useState(false) | ||
|
||
function changeVisibly() { | ||
setVisibly(!isVisibly) | ||
} | ||
|
||
return ( | ||
<div | ||
className={clsx( | ||
'text-[#0F0F10] cursor-pointer relative w-full pb-3', | ||
isVisibly | ||
? 'border-b-2 border-[#454BE9]' | ||
: 'border-b-2 border-[#B5B7F6]-2', | ||
className | ||
)} | ||
onClick={changeVisibly} | ||
role="presentation" | ||
> | ||
<div className="flex items-center justify-start"> | ||
<div className="inline-block"> | ||
<p className="inline-block text-2xl font-semibold">{index}.</p> | ||
<p className="inline-block pl-2 text-2xl text-[#1a1a1b] font-semibold leading-[30px] font-manrope"> | ||
{header} | ||
</p> | ||
</div> | ||
<div className="flex text-[#454be9] flex-row gap-4 absolute right-2"> | ||
<p className="text-manrope font-normal text-base"> | ||
{lecturesCount} лекцій | ||
</p> | ||
</div> | ||
</div> | ||
<div | ||
className={clsx( | ||
' duration-1400 transition-all ease-in-out flex flex-col gap-2', | ||
isVisibly ? '' : 'max-h-0 overflow-hidden' | ||
)} | ||
> | ||
{items.map((item: any, index: number) => ( | ||
<div key={index} className="py-3 pl-7 mt-1"> | ||
<p className="text-manrope font-normal text-base text-[#1a1a1b]"> | ||
{item.elementName} | ||
</p> | ||
</div> | ||
))} | ||
</div> | ||
|
||
<ToasterWithOptions /> | ||
</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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
interface Props { | ||
header: string | ||
index: number | ||
text: string | ||
} | ||
|
||
export function ListElement({ header, index, text }: Props) { | ||
return ( | ||
<div> | ||
<div className="inline-block"> | ||
<p className="inline-block text-[#454be9] text-lg font-semibold"> | ||
{index}. | ||
</p> | ||
<p className="inline-block pl-2 text-lg text-[#1a1a1b] font-medium leading-[30px] font-manrope"> | ||
{header} | ||
</p> | ||
</div> | ||
|
||
<p className="mt-4 max-w-[623px]">{text}</p> | ||
</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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.