home » zplus/freepost.git
Author zPlus <--> 2016-11-29 00:48:11
Committer zPlus <--> 2016-11-29 00:48:11
Commit d14bdc1 (patch)
Tree 3779eeb
Parent(s)

template/search.twig: better layout for results


commits diff: ba242a1..d14bdc1
1 file changed, 21 insertions, 4 deletionsdownload


Diffstat
-rw-r--r-- template/search.twig 25

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+21/-4 M   template/search.twig
index 2dfc291..38184cd
old size: 426B - new size: 1K
@@ -1,11 +1,28 @@
1 1 {% include 'header.twig' %}
2 2
3 - <div class="results">
3 + <div class="posts">
4 4
5 - {% for result in search_results %}
5 + {% for post in search_results %}
6 6
7 - <div class="result">
8 - {{ result.title }}
7 + <div class="post">
8 + <div class="title">
9 + {% if post.link|length > 0 %}
10 + <a href="{{ post.link }}">
11 + {{ post.title }}
12 + </a>
13 + {% else %}
14 + <a href="post/{{ post.hashId }}">
15 + {{ post.title }}
16 + </a>
17 + {% endif %}
18 + </div>
19 +
20 + <div class="info">
21 + <em><a href="post/{{ post.hashId }}">{{ post.created|ago }}</a></em>
22 + by <a href="{{ ('user/' ~ post.username)|docroot }}">{{ post.username }}</a>
23 +
24 + <a href="post/{{ post.hashId }}#comments">{{ post.commentsCount ? post.commentsCount }} comments</a>
25 + </div>
9 26 </div>
10 27
11 28 {% endfor %}