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-04-28 18:22:11 +02:00

63 lines
2.7 KiB
HTML

{% extends "base.html" %}
{% from 'macros.html' import siteheader %}
{% block title %}
{{ 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 }}">
{% endblock %}
{% block body %}
{{ siteheader(question.site) }}
<h1>{{ question.title.text }}</h1>
{% set vote=voted[("question", question.id)] %}
<div class="content question singlequestion">
<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 %}