Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bielefeld-CeBiTec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2024 Competition
Bielefeld-CeBiTec
Commits
b2f4a732
Commit
b2f4a732
authored
8 months ago
by
Liliana Sanfilippo
Browse files
Options
Downloads
Patches
Plain Diff
tabs
parent
590857f8
No related branches found
No related tags found
No related merge requests found
Pipeline
#394534
passed
8 months ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/HorizontalTimeline.tsx
+25
-19
25 additions, 19 deletions
src/components/HorizontalTimeline.tsx
src/contents/human-practices.tsx
+44
-5
44 additions, 5 deletions
src/contents/human-practices.tsx
with
69 additions
and
24 deletions
src/components/HorizontalTimeline.tsx
+
25
−
19
View file @
b2f4a732
...
...
@@ -41,13 +41,16 @@ function TimeItem({tag, title, children, pic, author, tabid}: ItemProps){
return
rows
;
}
export
function
TimeHori
({
tab
}:
{
tab
:
string
}){
let
nod
=
undefined
;
if
(
tab
=
""
){
export
function
TimeHori
({
tab
}:{
tab
:
string
}){
let
nod
;
/* console.log("TimeHori") */
if
(
tab
===
""
){
nod
=
<
AllItems
></
AllItems
>
/* console.log("Tab = ''") */
}
else
{
nod
=
<
getTypeItems
ta
=
{
tab
}
></
getTypeItems
>
/* console.log("Tab") */
nod
=
getItemsByType
(
tab
);
}
return
(
<
div
>
...
...
@@ -93,7 +96,7 @@ function TimeItem({tag, title, children, pic, author, tabid}: ItemProps){
}
function
openCity
({
cityName
}:{
cityName
:
string
})
{
export
function
openCity
({
cityName
}:{
cityName
:
string
})
{
const
opencity
=
(
event
:
React
.
MouseEvent
<
HTMLButtonElement
,
MouseEvent
>
)
=>
{
var
i
,
tabcontent
,
tablinks
;
tabcontent
=
document
.
getElementsByClassName
(
"
tabcontent
"
);
...
...
@@ -137,24 +140,27 @@ function TimeItem({tag, title, children, pic, author, tabid}: ItemProps){
}
return
rows
;
}
export
function
get
Type
Items
({
ta
}:
{
ta
:
string
}
){
export
function
getItems
ByType
(
tabid
:
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
>)
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
tabid
===
data
[
i
].
tag
)
{
rows
.
push
(<
TimeItem
key
=
{
i
}
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
=
[
{
...
...
This diff is collapsed.
Click to expand it.
src/contents/human-practices.tsx
+
44
−
5
View file @
b2f4a732
...
...
@@ -8,7 +8,7 @@
- Filter mit HalbkreisDing als Tabsteuerung | Einteilung nach Bereich (Academia, Insustry, ..., und auch nach Delivery und Mechanism)
- DNA Strang als Timeline?
*/
import
{
TimeHori
,
getTypeItems
}
from
"
../components/HorizontalTimeline
"
;
import
{
TimeHori
}
from
"
../components/HorizontalTimeline
"
;
import
{
AllPopus
}
from
"
../components/HorizontalTimeline
"
;
import
{
BFHStyleTabs
}
from
"
../components/Tabs
"
;
...
...
@@ -82,25 +82,64 @@ let tabbys =[
},
]
export
function
HumanPractices
()
{
let
tabtabs
=
[
{
node
:
<
TimeHori
tab
=
""
></
TimeHori
>,
eid
:
"
All
"
},
{
node
:
<
TimeHori
tab
=
"Academia"
></
TimeHori
>,
eid
:
"
Academia
"
},
{
node
:
<
TimeHori
tab
=
"Patient"
></
TimeHori
>,
eid
:
"
Patient
"
},
{
node
:
<
TimeHori
tab
=
"Medical Professional"
></
TimeHori
>,
eid
:
"
Medical
"
}
]
return
(
export
function
HumanPractices
()
{
return
(
<>
<
HPButtonrow
/>
<
AllPopus
></
AllPopus
>
<
TimeHori
></
TimeHori
>
<
BFHStyleTabs
data
=
{
tabtabs
}
></
BFHStyleTabs
>
<
BFHStyleTabs
data
=
{
tabbys
}
></
BFHStyleTabs
>
</>
);
}
export
function
openTab
({
cityName
}:{
cityName
:
string
})
{
const
opencity
=
(
event
:
React
.
MouseEvent
<
HTMLButtonElement
,
MouseEvent
>
)
=>
{
var
i
,
tabcontent
,
tablinks
;
tabcontent
=
document
.
getElementsByClassName
(
"
tabcontent
"
);
for
(
i
=
0
;
i
<
tabcontent
.
length
;
i
++
)
{
(
tabcontent
[
i
]
as
HTMLElement
).
style
.
display
=
"
none
"
;
}
tablinks
=
document
.
getElementsByClassName
(
"
tablinks
"
);
for
(
i
=
0
;
i
<
tablinks
.
length
;
i
++
)
{
tablinks
[
i
].
className
=
tablinks
[
i
].
className
.
replace
(
"
active
"
,
""
);
}
document
.
getElementById
(
cityName
)
!
.
style
.
display
=
"
block
"
;
event
.
currentTarget
.
className
+=
"
active
"
;
}
return
opencity
;
}
export
function
HPButtonrow
(){
return
(
<>
<
div
className
=
"row align-items-center bottom-buttons"
>
<
button
onClick
=
{
openTab
({
cityName
:
"
Patient
"
})
}
>
Patient
</
button
>
<
button
onClick
=
{
openTab
({
cityName
:
"
All
"
})
}
>
All
</
button
>
</
div
>
</>
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment