content.html 3.0 KB

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