Authored by whb

修改瀑布流

... ... @@ -4,7 +4,7 @@
<div class="video-main content-main">
<div class="video-wrap">
<div class="main-layout clearfix">
<?php $this->_widget('news_list', array('list'=> $this->view->list,'video' => 1));?>
<?php $this->_widget('news_listmobile', array('list'=> $this->view->list,'video' => 1));?>
</div>
</div>
<div id="pageContent" style="text-align: center;" class="pagination">
... ...
... ... @@ -26,11 +26,11 @@ else
<div class="image-box">
<a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" title="<?php echo $news['title'];?>">
<img src="<?php echo $thumb;?>" alt="" style="<?php echo sprintf("height:%spx;width:%spx;", $height, $width);?>">
<i class="play-icon"></i>
<?php if(trim($news['tag']) == '视频'):?>
<i class="play-icon"></i>
<?php endif;?>
</a>
<a class="item-tag" href="<?php echo url('news/index',array('tag' => $news['tag']))?>"><?php echo $news['tag'];?></a>
<?php if(trim($news['tag']) == '视频'):?>
<?php endif;?>
</div>
<div class="content">
<h2 <?php echo $news['main_title_type'] == 1 ? 'class="volupia"':'';?>>
... ...
<?php foreach($list as $news):
$title = Util_StringHelper::substr_cn($news['title'], 90);
$description = Lib_Utils_StringHelper::substr_cn(Lib_Utils_StringHelper::stripTags($news['content']), 68);
$height = $width = 0;
$thumb_size = json_decode($news['thumb_size'], true);
if ($news['thumb'])
{
$thumb = Lib_Images::getImageUrl($news['thumb'], 'source','fragmentimg');
}
else
{
$thumb = SITE_IMG.'/pic01.png';
}
if($thumb_size['height'] < 308 && $thumb_size['width'] < 308)
{
$height = $thumb_size['height'];
$width = $thumb_size['width'];
}
else
{
$height = ceil($thumb_size['height'] * (308 / $thumb_size['width']));
$width = 308;
}
?>
<div class="layout-item tiled">
<div class="image-box">
<a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" title="<?php echo $news['title'];?>">
<img src="<?php echo $thumb;?>" alt="">
<?php if(trim($news['tag']) == '视频'):?>
<i class="play-icon"></i>
<?php endif;?>
</a>
<a class="item-tag" href="<?php echo url('news/index',array('tag' => $news['tag']))?>"><?php echo $news['tag'];?></a>
</div>
<div class="content">
<h2 <?php echo $news['main_title_type'] == 1 ? 'class="volupia"':'';?>>
<a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>"><?php echo $news['title'];?></a>
</h2>
<p class="text-content"><?php echo $description;?></p>
<p class="time"><?php echo date('Y.m.d', $news['create_time'])?></p>
</div>
</div>
<?php endforeach;?>
\ No newline at end of file
... ...