home » zplus/freepost.git
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 deletionsdownload


Diffstat
-rw-r--r-- template/index.twig 4
-rw-r--r-- template/post.twig 5

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+2/-2 M   template/index.twig
index 43e704f..36a6397
old size: 1K - new size: 1K
@@ -24,10 +24,10 @@
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
index 757c686..9aaca20
old size: 2K - new size: 2K
@@ -23,7 +23,7 @@
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,6 +37,9 @@
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>