update news list
This commit is contained in:
parent
d0d129eba1
commit
d1d9a20644
|
@ -122,34 +122,44 @@
|
|||
<div class="col-xs-6 news-con">
|
||||
<?php for($i = 0; $i <= 3; $i++){ ?>
|
||||
<div class="news-wrapper">
|
||||
<h5><a href="<?= $this->list_news[$i]['url'] ?>"><?= $this->list_news[$i]['title'] ?></a></h5>
|
||||
<p><?php
|
||||
$description = "";
|
||||
if (mb_strlen($this->list_news[$i]['description'])>100)
|
||||
{
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,100,'utf-8').'...';
|
||||
}else{
|
||||
$description = $this->list_news[$i]['description'];
|
||||
}
|
||||
echo $description; ?>
|
||||
</p>
|
||||
<div class="col-xs-2" style="background: url('<?= $this->list_news[$i]['image'] ?>') no-repeat center;background-size:contain;height: 75px"></div>
|
||||
<div class="col-xs-10">
|
||||
<h5><a href="<?= $this->list_news[$i]['url'] ?>"><?= $this->list_news[$i]['title'] ?></a></h5>
|
||||
<p>
|
||||
<?php
|
||||
$description = "";
|
||||
if (mb_strlen($this->list_news[$i]['description'])>80)
|
||||
{
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,80,'utf-8').'...';
|
||||
}else{
|
||||
$description = $this->list_news[$i]['description'];
|
||||
}
|
||||
echo $description; ?>
|
||||
</p>
|
||||
</div>
|
||||
<p style="clear: both"></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-xs-6 news-con">
|
||||
<?php for($i = 4; $i <= 7; $i++){ ?>
|
||||
<div class="news-wrapper">
|
||||
<h5><a href="<?= $this->list_news[$i]['url'] ?>"><?= $this->list_news[$i]['title'] ?></a></h5>
|
||||
<p><?php
|
||||
$description = "";
|
||||
if (mb_strlen($this->list_news[$i]['description'])>100)
|
||||
{
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,100,'utf-8').'...';
|
||||
}else{
|
||||
$description = $this->list_news[$i]['description'];
|
||||
}
|
||||
echo $description; ?>
|
||||
</p>
|
||||
<div class="col-xs-2" style="background: url('<?= $this->list_news[$i]['image'] ?>') no-repeat center;background-size:contain;height: 75px"></div>
|
||||
<div class="col-xs-10">
|
||||
<h5><a href="<?= $this->list_news[$i]['url'] ?>"><?= $this->list_news[$i]['title'] ?></a></h5>
|
||||
<p>
|
||||
<?php
|
||||
$description = "";
|
||||
if (mb_strlen($this->list_news[$i]['description'])>80)
|
||||
{
|
||||
$description = mb_substr($this->list_news[$i]['description'],0,80,'utf-8').'...';
|
||||
}else{
|
||||
$description = $this->list_news[$i]['description'];
|
||||
}
|
||||
echo $description; ?>
|
||||
</p>
|
||||
</div>
|
||||
<p style="clear: both"></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
|
|
@ -164,7 +164,7 @@ h1{
|
|||
margin-top: 50px;
|
||||
}
|
||||
.news-wrapper a{
|
||||
color:#333;
|
||||
color:#333;
|
||||
}
|
||||
.news .hicon{
|
||||
display: inline-block;
|
||||
|
|
Loading…
Reference in New Issue