2018-03-22 22:52:14 +01:00
|
|
|
{% extends "base.html" %}
|
2018-03-26 21:56:25 +02:00
|
|
|
{% from 'macros.html' import siteheader %}
|
2018-04-02 19:12:35 +02:00
|
|
|
{% block title %}
|
2018-04-28 18:22:11 +02:00
|
|
|
{{ question.title.text }} - Stack Exchange Simulator
|
|
|
|
{% endblock %}
|
|
|
|
{% block extrameta %}
|
|
|
|
<meta property="og:image" name="twitter:image" itemprop="image primaryImageOfPage"
|
|
|
|
content="{{ url_for("image",site_id=question.site.id,_external=True) }}"/>
|
|
|
|
<meta name="twitter:domain" content="se-simulator.lw1.at"/>
|
|
|
|
<meta name="twitter:title" property="og:title" itemprop="title name" content="{{ question.title.text }}"/>
|
|
|
|
<meta name="twitter:description" property="og:description" itemprop="description"
|
|
|
|
content="{{ question.text|truncate(200, False, ' …', 10) }}">
|
|
|
|
|
|
|
|
<meta name="theme-color" content="{{ question.site.background_color }}">
|
2018-04-02 19:12:35 +02:00
|
|
|
{% endblock %}
|
2018-03-22 22:52:14 +01:00
|
|
|
{% block body %}
|
2018-03-26 21:56:25 +02:00
|
|
|
{{ 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">
|
2018-03-26 21:56:25 +02:00
|
|
|
<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>
|
2018-03-26 21:56:25 +02:00
|
|
|
<div class="contentbox">
|
2018-03-24 17:33:10 +01:00
|
|
|
|
|
|
|
{% for paragraph in question.text.split("\n") %}
|
|
|
|
<p>{{ paragraph }}</p>
|
|
|
|
{% endfor %}
|
2018-03-26 21:56:25 +02:00
|
|
|
<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>
|
2018-03-26 21:56:25 +02:00
|
|
|
<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 }}">
|
2018-03-26 21:56:25 +02:00
|
|
|
<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>
|
2018-03-26 21:56:25 +02:00
|
|
|
<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">
|
2018-03-26 21:56:25 +02:00
|
|
|
answered {{ prettydate(answer.datetime) }}
|
|
|
|
<br>
|
|
|
|
{{ answer.user.username }}
|
2018-03-30 15:07:18 +02:00
|
|
|
</a>
|
2018-03-26 21:56:25 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-25 23:01:32 +02:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2018-03-22 22:52:14 +01:00
|
|
|
{% endblock %}
|