|
|
|
|
@ -11,16 +11,17 @@ |
|
|
|
|
|
|
|
|
|
<!-- <div class="{% if forloop.counter|divisibleby:2 %}even{% else %}odd{% endif %}"> --> |
|
|
|
|
|
|
|
|
|
<article> |
|
|
|
|
|
|
|
|
|
<div class="postintro lat_padding"> |
|
|
|
|
{{ post.date }} - {{ post.author.username }} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- A post --> |
|
|
|
|
{% if post.style == 0 %} |
|
|
|
|
|
|
|
|
|
<article> |
|
|
|
|
|
|
|
|
|
<div class="postintro lat_padding"> |
|
|
|
|
{{ post.date }} - {{ post.author.username }} |
|
|
|
|
</div> |
|
|
|
|
<div class="imgcontainer"> |
|
|
|
|
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
<img src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
<div class="inside_image_top"> |
|
|
|
|
{% if post.url %}<a href="{{ post.url }}">{% endif %} |
|
|
|
|
<h1>{{ post.title }}</h1> |
|
|
|
|
@ -45,7 +46,6 @@ |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</article> |
|
|
|
|
|
|
|
|
|
<!-- Quote --> |
|
|
|
|
{% elif post.style == 1 %} |
|
|
|
|
@ -63,7 +63,7 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="info"> |
|
|
|
|
{{ post.date }} - {{ post.author.username }} - <a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comments{% else %}write comment{% endif %}</a> |
|
|
|
|
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comments{% else %}write comment{% endif %}</a> |
|
|
|
|
</div> |
|
|
|
|
<!-- Some comments --> |
|
|
|
|
<div class="comments"> |
|
|
|
|
@ -78,26 +78,23 @@ |
|
|
|
|
<!-- Picture no title no link --> |
|
|
|
|
{% elif post.style == 2 %} |
|
|
|
|
|
|
|
|
|
<article> |
|
|
|
|
|
|
|
|
|
{{ post.date }} - {{ post.author.username }} |
|
|
|
|
<div class="imgcontainer"> |
|
|
|
|
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
</div> |
|
|
|
|
<div class="imgcontainer"> |
|
|
|
|
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="info"> |
|
|
|
|
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comments{% else %}write comment{% endif %}</a> |
|
|
|
|
</div> |
|
|
|
|
<!-- Some comments --> |
|
|
|
|
<div class="comments"> |
|
|
|
|
{% for comment in post.top_comments %} |
|
|
|
|
<span>{{ comment.body }} - {{ comment.author.username }}</span><br/> |
|
|
|
|
{% endfor %} |
|
|
|
|
</div> |
|
|
|
|
<div class="info"> |
|
|
|
|
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comments{% else %}write comment{% endif %}</a> |
|
|
|
|
</div> |
|
|
|
|
<!-- Some comments --> |
|
|
|
|
<div class="comments"> |
|
|
|
|
{% for comment in post.top_comments %} |
|
|
|
|
<span>{{ comment.body }} - {{ comment.author.username }}</span><br/> |
|
|
|
|
{% endfor %} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</article> |
|
|
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
</article> |
|
|
|
|
|
|
|
|
|
<!-- </div> --> |
|
|
|
|
{% endfor %} |
|
|
|
|
|