42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
{% extends "templates/base.html" %}
|
|
|
|
{% block head %}
|
|
<link rel="stylesheet" href="../static/css/form.css">
|
|
{% endblock %}
|
|
|
|
{% block main_content %}
|
|
<h1 class="board-name">/{{ board.name }}/</h1>
|
|
<p>{{ board.description }}</p>
|
|
{% if board.owner_id == session.user_id %}
|
|
<h6><a href="/boards/delete/{{ board.id }}">Delete Board</a></h6>
|
|
{% endif %}
|
|
{% if session.user_id %}
|
|
<br>
|
|
<h3>Post to this board</h3>
|
|
<form action="/post" method="POST" enctype="multipart/form-data">
|
|
<input type="hidden" name="board_id" value="{{ board.id }}">
|
|
<textarea name="content" placeholder="Content" required></textarea>
|
|
<input type="file" name="attachments" multiple>
|
|
<button type="submit">Post</button>
|
|
</form>
|
|
{% endif %}
|
|
<br>
|
|
<ul class="post-list">
|
|
{% for post in posts %}
|
|
<li>
|
|
{% include "templates/short_post.html" %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% if total_pages > 0 %}
|
|
<div id="nav">
|
|
<h5>Page {{ page }} of {{ total_pages }}</h5>
|
|
{% if page > 1 %}
|
|
<h5><a href="/boards/{{ board.name }}?page={{ page - 1 }}">Previous Page</a></h5>
|
|
{% endif %}
|
|
{% if posts|length == 10 %}
|
|
<h5><a href="/boards/{{ board.name }}?page={{ page + 1 }}">Next Page</a></h5>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %} |