diff --git a/apps/dimentorin/public/image/59de8a682dfbe42455613ea07477ff3e30532c1f.webp b/apps/dimentorin/public/image/59de8a682dfbe42455613ea07477ff3e30532c1f.webp new file mode 100644 index 0000000..ad2aa3a Binary files /dev/null and b/apps/dimentorin/public/image/59de8a682dfbe42455613ea07477ff3e30532c1f.webp differ diff --git a/apps/dimentorin/src/app/(public)/articles/_components/card/article.tsx b/apps/dimentorin/src/app/(public)/articles/_components/card/article.tsx new file mode 100644 index 0000000..947a388 --- /dev/null +++ b/apps/dimentorin/src/app/(public)/articles/_components/card/article.tsx @@ -0,0 +1,72 @@ +import { Button } from "@imphnen-frontend-service/ui/atoms" +import { cn, Show } from "@imphnen-frontend-service/utils" +import { FC } from "react" + +export type ArticleCardProps = { + variant?: "default" | "recent" | "featured" +} + +export const ArticleCard: FC = ({ variant = 'default' }) => { + return ( +
+
+ Cover's Article +
+ +
+
+ 5 min read +
+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. +

+ +

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et massa mi. Aliquam in hendrerit urna. Pellentesque sit amet sapien fringilla, mattis ligula consectetur, ultrices mauris. +

+
+
+

Writer’s Name

+

14 March 2025

+
+ + + + +
+
+ ) +} diff --git a/apps/dimentorin/src/app/(public)/articles/page.tsx b/apps/dimentorin/src/app/(public)/articles/page.tsx new file mode 100644 index 0000000..51c09ec --- /dev/null +++ b/apps/dimentorin/src/app/(public)/articles/page.tsx @@ -0,0 +1,122 @@ +import { ReactElement, useRef, useState } from "react"; +import { ArticleCard } from "./_components/card/article"; +import { cn, For } from "@imphnen-frontend-service/utils"; +import { Button } from "@imphnen-frontend-service/ui/atoms"; +import { motion, useInView, Variants } from "framer-motion"; + +const CATEGORIES = ['UI/UX Design', 'Software/Web Dev', 'Data & AI', 'Cloud & DevOps', 'Cybersecurity', 'IT & Network', 'Project Management', 'QA & Testing'] as const +type Category = typeof CATEGORIES[number] + +export default function Components(): ReactElement { + const [activeTab, setActiveTab] = useState('UI/UX Design') + + const ref = useRef(null) + const isInView = useInView(ref, { once: true, amount: 0.2 }) + + const containerVariants: Variants = { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.1, + delayChildren: 0.2, + }, + }, + } + + const childVariants: Variants = { + hidden: { opacity: 0, y: 20 }, + visible: { + opacity: 1, + y: 0, + transition: { + duration: 0.4, + ease: [0.25, 0.46, 0.45, 0.94], + }, + }, + } + + return ( +
+ +
+ + Featuring Articles + + +
+ + + + +
+ + Recent Articles + +
+ + {(_, index) => ( + + + + )} + +
+
+
+
+ +
+ + Category + +
+ + + {(category) => ( + + )} + + +
+ +
+ + {(_, index) => ( + + + + )} + +
+
+
+
+ ) +} diff --git a/apps/dimentorin/src/middleware.ts b/apps/dimentorin/src/middleware.ts index 98833db..c797561 100644 --- a/apps/dimentorin/src/middleware.ts +++ b/apps/dimentorin/src/middleware.ts @@ -16,7 +16,8 @@ const mappingPublicRoutes = [ '/auth/new-password', '/auth/register-mentor', '/auth/register-mentor/pending', - '/auth/register-mentor/success' + '/auth/register-mentor/success', + '/resources', ]; const mappingRoutePermissions = [ @@ -76,7 +77,7 @@ const mappingRoutePermissions = [ const mappingPublicPrefixRoutes = [ '/mentoring', - '/resources', + '/articles', ] //TODO : Fix this later