This repository was archived by the owner on Jul 11, 2024. It is now read-only.
File tree 4 files changed +74
-20
lines changed
4 files changed +74
-20
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,19 @@ const PeopleCard = (props) => {
23
23
alignItems : "center" ,
24
24
} }
25
25
>
26
- < img src = { props . img } alt = "Image alt text" title = "Logo Title Text 1" />
26
+ < img
27
+ src = { props . img }
28
+ className = "cardImage"
29
+ alt = "Image alt text"
30
+ title = "Logo Title Text"
31
+ style = { {
32
+ maxWidth : "250px" ,
33
+ maxHeight : "250px" ,
34
+ objectFit : "contain" ,
35
+ width : "100%" ,
36
+ height : "100%" ,
37
+ } }
38
+ />
27
39
</ div >
28
40
< div
29
41
className = "card__footer"
@@ -55,15 +67,22 @@ const PeopleCard = (props) => {
55
67
} ;
56
68
57
69
const CardList = ( ) => {
70
+ const half = Math . ceil ( contributors . length / 2 ) ;
71
+ const firstHalf = contributors . slice ( 0 , half ) ;
72
+ const secondHalf = contributors . slice ( half ) ;
58
73
return (
59
- < >
60
- < h2 style = { { textAlign : "center" , margin :'0.5rem' } } > People</ h2 >
61
- < div className = { styles . peopleContainer } >
62
- { contributors . map ( ( person , index ) => {
63
- return < PeopleCard key = { index } { ...person } /> ;
64
- } ) }
74
+ < div className = { styles . mainContainer } >
75
+ < div className = { styles . column } >
76
+ { firstHalf . map ( ( person , index ) => (
77
+ < PeopleCard key = { index } { ...person } />
78
+ ) ) }
65
79
</ div >
66
- </ >
80
+ < div className = { styles . column } >
81
+ { secondHalf . map ( ( person , index ) => (
82
+ < PeopleCard key = { index } { ...person } />
83
+ ) ) }
84
+ </ div >
85
+ </ div >
67
86
) ;
68
87
} ;
69
88
export default CardList ;
Original file line number Diff line number Diff line change 1
- .peopleContainer {
1
+ .card {
2
+ margin : 2rem ;
3
+ max-width : 400px ;
4
+ flex : 1 1 auto;
5
+ }
6
+
7
+ .mainContainer {
2
8
display : flex;
3
- flex-wrap : wrap;
4
9
justify-content : center;
5
10
align-items : center;
6
- margin : 2rem 0 ;
11
+ margin : 0 ;
12
+ padding : 0 5rem ;
13
+ max-width : 100% ;
7
14
}
8
- .card {
9
- margin : 2rem 4rem ;
10
- max-width : 400px ;
11
- flex : 1 1 auto;
15
+
16
+ .column {
17
+ display : flex;
18
+ flex-direction : column;
19
+ align-items : center;
20
+ flex : 1 ;
21
+ margin : 0 1rem ;
12
22
}
23
+
24
+ @media (max-width : 768px ) {
25
+ .mainContainer {
26
+ flex-direction : column;
27
+ padding : 0 ;
28
+ }
29
+
30
+ .column {
31
+ margin : 0 ;
32
+ width : 100% ;
33
+ }
34
+ }
Original file line number Diff line number Diff line change @@ -56,19 +56,32 @@ const PeopleCard = (props) => {
56
56
} ;
57
57
58
58
const Alumni = ( ) => {
59
+ // Splitting the projectAlumni array into two
60
+ const half = Math . ceil ( projectAlumni . length / 2 ) ;
61
+ const firstHalf = projectAlumni . slice ( 0 , half ) ;
62
+ const secondHalf = projectAlumni . slice ( half ) ;
63
+
59
64
return (
60
65
< Layout title = "people" >
61
66
< div >
62
67
< h2 style = { { textAlign : "center" , margin : "0.5rem" } } >
63
68
Project Alumni
64
69
</ h2 >
65
- < div className = { styles . peopleContainer } >
66
- { projectAlumni . map ( ( person , index ) => {
67
- return < PeopleCard key = { index } { ...person } /> ;
68
- } ) }
70
+ < div className = { styles . mainContainer } >
71
+ < div className = { styles . column } >
72
+ { firstHalf . map ( ( person , index ) => (
73
+ < PeopleCard key = { index } { ...person } />
74
+ ) ) }
75
+ </ div >
76
+ < div className = { styles . column } >
77
+ { secondHalf . map ( ( person , index ) => (
78
+ < PeopleCard key = { index } { ...person } />
79
+ ) ) }
80
+ </ div >
69
81
</ div >
70
82
</ div >
71
83
</ Layout >
72
84
) ;
73
85
} ;
86
+
74
87
export default Alumni ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const contributors = [
11
11
12
12
role : "PEcAn Co-PI" ,
13
13
profession : "Staff Scientist, Indigo Ag" ,
14
- img : "https://datascience.cct.arizona.edu/sites/datascience.cct.arizona.edu/files/styles/large /public/images/people/ david_lebauer.jpg " ,
14
+ img : "https://datascience.cct.arizona.edu/sites/datascience.cct.arizona.edu/files/styles/az_medium /public/2023-11/ david_lebauer.jpeg " ,
15
15
} ,
16
16
{
17
17
name : "Dr. Kenton McHenry" ,
You can’t perform that action at this time.
0 commit comments