diff --git a/common/models/event/Tag.php b/common/models/event/Tag.php
index d9e3f75..e414fce 100755
--- a/common/models/event/Tag.php
+++ b/common/models/event/Tag.php
@@ -116,7 +116,7 @@
/**
* @return \yii\db\ActiveQuery
*/
- public function getArticles()
+ public function getEvents()
{
return $this->hasMany(Event::className(), [ 'id' => 'event_id' ])
->viaTable('event_to_tag', [ 'event_tag_id' => 'id' ]);
diff --git a/frontend/controllers/EventController.php b/frontend/controllers/EventController.php
index 344fe26..eba46f4 100755
--- a/frontend/controllers/EventController.php
+++ b/frontend/controllers/EventController.php
@@ -98,7 +98,7 @@
)
->with(
[
- 'articles',
+ 'events',
]
)
->one();
diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php
index ce28809..e46b9fb 100755
--- a/frontend/views/site/index.php
+++ b/frontend/views/site/index.php
@@ -16,7 +16,7 @@
-
+
background !== null ? ' style="background: url('.$slides[0]->background->getUrl().') center center repeat;"' : ''?>>
@@ -25,7 +25,7 @@ _________________________________________________________ -->
$slide){?>
-
+
background !== null) ? $slide->background->getUrl() : ''?>>
=$slide->title?>
diff --git a/frontend/web/js/front.js b/frontend/web/js/front.js
index 31a71fb..b6b0768 100755
--- a/frontend/web/js/front.js
+++ b/frontend/web/js/front.js
@@ -119,8 +119,14 @@ function sliders() {
//animationsSlider();
console.log('init');
},
- afterMove: function () {
+ afterMove: function (elem) {
//animationsSlider();
+ var bg = $(elem).children('.owl-wrapper-outer').children().find('.active').find('.item').data('bg');
+ if (bg != ''){
+ $(elem).parent().parent().css("background", 'url('+bg+') center center repeat');
+ }else{
+ $(elem).parent().parent().css('background', 'url(../img/photogrid.jpg) center center repeat');
+ }
console.log('move');
}
});
--
libgit2 0.21.4