-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.html
More file actions
62 lines (59 loc) · 2.08 KB
/
Copy pathdefault.html
File metadata and controls
62 lines (59 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!doctype html>
<html
<head>
<title>
Blog Post
</title>
</head>
<body>
{% if username %}
Welcome {{username}} <a href="/logout">Logout</a> | <a href="/newpost">New Post</a><p>
{% else %}
You are not logged in! <a href="/login">Login</a> | <a href="/signup">Sign Up</a>
<p>
{% endif %}
<a href="/">Blog Home</a><br><br>
<h2>{{post['title']}}</h2>
Posted {{post['date']}}<i> By {{post['author']}}</i><br>
<hr>
{% autoescape false %}
{{post['body']}}
{% endautoescape %}
<p>
<em>Filed Under</em>:
{% for tag in post.tags %}
{% if loop.first %}
<a href="/tag/{{tag}}">{{tag}}</a>
{% else %}
, <a href="/tag/{{tag}}">{{tag}}</a>
{% endif %}
{% endfor %}
<p>
Comments:
<ul>
{% for comment in post.comments %}
<form action="/like" method="POST">
<input type="hidden" name="permalink" , value="{{post['permalink']}}">
<input type="hidden" name="comment_ordinal" , value="{{loop.index0}}">
Author: {{comment['author']}}<br>
Likes: {{comment['num_likes']}} <input type="submit" value="Like">
</form>
<br>
{{comment['body']}}
<br>
<hr>
{% endfor %}
<h3>Add a comment</h3>
<form action="/newcomment" method="POST">
<input type="hidden" name="permalink" , value="{{post['permalink']}}">
<h4>{{errors}}</h4>
<b>Name</b> (required)<br>
<input type="text" name="commentName" size="60" value="{{comment['name']}}"><br>
<b>Email</b> (optional)<br>
<input type="text" name="commentEmail" size="60" value="{{comment['email']}}"><br>
<b>Comment</b><br>
<textarea name="commentBody" cols="60" rows="10">{{comment['body']}}</textarea><br>
<input type="submit" value="Submit">
</ul>
</body>
</html>