tag.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. {% extends 'index/base.html' %}
  2. {% block title %}{{ tag }} - HonMaple{% endblock %}
  3. {% block content %}
  4. {% import 'base/link.html' as link %}
  5. <style type="text/css" media="all">
  6. select {
  7. background-color: #fff;
  8. border-color: #c6c6c6;
  9. color: #141414;
  10. }
  11. </style>
  12. <ol class="breadcrumb" style="margin-bottom:0;">
  13. <li><a href="{{ url_for('index.forums') }}"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>社区首页</a></li>
  14. <li class="active">{{ tag }}</li>
  15. </ol>
  16. <div class="panel panel-default container-fluid" style="padding:0;">
  17. <div class="panel-heading" style="background:#2e609b;">
  18. <a href="{{ url_for('campus.tag',tag=tag) }}" style="color:#fff">{{ tag }}</a>
  19. </div>
  20. <div class="panel-heading" style="font-size:12px;">
  21. <div class="col-sm-9">
  22. 筛选:
  23. {{ g.sortform.display() }}
  24. 排序:
  25. {{ g.sortform.sort() }}
  26. {{ g.sortform.st() }}
  27. </div>
  28. <div class="col-sm-1">
  29. 作者
  30. </div>
  31. <div class="col-sm-1">
  32. 回复/查看
  33. </div>
  34. <div class="col-sm-1">
  35. 最后发表
  36. </div>
  37. <br>
  38. </div>
  39. <div id="showsort">
  40. <div class="panel-body" style="padding:0 10px 0 25px;">
  41. {% for question in questions %}
  42. <div class="row" style="padding:5px 0;border-bottom:1px solid #f6e1e1;">
  43. <div class="col-md-9">
  44. {% if question.category == '' %}
  45. {{ link.link(question) }}
  46. {% else %}
  47. <a href="{{ url_for('campus.tag',tag=question.category) }}">[{{ question.category }}]</a>
  48. {{ link.link(question) }}
  49. {% endif %}
  50. </div>
  51. <div class="col-md-1 hidden-xs">
  52. <a href="{{ url_for('user.index',user_url='question.author') }}" style="color:#333;">
  53. {{ question.author }}
  54. </a>
  55. <div style="font-size:12px;color:#999;">
  56. {{ question.time.strftime('%Y-%m-%d') }}
  57. </div>
  58. </div>
  59. <div class="col-md-1 hidden-xs">
  60. {% set read,rep = question.id | get_read_count %}
  61. {{ rep }}
  62. <div style="font-size:12px;color:#999;">
  63. {{ read }}
  64. </div>
  65. </div>
  66. <div class="col-md-1 hidden-xs">
  67. <a href="{{ url_for('user.index',user_url=question.last_reply) }}" style="color:#333;">
  68. {{ question.last_reply }}
  69. </a>
  70. <div style="font-size:12px;color:#999;">
  71. {{ question.last_time.strftime('%Y-%m-%d') }}
  72. </div>
  73. </div>
  74. </div>
  75. {% endfor %}
  76. </div>
  77. </div>
  78. <div class="panel-body" style="padding:0 10px 0 25px;">
  79. <ul class="pager" style="margin:0;">
  80. {% if pages == 0 %}
  81. 没有帖子
  82. {% else %}
  83. {% if number == 1 and pages ==1 %}
  84. <li style="color:#999;">{{ number }}/{{ pages }}</li>
  85. {% elif number == 1 and pages != 1 %}
  86. <li style="color:#999;">{{ number }}/{{ pages }}</li>
  87. <li class="next"><a href="{{ url_for('campus.tag',tag = tag,pid=number + 1) }}">下一页<span aria-hidden="true">&rarr;</span></a></li>
  88. {% else %}
  89. {% if number == pages %}
  90. <li class="previous"><a href="{{ url_for('campus.tag',tag = tag,pid=number-1) }}"><span aria-hidden="true">&larr;</span>上一页</a></li>
  91. <li style="color:#999;">{{ number }}/{{ pages }}</li>
  92. {% else %}
  93. <li class="previous"><a href="{{ url_for('campus.tag',tag = tag,pid=number-1) }}"><span aria-hidden="true">&larr;</span>上一页</a></li>
  94. <li style="color:#999;">{{ number }}/{{ pages }}</li>
  95. <li class="next"><a href="{{ url_for('campus.tag',tag = tag,pid=number + 1) }}">下一页<span aria-hidden="true">&rarr;</span></a></li>
  96. {% endif %}
  97. {% endif %}
  98. {% endif %}
  99. </ul>
  100. </div>
  101. </div>
  102. {% endblock %}