Add post voting

This commit is contained in:
2024-10-16 17:52:50 +02:00
parent df926c815e
commit ffbbc709ce
12 changed files with 4237 additions and 49 deletions
+10 -9
View File
@@ -3,7 +3,7 @@
<title>{{title}}</title>
<link rel="stylesheet" media="screen" href="/static/global.css" />
</head>
<body>
<body hx-boost="true">
<main>
<nav>
<table>
@@ -26,8 +26,11 @@
</nav>
<article>
<h1>{{title}} (by {{author}})</h1>
<p>{{content}}</p>
<div class="post">
<h1>{{title}} (by {{author}})</h1>
<p>{{content}}</p>
</div>
{% if login %}
<form action="/posts/{{id}}/comments" method="POST">
@@ -36,14 +39,12 @@
</form>
{% end %}
<table>
{% for comment in comments %}
<tr>
<td>{{comment.author}}:</td>
<td>{{comment.content}}</td>
</tr>
<div class="comment">
<a href="/users/{{comment.author}}">{{comment.author}}</a>:
{{comment.content}}
</div>
{% end %}
</table>
</article>
</main>
</body>