Skip to content

Commit

Permalink
fix project card rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Weile-Zheng committed Sep 8, 2024
1 parent 944b097 commit 590fce8
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 56 deletions.
115 changes: 59 additions & 56 deletions components/currentProjectCard.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Image from "next/image";

export default function CurrentProjectCard({ project, basePath }) {
const projectImagePath = `${basePath ? basePath : ''}/images/projects/${project.image}`;
const projectImagePath = `${basePath ? basePath : ""}/images/projects/${
project.image
}`;
const leadText = project.leads.length > 1 ? "Leads" : "Lead";

return (
Expand All @@ -25,7 +27,7 @@ export default function CurrentProjectCard({ project, basePath }) {
style={styles.leadImage}
width="75"
height="75"
src={`${basePath ? basePath : ''}/images/team/${lead.image}`}
src={`${basePath ? basePath : ""}/images/team/${lead.image}`}
alt={lead.name}
/>
<p style={styles.leadName}>{lead.name}</p>
Expand All @@ -39,79 +41,80 @@ export default function CurrentProjectCard({ project, basePath }) {

const styles = {
card: {
display: 'flex',
flexDirection: 'row',
backgroundColor: '#333',
padding: '25px',
borderRadius: '8px',
width: '100%',
maxWidth: '600px',
marginBottom: '32px',
justifyContent: 'space-between',
alignItems: 'stretch',
display: "flex",
flexDirection: "row",
backgroundColor: "#333",
padding: "25px",
borderRadius: "8px",
width: "100%",
maxWidth: "600px",
marginBottom: "32px",
justifyContent: "space-between",
alignItems: "stretch",
},
column: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
},
projectInfo: {
flex: '1 1 300px',
alignItems: 'center',
justifyContent: 'center',
flex: "1 1 300px",
alignItems: "center",
justifyContent: "center",
marginRight: "16px",
},
projectImage: {
borderRadius: '10%',
objectFit: 'contain',
width: 'auto',
height: '100%',
borderRadius: "10%",
objectFit: "contain",
width: "auto",
height: "auto",
},
projectTitle: {
marginTop: '16px',
fontSize: '24px',
fontWeight: 'bold',
textAlign: 'center',
color: 'white',
marginTop: "16px",
fontSize: "24px",
fontWeight: "bold",
textAlign: "center",
color: "white",
},
leadsInfo: {
flex: '0 0 35%',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
flex: '1 1 75px',
flex: "0 0 35%",
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
flex: "1 1 75px",
},
leadText: {
fontSize: '20px',
fontWeight: 'bold',
color: 'white',
fontSize: "20px",
fontWeight: "bold",
color: "white",
},
leadsContainer: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
marginTop: '8px',
gap: '16px',
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
marginTop: "8px",
gap: "16px",
},
lead: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
},
leadImage: {
borderRadius: '50%',
objectFit: 'cover',
width: '75px',
height: '75px',
borderRadius: "50%",
objectFit: "cover",
width: "75px",
height: "75px",
},
leadName: {
marginTop: '8px',
textAlign: 'center',
fontSize: '14px',
fontWeight: '500',
color: 'white',
marginTop: "8px",
textAlign: "center",
fontSize: "14px",
fontWeight: "500",
color: "white",
},
};
Binary file added public/images/community/mass_meeting1.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/community/mass_meeting2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 590fce8

Please sign in to comment.