File tree Expand file tree Collapse file tree 5 files changed +122
-0
lines changed Expand file tree Collapse file tree 5 files changed +122
-0
lines changed Original file line number Diff line number Diff line change 33 Intro ,
44 IntroCopy ,
55 Marquee ,
6+ TriangleGrid ,
67} from 'components' ;
78import 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 }
Original file line number Diff line number Diff line change 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 ;
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments