Author
|
zPlus <->
2016-03-16 14:50:32
|
Committer
|
zPlus <->
2016-03-16 14:50:32
|
Commit
|
5532c9c
(patch)
|
Tree
|
942a555
|
Parent(s)
|
|
Add some more links
commits diff:
fbdce65..5532c9c
2 files changed,
6 insertions,
3 deletions
—
download
Diffstat
Diff options
+2/-2
M template/index.twig
24
|
24
|
|
|
25
|
25
|
|
<div class="info">
|
26
|
26
|
|
{{ post.vote }} votes
|
27
|
|
- |
<em>{{ post.created|ago }}</em>
|
|
27
|
+ |
<em><a href="post/{{ post.hashId }}">{{ post.created|ago }}</a></em>
|
28
|
28
|
|
by <a href="{{ ('user/' ~ post.username)|docroot }}">{{ post.username }}</a> •
|
29
|
29
|
|
|
30
|
|
- |
<a href="post/{{ post.hashId }}">{{ post.commentsCount ? post.commentsCount ~ ' comments' : 'discuss' }}</a>
|
|
30
|
+ |
<a href="post/{{ post.hashId }}#comments">{{ post.commentsCount ? post.commentsCount ~ ' comments' : 'discuss' }}</a>
|
31
|
31
|
|
</div>
|
32
|
32
|
|
</td>
|
33
|
33
|
|
</tr>
|
+4/-1
M template/post.twig
23
|
23
|
|
|
24
|
24
|
|
<div class="info">
|
25
|
25
|
|
by <a href="{{ ('user/' ~ post.username)|docroot }}">{{ post.username }}</a> <em>{{ post.created|ago }}</em>
|
26
|
|
- |
— {{ post.vote }} votes, {{ post.commentsCount }} comments
|
|
26
|
+ |
— {{ post.vote }} votes, <a href="#comments">{{ post.commentsCount }} comments</a>
|
27
|
27
|
|
|
28
|
28
|
|
{% if user and post.userId == user.id %}
|
29
|
29
|
|
— <a href="../edit?post={{ post.hashId }}">Edit</a>
|
37
|
37
|
|
{{ post.text|markdown|raw }}
|
38
|
38
|
|
</div>
|
39
|
39
|
|
|
|
40
|
+ |
{# An anchor for where the comments section starts #}
|
|
41
|
+ |
<a id="comments"></a>
|
|
42
|
+ |
|
40
|
43
|
|
{% if user %}
|
41
|
44
|
|
<form action="" method="post" class="new_comment">
|
42
|
45
|
|
<textarea name="new_comment" class="form-control" placeholder="Write a comment"></textarea>
|