Skip to content

Commit

Permalink
Merge pull request #15 from andrewc0urt/style/all-campgrounds-page-ca…
Browse files Browse the repository at this point in the history
…rd-improvements

Merge: All Campgrounds Page Card and Image Improvements
  • Loading branch information
andrewc0urt authored Sep 9, 2024
2 parents 0b01dc0 + ab9d956 commit dfb713f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions public/stylesheets/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Ensure all card widths & heights are the same */
.individual-campground-card {
width: 100%;
max-width: 1294px;
}

/* Ensure all card image heights are the same to prevent different size cards and ensure images take up height of card */
.individual-campground-card .img-fluid {
width: 100%;
/* height: auto; */
height: 277px;
object-fit: cover; /* Ensures the image covers the container without distortion */
}
2 changes: 1 addition & 1 deletion views/campgrounds/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</a>

<% for (let camp of allCampgrounds) { %>
<div class="card mb-3">
<div class="card mb-3 individual-campground-card">
<div class="row">
<div class="col-md-4">
<% if (camp.images.length) { %>
Expand Down
2 changes: 1 addition & 1 deletion views/campgrounds/showDetails.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<% } %>

<div class="card-footer text-body-secondary">2 days ago</div>
<!-- <div class="card-footer text-body-secondary">2 days ago</div> -->
</div>
</div>

Expand Down
1 change: 1 addition & 0 deletions views/layouts/boilerplate.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

<!-- Custom CSS -->
<link rel="stylesheet" href="/stylesheets/app.css" />
<link rel="stylesheet" href="/stylesheets/index.css" />
</head>

<body class="d-flex flex-column vh-100">
Expand Down

0 comments on commit dfb713f

Please sign in to comment.