<?php get_header();?>
<div id="posts">
<div id="posts-list">
<?php if ( ! have_posts() ) : ?>
	<div class="entry" itemscope itemtype="http://schema.org/Article">
		<h2 class="entry-title">没有相关内容</h2>
		<div class="entry-content" itemprop="description">没有找到相关内容，请尝试用其他关键词再次搜索！</div>
	</div>
<?php endif; ?>
<?php $count = 1; ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ($count == 1) : ?>
<div class="top-entry" itemscope itemtype="http://schema.org/Article">
<div class="top-entry-img-wrapper">
<a class="top-entry-img" href="<?php the_permalink() ?>" title="<?php the_title(); ?>"  itemprop="url" style="background: #000 url('<?php $image_id = get_post_thumbnail_id();$cover = wp_get_attachment_image_src($image_id, 'photo-medium');if ($image_id) {echo $cover[0];} else {echo get_template_directory_uri() . '/images/d_thum_m.jpg';} ?>') no-repeat center center;">
<h2 class="entry-title"><?php the_title(); ?></h2></a></div>
<a class="top-entry-title" href="<?php the_permalink() ?>"><h2><?php the_title(); ?></h2></a>
<div class="top-entry-content"><?php echo mb_strimwidth(strip_tags($post->post_content),0,180,' ...'); ?></div>
<div class="clear"></div></div>
<?php else: ?>
<div class="entry" itemscope itemtype="http://schema.org/Article">
<div class="entry-thumb">
<a href="<?php the_permalink(); ?>"><?php dm_the_thumbnail(); ?></a></div>
<div class="entry-body">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" itemprop="name"><?php the_title(); ?></a></h2>
<div class="entry-meta">
<span class="entry-category-icon"><?php the_category(', '); ?></span>
<span class="entry-comment-icon"><?php comments_popup_link('0 条评论', '1 条评论', '% 条评论', '', '评论已关闭'); ?></span></div>
<div class="entry-content" itemprop="description">
<?php echo mb_strimwidth(strip_tags($post->post_content),0,120,' ...'); ?>
</div></div></div>
	<?php endif;$count++; ?>
<?php endwhile;endif;?>
</div>
<div class="prev-next"><?php previous_posts_link("« 上一页"); ?><?php $paged = get_query_var('paged'); if ( $paged > 1 ) echo '<span class="prev-next-page">第'. $paged .'页</span>'; ?><?php next_posts_link("下一页 »"); ?></div>
</div>
<script type="text/javascript">loadAdPagenav();</script>
<?php get_footer(); ?>