修改首页推荐图片的最小尺寸

This commit is contained in:
Li Jianxuan 2013-05-08 03:08:04 +00:00
parent 86b5731af7
commit 7f44514baf
1 changed files with 28 additions and 24 deletions

View File

@ -5,6 +5,10 @@
$auth = Zend_Auth::getInstance();
$this->headLink()->appendStylesheet('/css/index.css');
?>
<style>
.carousel-inner .item .featured-image-link{text-align:center;}
.featured-image{min-width:100%;text-align:center; margin:auto 0px;min-height:100%;}
</style>
<div class="row">
<div class="span5" id="main-news">
<h4><a href="archives">新闻</a></h4>
@ -16,30 +20,30 @@
</ul>
</div>
<div class="span7" id="feature-news">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<?php
foreach($this->news as $k=>$v)
{
echo '<li data-target="#myCarousel" data-slide-to="$k"'.($k==0?' class="active"':'').'></li>';
}
?>
</ol>
<div class="carousel-inner">
{
echo '<li data-target="#myCarousel" data-slide-to="$k"'.($k==0?' class="active"':'').'></li>';
}
?>
</ol>
<div class="carousel-inner">
<?php
foreach($this->news as $k=>$v)
{
echo '<div class="item'.($k==0?' active':'').'">';
echo '<a href="'.$v['url'].'" title="'.$v['description'].'" ><img src="'.$v['image'].'" class="img-rounded featured-image" /></a>';
echo '<div class="carousel-caption">';
echo '<h4><a href="'.$v['url'].'">'.$v['title'].'</a><span class="pull-right">['.date("Y-m-d",strtotime($v['ts_published'])).']</span></h4>';
//echo '<p>'.$v['description'].'</p>';
echo '</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>
{
echo '<div class="item'.($k==0?' active':'').'">';
echo '<a href="'.$v['url'].'" title="'.$v['description'].'" class="featured-image-link" ><img src="'.$v['image'].'" class="img-rounded featured-image" /></a>';
echo '<div class="carousel-caption">';
echo '<h4><a href="'.$v['url'].'">'.$v['title'].'</a><span class="pull-right">['.date("Y-m-d",strtotime($v['ts_published'])).']</span></h4>';
//echo '<p>'.$v['description'].'</p>';
echo '</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>
@ -72,9 +76,9 @@
<h4>专题数据集</h4>
<ul class="unstyled">
<li><a href="/heihe"><i class="icon-folder-open"></i>黑河计划数据管理中心</a></li>
<li><a href="/hiwater"><i class="icon-folder-open"></i>黑河生态水文遥感试验</a></li>
<li><a href="/water"><i class="icon-folder-open"></i>黑河综合遥感联合试验</a></li>
<li><a href="/glacier"><i class="icon-folder-open"></i>中国冰川资源及其变化调查</a></li>
<li><a href="/hiwater"><i class="icon-folder-open"></i>黑河生态水文遥感试验</a></li>
<li><a href="/water"><i class="icon-folder-open"></i>黑河综合遥感联合试验</a></li>
<li><a href="/glacier"><i class="icon-folder-open"></i>中国冰川资源及其变化调查</a></li>
<li><a href="/yrnmr"><i class="icon-folder-open"></i>黄河上游宁蒙河段数据</a></li>
</ul>
<!-- <hr />
@ -123,6 +127,6 @@
</ul>
</div>
</div>
<script>
<script>
$('.item').css('max-height',$('#main-news').height());
</script>