Skip to content

Commit 6cc6824

Browse files
committed
stub triangle grid section
1 parent 811b248 commit 6cc6824

File tree

5 files changed

+122
-0
lines changed

5 files changed

+122
-0
lines changed

examples/components/ParallaxExample/ParallaxExample.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
Intro,
44
IntroCopy,
55
Marquee,
6+
TriangleGrid,
67
} from 'components';
78
import style from './ParallaExample.scss';
89

@@ -14,6 +15,7 @@ export default class ParallaxExample extends Component {
1415
<Intro />
1516
<IntroCopy />
1617
<Marquee />
18+
<TriangleGrid />
1719
</div>
1820
);
1921
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from 'react';
2+
import style from './TriangleGrid.scss';
3+
import { Svg } from 'components';
4+
import { Parallax } from 'react-scroll-parallax';
5+
import gridPurple from '!!raw-loader!./grid-purple.svg';
6+
import gridWhite from '!!raw-loader!./grid-white.svg';
7+
import angleTop from '!!raw-loader!../shared/angle-dark-top.svg';
8+
9+
const TriangleGrid = () => (
10+
<div className={style.root}>
11+
<Svg
12+
svg={angleTop}
13+
className={style.angleTop}
14+
/>
15+
<div className={style.container}>
16+
<Parallax
17+
offsetYMax={25}
18+
offsetYMin={-25}
19+
>
20+
<Svg
21+
svg={gridPurple}
22+
className={style.trianglesPurple}
23+
/>
24+
</Parallax>
25+
<Parallax
26+
offsetYMax={50}
27+
offsetYMin={-50}
28+
offsetXMax={13}
29+
offsetXMin={-13}
30+
>
31+
<Svg
32+
svg={gridWhite}
33+
className={style.trianglesWhite}
34+
/>
35+
</Parallax>
36+
</div>
37+
</div>
38+
);
39+
40+
export default TriangleGrid;
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
//
2+
// Marquee
3+
// ---------------------------
4+
5+
@import '../../styles/colors';
6+
7+
:local(.root) {
8+
position: relative;
9+
display: flex;
10+
flex-flow: row wrap;
11+
justify-content: flex-end;
12+
align-items: center;
13+
padding: 25vh 2em;
14+
background-color: $plum;
15+
}
16+
17+
:local(.container) {
18+
position: relative;
19+
width: 25em;
20+
}
21+
22+
:local(.angleTop) {
23+
position: absolute;
24+
bottom: 100%;
25+
left: 0;
26+
right: 0;
27+
}
28+
29+
:local(.trianglesPurple) {
30+
position: absolute;
31+
top: 0;
32+
left: 0;
33+
right: 0;
34+
}
35+
36+
:local(.trianglesWhite) {
37+
svg {
38+
39+
}
40+
}
Lines changed: 21 additions & 0 deletions
Loading
Lines changed: 19 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)