12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- {% import 'base/link.html' as link_base %}
- {% for topic in topics %}
- {% set author = topic.author %}
- <div class="panel-body" style="padding:6px;border-bottom:1px solid #eee">
- <div class="row">
- <div class="col-md-6 media">
- <div class="media-left">
- <a href="{{ url_for('user.user',user_url=author.username) }}">
- <img class="media-object img-circle" src="{{ link_base.avatar(author) }}" alt="avatar" style="width:48px;height:48px">
- </a>
- </div>
- <div class="media-body">
- <div class="media-heading">
- {% if topic.is_top %}
- <span><i class="icon-pushpin text-danger"> </i></span>
- {% endif %}
- <a href="{{url_for('topic.topic',topicId=topic.uid)}}" style="color:#555">{{ topic.title}}</a>
- </div>
- <span class="visible-xs-inline">
- <small style="font-size:10px;">由{{ link_base.user(topic.author.username) }}</small>
- <small style="color:#999;font-size:10px;">
- {{ topic.publish | timesince }}
- 发布
- </small>
- </span>
- <div class="hidden-xs">
- {% for tag in topic.tags %}
- {{ link_base.tag(tag)}}
- {% endfor %}
- </div>
- </div>
- </div>
- <div class="col-md-2 hidden-xs" style="padding-top:5px;">
- <small>{{ link_base.user(topic.author.username) }}</small>
- <br/>
- <small style="color:#999;">
- {{ topic.publish | timesince }}
- </small>
- </div>
- <div class="col-md-2 hidden-xs" style="padding:5px 5px 5px 20px;margin:0">
- {% set rep,read = topic.id | get_read_count %}
- <span>{{ rep }}</span> /
- <span style="font-size:12px;color:#999;">
- {{ read }}
- </span>
- </div>
- <div class="col-md-2 hidden-xs" style="padding:5px;margin:0;">
- {% set last_reply = topic.replies.first() %}
- {% if last_reply %}
- <span style="font-size:12px">{{ link_base.user(last_reply.author.username) }}</span>
- <br/>
- <span style="font-size:12px;color:#999;">{{ last_reply.publish | timesince }}</span>
- {% else %}
- <span style="font-size:12px">{{ link_base.user(topic.author.username) }}</span>
- <br/>
- <span style="font-size:12px;color:#999;">{{ topic.publish | timesince }}</span>
- {% endif %}
- </div>
- </div>
- </div>
- {% endfor %}
|