First implementation of comments

This commit is contained in:
2026-02-19 12:58:42 +00:00
parent 82def98e7e
commit b97c9ea3ee
2 changed files with 1 additions and 21 deletions

View File

@@ -23,7 +23,7 @@
</section>
</main>
<section id="comments">
<h2>{{comments | length}} Comments</h2>
<h2>{{comments | length}} Comment{% if comments | length != 1 %}s{% endif %}</h2>
{% for comment in comments %}
<div class="comment">
<strong>{{ comment[0] }} - {{ comment[2] | human_date }}</strong>

View File

@@ -1,20 +0,0 @@
{% include 'header.html' %}
<script src="/static/js/get_comments.js"></script>
<main>
<section id="article">
<h1>{{ metadata.title}} </h1>
<p>{{ metadata.date | human_date }}</p>
<hr />
{{post|safe}}
</section>
<section id="comments">
</section>
<form action="/comments/{{ metadata.id }}" method="post">
<label for="name">Name:</label>
<input type="text" name="name" />
<label for="comment">Comment:</label>
<textarea name="comment"></textarea>
<input type="submit" name="submit" value="Submit">
</form>
</main>
{% include 'footer.html' %}