Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UBC-Vancouver
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
2023 Competition
UBC-Vancouver
Commits
cf56ac04
Commit
cf56ac04
authored
1 year ago
by
Lucy Hao
Browse files
Options
Downloads
Patches
Plain Diff
add svgs
parent
b9f59577
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#307813
passed
1 year ago
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/globals.scss
+10
-0
10 additions, 0 deletions
app/globals.scss
components/ImageText.js
+14
-29
14 additions, 29 deletions
components/ImageText.js
components/landingpage/Newspapers.js
+1
-22
1 addition, 22 deletions
components/landingpage/Newspapers.js
with
25 additions
and
51 deletions
app/globals.scss
+
10
−
0
View file @
cf56ac04
...
...
@@ -49,6 +49,16 @@ body {
padding-top
:
25px
;
}
.landing-svgs
{
width
:
40vw
;
height
:
auto
;
padding
:
10%
;
@media
only
screen
and
(
max-width
:
768px
)
{
width
:
80vw
;
height
:
auto
;
}
}
.bg-custom-navbar
{
a
{
text-decoration
:
none
;
...
...
This diff is collapsed.
Click to expand it.
components/ImageText.js
+
14
−
29
View file @
cf56ac04
import
*
as
React
from
"
react
"
;
import
{
Slide
}
from
"
react-awesome-reveal
"
;
import
styled
from
"
styled-components
"
;
import
{
useEffect
}
from
"
react
"
;
const
Img
=
styled
.
img
`
height: auto;
width: 40vw;
@media only screen and (max-width: 768px) {
max-width: 80vw;
width: 80vw;
height: auto;
}
`
;
const
ImageText
=
({
header
,
text
,
side
,
alt
,
image
,
pad
,
gif
})
=>
{
function
renderSVG
(
src
)
{
return
(
<
object
type
=
"
image/svg+xml
"
data
=
{
src
}
className
=
"
landing-svgs
"
>
Your
browser
does
not
support
SVG
.
<
/object
>
);
}
const
ImageText
=
({
header
,
text
,
side
,
image
,
gif
})
=>
{
return
(
<
div
className
=
{
...
...
@@ -43,25 +43,10 @@ const ImageText = ({ header, text, side, alt, image, pad, gif }) => {
triggerOnce
=
{
true
}
duration
=
{
1500
}
>
{
pad
?
(
<
Img
src
=
{
"
https://static.igem.wiki/teams/4796/wiki/landing/
"
+
image
+
(
gif
?
"
.gif
"
:
"
.svg
"
)
}
alt
=
{
alt
}
style
=
{{
padding
:
"
17%
"
}}
/
>
)
:
(
<
Img
src
=
{
"
https://static.igem.wiki/teams/4796/wiki/landing/
"
+
image
+
(
gif
?
"
.gif
"
:
"
.svg
"
)
}
alt
=
{
alt
}
/
>
{
renderSVG
(
"
https://static.igem.wiki/teams/4796/wiki/landing/
"
+
image
+
(
gif
?
"
.gif
"
:
"
.svg
"
)
)}
<
/Slide
>
<
/div
>
...
...
This diff is collapsed.
Click to expand it.
components/landingpage/Newspapers.js
+
1
−
22
View file @
cf56ac04
import
ImageText
from
"
../ImageText
"
;
import
styled
from
"
styled-components
"
;
const
LogoDiv
=
styled
.
div
`
background-image: url(https://static.igem.wiki/teams/4796/wiki/logo.gif);
background-size: contain;
background-repeat: no-repeat;
`
;
const
SpacingDiv
=
styled
.
div
`
padding-top: 70vh;
@media only screen and (max-width: 768px) {
padding-top: 30vh;
}
`
;
const
Logo
=
styled
.
img
`
width: 50vw;
margin: auto;
...
...
@@ -30,11 +17,6 @@ const LogoTitleDiv = styled.div`
export
default
function
Newspapers
()
{
return
(
// <LogoDiv >
// <SpacingDiv>
// </SpacingDiv>
// </LogoDiv>
<
div
className
=
{
"
padded-with-margins flex-col
"
}
>
<
LogoTitleDiv
>
<
h2
>
...
...
@@ -59,7 +41,7 @@ export default function Newspapers() {
pad
side
=
"
left
"
alt
=
"
1
"
image
=
"
size-fixed
"
image
=
"
size-fixed
-text-animate-classes
"
/>
<
ImageText
text
=
{()
=>
(
...
...
@@ -73,7 +55,6 @@ export default function Newspapers() {
<
/p
>
<
/
>
)}
pad
side
=
"
right
"
alt
=
"
2
"
image
=
"
sales
"
...
...
@@ -92,10 +73,8 @@ export default function Newspapers() {
)}
side
=
"
left
"
alt
=
"
3
"
pad
image
=
"
waste-fixed-bot
"
/>
<
/div
>
);
return
;
}
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