home.html
2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{template 'common/header'}
<style>
body{padding:0;margin:0; min-height:480px; background-image:url('{if empty($_W['styles']['indexbgimg'])}./themes/style23/images/bg_index.jpg{else}{$_W['styles']['indexbgimg']}{/if}');background-size:cover;}
a{color:{$_W['styles']['linkcolor']}; text-decoration:none;}
{$_W['styles']['css']}
.box{width:65%; margin:45.4% 0 0 34%; overflow:hidden;}
.box .box-item{float:left; width:43.8%; margin:0 1.8% 1.8% 0; display:block;text-decoration:none;outline:none;height:6em; text-align:center; color:#fff; border-radius:5px;overflow:hidden; padding:5px 10px;}
.box .box-item i{display:inline-block; width:50px; height:50px; line-height:50px; font-size:35px; color:#FFF; overflow:hidden; }
.box .box-item span{color:{$_W['styles']['fontnavcolor']};display:block;font-size:14px; width:100%; text-align:center; white-space:nowrap; overflow:hidden;}
.box .box-item.pic{display:block; width:89.4%;}
.box ul li{background-color:rgba(254,170,36,0.8);padding:0 10px;margin:1%;display: inline-block;height:45px;width:100%;}
.box ul li a{text-decoration: none;}
.box .title{color:#fff;}
.box .createtime{color:#999;font-size:12px}
</style>
<div class="box clearfix">
{php $num = 0;}
{loop $navs $nav}
{php if($num == 0) $bg = 'rgba(254,170,36,0.8)';}
{php if($num == 1) $bg = 'rgba(88,181,225,0.8)';}
{php if($num == 2) $bg = 'rgba(210,99,159,0.8)';}
{php if($num == 3) $bg = 'rgba(128,188,80,0.8)';}
{php if($num == 4) $bg = 'rgba(137,135,217,0.8)';}
<a href="{$nav['url']}" class="box-item {if $num == 2}pic{else}icon{/if}" style="background:{$bg};">
{if !empty($nav['icon'])}
<i style="background:url({$_W['attachurl']}{$nav['icon']}) no-repeat;background-size:cover;{$nav['css']['icon']['style']}"></i>
{else}
<i class="fa {$nav['css']['icon']['icon']}" style="{$nav['css']['icon']['style']}"></i>
{/if}
<span style="{$nav['css']['name']}" title="{$nav['name']}">{$nav['name']}</span>
</a>
{php $num++; if($num > 4) $num = 0;}
{/loop}
<!-- 该分类下文章-start -->
{if $_GPC['c'] == 'site' && $_GPC['a'] == 'site'}
<ul class="list list-unstyled">
{data func="site_article" cid=$cid return="true" assign="result"}
{loop $result['list'] $row}
<li>
<a href="{$row['linkurl']}">
<div class="title">{php echo cutstr($row['title'],10,1);}</div>
<div class="createtime">{php echo date('Y-m-d H:i:s', $row['createtime'])}</div>
</a>
</li>
{/loop}
</ul>
{/if}
<!-- 该分类下文章-start -->
</div>
{template 'common/footer'}