diff --git a/src/App/App.css b/src/App/App.css index 3e3e805cdea98be74d513d54fb690106850bdeb0..0f3b182d4b22f02de3f635e0a16e75ac808b55c0 100644 --- a/src/App/App.css +++ b/src/App/App.css @@ -898,7 +898,7 @@ svg{ .timeline { white-space: nowrap; min-height: 500px; - max-width: 83vw; + width: 83vw; overflow-x: auto; overflow-y: hidden; background-color: inherit; diff --git a/src/App/App.tsx b/src/App/App.tsx index d70cf1a3f09ddabc530f41bbfff88d09c8a734c0..dcb7b096788903a37fcef95aff7d79865c270269 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -14,7 +14,6 @@ import { Villbuttonrow } from "../components/Buttons.tsx"; import "../utils/highlight.js"; import LoadingScreen from "../components/LoadingScreen.tsx"; import "../components/LoadingScreen.css"; -import Sidebar from "../components/Sidebar.tsx"; const App = () => { const [isLoading, setIsLoading] = useState(true); @@ -56,7 +55,7 @@ const App = () => { {/* Header and PageContent */} <Routes> - {Object.entries(pathMapping).map(([path, {header: Header, component: Component, navlist}]) => ( + {Object.entries(pathMapping).map(([path, {header: Header, component: Component, navlist: Sidebar}]) => ( <Route key={path} path={path} @@ -66,18 +65,13 @@ const App = () => { {/* Page content */} <div className="container-fluid"> <div className="row"> - <div id="sidebarbox" className="col-2 d-none d-lg-block"> - <div className="sticky-top sidebar" /* style="top: 80px; overflow-wrap: break-word;" */> - {/* <Sidebar></Sidebar> */} - <Sidebar nums={navlist}></Sidebar> - </div> - </div> + <Sidebar/> <div className="col"> <Component /> <Villbuttonrow/> </div> <div className="col-1 d-none d-lg-block"> - {/* <!-- empty so far --> */} + {/* <!-- empty!--> */} </div> </div> </div> diff --git a/src/contents/index.tsx b/src/contents/index.tsx index 95fe1480265f093f590d474b0d32e03ead85f49a..e35e8d68783968f4a2e01a8d1976e7a868fc1960 100644 --- a/src/contents/index.tsx +++ b/src/contents/index.tsx @@ -7,6 +7,7 @@ export * from "./attributions.tsx"; // Project export * from "./contribution.tsx"; export * from "./description.tsx"; +export * from "../sidebars/descS.tsx" export * from "./engineering.tsx"; export * from "./experiments.tsx"; export * from "./notebook.tsx"; @@ -15,6 +16,7 @@ export * from "./results.tsx"; export * from "./safety.tsx"; // Human Practices export * from "./human-practices.tsx"; +export * from "../sidebars/hpS.tsx" export * from "./Bfh.tsx"; export * from "./wiki.tsx"; @@ -64,4 +66,4 @@ export * from "./example.tsx"; - +export * from "../sidebars/none.tsx" diff --git a/src/contents/partners.tsx b/src/contents/partners.tsx index d94cf4e33a570996db5a6c1890d9fe57307696e2..dcbc7dfc0e34775128981dc1e40c1148d1ce82b9 100644 --- a/src/contents/partners.tsx +++ b/src/contents/partners.tsx @@ -3,6 +3,7 @@ export function Partners() { return ( <> + <div id="sidebarbox" className="col-1 d-none d-lg-block"> </div> <br/> <div className="row align-items-center"> <div id="zeiss-portrait" className="col-5 sponsor-portrait"> diff --git a/src/pages.ts b/src/pages.ts index f0705c379ff5a6fb54c88e583fe9006a0eb9427b..53120ad52ce226f723344939cd0a4e1170e7222f 100644 --- a/src/pages.ts +++ b/src/pages.ts @@ -26,6 +26,7 @@ Example } from "./contents"; +import { DescSidebar, NoSidebar, HpSidebar } from "./contents"; import { BFHH, ETHH, JUDGEH, DESH, PROOFH, SUPH, PARTH, MESH, ENGH, DRYH, HOMEH, HPH, INTSH, SPONH, RESH, ATTH, CONTH, DESCH, EXPH, IMPH, NOTEH, SAFEH, TEAMH, WIKIH } from "./contents"; interface Base { @@ -43,7 +44,7 @@ class Page implements Base { path: string | undefined; component: React.FC | undefined; header!: React.FC; - navlist!: Array<string>; + navlist!: React.FC; } const Pages: (Page | Folder)[] = [ @@ -53,7 +54,7 @@ const Pages: (Page | Folder)[] = [ path: "/attributions", component: Attributions, header: ATTH, - navlist: [""], + navlist: NoSidebar, }, { name: "MeetUp", @@ -61,7 +62,7 @@ const Pages: (Page | Folder)[] = [ path: "/bfh", component: Bfh, header: BFHH, - navlist: [], + navlist: NoSidebar, }, { name: "Contribution", @@ -69,7 +70,7 @@ const Pages: (Page | Folder)[] = [ path: "/contribution", component: Contribution, header: CONTH, - navlist: [""], + navlist: NoSidebar, }, { name: "Description", @@ -77,7 +78,7 @@ const Pages: (Page | Folder)[] = [ path: "/description", component: Description, header: DESCH, - navlist: ["Abstract", "Cystic Fibrosis", "Our motivation", "Approach", "Delivery", "Our vision", "References"] + navlist: DescSidebar }, { name: "Design", @@ -85,7 +86,7 @@ const Pages: (Page | Folder)[] = [ path: "/design", component: Design, header: DESH, - navlist: [""], + navlist: NoSidebar, }, { name: "Dry Lab", @@ -93,7 +94,7 @@ const Pages: (Page | Folder)[] = [ path: "/dry-lab", component: Drylab, header: DRYH, - navlist: [""], + navlist: NoSidebar, }, { name: "Engineering Success", @@ -101,7 +102,7 @@ const Pages: (Page | Folder)[] = [ path: "/engineering", component: Engineering, header: ENGH, - navlist: [""], + navlist: NoSidebar, }, { name: "Ethics", @@ -109,7 +110,7 @@ const Pages: (Page | Folder)[] = [ path: "/ethics", component: Ethics, header: ETHH, - navlist: [""], + navlist: NoSidebar, }, { name: "Example", @@ -117,7 +118,7 @@ const Pages: (Page | Folder)[] = [ path: "/example", component: Example, header: HOMEH, - navlist: [""], + navlist: NoSidebar, }, { name: "Experiments", @@ -125,7 +126,7 @@ const Pages: (Page | Folder)[] = [ path: "/experiments", component: Experiments, header: EXPH, - navlist: [""], + navlist: NoSidebar, }, { name: "Human Practices", @@ -133,23 +134,25 @@ const Pages: (Page | Folder)[] = [ path: "/human-practices", component: HumanPractices, header: HPH, - navlist: ["Overview", "Timeline", "Inspiration", "Methods", "Analysis", "Reflection", "Implementation"], - }, + navlist: HpSidebar + }, + + { name: "Home", title: "Bielefeld CeBiTec", path: "/", component: Description, header: DESCH, - navlist: ["Abstract", "Cystic Fibrosis", "Our motivation", "Approach", "Delivery", "Our vision", "References"] - }, + navlist: DescSidebar + }, { name: "Home", title: "Bielefeld CeBiTec", path: "/index.html", component: Description, header: DESCH, - navlist: ["Abstract", "Cystic Fibrosis", "Our motivation", "Approach", "Delivery", "Our vision", "References"] + navlist: DescSidebar }, { name: "Impressum", @@ -157,7 +160,7 @@ const Pages: (Page | Folder)[] = [ path: "/impressum", component: Impressum, header: IMPH, - navlist: [""], + navlist: NoSidebar, }, { name: "Interviews", @@ -165,7 +168,7 @@ const Pages: (Page | Folder)[] = [ path: "/interviews", component: Ints, header: INTSH, - navlist: [""], + navlist: NoSidebar, }, { name: "Judging", @@ -173,7 +176,7 @@ const Pages: (Page | Folder)[] = [ path: "/judging", component: Judging, header: JUDGEH, - navlist: [""], + navlist: NoSidebar, }, { name: "Measurement", @@ -181,7 +184,7 @@ const Pages: (Page | Folder)[] = [ path: "/measurement", component: Measurement, header: MESH, - navlist: [""], + navlist: NoSidebar, }, { name: "Notebook", @@ -189,7 +192,7 @@ const Pages: (Page | Folder)[] = [ path: "/notebook", component: Notebook, header: NOTEH, - navlist: [""], + navlist: NoSidebar, }, { name: "Partners and Sponsors", @@ -197,7 +200,7 @@ const Pages: (Page | Folder)[] = [ path: "/partners", component: Partners, header: SPONH, - navlist: [""], + navlist: NoSidebar, }, { name: "Parts", @@ -205,7 +208,7 @@ const Pages: (Page | Folder)[] = [ path: "/parts", component: Parts, header: PARTH, - navlist: [""], + navlist: NoSidebar, }, { name: "Proof of Concept", @@ -213,7 +216,7 @@ const Pages: (Page | Folder)[] = [ path: "/proof-of-concept", component: Proof, header: PROOFH, - navlist: [""], + navlist: NoSidebar, }, { name: "Results", @@ -221,7 +224,7 @@ const Pages: (Page | Folder)[] = [ path: "/results", component: Results, header: RESH, - navlist: [""], + navlist: NoSidebar, }, { name: "Safety", @@ -229,7 +232,7 @@ const Pages: (Page | Folder)[] = [ path: "/safety", component: Safety, header: SAFEH, - navlist: [""], + navlist: NoSidebar, }, { name: "Supplementary", @@ -237,7 +240,7 @@ const Pages: (Page | Folder)[] = [ path: "/supplementary", component: Supplementary, header: SUPH, - navlist: [""], + navlist: NoSidebar, }, { name: "Team", @@ -245,7 +248,7 @@ const Pages: (Page | Folder)[] = [ path: "/team", component: Team, header: TEAMH, - navlist: [""], + navlist: NoSidebar, }, { name: "Wiki", @@ -253,7 +256,7 @@ const Pages: (Page | Folder)[] = [ path: "/wiki", component: Wiki, header: WIKIH, - navlist: [""], + navlist: NoSidebar, }, ]; @@ -264,7 +267,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/", component: Home, header: HOMEH, - navlist: [""], + navlist: NoSidebar, }, { name: "Team", @@ -275,7 +278,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/team", component: Team, header: TEAMH, - navlist: [""], + navlist: NoSidebar, }, { name: "Attributions", @@ -283,7 +286,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/attributions", component: Attributions, header: ATTH, - navlist: [""], + navlist: NoSidebar, }, { name: "Partners and Sponsors", @@ -291,7 +294,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/partners", component: Partners, header: SPONH, - navlist: [""], + navlist: NoSidebar, }, ], }, @@ -304,7 +307,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/description", component: Description, header: DESCH, - navlist: ["Abstract", "Cystic Fibrosis", "Our motivation", "Approach", "Delivery", "Our vision", "References"] + navlist: DescSidebar }, { name: "Results", @@ -312,7 +315,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/results", component: Results, header: RESH, - navlist: [""], + navlist: NoSidebar, }, { name: "Parts", @@ -320,7 +323,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/parts", component: Parts, header: PARTH, - navlist: [""], + navlist: NoSidebar, }, { name: "Proof of Concept", @@ -328,7 +331,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/proof-of-concept", component: Proof, header: PROOFH, - navlist: [""], + navlist: NoSidebar, }, { name: "Engineering Success", @@ -336,7 +339,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/engineering", component: Engineering, header: ENGH, - navlist: [""], + navlist: NoSidebar, }, ], }, @@ -349,7 +352,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/experiments", component: Experiments, header: EXPH, - navlist: [""], + navlist: NoSidebar, }, { name: "Dry Lab", @@ -357,7 +360,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/dry-lab", component: Drylab, header: DRYH, - navlist: [""], + navlist: NoSidebar, }, { name: "Design", @@ -365,7 +368,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/design", component: Design, header: DESH, - navlist: [""], + navlist: NoSidebar, }, { name: "Measurement", @@ -373,7 +376,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/measurement", component: Measurement, header: MESH, - navlist: [""], + navlist: NoSidebar, }, { name: "Supplementary", @@ -381,7 +384,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/supplementary", component: Supplementary, header: SUPH, - navlist: [""], + navlist: NoSidebar, }, { name: "Notebook", @@ -389,7 +392,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/notebook", component: Notebook, header: NOTEH, - navlist: [""], + navlist: NoSidebar, }, ] }, @@ -399,7 +402,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/safety", component: Safety, header: SAFEH, - navlist: [""], + navlist: NoSidebar, }, { name: "Human Practices", @@ -410,7 +413,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/human-practices", component: HumanPractices, header: HPH, - navlist: ["Overview"], + navlist: HpSidebar }, { name: "Interviews", @@ -418,7 +421,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/interviews", component: Ints, header: INTSH, - navlist: [""], + navlist: NoSidebar, }, ] }, @@ -431,7 +434,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/contribution", component: Contribution, header: CONTH, - navlist: [""], + navlist: NoSidebar, }, { name: "MeetUp", @@ -439,7 +442,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/bfh", component: Bfh, header: BFHH, - navlist: [], + navlist: NoSidebar, }, { name: "Wiki", @@ -447,7 +450,7 @@ export const NavPages: (Page | Folder)[] = [ path: "/wiki", component: Wiki, header: WIKIH, - navlist: [""], + navlist: NoSidebar, }, ] }, diff --git a/src/sidebars/descS.tsx b/src/sidebars/descS.tsx new file mode 100644 index 0000000000000000000000000000000000000000..ac7215fa4bfd4946d1fdf902bb5771aca3923e86 --- /dev/null +++ b/src/sidebars/descS.tsx @@ -0,0 +1,12 @@ +import Sidebar from "../components/Sidebar"; + +export function DescSidebar(){ + return( + <div className="col-2 d-none d-lg-block"> + <div className="sticky-top sidebar"> + <Sidebar nums={["Abstract", "Cystic Fibrosis", "Our motivation", + "Approach", "Delivery", "Our vision", "References"]}></Sidebar> + </div> + </div> + ) +} \ No newline at end of file diff --git a/src/sidebars/hpS.tsx b/src/sidebars/hpS.tsx new file mode 100644 index 0000000000000000000000000000000000000000..56ae130afd7089e2461dcd72663c27fcfa68c891 --- /dev/null +++ b/src/sidebars/hpS.tsx @@ -0,0 +1,11 @@ +import Sidebar from "../components/Sidebar"; + +export function HpSidebar(){ + return( + <div className="col-2 d-none d-lg-block"> + <div className="sticky-top sidebar"> + <Sidebar nums={["Overview", "Timeline", "Inspiration", "Methods", "Analysis", "Reflection", "Implementation"]}></Sidebar> + </div> + </div> + ) +} \ No newline at end of file diff --git a/src/sidebars/none.tsx b/src/sidebars/none.tsx new file mode 100644 index 0000000000000000000000000000000000000000..739d4740d9624a4c519fa222dafc34ed064d1dc5 --- /dev/null +++ b/src/sidebars/none.tsx @@ -0,0 +1,6 @@ +export function NoSidebar(){ + return( + <div className="col-1 d-none d-lg-block"> + </div> + ) +} \ No newline at end of file diff --git a/src/utils/getPathMapping.ts b/src/utils/getPathMapping.ts index 69ea21370d961bf49330eb6d2e18d897fcef463b..4c5d3fee1a531b620756ac4d473d3ca2bf4a6791 100644 --- a/src/utils/getPathMapping.ts +++ b/src/utils/getPathMapping.ts @@ -7,7 +7,7 @@ export const getPathMapping = () => { title: string | undefined; component: React.FC; header: React.FC; - navlist: Array<string>; + navlist: React.FC; }; }>((map, item) => { if ("path" in item && item.path && item.component) {