mirror of
https://github.com/usatiuk/photos.git
synced 2025-10-29 07:47:47 +01:00
do not stretch photos
maybe this can be an option?
This commit is contained in:
@@ -170,30 +170,31 @@
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.photoPadding {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.photoCard {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
flex-grow: 1;
|
||||
transition: all 0.3s;
|
||||
|
||||
transition: 0.3s;
|
||||
user-select: none;
|
||||
height: 15rem;
|
||||
min-width: 10rem;
|
||||
margin: 0.25rem;
|
||||
padding: 0rem;
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
object-fit: cover;
|
||||
object-fit: scale-down;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,11 +85,13 @@ export const OverviewComponent: React.FunctionComponent<
|
||||
);
|
||||
const photosEls = photos.map((photo) => {
|
||||
return (
|
||||
<PhotoCard
|
||||
key={photo.id}
|
||||
photo={photo}
|
||||
onClick={() => onCardClick(photo.id)}
|
||||
/>
|
||||
<>
|
||||
<PhotoCard
|
||||
key={photo.id}
|
||||
photo={photo}
|
||||
onClick={() => onCardClick(photo.id)}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
});
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user