-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💫 link from category in navbar to category list page
- Loading branch information
Showing
5 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
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,40 @@ | ||
{% extends '../base.html' %} | ||
{% load static %} | ||
{% block title %}Library | {{ category.name }}{% endblock title %} | ||
|
||
{% block content %} | ||
<div class="position-relative overflow-hidden p-3 p-md-5 m-md-3 text-center bg-light"> | ||
<h1 class="display-4 fw-normal">{{ category.name }}</h1> | ||
</div> | ||
|
||
<div class="album py-5 bg-light"> | ||
<div class="container"> | ||
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3"> | ||
|
||
{% for book in books %} | ||
|
||
<div class="col"> | ||
<a href="{{ book.get_absolute_url }}" class="text-decoration-none text-dark"> | ||
<div class="card mb-3" style="max-width: 540px;"> | ||
<div class="row g-0"> | ||
<div class="col-md-4"> | ||
<img src="{{ book.image_url }}" class="img-fluid rounded-start" alt="book-cover"> | ||
</div> | ||
<div class="col-md-8"> | ||
<div class="card-body"> | ||
<h5 class="card-title">{{ book.title|truncatechars:40 }}</h5> | ||
<p class="card-text"><small class="text-muted">{{ book.author }}</small></p> | ||
<p class="card-text">{{ book.description|truncatechars:80 }}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</a> | ||
</div> | ||
|
||
{% endfor %} | ||
|
||
</div> | ||
</div> | ||
</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