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

54 lines
2.1 KiB
HTML
Raw Normal View History

2018-03-22 22:52:14 +01:00
{% extends "base.html" %}
{% from 'macros.html' import siteheader %}
2018-04-02 19:12:35 +02:00
{% block title %}
{{ question.title.text }} - Stackexchange Simulator
{% endblock %}
2018-03-22 22:52:14 +01:00
{% block body %}
{{ siteheader(question.site) }}
2018-03-24 17:33:10 +01:00
<h1>{{ question.title.text }}</h1>
2018-03-27 20:41:57 +02:00
{% set vote=voted[("question", question.id)] %}
2018-04-02 22:50:03 +02:00
<div class="content question singlequestion">
<div class="vote" data-id="{{ question.id }}" data-type="question">
2018-03-27 20:41:57 +02:00
<a class="up {{ "active" if vote == True }}"></a>
2018-03-24 17:33:10 +01:00
<div>{{ question.upvotes - question.downvotes }}</div>
2018-03-27 20:41:57 +02:00
<a class="down {{ "active" if vote == False }}"></a>
2018-03-24 17:33:10 +01:00
</div>
<div class="contentbox">
2018-03-24 17:33:10 +01:00
{% for paragraph in question.text.split("\n") %}
<p>{{ paragraph }}</p>
{% endfor %}
<div class="contentfooter">
2018-03-24 17:33:10 +01:00
<div class="authorbox">
asked {{ prettydate(question.datetime) }}
<br>
{{ question.user.username }}
</div>
</div>
</div>
</div>
<h2 class="answerheader">{{ answers|length }} Answers</h2>
2018-03-25 23:01:32 +02:00
{% for answer in answers %}
2018-03-27 20:41:57 +02:00
{% set vote=voted[("answer", answer.id)] %}
2018-03-30 15:07:18 +02:00
<div class="content answer" id="{{ answer.id }}">
<div class="vote" data-id="{{ answer.id }}" data-type="answer" data-ranking="{{ answer.ci_lower_bound }}">
2018-03-27 20:41:57 +02:00
<a class="up {{ "active" if vote == True }}"></a>
2018-03-25 23:01:32 +02:00
<div>{{ answer.upvotes - answer.downvotes }}</div>
2018-03-27 20:41:57 +02:00
<a class="down {{ "active" if vote == False }}"></a>
2018-03-25 23:01:32 +02:00
</div>
<div class="contentbox">
{% for paragraph in answer.text.split("\n") %}
<p>{{ paragraph }}</p>
{% endfor %}
<div class="contentfooter">
2018-03-30 15:07:18 +02:00
<a href="{{ request.url }}#{{ answer.id }}" class="authorbox">
answered {{ prettydate(answer.datetime) }}
<br>
{{ answer.user.username }}
2018-03-30 15:07:18 +02:00
</a>
</div>
</div>
2018-03-25 23:01:32 +02:00
</div>
{% endfor %}
2018-03-22 22:52:14 +01:00
{% endblock %}