forked from lmatteis/hckr.it
/
item.html
79 lines (78 loc) · 3.14 KB
/
item.html
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{{>head}}
<tr>
<td>
{{#item}}
<script>
$(function() {
comments.getCommentsByParentId(0, '0');
comments.commentBind();
});
</script>
<table border="0">
<tbody>
<tr>
{{>itemhead}}
</tr>
<tr>
<td colspan="1"></td>
{{>itemsubhead}}
</tr>
<tr style="height:10px"></tr>
<tr>
<td></td>
<td>
<form method="post" action="/r" class="addcomment" doc_id="{{_id}}">
<input type="hidden" name="parent_id" value="0" />
<span style="color:red" class="error"></span>
<br />
<textarea name="text" rows="6" cols="60"></textarea>
<br><br>
<input type="submit" value="add comment">
</form>
</td>
</tr>
</tbody>
</table>
{{/item}}
<br><br>
<table border="0">
<tbody class="comments">
{{#comments}}
<tr comment_id="{{comment_id}}" parent_id="{{parent_id}}" score="{{score}}" style='display:none;'>
<td>
<table border="0">
<tbody>
<tr><td><img src="http://news.ycombinator.com/s.gif" height="1" width="0" class="level"></td>
<td valign="top">
<center>
{{>upvote}}
</center>
</td>
<td class="default">
<div style="margin-top:2px; margin-bottom:-10px; ">
<span class="comhead">{{points}} points by <a href="user?id={{author}}">{{author}}</a>
{{pretty_date}} |
<a href="#{{comment_id}}" name="{{comment_id}}">link</a></span>
</div>
<br>
<span class="comment">
<font color="#000000">
{{{text}}}
</font>
{{#username}}
<p><font size="1"><u><a class="commentreply" comment_id="{{comment_id}}" href="#">reply</a></u></font></p>
{{/username}}
</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
{{/comments}}
</tbody>
</table>
<br><br>
</td>
</tr>
{{>tail}}