From 78afa6be2223ee4f4fdc665946820be0f5084e28 Mon Sep 17 00:00:00 2001 From: michivonah Date: Sun, 27 Apr 2025 16:44:36 +0200 Subject: [PATCH] improve sidebar & layout --- src/app/home/feeds/manage/page.tsx | 11 +++++ src/app/home/layout.tsx | 1 - src/app/home/page.tsx | 6 +-- src/app/page.tsx | 18 +++++-- src/components/app-sidebar.tsx | 79 ++++++++++++++++++++---------- 5 files changed, 83 insertions(+), 32 deletions(-) create mode 100644 src/app/home/feeds/manage/page.tsx diff --git a/src/app/home/feeds/manage/page.tsx b/src/app/home/feeds/manage/page.tsx new file mode 100644 index 0000000..08ad930 --- /dev/null +++ b/src/app/home/feeds/manage/page.tsx @@ -0,0 +1,11 @@ +export default function Page(){ + return ( +
+
+

+ Manage feeds +

+
+
+ ); +} \ No newline at end of file diff --git a/src/app/home/layout.tsx b/src/app/home/layout.tsx index da06985..8cea1fb 100644 --- a/src/app/home/layout.tsx +++ b/src/app/home/layout.tsx @@ -7,7 +7,6 @@ export default function Layout({children}: {children: React.ReactNode}){
- {children}
diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx index 6b27be0..120e332 100644 --- a/src/app/home/page.tsx +++ b/src/app/home/page.tsx @@ -2,13 +2,13 @@ import NewsCard from "@/components/news-card"; export default function Page(){ return ( -
-
+
+

Home

-
+
diff --git a/src/app/page.tsx b/src/app/page.tsx index 9d2a906..6efb563 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,7 +1,19 @@ +import { Button } from "@/components/ui/button"; +import { Rss } from "lucide-react"; + export default function Page() { return ( -

- RSS Reader -

+
+
+ +

+ RSS Reader +

+
+ +
+ +
+
); } diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 9acce13..db4376a 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -1,4 +1,5 @@ -import { Home, Rss, LogOut } from "lucide-react" +import { Home, Rss, LogOut } from "lucide-react"; +import Link from 'next/link'; import { Sidebar, @@ -6,40 +7,63 @@ import { SidebarFooter, SidebarGroup, SidebarGroupContent, - SidebarGroupLabel, + //SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, + SidebarTrigger, } from "@/components/ui/sidebar"; -const items = [ - { - title: "Home", - url: "/home", - icon: Home, - }, - { - title: "Manage feeds", - url: "/home/feeds/manage", - icon: Rss, - }, -]; +const items = { + main: [ + { + title: "Home", + url: "/home", + icon: Home, + }, + { + title: "Manage feeds", + url: "/home/feeds/manage", + icon: Rss, + }, + ], + footer: [ + { + title: "Log out", + url: "#", + icon: LogOut, + }, + ] +}; export function AppSidebar() { return ( - + + + + + + + + + + + - {items.map((item) => ( + {items.main.map((item) => ( - + {item.title} - + ))} @@ -49,16 +73,21 @@ export function AppSidebar() { - - + + {items.footer.map((item) => ( + - - - Log out - + + + {item.title} + - + ))} + )