From 7430894d471599ed6eae12ae77af699df9a2f2f9 Mon Sep 17 00:00:00 2001 From: liliana <liliana.sanfilippo@uni-bielefeld.de> Date: Fri, 12 Jul 2024 14:24:54 +0200 Subject: [PATCH] split up pages that get create dand pages that are shown in the navbar --- src/components/Navbar.tsx | 4 +- src/contents/interviews.tsx | 18 ++++++ src/contents/partners.tsx | 18 ++++++ src/pages.ts | 114 ++++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 src/contents/interviews.tsx create mode 100644 src/contents/partners.tsx diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index d554cb4e..42871469 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -3,7 +3,7 @@ import Nav from "react-bootstrap/Nav"; import BootstrapNavbar from "react-bootstrap/Navbar"; import NavDropdown from "react-bootstrap/NavDropdown"; import { Link } from "react-router-dom"; -import Pages from "../pages.ts"; +import { NavPages } from "../pages.ts"; export function Navbar(/* {isLightMode, setIsLightMode}:any */) { @@ -11,7 +11,7 @@ export function Navbar(/* {isLightMode, setIsLightMode}:any */) { setIsLightMode(!isLightMode); }; */ - const pages = Pages.map((item, pageIndex) => { + const pages = NavPages.map((item, pageIndex) => { if ("folder" in item && item.folder) { const folderItems = item.folder.map((subpage, subpageIndex) => { if (subpage.path) { diff --git a/src/contents/interviews.tsx b/src/contents/interviews.tsx new file mode 100644 index 00000000..4c531d16 --- /dev/null +++ b/src/contents/interviews.tsx @@ -0,0 +1,18 @@ + +export function Ints() { + + return ( + <> + <div className="row"> + <div className="col"> + <h2>Wiki under construction!</h2> + <hr/> + </div> + </div> + <div className="row"> + + </div> + </> + ); + } + \ No newline at end of file diff --git a/src/contents/partners.tsx b/src/contents/partners.tsx new file mode 100644 index 00000000..568725af --- /dev/null +++ b/src/contents/partners.tsx @@ -0,0 +1,18 @@ + +export function Partners() { + + return ( + <> + <div className="row"> + <div className="col"> + <h2>Wiki under construction!</h2> + <hr/> + </div> + </div> + <div className="row"> + + </div> + </> + ); + } + \ No newline at end of file diff --git a/src/pages.ts b/src/pages.ts index d1fe0b07..f60384ba 100644 --- a/src/pages.ts +++ b/src/pages.ts @@ -180,4 +180,118 @@ const Pages: (Page | Folder)[] = [ }, ]; +export const NavPages: (Page | Folder)[] = [ + { + name: "Home", + title: "Bielefeld CeBiTec", + path: "/", + component: Home, + header: HOMEH, + navlist: [""], + }, + { + name: "Team", + folder: [ + { + name: "Team", + title: "Team", + path: "/team", + component: Team, + header: TEAMH, + navlist: [""], + }, + { + name: "Attributions", + title: "Attributions", + path: "/attributions", + component: Attributions, + header: ATTH, + navlist: [""], + }, + ], + }, + { + name: "Project", + folder: [ + { + name: "Contribution", + title: "Contribution", + path: "/contribution", + component: Contribution, + header: CONTH, + navlist: [""], + }, + { + name: "Description", + title: "Project Description", + path: "/description", + component: Description, + header: DESCH, + navlist: ["Abstract", "Cystic Fibrosis", "Our motivation", "Approach", "Delivery", "Our vision", "References"] + }, + { + name: "Experiments", + title: "Experiments", + path: "/experiments", + component: Experiments, + header: EXPH, + navlist: [""], + }, + { + name: "Notebook", + title: "Notebook", + path: "/notebook", + component: Notebook, + header: NOTEH, + navlist: [""], + }, + { + name: "Results", + title: "Results", + path: "/results", + component: Results, + header: RESH, + navlist: [""], + }, + ], + }, + { + name: "Safety", + title: "Safety", + path: "/safety", + component: Safety, + header: SAFEH, + navlist: [""], + }, + { + name: "Human Practices", + title: "Human Practices", + path: "/human-practices", + component: HumanPractices, + header: HPH, + navlist: [""], + }, + { + name: "Contribution", + folder: [ + { + name: "BFH", + title: "BFH European MeetUp", + path: "/bfh", + component: Bfh, + header: BFHH, + navlist: [], + }, + { + name: "Wiki", + title: "wiki", + path: "/wiki", + component: Wiki, + header: WIKIH, + navlist: [""], + }, + ] + }, +]; + export default Pages; \ No newline at end of file -- GitLab