<!--
约定documentList.docs为文档列表数据集合
item为子元素集合
-->
<div class="post-list">

	{% if pageType == 'index' %}
	<h2 class="top-news">
		<span>{{__('lc_new_document')}}
			<span>
	</h2>
	{% endif %}
	{% for item in posts %}
	<article class="post">
		<div class="row">
			<div class="col-xs-5 col-sm-3 col-md-4">
				{% if item.categories %} {% if item.categories.length > 1 %}
				<a target="_blank" class="item-category"
					href="{{(item.categories)[item.categories.length-1].url}}">{{(item.categories)[item.categories.length-1].name}}</a>
				{% elif item.categories == 1 %}
				<a target="_blank" class="item-category"
					href="{{(item.categories)[0].url}}">{{(item.categories)[0].name}}</a>
				{% endif%} {% endif%}
				<a href="{{item.url}} " target="_blank " class="contentImg ">
					<img src="{{item.sImg}} " class="img-responsive " alt="{{item.title}} " />
				</a>
			</div>
			<div class="col-xs-7 col-sm-9 col-md-8 discription ">
				<h2 class="post-title" alt="{{site.altkey}}{{item.title}}">
					<a href="{{item.url}} " target="_blank ">
						{% if item.roofPlacement == 1 %}
						<span class="sticky-post">置顶</span>
						{% endif %}
						{% if targetSearchKey %} {{item.title | hightWords(targetSearchKey) | safe }} {% else %}
						{{item.title}} {% endif %}
					</a>
				</h2>
				<div class="post-content ">
					{% if targetSearchKey %} {{item.discription | cutwords(200) | hightWords(targetSearchKey) | safe }}
					{% else %} {{item.discription
					| cutwords(200)}} {% endif %}
				</div>
				<ul class="post-meta post-meta-actions" ms-controller="rcStatic">
					{% if item.uAuthor %} {% set renderAuthor = item.uAuthor %} {% else %}
					{% set renderAuthor = item.author %} {% endif %}
					<li class="author">
						<a class="logo">
							<img src="{{ renderAuthor.logo}}" alt="{{renderAuthor.userName}}">
						</a>
						<span>{{renderAuthor.userName}}</span>
					</li>
					<li><i ms-on-click="@askLike($event,'1','{{item._id}}')" class="fa fa-thumbs-up"
							aria-hidden="true"></i>
						<span id="{{'thumbs_'+item._id}}">{{item.likeNum}}</span></li>
					<li><i ms-on-click="@askLike($event,'2','{{item._id}}')" class="fa fa-thumbs-down"
							aria-hidden="true"></i>
						<span id="{{'despises_'+item._id}}">{{item.despiseNum}}</span></li>
					<li><i ms-on-click="@askLike($event,'3','{{item._id}}')" class="fa fa-comment"
							aria-hidden="true"></i>
						<span id="{{'comments_'+item._id}}">{{item.commentNum}}</span></li>
					<li><i class="fa fa-eye" aria-hidden="true"></i>
						<span>{{item.clickNum}}</span></li>
				</ul>
			</div>
		</div>
	</article>
	{% endfor %} {% include "./pagination.html" %}

</div>