1
0
Fork 0
mirror of https://github.com/Findus23/se-simulator.git synced 2024-09-19 15:53:45 +02:00
se-simulator/templates/detail.html
2018-03-30 15:07:18 +02:00

50 lines
2 KiB
HTML

{% extends "base.html" %}
{% from 'macros.html' import siteheader %}
{% block body %}
{{ siteheader(question.site) }}
<h1>{{ question.title.text }}</h1>
{% set vote=voted[("question", question.id)] %}
<div class="content question">
<div class="vote" data-id="{{ question.id }}" data-type="question">
<a class="up {{ "active" if vote == True }}"></a>
<div>{{ question.upvotes - question.downvotes }}</div>
<a class="down {{ "active" if vote == False }}"></a>
</div>
<div class="contentbox">
{% for paragraph in question.text.split("\n") %}
<p>{{ paragraph }}</p>
{% endfor %}
<div class="contentfooter">
<div class="authorbox">
asked {{ prettydate(question.datetime) }}
<br>
{{ question.user.username }}
</div>
</div>
</div>
</div>
<h2 class="answerheader">{{ answers|length }} Answers</h2>
{% for answer in answers %}
{% set vote=voted[("answer", answer.id)] %}
<div class="content answer" id="{{ answer.id }}">
<div class="vote" data-id="{{ answer.id }}" data-type="answer" data-ranking="{{ answer.ci_lower_bound }}">
<a class="up {{ "active" if vote == True }}"></a>
<div>{{ answer.upvotes - answer.downvotes }}</div>
<a class="down {{ "active" if vote == False }}"></a>
</div>
<div class="contentbox">
{% for paragraph in answer.text.split("\n") %}
<p>{{ paragraph }}</p>
{% endfor %}
<div class="contentfooter">
<a href="{{ request.url }}#{{ answer.id }}" class="authorbox">
answered {{ prettydate(answer.datetime) }}
<br>
{{ answer.user.username }}
</a>
</div>
</div>
</div>
{% endfor %}
{% endblock %}