新闻列表页面样式

This commit is contained in:
Li Heng 2014-06-12 08:59:00 +00:00
parent e0fbdda367
commit 51cbbdd51b
6 changed files with 134 additions and 133 deletions

View File

@ -7,7 +7,7 @@ $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('关于我们'); $this->breadcrumb('关于我们');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
?> ?>
<div class="row"> <div class="row-fluid">
<div class="span3"> <div class="span3">
<?= $this->partial('about/navi.phtml'); ?> <?= $this->partial('about/navi.phtml'); ?>
</div> </div>

View File

@ -28,27 +28,29 @@ $this->theme->AppendPlus($this,'masonry');
</ul> </ul>
</div> </div>
</div> </div>
<div class="span9"> <div class="span9">
<div class="row" id="container"> <div class="Lbox">
<h4 class="box-title">新闻列表</h4>
<ol >
<?php <?php
foreach($this->lists as $v) foreach($this->lists as $v)
{?> {?>
<?php if(count($v['list'])>0) {?> <?php if(count($v['list'])>0) {?>
<div class="span4 items">
<h3><a href="<?= $v['url'] ?>"><?= $v['title'] ?></a></h3>
<div class="list-content">
<ul class="unstyled">
<?php foreach($v['list'] as $arc){?> <?php foreach($v['list'] as $arc){?>
<li><small>[<?php echo date("Y-m-d",strtotime( $arc['ts_published'] )); ?>]</small> <li><a href="<?= $arc['url']?>"><?= $arc['title'] ?></a><small>[<?php echo date("Y-m-d",strtotime( $arc['ts_published'] )); ?>]</small></li>
<a href="<?= $arc['url']?>"><?= $arc['title'] ?></a></li>
<?php }?> <?php }?>
</ul>
</div> <?php } }?>
</div> </ol>
<?php } } </div>
?> <div class="pagenavi">
<?= $this->paginator; ?>
</div> </div>
</div> </div>
<!-- /.span9 -->
</div> </div>
<script> <script>
$('#container').masonry({ $('#container').masonry({

View File

@ -44,7 +44,6 @@ $this->breadcrumb()->setSeparator(' > ');
<h4 class="box-title">新闻列表</h4> <h4 class="box-title">新闻列表</h4>
<ol > <ol >
<?php <?php
# print_r($this->paginator);
if(count($this->paginator)) if(count($this->paginator))
{ {
foreach ($this->paginator as $v) foreach ($this->paginator as $v)

View File

@ -15,3 +15,4 @@
}) })
}(window.jQuery) }(window.jQuery)
</script> </script>
<script>setPage();</script>

View File

@ -26,12 +26,11 @@
} else { } else {
echo '<a href="/account/login">登 录</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/account/register">注 册</a>'; echo '<a href="/account/login">登 录</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/account/register">注 册</a>';
} ?> } ?>
</p> </p>
<?php $current_url =$_SERVER["REQUEST_URI"]?> <?php $current_url =$_SERVER["REQUEST_URI"]?>
<p > <p >
<ul class="nav nav-pills pull-right" id="mainmenu"> <ul class="nav nav-pills pull-right" id="mainmenu">
<li style="padding-right:20px"><a href="/">首 页</a></li> <li style="padding-right:20px"<?php if($current_url=='/') echo " class='active'";?> ><a href="/">首 页</a></li>
<li style="padding-right:20px"><a href="/archives/">新 闻</a></li> <li style="padding-right:20px"><a href="/archives/">新 闻</a></li>
<li style="padding-right:20px"><a href="/data">数 据</a></li> <li style="padding-right:20px"><a href="/data">数 据</a></li>
<li style="padding-right:20px"><a href="/about">关于我们</a></li> <li style="padding-right:20px"><a href="/about">关于我们</a></li>