ver 1
This commit is contained in:
35
src/html/board.html
Normal file
35
src/html/board.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ board.name }}</h1>
|
||||
<h6>Created at: {{ board.created_at }}</h6>
|
||||
<p>{{ board.description }}</p>
|
||||
<br>
|
||||
<h1>Posts:</h1>
|
||||
<ul class="posts">
|
||||
{% for post in board.posts %}
|
||||
<li>
|
||||
<h3>From {{ post.user.name }}</h3>
|
||||
<h6>posted at {{ post.created_at }}</h6>
|
||||
{% if post.reference %}
|
||||
<h6><b>ref post:</b> <a href="/posts/{{ post.reference.id }}">{{ post.reference.content }}</a></h6>
|
||||
{% endif %}
|
||||
<p>{{ post.content }}</p>
|
||||
<h6><a href="/posts/{{ post.id }}">View Post</a></h6>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% if board.posts|length == 0 %}
|
||||
<li>No posts found.</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div id="nav">
|
||||
<h5>Page {{ page }}</h5>
|
||||
{% if page > 1 %}
|
||||
<h5><a href="/boards/{{ board.name }}?page={{ page - 1 }}">Previous Page</a></h5>
|
||||
{% endif %}
|
||||
|
||||
{% if board.posts|length == 10 %}
|
||||
<h5><a href="/boards/{{ board.name }}?page={{ page + 1 }}">Next Page</a></h5>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user