From 5bddeec5ae00bc2c43a520ad9d4eb82e1b257a5c Mon Sep 17 00:00:00 2001 From: nefelibatala1993 Date: Tue, 29 Aug 2023 16:48:36 +0300 Subject: [PATCH] fix(Aait-web-1): add responsiveness for the blogs in the profile page --- aait/web/group-1/app/profile/account/page.tsx | 88 +++++++++++++++++++ aait/web/group-1/app/profile/layout.tsx | 65 ++++++++++++++ .../web/group-1/app/profile/my-blogs/page.tsx | 20 +++++ aait/web/group-1/app/profile/page.tsx | 55 ++++++++++++ aait/web/group-1/components/profile/Card.tsx | 58 ++++++++++++ 5 files changed, 286 insertions(+) create mode 100644 aait/web/group-1/app/profile/account/page.tsx create mode 100644 aait/web/group-1/app/profile/layout.tsx create mode 100644 aait/web/group-1/app/profile/my-blogs/page.tsx create mode 100644 aait/web/group-1/app/profile/page.tsx create mode 100644 aait/web/group-1/components/profile/Card.tsx diff --git a/aait/web/group-1/app/profile/account/page.tsx b/aait/web/group-1/app/profile/account/page.tsx new file mode 100644 index 000000000..bdc509dcc --- /dev/null +++ b/aait/web/group-1/app/profile/account/page.tsx @@ -0,0 +1,88 @@ +'use client' + +import React from 'react'; +import Image from 'next/image'; + +export default function Page() { + return ( +
+
+
+

Manage Your Account

+

You can change your password here

+
+ +
+
+ +
+ +  toggle password visiblity +
+ +
+ +  toggle password visiblity +
+ +
+ +  toggle password visiblity +
+
+
+ ); +} + + +///
+{/*
+ +

Current Password

+ +
+ +  toggle password visiblity +
+ +
+
*/} diff --git a/aait/web/group-1/app/profile/layout.tsx b/aait/web/group-1/app/profile/layout.tsx new file mode 100644 index 000000000..9e14cd141 --- /dev/null +++ b/aait/web/group-1/app/profile/layout.tsx @@ -0,0 +1,65 @@ +'use client'; + +import React from 'react'; +import { usePathname } from 'next/navigation'; +import Link from 'next/link'; + +export default function ProfileLayout({ + children, +}: { + children: React.ReactNode +}) { + const links: string[] = [ 'Personal Information', 'My Blogs', 'Account Setting' ]; + const linkPathname = new Map([ + ['Personal Information', '/profile'], + ['My Blogs', '/profile/my-blogs'], + ['Account Setting', '/profile/account'] + ]); + const pathname = usePathname(); + + return ( +
+

Profile

+
+
+ { + // links.map(link =>

{ link }

) + links.map(link => ( + { link } + )) + } +
+ { pathname === linkPathname.get('My Blogs') && } +
+ { children } +
+ ); +} + + + + + + + +// import React, { ReactNode } from 'react'; + +// interface PropsInterface { +// children: ReactNode; +// } + +// const ProfileLayout: React.FC = ({ children }) => { +// return ( +//
+//

This is Persitent layout accross components.

+// { children } +//
+// ); +// } + +// export default ProfileLayout; diff --git a/aait/web/group-1/app/profile/my-blogs/page.tsx b/aait/web/group-1/app/profile/my-blogs/page.tsx new file mode 100644 index 000000000..5f786b5f4 --- /dev/null +++ b/aait/web/group-1/app/profile/my-blogs/page.tsx @@ -0,0 +1,20 @@ +import React from 'react'; +import Card from '@/components/profile/Card'; + +export default function Page() { + return ( +
+
+

Manage Blogs

+

Edit, Delete and View the status of your blogs

+
+
+ {Array.from({ length: 8 }).map((_, index) => ( +
+ +
+ ))} +
+
+ ); +} diff --git a/aait/web/group-1/app/profile/page.tsx b/aait/web/group-1/app/profile/page.tsx new file mode 100644 index 000000000..7c7a98981 --- /dev/null +++ b/aait/web/group-1/app/profile/page.tsx @@ -0,0 +1,55 @@ +import React, { useState } from 'react'; +import Image from 'next/image'; + + +export default function Page() { + return ( +
+
+
+

Manage Personal Information

+

Add all the required information about yourself

+
+ +
+
+

Name *

+ + +

Email *

+ +

Your Photo *

+
+ small profile image +
+ file upload image +

Clik to upload or drag and drop SVG, PNG, JPG or GIF(max 800x400px)

+
+
+
+
+ ); +} diff --git a/aait/web/group-1/components/profile/Card.tsx b/aait/web/group-1/components/profile/Card.tsx new file mode 100644 index 000000000..927103d78 --- /dev/null +++ b/aait/web/group-1/components/profile/Card.tsx @@ -0,0 +1,58 @@ +import React from 'react'; +import Image from 'next/image'; + + +const Card = () => { + return ( +
+ test card image + +
+ +

Design Liberalized Exchange Rate Management

+ +
+ test avatar image +

by Fred Boone | Jan 10, 2020

+
+ +
+
UI/UX
+
DEVELOPMENT
+
+ +
A little personality goes a long way, especially on a business blog. So don’t be afraid to let loose.
+ +
+
+ pending image + Pending +
+
Read More
+
+ +
+ +
+ ) +} + +export default Card;