新闻首页添加自动排版

This commit is contained in:
Li Jianxuan 2013-04-16 09:59:33 +00:00
parent 1890f8f8dd
commit 6e9a3cbdfe
1 changed files with 11 additions and 5 deletions

View File

@ -4,13 +4,14 @@ $this->headTitle('新闻中心');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('新闻中心');
$this->breadcrumb()->setSeparator(' > ');
$this->breadcrumb()->setSeparator(' > ');
$this->headLink()->appendStylesheet('/css/mdreview.css');
$this->theme->AppendPlus($this,'masonry');
?>
<div class="row">
<div class="span3">
<div class="sidebar-nav bs-review-nav">
<ul class="nav nav-list bs-review-sidenav">
<ul class="nav nav-list bs-review-sidenav">
<li class="active"><a href="/archies"><i class="icon-chevron-right"></i>新闻中心</a></li>
<?php
if(count($this->types))
@ -35,10 +36,10 @@ $this->headLink()->appendStylesheet('/css/mdreview.css');
<?php if(count($v['list'])>0) {?>
<div class="span4">
<h3><a href="<?= $v['url'] ?>"><?= $v['title'] ?></a></h3>
<div class="list-content">
<div class="list-content" id="container">
<ul class="unstyled">
<?php foreach($v['list'] as $arc){?>
<li><small>[<?php echo date("Y-m-d",strtotime( $arc['ts_published'] )); ?>]</small>
<li><small>[<?php echo date("Y-m-d",strtotime( $arc['ts_published'] )); ?>]</small>
<a href="<?= $arc['url']?>"><?= $arc['title'] ?></a></li>
<?php }?>
</ul>
@ -48,4 +49,9 @@ $this->headLink()->appendStylesheet('/css/mdreview.css');
?>
</div>
</div>
</div>
</div>
<script>
$('#container').masonry({
itemSelector : '.items',
});
</script>