From 012c6d0f4b6960e3e2cf399bf685e07a266c2c13 Mon Sep 17 00:00:00 2001 From: Ying Tung Lau <lauy5@cardiff.ac.uk> Date: Fri, 27 Jan 2023 16:11:00 +0000 Subject: [PATCH] Upload New File --- portfolio/templates/comment.html | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 portfolio/templates/comment.html diff --git a/portfolio/templates/comment.html b/portfolio/templates/comment.html new file mode 100644 index 0000000..3a48dfe --- /dev/null +++ b/portfolio/templates/comment.html @@ -0,0 +1,36 @@ +{% extends 'layout.html' %} + +{% block title %}Comment Corner{% endblock title %} + +{% block content %} +<h1>Leave a Comment</h1> +<form method="POST" action="{{ url_for('commentposted') }}"> + <div> + <label for="name">Name:</label> + {{ comment.name(class="form-control") }} + </div> + <div> + <label for="comment">Comment:</label> + {{ comment.comment(class="form-control") }} + </div> + {{ comment.submit() }} +</form> + +<h1>Recent Comments</h1> +<form method="POST" action="{{ url_for('comment_order') }}"> + <label for="order">Order by date:</label> + {{ filter.option }} + {{ filter.submit() }} +</form> + +<div id="comments-container"> + {% for mycomment in recentcomments %} + <div class="comment-container"> + <div class="comment-date">{{ mycomment.date }}</div> + <div class="comment-name">{{ mycomment.name }}</div> + <div class="comment-text">{{ mycomment.comment }}</div> + </div> + {% endfor %} +</div> + +{% endblock content %} \ No newline at end of file -- GitLab