This commit is contained in:
Li Heng 2015-01-30 09:56:01 +00:00
parent c504dbed37
commit aa4233d4a4
5 changed files with 49 additions and 28 deletions

View File

@ -66,7 +66,7 @@ class IndexController extends Zend_Controller_Action
//$time = date("Y-m-d H:i:s",time());
$sql = "SELECT * FROM archive WHERE is_pub=true and sub='$this->subnews' AND ts_published<now()
and id in (select ar_catalog.aid from ar_catalog left join ar_category on ar_catalog.cid=ar_category.id where ar_category.ptype='news')
order by ts_published desc LIMIT 8 ";
order by ts_published desc LIMIT 12 ";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll(PDO::FETCH_BOTH);

View File

@ -11,7 +11,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="#">青海省水文水资源勘测局</a>
<a class="brand" href="#"><?= $this->config->title->site ?></a>
<div class="nav-collapse collapse">
<ul class="nav" id="mainmenu">
<li class="">

View File

@ -13,40 +13,48 @@
<div class="span6">
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item active"> <img src="/sjyportal/img/slide-00.jpg" class="img-rounded">
<div class="item"> <img src="/sjyportal/img/slide-0.png" class="img-rounded">
<div class="container">
<div class="carousel-caption">
<h2>青海54.6%国土被纳入三江源国家生态保护试验区</h2>
</div>
</div>
</div>
<div class="item active"> <img src="/sjyportal/img/slide-1.png" class="img-rounded">
<div class="container">
<div class="carousel-caption">
<h2>青海54.6%国土被纳入三江源国家生态保护试验区</h2>
</div>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev"></a> <a class="right carousel-control" href="#myCarousel" data-slide="next"></a> </div>
</div>
<div class="span6">
<div class="box">
<div class="box" style="height: 230px">
<p class="box-title">平台新闻</p>
<div id="showdata" class="slidebox">
<ul>
<?php foreach($this->list_news as $k=>$v){ ?>
<li>
<a href="<?= $v['url'] ?>" title="<?= $v['title'] ?>"><i class="icon-hand-right"> </i><?= $v['title'] ?></a>&nbsp;&nbsp;<span class="small"><?= date('Y-m-d',strtotime($v['ts_published'])) ?></span>
</li>
<?php } ?>
<span class="pull-right"><a href="/archives/" target="_blank" class="more">更多>></a></span>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- /.carousel -->
<div class="container">
<div class="row-fluid">
<div class="span6">
<div class="box">
<div class="box" >
<p class="box-title">最新可视化数据</p>
<ul>
<ul >
<?php foreach($this->visualdata as $k=>$v){ ?>
<li>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>&nbsp;&nbsp;<span class="small"><?= date('Y-m-d',strtotime($v['ts_published'])) ?></span>
@ -183,4 +191,12 @@
$('#myCarousel').carousel()
})
}(window.jQuery)
$(document).ready(function(){
$('#showdata').textSlider({
line:1,
speed:500,
timer:3000
});
});
</script>

View File

@ -24,6 +24,7 @@
<script src="/js/lib/jquery.lasted.js"></script>
<script src="/js/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="/js/navi.js"></script>
<script src="/js/textSlider.js"></script>
<?= $this->headScript() ?>
<?= $this->headLink() ?>
<?= $this->headStyle() ?>

View File

@ -1,8 +1,5 @@

.navbar-search
{
margin-top:10px;
}
body {
padding-top: 70px;
@ -19,11 +16,14 @@ header{
.navigat {
float: right;
position: relative;
left: 70px;
top: 15px;
}
.navbar-search
{
margin-top:10px;
}
.container .span12 .row .span8 .nav {
padding-top: 0px;
@ -101,14 +101,13 @@ header{
font-family: "微软雅黑";
background-color: #FFFFFF;
border: 1px solid #E2E2E2;
padding-top: 10px;
padding-bottom: 20px;
padding: 20px 10px;
margin-bottom: 20px;
padding-right: 10px;
background-color: #fff;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
overflow:hidden
}
.box-title {
font-family: "微软雅黑";
@ -122,16 +121,21 @@ header{
padding-left: 10px;
margin-left: 10px;
}
.box .slidebox
{
overflow: auto;
}
.row .span4.box .inline .more {
padding-left: 260px;
font-size: 9px;
font-size: 8px;
}
.box ul li {
/*width: 350px;*/
font-family: 宋体, Arial;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
/* Downsize the brand/project name a bit */
.navbar .brand {
padding: 14px 20px 0px 0px; /* Increase vertical padding to match navbar links */
@ -165,7 +169,7 @@ header{
z-index: 10;
}
.carousel .item {
height: 260px;
height: 270px;
}
.carousel img {
position: absolute;
@ -180,7 +184,7 @@ header{
max-width: 570px;
padding: 0 0px;
margin-top:210px;
margin-top:220px;
}
.carousel-caption h2, .carousel-caption .lead {
margin: 0;
@ -304,7 +308,7 @@ header{
line-height: 1.5em;
margin-top: 50px;
text-align: center;
min-height: 90px;
min-height: 100px;
font-family:微软雅黑黑体;
}