Newer
Older
// The main tab has to be given display: block; via id css or be given the id "First"
export function ButtonRowTabs({data, cla}: {data: Array<TabDatensatz>, cla: string}) {
if(data[i].main == true){
rows.push(<div id={data[i].cssname} className={cla} style={{display: "block"}}>
{data[i].node}
</div>)
}
else{
rows.push(<div id={data[i].cssname} className={cla} style={{display: "none"}}>
{data[i].node}
</div>)
}
import { TimelineDatenpunkt } from "../data/hptimelinedata";
import Collapsible from "./Collapsible";
export function BFHStyleTabs({data, cla}: {data: Array<TimelineDatenpunkt>, cla: string}) {
for ( let i = 0; i < data.length; i++ ){
var problem: Boolean = false;
var problem_desc: Array<string> = [];
/* Language */
var lang;
if(data[i].language === "en"){
lang = "Original language: English"
}
else if(data[i].language === "de"){
lang = "Original language: German"
}
else if(data[i].type != "meta"){
problem = true;
problem_desc.push("interview language");
}
/* Expert on */
let expert = "";
if (data[i].experton) {
expert = `Expert on ${data[i].experton}`;
}
/* Aim/Goal */
var goalheading: string = "";
if(data[i].type === "meta"){
goalheading = "Goals";
}
else{
goalheading = "Aim of contact"
}
/* Quotation */
var quoted: string = "";
if(data[i].quote != ""){
if(data[i].quoteNachname && data[i].quoteVorname){
quoted = data[i].quoteVorname + " " + data[i].quoteNachname;
}
else{
quoted = data[i].vorname + " " + data[i].nachnname;
}
}
else{
problem = true;
problem_desc.push("quote missing");
}
/* textparts */
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
let aiM: JSX.Element = <></>
if(data[i].aimofcontact){
aiM = <>
<h4>{goalheading}</h4>
<div className="flexbox">
<p className="hp-timeline-p">{data[i].aimofcontact}</p>
{aim_img}
</div>
</>
}
let insighT: JSX.Element = <></>
if(data[i].insights){
insighT = <>
<h4>Insights</h4>
<div className="flexbox">
{inv_img}
<p className="hp-timeline-p">{data[i].insights}</p>
</div>
</>
}
let imP: JSX.Element = <></>
if(data[i].implementation){
imP = <>
<h4>Implementation</h4>
<div className="flexbox">
<p className="hp-timeline-p">{data[i].implementation}</p>
{imp_img}
</div>
</>
}
/* if(data[i].aimofcontact === ""){
}
if(data[i].insights === ""){
problem = true;
problem_desc.push(" insights missing");
}
if(data[i].implementation === ""){
problem = true;
problem_desc.push(" implementation missing");
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/* Clarification */
var clari: React.ReactNode = <></>
if(data[i].clarification){
clari = <>
<h4>Clarification</h4>
<p>{data[i].clarification}</p>
</>
}
/* Other warnings */
if(data[i].interviewtabid === ""){
problem = true;
problem_desc.push(" interviewtabid missing");
}
/* if(data[i].cardtext === ""){
problem = true;
problem_desc.push(" cardtext missing");
} */
if(data[i].type !== "meta"){
if(data[i].affiliation === undefined || data[i].affiliation === ""){
problem = true;
problem_desc.push(" affiliation missing");
}
if(data[i].job === undefined || data[i].job === ""){
problem = true;
problem_desc.push(" job missing" );
}
}
if(data[i].type === "meta"){
if(data[i].quoteVorname === undefined || data[i].quoteVorname === ""){
problem = true;
problem_desc.push(" who is the quote from?" );
}
}
/* References */
var refs: React.ReactNode = <></>;
if (data[i].references) {
refs = <> <h4>References </h4> {data[i].references}</>
}
/* Further pictures */
var inv_img: React.ReactNode = <></>;
if (data[i].pictureurl_interview) {
inv_img = <> <div className="hti-box"> <img src={data[i].pictureurl_interview} className="hp-timeline-img hti-right"/> </div> <div className="hti-abstand"/> </>
}
var imp_img: React.ReactNode = <></>;
if (data[i].pictureurl_implementation) {
imp_img = <> <div className="hti-abstand"/><div className="hti-box">
<img src={data[i].pictureurl_implementation} className="hp-timeline-img hti-right"/>
</div>
</>
}
var aim_img: React.ReactNode = <></>;
if (data[i].pictureurl_aim) {
aim_img = <> <div className="hti-abstand"/> <div className="hti-box">
<img src={data[i].pictureurl_aim} className="hp-timeline-img hti-left"/>
</div></>
}
let int = <></>;
let int_id = stringToSlug(`${data[i].vorname}-inv-collapsible`)
if (data[i].interview) {
int = <Collapsible title="Interview" id={int_id}>
{data[i].interview}
</Collapsible>
}
let morepics: JSX.Element[] = [];
let oldpics: string[] = [];
console.info("!data[i].aimofcontact && data[i].pictureurl_aim")
oldpics.push(data[i].pictureurl_aim!)
}
if (!data[i].insights && data[i].pictureurl_interview) {
oldpics.push(data[i].pictureurl_interview!)
}
if (!data[i].implementation && data[i].pictureurl_implementation) {
oldpics.push(data[i].pictureurl_implementation!)
}
let newlist = oldpics.concat(data[i].more_pictures!);
for (let ind = 0; ind < (newlist.length - 1); ind += 2) {
morepics.push(
<div className="row">
<div className="col">
<img src={newlist[ind]}/>
</div>
<div className="col">
<img src={newlist[ind+1]}/>
</div>
</div>
)
}
let node = <>
<br/>
<h3>{data[i].vorname} {data[i].nachnname}</h3>
<hr/>
<div className="row">
<div className="col-6">
<div className={"t-tag " + data[i].tag}>
<div className="col" style={{padding: "5px"}}>{expert}</div>
<div className="col" style={{width: "20%", flex: "1 0 0%", padding: "5px"}}>{lang}</div>
<div className="row align-items-stretch">
<div className="col d-flex flex-column">
<div className="row flex-grow-1 mitte">
<p style={{paddingTop: "50px", fontSize: "large"}}>Summary:</p>
<p>{data[i].summary}</p>
</div>
<div className="row unten" style={{fontSize: "large"}}>
See how this influenced our project at
</div>
</div>
<div className="col-3">
<img className="middle sechpro img-fluid" src={data[i].pictureurl} />
</div>
</div>
{/* <div className="row">
<p style={{paddingTop: "50px", fontSize: "large"}}>Summary:</p>
</div>
<div className="col-3">
<img className="middle sechpro" src={data[i].pictureurl}/>
</div>
<div className="col">
<BlockQuoteB text={data[i].quote} cite={quoted}></BlockQuoteB>
</div>
<div id={data[i].interviewtabid} className={cla} style={{ backgroundColor: "black", color: "white"}}>
<h1>PROBLEM with {data[i].vorname} {data[i].nachnname}</h1>
<p> because of: </p>
{problem_desc}
if (data[i].interviewtabid === "timeline"){
rows.push(
<div id={data[i].interviewtabid} className={`${cla} timelinetab bg-db`} style={{display: "block"}}>
{node}
</div>
)
}
else{
rows.push(
<div id={data[i].interviewtabid} className={`${cla} timelinetab bg-db`}>
/* Interview */
export function OLDBFHStyleTabs({data, cla}: {data: Array<NodeDatensatz>, cla: string}) {
rows.push(
<div id={data[i].cssname} className={cla} style={{display: "block"}}>
{data[i].node}
</div>
)
}
else{
rows.push(
<div id={data[i].cssname} className={cla}>
{data[i].node}
</div>
)
}
}
return rows;
}