-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05496fa
commit 548483e
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
project_2/commerce/auctions/templates/auctions/category_listings.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% extends "auctions/layout.html" %} | ||
|
||
{% block body %} | ||
<h2> {{ category }} </h2> | ||
|
||
|
||
<div class="listings-grid"> | ||
{% for listing in listings %} | ||
<a class="listing-card-link" href="{% url 'listing' listing.title %}"> | ||
<div class="card" style="width: 18rem;"> | ||
{% if listing.imageURL %} | ||
<img src= "{{ listing.imageURL }}" alt="listing image" height="200" class="listing-image"> | ||
{% else %} | ||
<div class="placeholder-rectangle"></div> | ||
{% endif %} | ||
<div class="card-body"> | ||
<h5 class="card-title">{{ listing.title }}</h5> | ||
<h6 class="card-subtitle mb-2 text-body">Price: {{ listing.bid }}€</h6> | ||
<p class="card-text">{{ listing.description }}</p> | ||
</div> | ||
<div class="card-footer text-body-secondary"> | ||
<div>Created time: {{ listing.created_at }}</div> | ||
</div> | ||
</div> | ||
</a> | ||
{% endfor %} | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters