File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,26 @@ <h1 class="mt-4">{{ object.title }}</h1>
2929 {{ object.body }}
3030 < hr >
3131
32+ < h2 class ="bg-primary p-2 text-white "> Similar posts</ h2 >
33+ < div class ="row ">
34+ {% for post in similar_posts %}
35+ < div class ="col-md-4 ">
36+ < div class ="card " style ="width: 200px ">
37+ < div class ="card-image-top ">
38+ < img src ="{{ object.image.url}} " alt ="" class ="img-fluid ">
39+ </ div >
40+ < div class ="card-body ">
41+ < h5 class ="card-title ">
42+ < a href ="{{ post.get_absolute_url }} "> {{ post.title }}</ a >
43+ </ h5 >
44+ </ div >
45+ </ div >
46+ </ div >
47+ {% empty %}
48+ There are no similar posts yet.
49+ {% endfor %}
50+ </ div >
51+
3252 <!-- Comments Form -->
3353 < div class ="card my-4 ">
3454 < h5 class ="card-header "> Leave a Comment:</ h5 >
You can’t perform that action at this time.
0 commit comments