首部导航样式

This commit is contained in:
Li Heng 2014-05-28 04:05:04 +00:00
parent 00ba57a340
commit 44879890c8
2 changed files with 74 additions and 39 deletions

View File

@ -3,16 +3,23 @@ $this->headTitle($this->config->title->site);
$this->headTitle('新闻中心'); $this->headTitle('新闻中心');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('新闻中心'); $this->breadcrumb('<a href="/archives/">新闻中心</a>');
$this->breadcrumb($this->title);
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
$this->headLink()->appendStylesheet('/css/news.css');
$this->theme->AppendPlus($this,'masonry');
?> ?>
<div class="row">
<!-- Marketing messaging and featurettes
================================================== -->
<!-- Wrap the rest of the page in another container to center all the content. -->
<div class="container marketing">
<!-- Three columns of text below the carousel -->
<div class="row-fluid">
<div class="span3"> <div class="span3">
<div class="sidebar-nav bs-review-nav"> <div class="bs-docs-sidebar">
<ul class="nav nav-list bs-review-sidenav"> <ul class="nav nav-list bs-docs-sidenav">
<li class="active"><a href="/archives"><i class="icon-chevron-right"></i>新闻中心</a></li> <li><a href="/archives"><i class="icon-chevron-right"></i>新闻中心</a></li>
<?php <?php
if(count($this->types)) if(count($this->types))
{ {
@ -20,38 +27,65 @@ $this->theme->AppendPlus($this,'masonry');
{ {
$haed = ""; $haed = "";
if(!empty($v[$this->deepField])) {$haed = str_repeat(' ',$v[$this->deepField]);} if(!empty($v[$this->deepField])) {$haed = str_repeat(' ',$v[$this->deepField]);}
echo '<li><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title'].'</a></li>'; echo '<li'.($v['code']==$this->type?' class="active"':'').'><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title'].'</a></li>';
$haed = ""; $haed = "";
} }
} }
?> ?>
</ul> </ul>
</div> </div>
<!-- /.bs-docs-sidebar -->
</div> </div>
<!-- /.span3 -->
<?php $list = $this->paginator;?>
<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) # print_r($this->paginator);
{?> if(count($this->paginator))
<?php if(count($v['list'])>0) {?> {
<div class="span4 items"> foreach ($this->paginator as $v)
<h3><a href="<?= $v['url'] ?>"><?= $v['title'] ?></a></h3> {
<div class="list-content"> $description = "";
<ul class="unstyled"> if (mb_strlen($v['description'])>160)
<?php foreach($v['list'] as $arc){?> {
<li><small>[<?php echo date("Y-m-d",strtotime( $arc['ts_published'] )); ?>]</small> $description = mb_substr($v['description'],0,160,'utf-8').'...<a href="'.$v['url'].'" class="more">(more)</a>';
<a href="<?= $arc['url']?>"><?= $arc['title'] ?></a></li> }else{
<?php }?> $description = $v['description'];
</ul> }
</div>
</div>
<?php } }
?> ?>
<li><a href="<?php echo $v['url']; ?>"><?php echo $v['title']; ?></a> <small>[<?php echo date("Y-m-d",strtotime( $v['ts_published'] )); ?>]</small></li>
<?php
}
}
else
{
echo '暂无数据';
}
?>
</ol>
</div>
<div class="pagenavi">
<?= $this->paginator; ?>
</div> </div>
</div> </div>
<!-- /.span9 -->
</div>
<!-- /.row -->
<!-- <div class="pagination">
<ul>
<li class="disabled"><a href="#">&laquo;</a></li>
<li class="active"><a href="#">1</a></li>
<li ><a href="#">2</a></li>
<li ><a href="#">3</a></li>
<li class="disabled"><a href="#">&raquo;</a></li>
</ul>
</div>-->
</div> </div>
<script> </div>
$('#container').masonry({ <!-- /.container -->
itemSelector : '.items',
});
</script>

View File

@ -23,12 +23,13 @@
} ?> } ?>
</p> </p>
<?php $current_url =$_SERVER["REQUEST_URI"]?>
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<li style="padding-right:20px" class="active" id="page-nav-index-index"><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" id="page-nav-index-index"><a href="/archives/news/localnews">新 闻</a></li> <li style="padding-right:20px"<?php if($current_url=='/archives/news/localnews') echo " class='active'";?> ><a href="/archives/news/localnews">新 闻</a></li>
<li style="padding-right:20px" id="page-nav-index-index"><a href="/data">数 据</a></li> <li style="padding-right:20px"<?php if($current_url=='/data') echo " class='active'";?> ><a href="/data">数 据</a></li>
<li style="padding-right:20px" id="page-nav-index-index"><a href="#">关于我们</a></li> <li style="padding-right:20px" ><a href="/about">关于我们</a></li>
<li style="padding-right:20px" class="input-append " id="search"><form action="/search" method="get"><input class="input-medium" placeholder="关键字" type="text" name="q"><button class="btn" type="submit">搜索</button></form></li> <li style="padding-right:20px" class="input-append "><form action="/search" method="get"><input class="input-medium" placeholder="关键字" type="text" name="q"><button class="btn" type="submit">搜索</button></form></li>
</ul> </ul>
</div> </div>
</div> </div>