v0.9.3 Make projectCards of fixed sizes
This commit is contained in:
parent
4e938a0a3e
commit
b9e1326d1c
3 changed files with 30 additions and 12 deletions
|
|
@ -7,9 +7,11 @@ function ProjectCard({ project, onClick, className }) {
|
||||||
<div className={styles.imageSlider}>
|
<div className={styles.imageSlider}>
|
||||||
<img src={project.images[0]} alt={`${project.title} - main image`} className={styles.projectImage} />
|
<img src={project.images[0]} alt={`${project.title} - main image`} className={styles.projectImage} />
|
||||||
</div>
|
</div>
|
||||||
<h3 className={styles.title}>{project.title}</h3>
|
<div className={styles.content}>
|
||||||
<p className={styles.category}>{project.category}</p>
|
<h3 className={styles.title}>{project.title}</h3>
|
||||||
<p className={styles.description}>{project.description}</p>
|
<p className={styles.category}>{project.category}</p>
|
||||||
|
<p className={styles.description}>{project.description}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
height: 450px; /* Fixed height for the card */
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card:hover {
|
.card:hover {
|
||||||
|
|
@ -24,21 +27,34 @@
|
||||||
transition: opacity 0.5s ease;
|
transition: opacity 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 1rem;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 1rem;
|
margin-bottom: 0.5rem;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.description {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
margin: 0 1rem 1rem;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category {
|
.category {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: #666;
|
color: #666;
|
||||||
margin: 0 1rem;
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #666;
|
||||||
|
flex-grow: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 4; /* Adjust this number to show more or fewer lines */
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
0.9.2
|
0.9.3
|
||||||
Loading…
Add table
Add a link
Reference in a new issue