index.php
17.2 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<?php
use yii\widgets\ListView;
use yii\widgets\MyListView;
use yii\widgets\Menu;
use yii\helpers\Html;
use \yii\base\Controller;
$this->title = 'Главная';
?>
<div class="wrapper content-wrapper clearfix">
<div class="slider-feature-wrap clearfix">
<!-- Slider -->
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('.home-bxslider').bxSlider( {
pager: false,
auto: true,
});
jQuery('.second-bxslider').bxSlider( {
pager: false,
auto: true,
});
})
</script>
<div class="slider-section">
<ul class="home-bxslider">
<?php foreach($blog as $one_blog):?>
<li>
<img src="<?= $one_blog->image ?>" />
<div class="slider-desc">
<div class="slider-details">
<div class="slide-title"><?= Html::a($one_blog->name,['articles/view', 'type'=> 'blog', 'translit' =>$one_blog->translit ]) ?></div>
<div class="slide-caption"><?= $one_blog->shortenString($one_blog->body, 400)?></div>
<div class="slide-date">
<i class="fa fa-calendar"></i><?= $one_blog->date ?>
</div>
</div>
</div>
</li>
<?php endforeach;?>
</ul>
</div>
<!-- Featured Post Beside Slider -->
<div class="besides-block">
<?php foreach($gallery as $one_gallery):?>
<div class="beside-post clearfix">
<figure class="beside-thumb clearfix">
<?= Html::a(Html::img($one_gallery->image),['gallery/view', 'translit' =>$one_gallery->translit ]) ?>
</figure>
<div class="beside-caption clearfix">
<h3 class="post-title"><?= Html::a($one_gallery->title,['gallery/view', 'translit' =>$one_gallery->translit ]) ?></h3>
<div class="post-date"><i class="fa fa-calendar"></i><?=$one_gallery->date?></div>
</div>
</div>
<?php endforeach;?>
</div><!-- .beides-block -->
</div>
<div id="home-content" class="site-content">
<div id="primary" class="content-area">
<div id="gray-bg-wr"><div id="gray-bg"></div></div>
<main id="main" class="site-main" role="main">
<div class="home-featured-block">
<h2 class="block-title"><span class="bordertitle-red"></span>КАЙТ-ТРИПЫ</h2>
<div class="feature-post-wrap clearfix">
<?php foreach($trips as $one_trip):?>
<div class="featured-post clearfix">
<figure class="post-thumb clearfix">
<?= Html::a(Html::img($one_trip->image),['articles/view', 'type'=> 'trips', 'translit' =>$one_trip->translit ]) ?>
</figure>
<div class="post-desc clearfix">
<h3 class="feature-main-title"><?= Html::a($one_trip->title,['articles/view', 'type'=> 'trips', 'translit' =>$one_trip->translit ])?></h3>
<div class="post-date feature-main-date"><?= $one_trip->shortenString($one_trip->body, 400)?></div>
</div>
</div>
<?php endforeach;?>
</div>
</div>
<!-- Featured Block Three -->
<div class="home-featured-block block-3 clearfix">
<h2 class="block-title"><span class="bordertitle-red"></span>Акции</h2>
<figure class="post-thumb-mini clearfix">
</figure>
<div class="post-desc slider-section clearfix event-slider">
<ul class="second-bxslider">
<?php foreach($events as $one_event):?>
<li>
<?= Html::a(Html::img( $one_event->cover),['events/view','translit' =>$one_event->translit ]) ?>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
<!-- End Featured Block Three -->
<div class="single-col clearfix">
<!-- Featured Block Left -->
<div class="home-featured-block-single-col">
<h2 class="block-title"><span class="bordertitle-red"></span>Школы</h2>
<?php foreach($schools as $one_schools):?>
<div class="featured-post-block-coltype clearfix">
<figure class="post-thumb-mini clearfix">
<?= Html::a(Html::img($one_schools->image),['schools/view', 'translit' =>$one_schools->translit ]) ?>
</figure>
<div class="post-desc clearfix">
<h3 class="feature-main-title"><?= Html::a($one_schools->name,['schools/view', 'translit' =>$one_schools->translit ])?></h3>
<div class="post-date feature-main-date"><?= $one_schools->shortenString($one_schools->description, 400)?></div>
</div>
</div>
<?php endforeach;?>
</div>
<!-- End Featured Block Lefte -->
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<!-- Featured Block Right -->
<div class="home-featured-block-single-col">
<h2 class="block-title"><span class="bordertitle-red"></span>Споты</h2>
<?php foreach($spots as $one_spot):?>
<div class="featured-post-block-coltype clearfix">
<figure class="post-thumb-mini clearfix">
<div id="google-map_<?=$one_spot->id?>" style="width: 130px;height: 130px"></div>
</figure>
<div class="post-desc clearfix">
<h3 class="feature-main-title"><?= Html::a($one_spot->name,['spots/view', 'translit' =>$one_spot->translit ])?></h3>
<div class="post-date feature-main-date"><?= $one_spot->shortenString($one_spot->description, 400)?></div>
</div>
</div>
<script>
function map_initialize_<?= $one_spot->id ?>( map_element_id )
{
var image = '/images/icon_map.png';
var myOptions_<?= $one_spot->id ?> = {
zoom: 10,
center: new google.maps.LatLng(<?= $one_spot->coordinates_x?>,<?= $one_spot->coordinates_y?>),
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
scrollwheel: false
};
var map_<?= $one_spot->id ?> = new google.maps.Map(document.getElementById( map_element_id ),myOptions_<?= $one_spot->id ?>);
var mapLat_<?= $one_spot->id ?> = <?= $one_spot->coordinates_x?>;
var mapLng_<?= $one_spot->id?> = <?= $one_spot->coordinates_y?>;
var latlng_<?= $one_spot->id?> = new google.maps.LatLng(mapLat_<?= $one_spot->id?>,mapLng_<?= $one_spot->id?>);
var marker_<?= $one_spot->id?> = new google.maps.Marker({
position: latlng_<?= $one_spot->id?>,
map: map_<?= $one_spot->id ?>,
icon: image
});
var contentString_<?= $one_spot->id?> = '';
var infowindow_<?= $one_spot->id?> = new google.maps.InfoWindow({
content: contentString_<?= $one_spot->id?>
});
google.maps.event.addListener(marker_<?= $one_spot->id?>, 'click', function() {
infowindow_<?= $one_spot->id?>.open(map_<?= $one_spot->id ?>,marker_<?= $one_spot->id?>);
});
}
$(function () {
if( document.getElementById('google-map_<?=$one_spot->id?>') )
{
map_initialize_<?= $one_spot->id ?>( 'google-map_<?=$one_spot->id?>' );
}
});
</script>
<?php endforeach;?>
</div>
</div><!--single-col-->
<!-- End Featured Block Left -->
<!-- FORECAST-->
<div class="home-featured-block block-4">
<h2 class="block-title"><span class="bordertitle-red"></span>Прогнозы</h2>
<div class="featured-excerpt-block clearfix">
<div class="featured-post-main clearfix">
<?php foreach($spots as $one_spot):?>
<div>
<div class="name"><?= Html::a($one_spot->name,['spots/view', 'translit' =>$one_spot->translit ])?></div>
<?=$this->render('@app/views/spots/_forecast', [
'model'=>$one_spot
]);?>
</div>
<?php endforeach;?>
</div>
</div>
</div>
<!-- END FORECAST -->
<!-- Popular Widget Area -->
<div class="home-featured-block popular-widget-area clearfix">
</div>
<!-- End Popular Widget Area -->
<!-- Media Gallery -->
<!-- End Media Gallery -->
</main><!-- #main -->
</div><!-- #primary -->
<div id="secondary-right" class="widget-area secondary-sidebar f-right clearfix" role="complementary">
<div id="sidebar-section-top" class="widget-area sidebar clearfix">
<aside id="text-2" class="widget widget_text"> <div class="textwidget"><div class = "ukraine" style = "width: 272px; height: 167px">
<a href="spots/index"><img src = "/images/ukraine.png" style = "width: 272px;
height: 167px; margin-bottom:30px"></a>
</div></div>
</aside><aside id="text-3" class="widget widget_text"><h3 class="widget-title"><span>НОВОСТИ</span></h3>
<div class="textwidget"> <div class = "sidebar-news">
<?php foreach($news as $one_news):?>
<div class = "sidebar-trips-nth" style = "height:100px; width:272px; margin-bottom: 20px">
<?= Html::a(Html::img($one_news->image),['articles/view', 'type'=> 'news','translit' =>$one_news->translit ]) ?>
<div style = "float:right; height:100px; width:136px; padding: 0px 5px 5px 11px; font: 13px Roboto,sans-serif;
line-height: 24px;">
<?= Html::a($one_news->title,['articles/view', 'type'=> 'news','translit' =>$one_news->translit ]) ?>
</div>
</div>
<?php endforeach; ?>
<?= Html::a('ВСЕ НОВОСТИ',['articles/index', 'type'=> 'news'],['id'=>'button-news']) ?>
</div></div>
</aside><aside id="text-4" class="widget widget_text"> <div class="textwidget"><div class = "kite-cabrina" style = "width: 272px;
height: 167px">
<a href = "#"><img src = "/images/kite-cabrina.png" style = "width: 272px;
height: 167px; margin-bottom:30px"></a>
</div>
</div>
</aside>
<aside id="text-5" class="widget widget_text"><h3 class="widget-title">
<span>ТРИПЫ</span></h3>
<div class="textwidget"><div class = "sidebar-trips">
<?php foreach($trips as $one_trip):?>
<div class = "sidebar-trips-nth" style = "height:100px; width:272px; margin-bottom: 20px">
<?= Html::a(Html::img($one_trip->image),['articles/view', 'type'=> 'trips','translit' =>$one_trip->translit ]) ?>
<div style = "float:right; height:100px; width:136px; padding: 0px 5px 5px 11px; font: 13px Roboto,sans-serif;
line-height: 24px;">
<?= Html::a($this->title,['articles/view', 'type'=> 'trips','translit' =>$one_trip->translit ]) ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</aside>
<!-- <aside id="text-6" class="widget widget_text"><h3 class="widget-title"><span>ПОПУЛЯРНЫЕ ТОВАРЫ</span></h3> <div class="textwidget"><div class = "sidebar-pop-items">-->
<!-- <a href = "#">-->
<!-- <div class = "sidebar-pop-items-nth">-->
<!-- <img src = "/images/popular-items.png" style = "height:90px; width:100px; float:left;">-->
<!-- <div class = "pop-item-ins">-->
<!-- Комплект кайта Cabrinha , SWITCHBL ADE KC 10 2014-->
<!-- </div>-->
<!-- <div class = "pop-price">-->
<!-- 39959 грн.-->
<!-- </div>-->
<!-- <a href="#" id = "pop-buy">КУПИТЬ</a>-->
<!-- </div>-->
<!-- </a>-->
<!---->
<!---->
<!-- <a href = "#">-->
<!-- <div class = "sidebar-pop-items-nth">-->
<!-- <img src = "/images/popular-items.png" style = "height:90px; width:100px; float:left;">-->
<!-- <div class = "pop-item-ins">-->
<!-- Комплект кайта Cabrinha , SWITCHBL ADE KC 10 2014-->
<!-- </div>-->
<!-- <div class = "pop-price">-->
<!-- 39959 грн.-->
<!-- </div>-->
<!-- <a href="#" id = "pop-buy">КУПИТЬ</a>-->
<!-- </div>-->
<!-- </a>-->
<!---->
<!-- <a href = "#">-->
<!-- <div class = "sidebar-pop-items-nth">-->
<!-- <img src = "/images/popular-items.png" style = "height:90px; width:100px; float:left;">-->
<!-- <div class = "pop-item-ins">-->
<!-- Комплект кайта Cabrinha , SWITCHBL ADE KC 10 2014-->
<!-- </div>-->
<!-- <div class = "pop-price">-->
<!-- 39959 грн.-->
<!-- </div>-->
<!-- <a href="#" id = "pop-buy">КУПИТЬ</a>-->
<!-- </div>-->
<!-- </a>-->
<!---->
<!-- </div></div>-->
<!-- </aside> -->
</div>
</div>
</div><!-- #content -->
</div><!-- content-wrapper-->