Первая версия, написанная гопотой. Не работает нормально лента и поиск, сломана авторизация
This commit is contained in:
29
app/templates/post.html
Normal file
29
app/templates/post.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ post.title or ("Пост #" ~ post.id) }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<article class="post-full">
|
||||
<h2>{{ post.title or ("Пост #" ~ post.id) }}</h2>
|
||||
<div class="meta">{{ post.created_at }} • #{{ post.id }}</div>
|
||||
<div class="body">{{ markdown(post.body)|safe }}</div>
|
||||
|
||||
<div class="post-actions">
|
||||
<form action="{{ url_for('vote', pid=post.id) }}" method="post" style="display:inline;">
|
||||
<input type="hidden" name="vote" value="up">
|
||||
<button type="submit">▲ {{ votes.ups }}</button>
|
||||
</form>
|
||||
<form action="{{ url_for('vote', pid=post.id) }}" method="post" style="display:inline;">
|
||||
<input type="hidden" name="vote" value="down">
|
||||
<button type="submit">▼ {{ votes.downs }}</button>
|
||||
</form>
|
||||
<span class="score">Score: {{ votes.score }}</span>
|
||||
|
||||
<form action="{{ url_for('flag_post', pid=post.id) }}" method="post" class="flag-form" style="display:inline;">
|
||||
<input type="text" name="reason" placeholder="Пожаловаться..." />
|
||||
<button type="submit">Flag ({{ flags }})</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p><a href="{{ url_for('index') }}">← Назад в ленту</a></p>
|
||||
</article>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user