<div class="post">
  <div class="post-container">
    <div class="reputation">
      {% if post["Score"] >= 0 %}
        <div class="score">
          <p><span class="glyphicon glyphicon-triangle-top {{ post["Score"] | scale }}"></span></p>
          <p>{{ post["Score"] | intspace }}</p>
        </div>
      {% else %}
        <div class="score">
          <p>{{ post["Score"] | intspace }}</p>
          <p><span class="glyphicon glyphicon-triangle-bottom {{ post["Score"] | scale }}"></span></p>
        </div>
      {% endif %}
      {% if post["FavoriteCount"] %}
        <div>
          <p class="favorites {{ post["FavoriteCount"] | scale }}"><span class="glyphicon glyphicon-star"></span></p>
          <p><span>{{ post["FavoriteCount"] | intspace }}</span></p>
        </div>
      {% endif %}
      {% if post["Accepted"] and post["Accepted"] == True %}
        <div class="accepted">
          <p><span class="glyphicon glyphicon-ok"></span></p>
        </div>
      {% endif %}
    </div>
    {# FIXME, remove the decode #}
    <div class="body">{{ post["Body"] | safe }}</div>
  </div>
  {% if post["Tags"] %}
    <div class="tags">
      <ul>
        {% for tag in post["Tags"] %}
          <li><a href="{{ rooturl }}/tag/{{ tag }}/1.html">{{ tag }}</a></li>
        {% endfor %}
      </ul>
    </div>
  {% endif %}
  {% if post["OwnerUserId"] %}
    <div class="author">
      <div>
        <p>asked <span class="date" title="{{ question["CreationDate"] }}">{{ question["CreationDate"] }}</span></p>
        {% if post["OwnerUserId"]["Path"] %}<a class="profile" href="../user/{{ post["OwnerUserId"]["Path"] }}.html"> {% endif %}
          <div> 
{% if post["OwnerUserId"]["Id"] %}<img src="../static/identicon/{{ post["OwnerUserId"]["Id"] }}.png" style="width:32px; height:32px;" /> {% endif %}
          </div> 
          <div>
            <p>{{ post["OwnerUserId"]["DisplayName"] }}</p>
            <p>{{ post["OwnerUserId"]["Reputation"] | intspace }}</p>
          </div>
{% if post["OwnerUserId"]["Path"] %}</a>{% endif %}
      </div>
    </div>
  {% endif %} 
  {% if post["ClosedDate"] %}
    <div class="closed-banner">
      {% if post["ClosedDate"] %}
        <p>Question was closed <span class="date" title="{{ post["ClosedDate"] }}">{{ post["ClosedDate"] }}</span></p>
      {% endif %}
    </div>
  {% endif %}
  {% if post["comments"] %}
    <div class="comments">
      {% for comment in post["comments"] %}
        <div class="comment">
          <p>
            {% if comment["Score"] != 0 %}
              <span class="score {{ comment["Score"] | scale }}">{{ comment["Score"] }}</span>
            {% endif %}
            <span class="text">{{ comment["Text"] | safe }}</span> – {% if comment["Path"] %}<a href="{{ rooturl }}/user/{{ comment["Path"] }}.html">{% endif %}{{ comment["UserDisplayName"] }} {% if comment["Path"] %}</a>{% endif %} – <span class="date" title="{{ comment["CreationDate"] }}">{{ comment["CreationDate"] }}</span>
            </p>
        </div>
      {% endfor %}
    </div>
  {% endif %}
</div>
