view.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {% import 'base/link.html' as link %}
  2. {% for topic in topics.items %}
  3. <style>
  4. .avatar-48 {
  5. width:48px;
  6. height:48px
  7. }
  8. </style>
  9. {% set last_reply = topic.id | get_last_reply %}
  10. {% set username = topic.author.username %}
  11. <div class="topic media">
  12. <div class="avatar media-left">
  13. <a href="/sundevilyang"><img class="media-object avatar-48" src="{{ url_for('static',filename='images/hehai.png')}}" alt="1805"></a>
  14. </div>
  15. <div class="media-body">
  16. <div class="media-heading">
  17. <a href="{{ url_for('topic.topic',uid=topic.uid)}}" style="font-size:15px;color:#333">{{ topic.title}}</a>
  18. <i class="fa fa-thumb-tack" title="置顶"></i>
  19. </div>
  20. <small style="color:#999">
  21. {% for tag in topic.tags %}
  22. {{ link.tag(tag)}}
  23. {% endfor %}
  24. <a href="{{ url_for('user.user',user_url=username)}}" style="color:#999">{{ username}}</a>
  25. {% if last_reply %}
  26. {% set name = last_reply.author.username %}
  27. <span class="hidden-mobile">
  28. 最后由 <a data-name="jasl" href="{{ url_for('user.user',user_url=name)}}" style="color:#999">{{ name }}</a>
  29. 于 <abbr class="timeago" title="{{ last_reply.publish }}">1 小时前</abbr>回复
  30. </span>
  31. {% else %}
  32. <span class="hidden-mobile">
  33. 于 <abbr class="timeago" title="{{ topic.publish }}">1 小时前</abbr>发布
  34. </span>
  35. {% endif %}
  36. </small>
  37. </div>
  38. <div class="count media-right">
  39. <a class="state-false" href="/topics/29957#reply29">29</a>
  40. </div>
  41. </div>
  42. {% endfor %}