|
|
|
|
@ -16,21 +16,22 @@ |
|
|
|
|
|
|
|
|
|
<article> |
|
|
|
|
|
|
|
|
|
{{ post.date }} - {{ post.author.username }} |
|
|
|
|
<div class="imgcontainer"> |
|
|
|
|
<a href="{{ post.url }}"> |
|
|
|
|
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
<div> |
|
|
|
|
<div class="inside_image_top"> |
|
|
|
|
{% if post.url %}<a href="{{ post.url }}">{% endif %} |
|
|
|
|
<h1>{{ post.title }}</h1> |
|
|
|
|
</div> |
|
|
|
|
</a> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="body"> |
|
|
|
|
{% if post.url %}</a>{% endif %} |
|
|
|
|
<p> |
|
|
|
|
{{ post.body }} |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="inside_image_bottom"> |
|
|
|
|
|
|
|
|
|
<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"> |
|
|
|
|
@ -39,38 +40,13 @@ |
|
|
|
|
{% endfor %} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</article> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div class="grid-x post"> |
|
|
|
|
<div class="cell large-2 large-offset-2 info"> |
|
|
|
|
<br/> |
|
|
|
|
{{ post.date }} |
|
|
|
|
<br/> |
|
|
|
|
{{ post.author.username }} |
|
|
|
|
<br/> |
|
|
|
|
<a href="{% url 'news:post' post.id %}">comments</a> |
|
|
|
|
</div> |
|
|
|
|
<div class="cell large-4"> |
|
|
|
|
<div class="grid-y"> |
|
|
|
|
<div class="cell large-4"> |
|
|
|
|
<img src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
<h1><a href="{{ post.url }}">{{ post.title }}</a></h1> |
|
|
|
|
{{ post.body }} |
|
|
|
|
</div> |
|
|
|
|
<div class="cell large-4 comments"> |
|
|
|
|
{% for comment in post.top_comments %} |
|
|
|
|
<div class="grid-x"> |
|
|
|
|
<div class="cell small-2 large-2">{{ comment.body }}</div> |
|
|
|
|
</div> |
|
|
|
|
{% endfor %} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> --> |
|
|
|
|
</article> |
|
|
|
|
|
|
|
|
|
{% else %} |
|
|
|
|
<!-- Quote --> |
|
|
|
|
{% elif post.style == 1 %} |
|
|
|
|
|
|
|
|
|
<div class="post"> |
|
|
|
|
<div class="grid-x"> |
|
|
|
|
@ -97,6 +73,28 @@ |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 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="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 %} |
|
|
|
|
|
|
|
|
|
<!-- </div> --> |
|
|
|
|
|