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
a06e2e43
Commit
a06e2e43
authored
6 months ago
by
Maximilian Leo Huber
Browse files
Options
Downloads
Patches
Plain Diff
fixed 'Problems' images with seperate text
parent
850a06a3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#426626
passed
6 months ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/FadeIn.tsx
+1
-3
1 addition, 3 deletions
src/components/FadeIn.tsx
src/components/Problems.tsx
+160
-0
160 additions, 0 deletions
src/components/Problems.tsx
src/contents/Home.tsx
+3
-0
3 additions, 0 deletions
src/contents/Home.tsx
with
164 additions
and
3 deletions
src/components/FadeIn.tsx
+
1
−
3
View file @
a06e2e43
...
...
@@ -6,8 +6,6 @@ export function FadeIn({filepath, bg}:{filepath: string, bg: string}){
useEffect
(()
=>
{
const
observer
=
new
IntersectionObserver
(
entries
=>
{
entries
.
forEach
(
entry
=>
setVisible
(
entry
.
isIntersecting
));
{
/* debug */
}
entries
.
forEach
(
entry
=>
console
.
log
(
entry
.
isIntersecting
));
});
observer
.
observe
(
domRef
.
current
!
);
},
[]);
...
...
@@ -46,7 +44,7 @@ export function FadeIn({filepath, bg}:{filepath: string, bg: string}){
</
img
>
</
div
>
{
/* Spacing Block */
}
<
div
className
=
'col'
style
=
{
{
'
height
'
:
'
9
0
vh
'
}
}
></
div
>
<
div
className
=
'col'
style
=
{
{
'
height
'
:
'
9
5
vh
'
}
}
></
div
>
</>
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/components/Problems.tsx
0 → 100644
+
160
−
0
View file @
a06e2e43
import
{
useEffect
,
useRef
,
useState
}
from
"
react
"
;
export
function
Problems
(){
const
[
isVisible
,
setVisible
]
=
useState
(
false
);
const
domRef
=
useRef
(
null
)
!
;
useEffect
(()
=>
{
const
observer
=
new
IntersectionObserver
(
entries
=>
{
entries
.
forEach
(
entry
=>
setVisible
(
entry
.
isIntersecting
));
});
observer
.
observe
(
domRef
.
current
!
);
},
[]);
const
[
isVisible2
,
setVisible2
]
=
useState
(
false
);
const
domRef2
=
useRef
(
null
)
!
;
useEffect
(()
=>
{
const
observer
=
new
IntersectionObserver
(
entries
=>
{
entries
.
forEach
(
entry
=>
setVisible2
(
entry
.
isIntersecting
));
});
observer
.
observe
(
domRef2
.
current
!
);
},
[]);
const
[
isVisible3
,
setVisible3
]
=
useState
(
false
);
const
domRef3
=
useRef
(
null
)
!
;
useEffect
(()
=>
{
const
observer
=
new
IntersectionObserver
(
entries
=>
{
entries
.
forEach
(
entry
=>
setVisible3
(
entry
.
isIntersecting
));
});
observer
.
observe
(
domRef3
.
current
!
);
},
[]);
const
[
isVisible4
,
setVisible4
]
=
useState
(
false
);
const
domRef4
=
useRef
(
null
)
!
;
useEffect
(()
=>
{
const
observer
=
new
IntersectionObserver
(
entries
=>
{
entries
.
forEach
(
entry
=>
setVisible4
(
entry
.
isIntersecting
));
});
observer
.
observe
(
domRef4
.
current
!
);
},
[]);
const
[
isVisible5
,
setVisible5
]
=
useState
(
false
);
const
domRef5
=
useRef
(
null
)
!
;
useEffect
(()
=>
{
const
observer
=
new
IntersectionObserver
(
entries
=>
{
entries
.
forEach
(
entry
=>
setVisible5
(
entry
.
isIntersecting
));
});
observer
.
observe
(
domRef5
.
current
!
);
},
[]);
return
(
<>
{
/* One */
}
<
div
className
=
'col'
style
=
{
{
'
height
'
:
'
100vh
'
,
'
transition
'
:
'
opacity 0.6s ease-out
'
,
'
opacity
'
:
`
${
isVisible
?
'
1
'
:
'
0
'
}
`
,
'
visibility
'
:
`
${
isVisible
?
'
visible
'
:
'
hidden
'
}
`
}
}
ref
=
{
domRef
}
>
<
img
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
width
'
:
'
60vw
'
,
'
height
'
:
'
60vh
'
,
}
}
src
=
"https://static.igem.wiki/teams/5247/landing/problems/cyfib-1.webp"
>
</
img
>
<
p
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
zIndex
'
:
'
1
'
}
}
>
Text Here
</
p
>
</
div
>
{
/* Two */
}
<
div
className
=
'col'
style
=
{
{
'
height
'
:
'
100vh
'
,
'
transition
'
:
'
opacity 0.6s ease-out
'
,
'
opacity
'
:
`
${
isVisible2
?
'
1
'
:
'
0
'
}
`
,
'
visibility
'
:
`
${
isVisible2
?
'
visible
'
:
'
hidden
'
}
`
}
}
ref
=
{
domRef2
}
>
<
img
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
width
'
:
'
60vw
'
,
'
height
'
:
'
60vh
'
,
}
}
src
=
"https://static.igem.wiki/teams/5247/landing/problems/cyfib-2.webp"
>
</
img
>
<
p
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
zIndex
'
:
'
1
'
}
}
>
Text Here
</
p
>
</
div
>
{
/* Three */
}
<
div
className
=
'col'
style
=
{
{
'
height
'
:
'
100vh
'
,
'
transition
'
:
'
opacity 0.6s ease-out
'
,
'
opacity
'
:
`
${
isVisible3
?
'
1
'
:
'
0
'
}
`
,
'
visibility
'
:
`
${
isVisible3
?
'
visible
'
:
'
hidden
'
}
`
}
}
ref
=
{
domRef3
}
>
<
img
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
width
'
:
'
60vw
'
,
'
height
'
:
'
60vh
'
,
}
}
src
=
"https://static.igem.wiki/teams/5247/landing/problems/cyfib-3.webp"
>
</
img
>
<
p
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
zIndex
'
:
'
1
'
}
}
>
Text Here
</
p
>
</
div
>
{
/* Four */
}
<
div
className
=
'col'
style
=
{
{
'
height
'
:
'
100vh
'
,
'
transition
'
:
'
opacity 0.6s ease-out
'
,
'
opacity
'
:
`
${
isVisible4
?
'
1
'
:
'
0
'
}
`
,
'
visibility
'
:
`
${
isVisible4
?
'
visible
'
:
'
hidden
'
}
`
}
}
ref
=
{
domRef4
}
>
<
img
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
width
'
:
'
60vw
'
,
'
height
'
:
'
60vh
'
,
}
}
src
=
"https://static.igem.wiki/teams/5247/landing/problems/cyfib-4.webp"
>
</
img
>
<
p
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
zIndex
'
:
'
1
'
}
}
>
Text Here
</
p
>
</
div
>
{
/* Five */
}
<
div
className
=
'col'
style
=
{
{
'
height
'
:
'
100vh
'
,
'
transition
'
:
'
opacity 0.6s ease-out
'
,
'
opacity
'
:
`
${
isVisible5
?
'
1
'
:
'
0
'
}
`
,
'
visibility
'
:
`
${
isVisible5
?
'
visible
'
:
'
hidden
'
}
`
}
}
ref
=
{
domRef5
}
>
<
img
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
width
'
:
'
60vw
'
,
'
height
'
:
'
60vh
'
,
}
}
src
=
"https://static.igem.wiki/teams/5247/landing/problems/cyfib-5.webp"
>
</
img
>
<
p
style
=
{
{
'
position
'
:
'
fixed
'
,
'
top
'
:
'
20vh
'
,
'
left
'
:
'
20vw
'
,
'
zIndex
'
:
'
1
'
}
}
>
Text Here
</
p
>
</
div
>
</>
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/contents/Home.tsx
+
3
−
0
View file @
a06e2e43
import
{
FadeIn
}
from
"
../components/FadeIn
"
;
import
{
Breathe
}
from
"
../components/Breathe
"
;
import
{
Problems
}
from
"
../components/Problems
"
;
export
function
Home
()
{
return
(
...
...
@@ -10,6 +11,8 @@ export function Home() {
<
div
className
=
'col'
style
=
{
{
'
height
'
:
'
70vh
'
}
}
></
div
>
<
Breathe
></
Breathe
>
<
Problems
></
Problems
>
<
FadeIn
filepath
=
"https://static.igem.wiki/teams/5247/landing/problems/problems-1.webp"
bg
=
''
></
FadeIn
>
<
FadeIn
filepath
=
"https://static.igem.wiki/teams/5247/landing/problems/problems-2.webp"
bg
=
''
></
FadeIn
>
...
...
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