diff --git a/frontend/src/assets/img/photo.png b/frontend/src/assets/img/photo.png new file mode 100644 index 000000000..42e23655f Binary files /dev/null and b/frontend/src/assets/img/photo.png differ diff --git a/frontend/src/bundles/common/components/components.ts b/frontend/src/bundles/common/components/components.ts index 24a7b0098..1cfa1cd9f 100644 --- a/frontend/src/bundles/common/components/components.ts +++ b/frontend/src/bundles/common/components/components.ts @@ -10,6 +10,7 @@ export { VideoModal } from './video-modal/video-modal.js'; export { DownloadIcon } from '@chakra-ui/icons'; export { ViewIcon, ViewOffIcon } from '@chakra-ui/icons'; export { + Badge, Box, Center, Circle, @@ -18,7 +19,9 @@ export { FormControl, FormErrorMessage, Heading, + Icon, IconButton, + Image, InputGroup, InputRightElement, SimpleGrid, diff --git a/frontend/src/bundles/common/components/header/header.tsx b/frontend/src/bundles/common/components/header/header.tsx index 7846ddee7..7f6c8cbb6 100644 --- a/frontend/src/bundles/common/components/header/header.tsx +++ b/frontend/src/bundles/common/components/header/header.tsx @@ -19,7 +19,6 @@ const Header: React.FC = ({ left, center, right }) => { boxShadow="md" zIndex="1000" padding="4" - marginBottom="20px" alignItems="center" justifyContent="space-between" > diff --git a/frontend/src/bundles/common/icons/icon-name.ts b/frontend/src/bundles/common/icons/icon-name.ts new file mode 100644 index 000000000..89d7a2a1d --- /dev/null +++ b/frontend/src/bundles/common/icons/icon-name.ts @@ -0,0 +1,8 @@ +import { faEllipsisVertical, faPen } from '@fortawesome/free-solid-svg-icons'; + +const IconName = { + OPTIONS_VERTICAL: faEllipsisVertical, + PEN: faPen, +} as const; + +export { IconName }; diff --git a/frontend/src/bundles/common/icons/icons.ts b/frontend/src/bundles/common/icons/icons.ts new file mode 100644 index 000000000..ef6aab744 --- /dev/null +++ b/frontend/src/bundles/common/icons/icons.ts @@ -0,0 +1 @@ +export { IconName } from './icon-name.js'; diff --git a/frontend/src/bundles/home/components/components.ts b/frontend/src/bundles/home/components/components.ts new file mode 100644 index 000000000..04e5a9066 --- /dev/null +++ b/frontend/src/bundles/home/components/components.ts @@ -0,0 +1,3 @@ +export { MainContent } from './main-content/main-content.js'; +export { VideoCard } from './video-card/video-card.js'; +export { VideoSection } from './video-section/video-section.js'; diff --git a/frontend/src/bundles/home/components/main-content/main-content.tsx b/frontend/src/bundles/home/components/main-content/main-content.tsx new file mode 100644 index 000000000..32ceac750 --- /dev/null +++ b/frontend/src/bundles/home/components/main-content/main-content.tsx @@ -0,0 +1,14 @@ +import { Box } from '~/bundles/common/components/components.js'; + +import { VideoSection } from '../components.js'; + +const MainContent: React.FC = () => { + return ( + + + + + ); +}; + +export { MainContent }; diff --git a/frontend/src/bundles/home/components/video-card/video-card.tsx b/frontend/src/bundles/home/components/video-card/video-card.tsx new file mode 100644 index 000000000..e76ec82a4 --- /dev/null +++ b/frontend/src/bundles/home/components/video-card/video-card.tsx @@ -0,0 +1,92 @@ +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; + +import photo from '~/assets/img/photo.png'; +import { + Box, + Flex, + Icon, + IconButton, + Image, + Text, +} from '~/bundles/common/components/components.js'; +import { IconName } from '~/bundles/common/icons/icons.js'; + +const VideoCard: React.FC = () => { + return ( + + + Video preview + + {/* Overlay effect */} + + + + } + /> + + + } + /> + + + + + Video Name + + + + Aug 9, 2024, 1:24 PM + + + 0,30 sec + + + + + ); +}; + +export { VideoCard }; diff --git a/frontend/src/bundles/home/components/video-section/video-section.tsx b/frontend/src/bundles/home/components/video-section/video-section.tsx new file mode 100644 index 000000000..6d509ba55 --- /dev/null +++ b/frontend/src/bundles/home/components/video-section/video-section.tsx @@ -0,0 +1,39 @@ +import { + Badge, + Box, + Flex, + Heading, + SimpleGrid, +} from '~/bundles/common/components/components.js'; + +import { VideoCard } from '../components.js'; + +const VideoSection: React.FC = () => { + return ( + + + + Videos + + + 23 + + + + {/* TODO: Update this mocked data */} + + + + + + + + ); +}; + +export { VideoSection }; diff --git a/frontend/src/bundles/home/pages/home.tsx b/frontend/src/bundles/home/pages/home.tsx new file mode 100644 index 000000000..1b4ca44c7 --- /dev/null +++ b/frontend/src/bundles/home/pages/home.tsx @@ -0,0 +1,15 @@ +import { Box, Header } from '~/bundles/common/components/components.js'; + +import { MainContent } from '../components/components.js'; + +const Home: React.FC = () => { + return ( + +
+ {/* Sidebar */} + + + ); +}; + +export { Home }; diff --git a/frontend/src/router/routes/protected-routes.tsx b/frontend/src/router/routes/protected-routes.tsx index 4724f0a4b..d70b3eb45 100644 --- a/frontend/src/router/routes/protected-routes.tsx +++ b/frontend/src/router/routes/protected-routes.tsx @@ -1,6 +1,7 @@ import { Navigate } from 'react-router-dom'; import { AppRoute } from '~/bundles/common/enums/app-route.enum.js'; +import { Home } from '~/bundles/home/pages/home.js'; import { Studio } from '~/bundles/studio/pages/studio.js'; import { ProtectedRoute } from '../components/protected-route.js'; @@ -10,6 +11,10 @@ const protectedRoutes = { element: , children: [ //TODO Add protected routes here in element property and specify the correct path + { + path: AppRoute.ROOT, + element: , + }, { path: AppRoute.STUDIO, element: ,