From cd5822def4b92567859e6b4b7bc83c8d87896f77 Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Tue, 14 May 2024 11:53:20 +0200 Subject: [PATCH] Profile page and sidebar layouts --- components/global/Heading.vue | 5 +++++ components/global/Sidebar.vue | 2 +- components/global/SidebarProps.ts | 3 ++- components/global/user/CTA.vue | 2 +- components/profile/Layout.vue | 9 ++++++++ pages/index.vue | 36 +++++++++++++++++++------------ pages/profile.vue | 17 +++++++++++++++ 7 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 components/global/Heading.vue create mode 100644 components/profile/Layout.vue create mode 100644 pages/profile.vue diff --git a/components/global/Heading.vue b/components/global/Heading.vue new file mode 100644 index 0000000..2726bcc --- /dev/null +++ b/components/global/Heading.vue @@ -0,0 +1,5 @@ + + + + + diff --git a/components/global/Sidebar.vue b/components/global/Sidebar.vue index cbf174f..56142fb 100644 --- a/components/global/Sidebar.vue +++ b/components/global/Sidebar.vue @@ -14,7 +14,7 @@ defineProps() - + diff --git a/components/global/SidebarProps.ts b/components/global/SidebarProps.ts index fa40d08..adcfce0 100644 --- a/components/global/SidebarProps.ts +++ b/components/global/SidebarProps.ts @@ -6,5 +6,6 @@ export interface MenuItem { } export interface SidebarProps { - menuItems: MenuItem[] + menuItems: MenuItem[], + isHome?: boolean } diff --git a/components/global/user/CTA.vue b/components/global/user/CTA.vue index da3558d..72b76ee 100644 --- a/components/global/user/CTA.vue +++ b/components/global/user/CTA.vue @@ -43,7 +43,7 @@ async function handleLogout() { } function gotoProfilePage() { - router.push({ path: '/profil' }) + router.push({ path: '/profile' }) } diff --git a/components/profile/Layout.vue b/components/profile/Layout.vue new file mode 100644 index 0000000..623d0a6 --- /dev/null +++ b/components/profile/Layout.vue @@ -0,0 +1,9 @@ + + + + + {{ user?.user_metadata.full_name }} + + diff --git a/pages/index.vue b/pages/index.vue index e0c8f83..f4eb51d 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,23 +1,31 @@ - - - - Calendrier - - - chronologie - - - - - Chronologie complète de Léïm, rassemblant les évènements et personnages clés du monde - - + + + + + + + Calendrier + + + chronologie + + + + + Chronologie complète de Léïm, rassemblant les évènements et personnages clés du monde + + + diff --git a/pages/profile.vue b/pages/profile.vue new file mode 100644 index 0000000..54b45e8 --- /dev/null +++ b/pages/profile.vue @@ -0,0 +1,17 @@ + + + + + + + + +