content.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {% extends 'base/base.html' %}
  2. {% block content %}
  3. {% set board = topic.board %}
  4. {{ breadcrumb(hrefs={board.parent_board:url_for('board.board',parent_b=board.parent_board),
  5. board.board:url_for('board.board',parent_b=board.parent_board,child_b=board.board)},active=topic.title)}}
  6. {% set last_reply = topic.replies.first() %}
  7. <style>
  8. .vote {
  9. text-decoration: none;
  10. font-size: 10px;
  11. line-height: 1;
  12. padding: 2px 8px;
  13. border: 1px solid #C4C4C4;
  14. border-radius: 3px;
  15. color: #778;
  16. display: inline-block;
  17. vertical-align: baseline;
  18. text-align: center;
  19. background-color: #fff;
  20. }
  21. </style>
  22. {% from 'base/paginate.html' import footer as p_footer %}
  23. <div class="row">
  24. <div class="col-md-9">
  25. <div class="panel panel-default">
  26. <div class="panel-heading media ">
  27. <div class="media-body">
  28. <h3 class="media-heading">{{ topic.title}}</h3>
  29. <small style="color:#999">
  30. <span class="vote">
  31. <i class="icon-chevron-up"></i>
  32. </span>
  33. <span class="vote">
  34. <i class="icon-chevron-down"></i>
  35. </span>
  36. {% for tag in topic.tags %}
  37. {{ link_base.tag(tag) }}
  38. {% endfor %}
  39. <br/>
  40. {{ link_base.user(topic.author.username )}}
  41. 于 <abbr class="timeago" title="{{ topic.publish}}">{{ topic.publish | timesince }}</abbr>发布
  42. {% if last_reply %}
  43. 最后由{{ link_base.user(last_reply.author.username )}}于
  44. <abbr class="timeago" title="{{ topic.publish}}">{{ last_reply.publish | timesince }}</abbr>回复
  45. {% endif %}
  46. </small>
  47. </div>
  48. <div class="media-right">
  49. <a href="{{ url_for('user.user',user_url=topic.author.username)}}">
  50. <img class="media-object img-circle" src="{{ url_for('static',filename='images/Moo.png')}}" alt="..." style="width:64px;height:64px">
  51. </a>
  52. </div>
  53. </div>
  54. <div class="panel-body topic-content">
  55. {% if topic.is_markdown %}
  56. {{ topic.content | markdown }}
  57. {% else %}
  58. {{ topic.content }}
  59. {% endif %}
  60. </div>
  61. </div>
  62. {% include 'topic/replies.html' %}
  63. </div>
  64. <div class="col-md-3" style="padding-left:0">
  65. {% set ask_url = url_for('topic.ask',boardId=topic.board.id) %}
  66. {% include 'topic/panel.html' %}
  67. </div>
  68. </div>
  69. {% endblock %}