Files
luntan/app/templates/posts/detail.html

27 lines
948 B
HTML

{% extends 'base.html' %}
{% block title %}作品详情{% endblock %}
{% block content %}
<div class="card mb-3">
<div class="p-3">
<h3 class="mb-2">{{ post.title }}</h3>
<p class="text-secondary">{{ post.description }}</p>
<span class="badge bg-light text-dark">{{ post.visibility.value }}</span>
</div>
<div class="p-3">
<div class="row">
{% for img in post.images %}
<div class="col-md-4 mb-2">
<img src="{{ url_for('main.uploads', filename=img.web_path) }}" class="photo-thumb" />
</div>
{% endfor %}
</div>
</div>
</div>
<hr>
<form class="card p-3" method="post" action="{{ url_for('comments.create', post_id=post.id) }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<div class="mb-3"><textarea class="form-control" name="body" placeholder="发表评论"></textarea></div>
<button class="btn btn-brand" type="submit">评论</button>
</form>
{% endblock %}