Skip to content

Commit

Permalink
fixed broken paginator, small image improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
pj-simpson committed Dec 24, 2020
1 parent e201c37 commit d9711e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 0 additions & 1 deletion blog/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def _post_list_displayer(request, posts, context=None):
page_number = request.GET.get("page")
page_obj = paginator.get_page(page_number)
context["page_obj"] = page_obj
context["post_list"] = posts

return TemplateResponse(request, "blog/post_list.html", context)

Expand Down
15 changes: 13 additions & 2 deletions static/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,23 @@ font-family: 'Source Sans Pro', sans-serif;
}

.django-ckeditor-widget{

display: flex !important;
}

.draft-warning {
transform: rotate(-45deg);
text-align: center;
color: red;
padding-left: 5em;
}
}

.blog-post img {
height: 100% !important;
width:100% !important;
}

.blog-post img:hover {
height:unset;
width:unset;
}

2 changes: 1 addition & 1 deletion templates/blog/post_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h3>Drafts</h3>
<div class="infinite-container">


{% for post in post_list %}
{% for post in page_obj.object_list %}

{% if post.draft and not user.is_authenticated and not user.is_superuser %}
{% else %}
Expand Down

0 comments on commit d9711e8

Please sign in to comment.