index.twig 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {% include 'header.twig' %}
  2. <div class="posts">
  3. {# banner
  4. <div class="bg-green" style="margin: 0 0 2em 0; padding: .5em;">
  5. <img alt="" title="" src="images/pulse.gif" style="height: 1em;" />
  6. <a href="https://libreplanet.org/2017/live/">LibrePlanet 2017</a>
  7. </div>
  8. #}
  9. {# Welcome New Year
  10. <pre class="new_year">
  11. .''.
  12. . *''* :_\/_:
  13. _\(/_ .:.*_\/_* : /\ :
  14. ./)\ ':'* /\ * : '..'.
  15. ' *''* * '.\'/.' _\(/_'
  16. *_\/_* -= o =- /)\
  17. * /\ * .'/.\'. '
  18. *..* :
  19. ____ ___ _ _____
  20. |___ \ / _ \/ |___ |
  21. __) | | | | | / /
  22. / __/| |_| | | / /
  23. |_____|\___/|_|/_/
  24. </pre>
  25. #}
  26. {% for post in posts %}
  27. <div class="post">
  28. <div class="title">
  29. {% if post.link|length > 0 %}
  30. <a href="{{ post.link }}">
  31. {{ post.title }}
  32. </a>
  33. {% else %}
  34. <a href="post/{{ post.hashId }}">
  35. {{ post.title }}
  36. </a>
  37. {% endif %}
  38. </div>
  39. <div class="info">
  40. {%
  41. include 'vote.twig' with {
  42. target: 'post',
  43. hash_id: post.hashId,
  44. vote: votes[post.id] is defined ? votes[post.id].vote : null,
  45. vote_count: post.vote,
  46. user: user is defined ? user : null
  47. } only
  48. %}
  49. <em><a href="post/{{ post.hashId }}">{{ post.created|ago }}</a></em>
  50. by <a href="{{ ('user/' ~ post.username|url_encode)|docroot }}">{{ post.username }}</a>
  51. <a href="post/{{ post.hashId }}#comments">{{ post.commentsCount ? post.commentsCount }} comments</a>
  52. </div>
  53. </div>
  54. {% endfor %}
  55. <div class="more">
  56. <a href="?page={{ page + 1 }}" class="button button_default1">
  57. More
  58. </a>
  59. </div>
  60. </div>
  61. {% include 'footer.twig' %}