This commit is contained in:
liheng 2018-05-12 17:12:27 +08:00
parent db6c8db3e5
commit a1245e737f
4 changed files with 108 additions and 61 deletions

View File

@ -11,12 +11,18 @@ $this->breadcrumb()->setSeparator(' > ');
if(!empty($this->infos['keyword'])) $keyword = $this->infos['keyword']; else $keyword = $this->infos['title']; if(!empty($this->infos['keyword'])) $keyword = $this->infos['keyword']; else $keyword = $this->infos['title'];
$this->headMeta()->appendName('keywords', $keyword); $this->headMeta()->appendName('keywords', $keyword);
$this->headMeta()->appendName('description', mb_substr($this->infos['description'],0,180,'utf-8')); $this->headMeta()->appendName('description', mb_substr($this->infos['description'],0,180,'utf-8'));
$this->headLink()->appendStylesheet('/static-sanji/css/new-list.css'); $this->headLink()->appendStylesheet('/static-sanji-v2/css/archive.css');
$this->headLink()->appendStylesheet('/static-sanji/css/new-detail.css');
?> ?>
<div class="body-warp">
<div class="nav" id="nav"> <div class="content-warp">
<ul> <div class="container">
<div class="row">
<div class="col-md-3 col-sm-2">
<div class="list-group">
<a href="#" class="list-group-item active">
新闻动态
</a>
<?php <?php
if(count($this->types)) if(count($this->types))
{ {
@ -24,24 +30,30 @@ $this->headLink()->appendStylesheet('/static-sanji/css/new-detail.css');
{ {
$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'].'">'.$haed.$v['title'].'</a></li>'; echo '<a href="'.$v['url'].'" class="list-group-item">'.$haed.$v['title'].'</a>';
$haed = ""; $haed = "";
} }
} }
?> ?>
</ul>
</div> </div>
</div> </div>
<div class="col-md-8 col-sm-10">
<ol class="breadcrumb">
<li><a href="#">首页</a></li>
<li><a href="active">新闻动态</a></li>
</ol>
<div class="content-warp">
<div class="container">
<h1 class="text-center"><?php echo $this->infos['title'];?></h1> <h1 class="text-center"><?php echo $this->infos['title'];?></h1>
<div class="text-center">[<?php echo date("Y-m-d",strtotime($this->infos['ts_published']));?>]&nbsp;&nbsp;来源&nbsp;:&nbsp;<?php echo $this->infos['source'];?></div> <div class="text-center">[<?php echo date("Y-m-d",strtotime($this->infos['ts_published']));?>]&nbsp;&nbsp;来源&nbsp;:&nbsp;<?php echo $this->infos['source'];?></div>
<?php if(!empty($this->mdinfo)){?> <?php if(!empty($this->mdinfo)){?>
<?php foreach($this->mdinfo as $v){ ?> <?php foreach($this->mdinfo as $v){ ?>
<div class="info">相关数据:《<a href="/data/<?= $v['uuid']?>"><?= $v['title']?></a></div> <div class="info">相关数据:《<a href="/data/<?= $v['uuid']?>"><?= $v['title']?></a></div>
<?php } } ?> <?php } } ?>
<hr>
<?php echo $this->infos['body'];?> <?php echo $this->infos['body'];?>
</div> </div>
</div> </div>
</div>
</div>

View File

@ -6,11 +6,18 @@ $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/archives/">新闻中心</a>'); $this->breadcrumb('<a href="/archives/">新闻中心</a>');
$this->breadcrumb($this->title); $this->breadcrumb($this->title);
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
$this->headLink()->appendStylesheet('/static-sanji/css/new-list.css'); $this->headLink()->appendStylesheet('/static-sanji-v2/css/archive.css');
?> ?>
<div class="body-warp"> <div class="content-warp">
<div class="nav" id="nav">
<ul> <div class="list-warp container" style="min-height: 600px">
<div class="row">
<div class="col-md-3">
<div class="list-group">
<a href="#" class="list-group-item active">
新闻动态
</a>
<?php <?php
if(count($this->types)) if(count($this->types))
{ {
@ -18,22 +25,27 @@ $this->headLink()->appendStylesheet('/static-sanji/css/new-list.css');
{ {
$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'].'">'.$haed.$v['title'].'</a></li>'; echo '<a href="'.$v['url'].'" class="list-group-item">'.$haed.$v['title'].'</a>';
$haed = ""; $haed = "";
} }
} }
?> ?>
</ul>
</div> </div>
<div class="list-warp container"> </div>
<ul>
<div class="col-md-8">
<ol class="breadcrumb">
<li><a href="#">首页</a></li>
<li><a href="active">新闻动态</a></li>
</ol>
<ul class="news-list">
<?php <?php
if(count($this->paginator)) if(count($this->paginator))
{ {
foreach ($this->paginator as $v) foreach ($this->paginator as $v)
{ {
?> ?>
<li><a href="<?php echo $v['url']; ?>"><?php echo $v['title']; ?></a><span><?php echo date("Y-m-d",strtotime( $v['ts_published'] )); ?></span></li> <li><a href="<?php echo $v['url']; ?>"><?php echo $v['title']; ?></a><span class="pull-right"><?php echo date("Y-m-d",strtotime( $v['ts_published'] )); ?></span></li>
<?php <?php
} }
} else { } else {
@ -42,6 +54,10 @@ $this->headLink()->appendStylesheet('/static-sanji/css/new-list.css');
?> ?>
</ul> </ul>
</div> </div>
</div>
</div>
<div class="page"> <div class="page">
<div class="pagenavi"><?= $this->paginator; ?></div> <div class="pagenavi"><?= $this->paginator; ?></div>
</div> </div>

3
htdocs/css/archive.css Normal file
View File

@ -0,0 +1,3 @@
.content-warp{
margin-top: 50px;
}

View File

@ -0,0 +1,16 @@
.content-warp{
margin-top: 80px;
}
.breadcrumb > a > .active{
color: #00A9FF;
}
.news-list >li {
padding:8px 0px;
}
.news-list >li >a{
color:#303848;
}
.news-list > li >span{
color:#999;
}