File tree Expand file tree Collapse file tree 8 files changed +117
-1
lines changed Expand file tree Collapse file tree 8 files changed +117
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import restricted from './components/Restricted/Restricted'
14
14
import SignupForm from './components/SignupForm/SignupForm'
15
15
import Version from './components/Version/Version'
16
16
import LandingA from './components/LandingA/LandingA'
17
+ import LandingC from './components/LandingC/LandingC'
17
18
18
19
// set up components for lazy loading
19
20
const ProfileRestrictedLoadable = restricted ( Loadable ( {
@@ -44,6 +45,7 @@ class App extends Component {
44
45
< Route path = '/profile' component = { ProfileRestrictedLoadable } />
45
46
< Route path = '/signup' component = { SignupForm } />
46
47
< Route path = '/landing-a' component = { LandingA } />
48
+ < Route path = '/landing-c' component = { LandingC } />
47
49
</ Switch >
48
50
</ div >
49
51
)
Original file line number Diff line number Diff line change 2
2
3
3
$black : #000 ;
4
4
$bottom-red : #ff3e3e ;
5
- $text-red : #ea4c2d ;
6
5
$top-red : #e74e2b ;
7
6
$white : #fff ;
8
7
Original file line number Diff line number Diff line change
1
+ import React , { Component } from 'react'
2
+ import styles from './LandingC.scss'
3
+ import map from '../../images/map.png'
4
+ import { callToCodeEfforts } from '../shared/constants'
5
+
6
+ /**
7
+ * TODO: callToCodeEfforts constants should be removed once the API to
8
+ * get the efforts are implemented
9
+ */
10
+ class LandingC extends Component {
11
+ constructor ( props ) {
12
+ super ( props )
13
+ this . getLinkStyles = this . getLinkStyles . bind ( this )
14
+ }
15
+
16
+ getLinkStyles ( itemType ) {
17
+ return itemType === 'number'
18
+ ? `${ styles . number } ${ styles . effortItem } `
19
+ : `${ styles . label } ${ styles . effortItem } `
20
+ }
21
+
22
+ renderList ( items , type ) {
23
+ return items . map ( ( item , index ) => {
24
+ return (
25
+ < div key = { index } className = { this . getLinkStyles ( type ) } >
26
+ { item }
27
+ </ div >
28
+ )
29
+ } )
30
+ }
31
+
32
+ render ( ) {
33
+ return (
34
+ < div className = { styles . container } >
35
+ < h1 className = { styles . landingPageHeading } >
36
+ { 'A truly international effort' }
37
+ </ h1 >
38
+ < div className = { styles . map } >
39
+ < img src = { map } alt = "Call to code presence international" />
40
+ </ div >
41
+ < div className = { styles . effortsSection } >
42
+ { this . renderList ( Object . values ( callToCodeEfforts ) , 'number' ) }
43
+ { this . renderList ( Object . keys ( callToCodeEfforts ) , 'label' ) }
44
+ </ div >
45
+ </ div >
46
+ )
47
+ }
48
+ }
49
+
50
+ export default LandingC
Original file line number Diff line number Diff line change
1
+ @import " ../../scss/partials/partials" ;
2
+
3
+ .container {
4
+ left : 0 ;
5
+ padding : 20px 20px ;
6
+ position : absolute ;
7
+ right : 0 ;
8
+ }
9
+
10
+ .landingPageHeading {
11
+ text-align : center ;
12
+ padding-bottom : 30px ;
13
+ line-height : 2.33 ;
14
+ letter-spacing : normal ;
15
+ font-size : 30px ;
16
+ }
17
+
18
+ .map {
19
+ width : 929px ;
20
+ height : 488px ;
21
+ object-fit : contain ;
22
+ margin :0px auto ;
23
+ display : block ;
24
+ margin-bottom : 30px ;
25
+ }
26
+
27
+ .effortsSection {
28
+ margin : auto ;
29
+ width : 60% ;
30
+ padding : 10px ;
31
+ display : grid ;
32
+ grid-template-columns : repeat (4 , 1fr );
33
+ grid-column-gap : 10px ;
34
+ grid-template-rows : auto ;
35
+ grid-gap : 15px ;
36
+ justify-items : center ;
37
+ align-items : center ;
38
+ }
39
+
40
+ .effortItem {
41
+ text-align : center ;
42
+ }
43
+
44
+ .number {
45
+ font-size : 350% ;
46
+ color : $text-red
47
+ }
48
+
49
+ .label {
50
+ font-size : 20px ;
51
+ font-weight : 300 ;
52
+ }
Original file line number Diff line number Diff line change
1
+ export const VOLUNTEERS = 1254
2
+ export const PROJECTS = 73
3
+ export const ORGANIZATIONS = 52
4
+ export const COUNTRIES = 72
5
+
6
+ export default {
7
+ Volunteers : VOLUNTEERS ,
8
+ Projects : PROJECTS ,
9
+ Organizations : ORGANIZATIONS ,
10
+ Countries : COUNTRIES
11
+ }
Original file line number Diff line number Diff line change 1
1
export { default as causes } from './causes'
2
2
export { default as technologies } from './technologies'
3
+ export { default as callToCodeEfforts } from './callToCodeEfforts'
Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ $listColor: darkgray;
9
9
$errorColor : red ;
10
10
$validInputColor : #3E9B2A ;
11
11
$inputsBorderColor : #C6CBD4 ;
12
+ $text-red : #EA4C2D ;
You can’t perform that action at this time.
0 commit comments