index.html
7.3 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<html>
<head>
<title>首页 {$site_info.site_name|default=''}</title>
<meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
<meta name="description" content="{$site_info.site_seo_description|default=''}">
<include file="public@head"/>
<link href="__TMPL__/public/assets/css/slippry/slippry.css" rel="stylesheet">
<style>
.caption-wraper {
position: absolute;
left: 50%;
bottom: 2em;
}
.caption-wraper .caption {
position: relative;
left: -50%;
background-color: rgba(0, 0, 0, 0.54);
padding: 0.4em 1em;
color: #fff;
-webkit-border-radius: 1.2em;
-moz-border-radius: 1.2em;
-ms-border-radius: 1.2em;
-o-border-radius: 1.2em;
border-radius: 1.2em;
}
.tc-gridbox {
margin: 0;
}
@media (max-width: 767px) {
.caption-wraper {
left: 0;
bottom: 0.4em;
}
.caption-wraper .caption {
left: 0;
padding: 0.2em 0.4em;
font-size: 0.92em;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
}
</style>
<hook name="before_head_end"/>
</head>
<body class="body-white">
<include file="public@nav"/>
<ul id="home-slider" class="list-unstyled">
<php>
$top_slide_id=empty($theme_vars['top_slide'])?1:$theme_vars['top_slide'];
</php>
<slides id="$top_slide_id">
<li>
<div class="caption-wraper">
<div class="caption">{$vo.title|default=''}</div>
</div>
<a href="{$vo.url|default=''}"><img src="{:cmf_get_image_url($vo.image)}" alt=""></a>
</li>
</slides>
<noslides id="$top_slide_id">
<li>
<div class="caption-wraper">
<div class="caption">此幻灯片只是演示,您没有设置任何幻灯片,请到后台模板设置!</div>
</div>
<a href=""><img src="__TMPL__/public/assets/images/demo/1.jpg" alt=""></a>
</li>
<li>
<div class="caption-wraper">
<div class="caption">此幻灯片只是演示,您没有设置任何幻灯片,请到后台模板设置!</div>
</div>
<a href=""><img src="__TMPL__/public/assets/images/demo/2.jpg" alt=""></a>
</li>
<li>
<div class="caption-wraper">
<div class="caption">此幻灯片只是演示,您没有设置任何幻灯片,请到后台模板设置!</div>
</div>
<a href=""><img src="__TMPL__/public/assets/images/demo/3.jpg" alt=""></a>
</li>
</noslides>
</ul>
<div class="container">
<widget name="features">
<div>
<h1 class="text-center">{$widget.title}</h1>
<h3 class="text-center">{$widget.vars.sub_title}</h3>
</div>
<php>
$features_count = count($widget['vars']['features']);
$rows = ceil($features_count/3);
</php>
<for start="1" end="$rows" comparison="elt" step="1" name="row">
<php>
$first_row = ($row-1)*3;
$features = array_slice($widget['vars']['features'],$first_row,3);
</php>
<div class="row">
<foreach name="features" item="vo">
<div class="col-md-4">
<h2 class="font-large nospace"><i class="fa fa-{$vo.icon}"></i> {$vo.title}</h2>
<p>{$vo.content}</p>
</div>
</foreach>
</div>
</for>
</widget>
<widget name="last_news">
<div>
<h1 class="text-center">{$widget.title}</h1>
</div>
<div class="row">
<php>
$widget["vars"]["last_news_category_id"] = empty($widget["vars"]["last_news_category_id"])?1:$widget["vars"]["last_news_category_id"];
$last_news_limit=4;
</php>
<portal:articles limit="$last_news_limit" order="post.published_time DESC"
categoryIds="$widget.vars.last_news_category_id">
<div class="col-md-3">
<div class="tc-gridbox">
<div class="header">
<div class="item-image">
<a href="{:cmf_url('portal/Article/index',array('id'=>$vo.id,'cid'=>$vo.category_id))}">
<present name="vo.more.thumbnail">
<empty name="vo.more.thumbnail">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
class="img-responsive"
alt="">
<else/>
<img src="{:cmf_get_image_url($vo.more.thumbnail)}"
class="img-responsive"
alt="">
</empty>
<else/>
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
class="img-responsive"
alt="">
</present>
</a>
</div>
<h3>
<a href="{:cmf_url('portal/Article/index',array('id'=>$vo.id,'cid'=>$vo.category_id))}">{$vo.post_title}</a>
</h3>
<hr>
</div>
<div class="body">
<p>
<a href="{:cmf_url('portal/Article/index',array('id'=>$vo.id,'cid'=>$vo.category_id))}">...</a>
</p>
</div>
</div>
</div>
</portal:articles>
</div>
</widget>
<include file="public@footer"/>
</div>
<!-- /container -->
<include file="public@scripts"/>
<script src="__TMPL__/public/assets/js/slippry.min.js"></script>
<script>
$(function () {
$("#home-slider").slippry({
transition: 'fade',
useCSS: true,
captions: false,
speed: 1000,
pause: 3000,
auto: true,
preload: 'visible'
});
$("#home-slider").show();
setInterval(function(){
console.log(1);
$.ajax({
url:"{:url('checkStatus')}",
type:"POST",
data:{
order_sn:123123123123
},
dataType:"JSON",
success:function(res){
console.log(res);
}
})
},1000)
});
</script>
<hook name="before_body_end"/>
</body>
</html>