Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
add a new page to show the results of the search feature
  • Loading branch information
Asjdnnc authored Oct 11, 2024
1 parent 21fc8e7 commit c3a13da
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions views/search.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<%- layout("/layouts/boilerplate") -%>
<div class="row row-cols-lg-3 row-cols-md-3 row-cols-sm-1 justify-content-center">
<% for (let listing of results) { %>
<div class="card col listing-card" style="width: 21rem;">
<a href="/listing/<%= listing._id %>" class="show">
<img src="<%= listing.image[0].url %>" class="card-img-top" alt="listing_image" style="height: 20rem;" />
<div class="card-body">
<h5 class="card-title"><%= listing.title %></h5>
<p class="card-text"><i><%= listing.description %></i>
<br>&#8377;<%= listing.price.toLocaleString("en-IN") %> / night</p>
<p class="card-text">Location: <%= listing.location %>, <%= listing.country %></p>
<a href="/listing/<%= listing._id %>" class="btn btn-dark">Show in Detail</a>
</div>
</a>
</div>
<% } %>
</div>

0 comments on commit c3a13da

Please sign in to comment.