This repository was archived by the owner on Jul 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +74
-20
lines changed Expand file tree Collapse file tree 4 files changed +74
-20
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,19 @@ const PeopleCard = (props) => {
2323 alignItems : "center" ,
2424 } }
2525 >
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+ />
2739 </ div >
2840 < div
2941 className = "card__footer"
@@ -55,15 +67,22 @@ const PeopleCard = (props) => {
5567} ;
5668
5769const CardList = ( ) => {
70+ const half = Math . ceil ( contributors . length / 2 ) ;
71+ const firstHalf = contributors . slice ( 0 , half ) ;
72+ const secondHalf = contributors . slice ( half ) ;
5873 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+ ) ) }
6579 </ div >
66- </ >
80+ < div className = { styles . column } >
81+ { secondHalf . map ( ( person , index ) => (
82+ < PeopleCard key = { index } { ...person } />
83+ ) ) }
84+ </ div >
85+ </ div >
6786 ) ;
6887} ;
6988export 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 {
28 display : flex;
3- flex-wrap : wrap;
49 justify-content : center;
510 align-items : center;
6- margin : 2rem 0 ;
11+ margin : 0 ;
12+ padding : 0 5rem ;
13+ max-width : 100% ;
714}
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 ;
1222}
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) => {
5656} ;
5757
5858const 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+
5964 return (
6065 < Layout title = "people" >
6166 < div >
6267 < h2 style = { { textAlign : "center" , margin : "0.5rem" } } >
6368 Project Alumni
6469 </ 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 >
6981 </ div >
7082 </ div >
7183 </ Layout >
7284 ) ;
7385} ;
86+
7487export default Alumni ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const contributors = [
11111212 role : "PEcAn Co-PI" ,
1313 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 " ,
1515 } ,
1616 {
1717 name : "Dr. Kenton McHenry" ,
You can’t perform that action at this time.
0 commit comments