summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/login.html24
-rw-r--r--templates/post.html24
2 files changed, 44 insertions, 4 deletions
diff --git a/templates/login.html b/templates/login.html
new file mode 100644
index 0000000..3a46511
--- /dev/null
+++ b/templates/login.html
@@ -0,0 +1,24 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1>Welcome to VibeEngine</h1>
+<form action="" method="post" novalidate>
+ {{ form.hidden_tag() }}
+ <p>
+ {{ form.username.label }}<br>
+ {{ form.username(size=32) }}<br>
+ {% for error in form.username.errors %}
+ <span style="color: peru;">[{{ error }}]</span>
+ {% endfor %}
+ </p>
+ <p>
+ {{ form.password.label }}<br>
+ {{ form.password(size=32) }}<br>
+ {% for error in form.password.errors %}
+ <span style="color: peru;">[{{ error }}]</span>
+ {% endfor %}
+ </p>
+ <p>{{ form.remember_me() }} {{ form.remember_me.label }}</p>
+ <p>{{ form.submit() }}</p>
+</form>
+{% endblock %} \ No newline at end of file
diff --git a/templates/post.html b/templates/post.html
index 8272d37..d759da4 100644
--- a/templates/post.html
+++ b/templates/post.html
@@ -1,8 +1,24 @@
{% extends 'base.html' %}
{% block content %}
- <h2>{{ post.title }}</h2>
- <p>{{ post.created_at.strftime('%Y-%m-%d %H:%M') }}</p>
- <div>{{ post.content|markdown|safe }}</div>
+{% if post.parent != 0 %}
+<a href="{{url_for('post', post_id=post.parent)}}"> Previous</a>
+<hr>
+{% endif %}
+<h2>{{ post.title }}</h2>
+<p>{{ post.created_at.strftime('%Y-%m-%d %H:%M') }}</p>
+<p> Authour: {{post.authour.name}}</p>
+<div>{{ post.content|markdown|safe }}</div>
+<div class="post-actions">
+ <a href="{{ url_for('create', reply=post.id)}}"> Reply</a> ~
<a href="{{ url_for('index') }}">Back to posts</a>
-{% endblock %}
+</div>
+<hr>
+<h3> Replies to this</h3>
+<div class="post-replies">
+ <ul>
+ <li> {% for reply in replies %} <a href="{{ url_for('post', post_id=reply.id) }}">{{ reply.title }}</a> - {{
+ reply.created_at.strftime('%Y-%m-%d') }}</li> {% endfor %}
+ </ul>
+</div>
+{% endblock %} \ No newline at end of file