Adds HTML to post template + fix attempt

master
Laurent 6 years ago
parent 667e0eb2cb
commit 84d1f5793a
  1. 4
      news/templates/news/index.html
  2. 30
      news/templates/news/post.html

@ -105,7 +105,9 @@
</div> </div>
{% elif post.style == 4 %} {% elif post.style == 4 %}
{{ post.body |safe }} {% autoescape off %}
{{ post.body }}
{% endautoescape %}
<div class="post_padding"> <div class="post_padding">
<div class="details info"> <div class="details info">

@ -10,15 +10,25 @@
<div class="post_padding"> <div class="post_padding">
{% if post.style == 1 %} {% if post.style == 4 %}
<div class="quote"> {% autoescape off %}
{% endif %} {{ post.body }}
{% if post.style != 2 %} {% endautoescape %}
<a href="{{ post.url }}"><h1>{{ post.title }}</h1></a> {% else %}
{% endif %}
{% if post.style == 1 %} {% if post.style == 1 %}
</div> <div class="quote">
{% endif %} {% endif %}
{% if post.style != 2 %}
<a href="{{ post.url }}"><h1>{{ post.title }}</h1></a>
{% endif %}
{% if post.style == 1 %}
</div>
{% endif %}
{% endif %}
<div class="details"> <div class="details">
{{ post.date }} - {{ post.author.username }} {{ post.date }} - {{ post.author.username }}
@ -27,7 +37,7 @@
{% if post.style == 3 %} {% if post.style == 3 %}
<iframe class="youtube" src="https://www.youtube.com/embed/{{ post.url }}"></iframe> <iframe class="youtube" src="https://www.youtube.com/embed/{{ post.url }}"></iframe>
{% elif post.style != 1 %} {% elif post.style != 1 and post.style != 4 %}
<img src="{% static 'media/' %}{{ post.image_url }}"/> <img src="{% static 'media/' %}{{ post.image_url }}"/>
{% endif %} {% endif %}

Loading…
Cancel
Save