Skip to content

Commit

Permalink
updated style of edit gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
James Andrew Croney committed Dec 24, 2023
1 parent 52c6ffe commit 6eea701
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
34 changes: 19 additions & 15 deletions webapp/webpack/src/components/ListGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,26 @@ export default class listGallery extends React.Component {


ListAllGalleries = (props) => {
const { galleries } = props;
console.log("GLLAER", galleries);
return <div className="listGallery">
{ galleries.map( (gallery, index) => (
<div key={ index } className="galleryEntry" onClick={() => this.navToGallery( gallery.id )}>
<img src={ gallery.imageData } />
<div className="overlay">
<div className="text">
<span>Name: { gallery.name } </span>
<span>Address: { gallery.locationAddress } </span>
<span>Location: { gallery.locationName } </span>
</div>
</div>
</div>
) ) }
const { galleries } = props;

return (<div className="listGallery">
<div className="galleryEntries">
{galleries.map((gallery, index) => (
<div key={ index } className="galleryEntry" onClick={() => this.navToGallery( gallery.id )}>
<img src={gallery.imageData} alt={`Gallery Entry ${index}`} />
<div className="overlay">
<div className="text">
<span>Name: { gallery.name } </span>
<span>Address: { gallery.locationAddress } </span>
<span>Location: { gallery.locationName } </span>
</div>
<div className="buttons">
</div>
</div>
</div>
))}
</div>
</div>)
}

render() {
Expand Down
8 changes: 3 additions & 5 deletions webapp/webpack/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body {
/* List Gallery component */
div .listGallery .galleryEntries {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(22%, 1fr));
grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
gap: 20px;
margin: 20px;
}
Expand Down Expand Up @@ -91,7 +91,7 @@ body {
/* Edit Gallery component */
div .editGallery .galleryEntries {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(22%, 1fr));
grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
gap: 20px;
margin: 20px;
}
Expand All @@ -103,10 +103,8 @@ body {
}

div .editGallery .galleryEntry img {
max-width: 100%;
width: 100%;
height: auto;
min-height: 15em;
min-width: 10em;
display: block;
}

Expand Down

0 comments on commit 6eea701

Please sign in to comment.