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
ba124bde
Commit
ba124bde
authored
6 months ago
by
Liliana Sanfilippo
Browse files
Options
Downloads
Patches
Plain Diff
delete ethics
parent
6ff75207
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#422077
failed
6 months ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/contents/ethics.tsx
+0
-45
0 additions, 45 deletions
src/contents/ethics.tsx
src/headers/eth-h.tsx
+0
-10
0 additions, 10 deletions
src/headers/eth-h.tsx
src/sidebars/ethS.tsx
+0
-99
0 additions, 99 deletions
src/sidebars/ethS.tsx
with
0 additions
and
154 deletions
src/contents/ethics.tsx
deleted
100644 → 0
+
0
−
45
View file @
6ff75207
import
{
useEffect
}
from
"
react
"
;
import
{
useLocation
}
from
"
react-router-dom
"
;
import
{
openFromOtherPage
}
from
"
../utils/openFromOtherpAge
"
;
export
function
Ethics
()
{
const
location
=
useLocation
();
useEffect
(()
=>
{
const
params
=
new
URLSearchParams
(
location
.
search
);
const
collapseId
=
params
.
get
(
'
collapseId
'
);
const
tabId
=
params
.
get
(
'
tab
'
);
// Scroll to the section specified by collapseId
if
(
collapseId
)
{
const
collapseElement
=
document
.
getElementById
(
collapseId
);
if
(
collapseElement
)
{
const
elementTop
=
collapseElement
.
getBoundingClientRect
().
top
+
window
.
pageYOffset
;
const
offset
=
window
.
innerHeight
/
2
-
collapseElement
.
offsetHeight
/
2
;
const
scrollPosition
=
elementTop
-
offset
;
window
.
scrollTo
({
top
:
scrollPosition
,
behavior
:
'
smooth
'
,
});
}
}
// Open the tab specified by tabId
if
(
tabId
)
{
openFromOtherPage
(
tabId
)({
currentTarget
:
document
.
getElementById
(
tabId
)
!
});
}
},
[
location
.
search
]);
return
(
<>
<
div
className
=
"row mt-4"
>
<
div
className
=
"col-lg-8"
>
<
p
>
Happy Birthday Kaya!
</
p
>
</
div
>
</
div
>
</>
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/headers/eth-h.tsx
deleted
100644 → 0
+
0
−
10
View file @
6ff75207
export
function
ETHH
()
{
return
(
<
HeaderBox
title
=
"Ethics"
>
</
HeaderBox
>
);
}
import
HeaderBox
from
"
../components/HeaderBox
"
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/sidebars/ethS.tsx
deleted
100644 → 0
+
0
−
99
View file @
6ff75207
import
{
useEffect
}
from
"
react
"
;
import
{
Highlight
,
NewHighlight
}
from
"
../utils/Highlight-functions
"
;
export
function
EthicsSidebar
(){
let
numsBig
=
[
""
]
let
numsSub
=
[
"
BS1
"
,
"
BS2
"
]
useEffect
(()
=>
{
window
.
addEventListener
(
'
scroll
'
,
handleScroll
);
return
()
=>
window
.
removeEventListener
(
'
scroll
'
,
handleScroll
);
},
[]);
const
handleScroll
=
()
=>
{
for
(
let
idx
in
numsSub
){
const
item
=
numsSub
[
idx
];
let
ind
=
numsSub
.
findIndex
((
e
)
=>
e
==
item
)
let
subdi
=
"
newsubtitle
"
+
ind
console
.
log
(
"
We are looking at 'item' =
"
+
numsSub
[
idx
])
console
.
log
(
"
ind is:
"
+
ind
)
console
.
log
(
"
subdi is:
"
+
subdi
)
console
.
log
(
"
we use
"
+
document
.
getElementById
(
item
)?.
id
+
"
and
"
+
document
.
getElementById
(
subdi
)?.
id
)
NewHighlight
({
el
:
document
.
getElementById
(
item
)
!
},
{
subtitle
:
document
.
getElementById
(
subdi
)
!
});
}
for
(
let
idx
in
numsBig
){
const
item
=
numsBig
[
idx
];
let
ind
=
numsBig
.
findIndex
((
e
)
=>
e
==
item
)
let
subdi
=
"
subtitle
"
+
ind
console
.
log
(
"
We are looking at 'item' =
"
+
numsBig
[
idx
])
console
.
log
(
"
ind is:
"
+
ind
)
console
.
log
(
"
subdi is:
"
+
subdi
)
console
.
log
(
"
we use
"
+
document
.
getElementById
(
item
)?.
id
+
"
and
"
+
document
.
getElementById
(
subdi
)?.
id
)
Highlight
({
el
:
document
.
getElementById
(
item
)
!
},
{
subtitle
:
document
.
getElementById
(
subdi
)
!
});
}
console
.
log
(
"
function HighlightCheck
"
)
}
console
.
log
(
numsSub
)
return
(
<
div
className
=
"col-2 d-none d-lg-block"
>
<
div
className
=
"sticky-top"
>
<
nav
className
=
"sidebar"
>
<
div
>
<
a
onClick
=
{
openThem
({
it
:
"
our-cycle
"
})
}
>
<
div
className
=
"detail-sideitem"
>
<
div
id
=
"parent-our-cycle"
className
=
"sideitem"
>
<
summary
>
Our Cycle
</
summary
>
<
span
id
=
"our-cycle"
className
=
"sidesubtab"
style
=
{
{
display
:
"
none
"
}
}
>
<
ul
>
<
a
href
=
"#"
><
li
>
Iteration 1
</
li
></
a
>
<
a
href
=
"#"
><
li
>
Iteration 2
</
li
></
a
>
<
a
href
=
"#"
><
li
>
Iteration 3
</
li
></
a
>
</
ul
>
</
span
>
</
div
>
</
div
>
</
a
>
</
div
>
</
nav
>
</
div
>
</
div
>
)
}
function
openThem
({
it
}:
{
it
:
string
}){
const
gotoandopen
=
(
_event
:
React
.
MouseEvent
<
HTMLElement
,
MouseEvent
>
)
=>
{
console
.
log
(
"
it classname:
"
+
document
.
getElementById
(
it
)?.
className
)
console
.
log
(
"
it:
"
+
it
)
let
contenttabid
=
"
tab-
"
+
it
;
let
parent
=
"
parent-
"
+
it
;
console
.
log
(
"
we want to open
"
+
it
+
"
and
"
+
contenttabid
)
let
sideitems
=
document
.
getElementsByClassName
(
"
sideitem
"
);
let
subtabs
=
document
.
getElementsByClassName
(
"
sidesubtab
"
);
let
contenttabs
=
document
.
getElementsByClassName
(
"
enginneeringtab
"
);
for
(
let
i
=
0
;
i
<
subtabs
.
length
;
i
++
)
{
(
subtabs
[
i
]
as
HTMLElement
).
style
.
display
=
"
none
"
;
console
.
log
(
"
Hiding sidebar subtab...
"
)
}
for
(
let
i
=
0
;
i
<
contenttabs
.
length
;
i
++
)
{
(
contenttabs
[
i
]
as
HTMLElement
).
style
.
display
=
"
none
"
;
console
.
log
(
"
Hiding content tab...
"
)
}
for
(
let
i
=
0
;
i
<
sideitems
.
length
;
i
++
)
{
(
sideitems
[
i
]
as
HTMLElement
)
!
.
classList
.
remove
(
"
active-sideitem
"
);
console
.
log
(
"
Hiding sidebar subtab...
"
)
}
document
.
getElementById
(
it
)
!
.
style
.
display
=
"
block
"
;
document
.
getElementById
(
parent
)
!
.
classList
.
add
(
"
active-sideitem
"
);
document
.
getElementById
(
contenttabid
)
!
.
style
.
display
=
"
block
"
;
}
return
gotoandopen
;
}
\ No newline at end of file
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