Add theme
This commit is contained in:
@@ -1,19 +1,27 @@
|
||||
{% macro render_comment(comment) %}
|
||||
<div style="margin-left:20px">
|
||||
<p><i>{{ comment.author }}</i></p>
|
||||
{% macro render_comment_pre(comment) %}
|
||||
<div class=comment>
|
||||
<p><sub><i>{{ comment.author }}</i></sub></p>
|
||||
<p>{{ comment.text }}</p>
|
||||
<sup><a href="{{ url_for("comment", comment_id = comment.id) }}">reply</a></sup>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_comment_post(comment) %}
|
||||
{% for c in comment.children %}
|
||||
{{ render_comment(c) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_comment(comment) %}
|
||||
{{ render_comment_pre(comment) }}
|
||||
<sup><a href="{{ url_for("comment", comment_id = comment.id) }}">reply</a></sup>
|
||||
{{ render_comment_post(comment) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro reply() %}
|
||||
{% if 'user_id' in session %}
|
||||
<form method="post" action="comment/">
|
||||
<textarea name="text"></textarea>
|
||||
<input type="submit" value="Post comment">
|
||||
<p><textarea name="text"></textarea></p>
|
||||
<p><input type="submit" value="Post comment"></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user