<?php
/**
 * 站点首页模板
 */
if (!defined('EMLOG_ROOT')) {
    exit('error!');
}
$Sort_Model = new Sort_Model();
$sorts = $CACHE->readCache('sort');

$Sort_Model = new Sort_Model();
$sorts = $CACHE->readCache('sort');
?>
<link rel="stylesheet" href="<?php echo TEMPLATE_URL; ?>assets/css/joe.xiangce.css">
<div class="joe_container">
	<div class="joe_main">
<div class="joe_archive">
	<div class="joe_index__hot">
		<div class="joe_index__title">
		  <ul class="joe_index__title-title default">
			<li class="item active" data-type="created"><?php echo $sorts[$sortid]["sortname"]; ?></li>
		  </ul>
		</div>
		<ul class="joe_index__hot-list">
		<?php doAction('index_loglist_top');if (!empty($logs)):foreach ($logs as $value): ?>
		<?php if(!empty($value['cover'])) {
			$imgurl = $value['cover'];
		} elseif(img_ns($value['content'])) {
		if(strpos(img_ns($value['content']),$wzpeizhi['config_uy']) !== false){ 
			 $imgurl = img_ns($value['content']).$wzpeizhi['config_suocaijian'];
		}else{
			 $imgurl = img_ns($value['content']);
		}
		} else {
			$imgurl = $wzpeizhi['config_suolt1'];
		}
		?>
		<li class="item animated fadeIn">
		  <a class="link" href="<?php echo $value['log_url']; ?>" title="<?php echo $value['log_title']; ?>">
			<figure class="inner">
				<span class="views"><?php echo img_count($value['content']); ?>&nbsp;张照片</span>
				<img width="100%" height="120" class="image lazyloaded" src="<?php echo $imgurl;?>" alt="<?php echo $value['log_title']; ?>">
			  <figcaption class="title"><?php echo $value['log_title']; ?></figcaption>
			</figure>
		  </a>
		</li>
		<?php endforeach;else:?>
			<div class="author-links box b2-radius mg-b"><div class="empty-page"><img src="<?php echo TEMPLATE_URL; ?>assets/css/b2-page-empty.svg"><p>没有任何文章!</p></div></div> 
		<?php endif; ?>  
				</ul>
			</div>
</div>
<ul class="joe_pagination">
	<?php echo sheli_fy($lognum,$index_lognum,$page,$pageurl);?>
</ul>
</div>
<?php include View::getView('side'); ?>
<?php include View::getView('footer');?>