|
|
|
|
@ -20,32 +20,37 @@ |
|
|
|
|
<!-- A post --> |
|
|
|
|
{% if post.style == 0 %} |
|
|
|
|
|
|
|
|
|
<div class="imgcontainer"> |
|
|
|
|
<img src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
<div class="inside_image_top"> |
|
|
|
|
{% if post.url %}<a href="{{ post.url }}">{% endif %} |
|
|
|
|
<h1>{{ post.title }}</h1> |
|
|
|
|
{% if post.url %}</a>{% endif %} |
|
|
|
|
<p> |
|
|
|
|
{{ post.body }} |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="inside_image_bottom"> |
|
|
|
|
|
|
|
|
|
<div class="details"> |
|
|
|
|
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comment{% if post.comment_set.count > 1 %}s{% endif %}{% 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 %} |
|
|
|
|
{% if post.is_youtube_video %} |
|
|
|
|
<a href="{{ post.url }}"> |
|
|
|
|
<h1>{{ post.title }}</h1> |
|
|
|
|
</a> |
|
|
|
|
<iframe src="{{ post.url }}" width="600" height="400"></iframe> |
|
|
|
|
{% else %} |
|
|
|
|
<div class="imgcontainer"> |
|
|
|
|
<img src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
<div class="inside_image_top"> |
|
|
|
|
{% if post.url %}<a href="{{ post.url }}">{% endif %} |
|
|
|
|
<h1>{{ post.title }}</h1> |
|
|
|
|
{% if post.url %}</a>{% endif %} |
|
|
|
|
|
|
|
|
|
{% if post.body %} |
|
|
|
|
<p> |
|
|
|
|
{{ post.body }} |
|
|
|
|
</p> |
|
|
|
|
{% endif %} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
<div class="details"> |
|
|
|
|
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comment{% if post.comment_set.count > 1 %}s{% endif %}{% 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> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Quote --> |
|
|
|
|
{% elif post.style == 1 %} |
|
|
|
|
@ -69,25 +74,28 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- Picture no title no link --> |
|
|
|
|
<!-- Media no title no link --> |
|
|
|
|
{% elif post.style == 2 %} |
|
|
|
|
|
|
|
|
|
<div class="imgcontainer"> |
|
|
|
|
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
</div> |
|
|
|
|
{% if post.is_youtube_video %} |
|
|
|
|
<iframe src="{{ post.url }}" width="600" height="400"></iframe> |
|
|
|
|
{% else %} |
|
|
|
|
<div class="imgcontainer"> |
|
|
|
|
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/> |
|
|
|
|
</div> |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
<div class="post_padding"> |
|
|
|
|
<div class="details info"> |
|
|
|
|
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comment{% if post.comment_set.count > 1 %}s{% endif %}{% 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="post_padding"> |
|
|
|
|
<div class="details info"> |
|
|
|
|
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comment{% if post.comment_set.count > 1 %}s{% endif %}{% 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> |
|
|
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
</article> |
|
|
|
|
|