diff --git a/src/components/Buttons.tsx b/src/components/Buttons.tsx index bf3fdf60af098f78c247d9416e9a8df007bcb61d..8fc348800a01f69ab51bdd50e0f0ab7643de70c3 100644 --- a/src/components/Buttons.tsx +++ b/src/components/Buttons.tsx @@ -71,4 +71,3 @@ return ( ); }; - \ No newline at end of file diff --git a/src/components/HorizontalTimeline.tsx b/src/components/HorizontalTimeline.tsx index 7d626349652a16743951683c4efe583c969dba7e..ff12beb6508b490e1deaff89af30a2b9e13436bb 100644 --- a/src/components/HorizontalTimeline.tsx +++ b/src/components/HorizontalTimeline.tsx @@ -132,6 +132,23 @@ function TimeItem({tag, title, children, pic, author, tabid}: ItemProps){ return rows; } + export function getTypeItems(ta: string){ + let rows = [] + for ( let i = 0; i < data.length; i++ ){ + if (ta = data[i].tag) + rows.push(<TimeItem + title={data[i].title} + pic={data[i].pic} + tag={data[i].tag} + author={data[i].author} + tabid={data[i].tabid} + > + {data[i].text} + </TimeItem>) + } + return rows; + } + let data = [ { diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx new file mode 100644 index 0000000000000000000000000000000000000000..23f819ffc39c7987ac153eb51d583db7072c9ace --- /dev/null +++ b/src/components/Tabs.tsx @@ -0,0 +1,12 @@ + +export function BFHStyleTabs({data}: {data: Array<NodeDatensatz>}) { + let rows = [] + for ( let i = 0; i < data.length; i++ ){ + rows.push( + <div id={data[i].eid} className="tabcontent"> + {data[i].node} + </div> + ) + } + return rows; + } \ No newline at end of file diff --git a/src/components/seclarations.ts b/src/components/seclarations.ts index 67a7c78713da26816f10d1dc579ea2dd4aac3683..2692a6ac113aa143d6ab32cdf2daf6b747edea37 100644 --- a/src/components/seclarations.ts +++ b/src/components/seclarations.ts @@ -14,6 +14,10 @@ interface Window { datawrapper: Datawrapper; renderDatawrapper: () => void; } + interface NodeDatensatz{ + node: React.ReactNode, + eid: string +} } interface Datawrapper { diff --git a/src/contents/Bfh.tsx b/src/contents/Bfh.tsx index e0b9e3ad867280b092a402ad5add9f9dc394ff69..2db4d491cc4b91e721282ec1a83da73aa5c2e8b9 100644 --- a/src/contents/Bfh.tsx +++ b/src/contents/Bfh.tsx @@ -2,7 +2,25 @@ import { MyTimeline } from "../components/My-Timeline"; import BFHGallery from "../components/photo-grid"; import BFHpdf from "../components/pdfs"; import { H2} from "../components/headings"; - +import { BFHStyleTabs } from "../components/Tabs"; +let tabbys = [ + { + node: <BFHpdf></BFHpdf>, + eid: "pdf" + }, + { + node: <MyTimeline></MyTimeline>, + eid: "timeline" + }, + { + node: <BFHGallery/>, + eid: "gall" + }, + { + node: <About/>, + eid: "about" + } +] export function Bfh() { return ( @@ -46,7 +64,7 @@ export function Bfh() { </div> <div className="col"> - <LabTabs></LabTabs> + <BFHStyleTabs data={tabbys}></BFHStyleTabs> </div> </div> <div className="row"> @@ -57,27 +75,7 @@ export function Bfh() { ); } -export function LabTabs() { - return ( - <div> - <div id="pdf" className="tabcontent"> - <BFHpdf></BFHpdf> - </div> - <div id="timeline" className="tabcontent"> - <MyTimeline></MyTimeline> - </div> - <div id="gall" className="tabcontent"> - <BFHGallery/> - </div> - <div id="about" className="tabcontent"> - <About/> - </div> - - - </div> - ); -} export function About(){ return( diff --git a/src/contents/human-practices.tsx b/src/contents/human-practices.tsx index 73874dae86440579f2af705d44c2d4fe3f093ddb..0d80446045da787fdda9218c8216d1ec2f5895ed 100644 --- a/src/contents/human-practices.tsx +++ b/src/contents/human-practices.tsx @@ -8,69 +8,100 @@ - Filter mit HalbkreisDing als Tabsteuerung | Einteilung nach Bereich (Academia, Insustry, ..., und auch nach Delivery und Mechanism) - DNA Strang als Timeline? */ -import { TimeHori } from "../components/HorizontalTimeline"; +import { TimeHori, getTypeItems } from "../components/HorizontalTimeline"; import { AllPopus } from "../components/HorizontalTimeline"; +import { BFHStyleTabs } from "../components/Tabs"; +let tabbys =[ + { + node: <> + <h3>Max</h3> + <p></p> + </>, + eid: "Max" + }, + { + node: <> + + </>, + eid: "Berens" + }, + { + node: <> + + </>, + eid: "Wischmeyer" + }, + { + node: <> + + </>, + eid: "Friedlein" + }, + { + node: <> + + </>, + eid: "Rnhale" + }, + { + node: <> + + </>, + eid: "Mattjis" + }, + { + node: <> + + </>, + eid: "Eltern" + }, + { + node: <> + + </>, + eid: "Physio" + }, + { + node: <> + + </>, + eid: "Olariu" + }, + { + node: <> + + </>, + eid: "Eltern" + }, + { + node: <> + + </>, + eid: "Weber" + }, +] export function HumanPractices() { - return ( <> - <div className="row align-items-center bottom-buttons"> - - </div> + <HPButtonrow/> <AllPopus></AllPopus> <TimeHori></TimeHori> - <div> - <div id="Max" className="tabcontent"> - <h3>London</h3> - <p>London is the capital city of England.</p> - </div> - <div id="Wischmeyer" className="tabcontent"> - <h3>Paris</h3> - <p>Paris is the capital of France.</p> - </div> - <div id="Berens" className="tabcontent"> - <h3>Tokyo</h3> - <p>Tokyo is the capital of Japan.</p> - </div> - <div id="Friedlein" className="tabcontent"> - <h3>Tokyo</h3> - <p>Tokyo is the capital of Japan.</p> - </div> - <div id="Rnhale" className="tabcontent"> - <h3>Tokyo</h3> - <p>Tokyo is the capital of Japan.</p> - </div> - <div id="Mattjis" className="tabcontent"> - <h3>Tokyo</h3> - <p>Tokyo is the capital of Japan.</p> - </div> - <div id="Physio" className="tabcontent"> - <h3>Tokyo</h3> - <p>Tokyo is the capital of Japan.</p> - </div> - <div id="Eltern" className="tabcontent"> - <h3>Tokyo</h3> - <p>Tokyo is the capital of Japan.</p> - </div> - <div id="Olariu" className="tabcontent"> - <h3>Tokyo</h3> - <p>Tokyo is the capital of Japan.</p> - </div> - <div id="Weber" className="tabcontent"> - <h3>Tokyo</h3> - <p>Tokyo is the capital of Japan.</p> - </div> - <div id="Eltern" className="tabcontent"> - <h3>Tokyo</h3> - <p>Tokyo is the capital of Japan.</p> - </div> - </div> - + <BFHStyleTabs data={tabbys}></BFHStyleTabs> </> ); } +export function HPButtonrow(){ + + return( + <> + <div className="row align-items-center bottom-buttons"> + + </div> + </> + ) +} \ No newline at end of file