fixed blog posts css issue

This commit is contained in:
Levi 2017-01-31 10:09:24 -05:00
parent 54e3059cef
commit 8e5834b2dd
3 changed files with 49 additions and 2 deletions

View file

@ -0,0 +1,48 @@
{% load i18n thumbnail cms_tags %}
<div class="post-preview">
<div class="row">
<div class="col-md-4">
<a href="{{ post.get_absolute_url }}">
<img style="margin-top:11%"src="{% thumbnail post.main_image 240x235 crop upscale subject_location=post.main_image.subject_location %}"/>
</a>
</div>
<div class="col-md-6 col-md-offset-2 col-lg-offset-1">
<a href="{{ post.get_absolute_url }}">
<h2 class="post-title">
{{ post.title }}
</h2>
</a>
<p class="post-meta" style="font-size:0.9em;">
Posted
{% if post.author %}
by
<!-- <a href="{% url 'djangocms_blog:posts-author' post.author.get_username %}"> -->
{% if post.author.get_full_name %}
{{ post.author.get_full_name }}
{% else %}
{{ post.author }}
{% endif %}
<!-- </a> -->
{% endif %}
on {{ post.date_published|date:"DATE_FORMAT" }}
</p>
<p class="post-subtitle">
{% if not TRUNCWORDS_COUNT %}
{% render_model post "abstract" %}
{% else %}
{% render_model post "abstract" "" "" 'truncatewords_html:TRUNCWORDS_COUNT' %}
{% endif %}
</p>
</div>
</div>
</div>
<hr>

View file

@ -152,7 +152,7 @@
<div class="col-md-7 col-md-offset-3 supportus-posts">
<div class="blog-list">
{% for post in post_list %}
{% include "ungleich/djangocms_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
{% include "digitalglarus/post_detail.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
{% endfor %}
</div>
</div>

View file

@ -40,7 +40,6 @@ class SupportusView(TemplateView):
def get_context_data(self, *args, **kwargs):
context = super(SupportusView, self).get_context_data(**kwargs)
tags = ["dg-renovation"]
import pdb;pdb.set_trace()
posts = Post.objects.filter(tags__name__in=tags, publish=True).translated(get_language())
context.update({
'post_list': posts