search.twig 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {% include 'header.twig' %}
  2. <div class="posts">
  3. {% for post in search_results %}
  4. <div class="post">
  5. <div class="title">
  6. {% if post.link|length > 0 %}
  7. <a href="{{ post.link }}">
  8. {{ post.title }}
  9. </a>
  10. {% else %}
  11. <a href="post/{{ post.hashId }}">
  12. {{ post.title }}
  13. </a>
  14. {% endif %}
  15. </div>
  16. <div class="info">
  17. <em><a href="post/{{ post.hashId }}">{{ post.created|ago }}</a></em>
  18. by <a href="{{ ('user/' ~ post.username|url_encode)|docroot }}">{{ post.username }}</a>
  19. <a href="post/{{ post.hashId }}#comments">{{ post.commentsCount ? post.commentsCount }} comments</a>
  20. </div>
  21. </div>
  22. {% endfor %}
  23. {# Add once I'll have fulltext search
  24. <div class="more">
  25. <a href="?page={{ page + 1 }}" class="button button_default1">
  26. More
  27. </a>
  28. </div>
  29. #}
  30. </div>
  31. {% include 'footer.twig' %}