Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Sep 29, 2019
1 parent ed0535e commit bca7037
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/UnifyTheme.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ static public function initBeforeRender()
/**
* @var bool
*/
public $isShowLoader = false;
public $is_show_loader = false;

/**
* @var bool
Expand Down
8 changes: 5 additions & 3 deletions src/assets/UnifyDefaultAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ class UnifyDefaultAsset extends UnifyAsset
//'@vendor/fortawesome/font-awesome/css/all.min.css',

'assets/vendor/icon-awesome/css/font-awesome.min.css',
/*'assets/vendor/icon-awesome/css/font-awesome.min.css',
'assets/vendor/icon-line/css/simple-line-icons.css',
'assets/vendor/icon-etlinefont/style.css',
'assets/vendor/icon-line-pro/style.css',
'assets/vendor/icon-hs/style.css',
'assets/vendor/animate.css',
'assets/vendor/typedjs/typed.css',
'assets/vendor/icon-hs/style.css',*/

/*'assets/vendor/animate.css',
'assets/vendor/typedjs/typed.css',*/

'assets/css/unify-core.css',
'assets/css/unify-components.css',
Expand Down
8 changes: 4 additions & 4 deletions src/assets/UnifyThemeAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ class UnifyThemeAsset extends UnifyAsset
public $depends = [
UnifyDefaultAsset::class,

UnifyHsMegamenuAsset::class,
UnifyHsHamburgersAsset::class,
//UnifyHsMegamenuAsset::class,
//UnifyHsHamburgersAsset::class,
UnifyHsPopupAsset::class,
UnifyHsOnscrollAnimationAsset::class,
UnifyHsStickyBlockAsset::class,
UnifyHsCarouselAsset::class,
//UnifyHsStickyBlockAsset::class,
//UnifyHsCarouselAsset::class,
];
}
4 changes: 4 additions & 0 deletions src/assets/src/css/unify-custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,7 @@ html.mm-right .mm-menu.mm-fx-menu-slide {
.u-btn-primary, a.g-bg-primary {
color: #fff !important;
}




12 changes: 10 additions & 2 deletions src/assets/src/js/unify-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@

return false;
});


$('.sx-preloader').fadeOut('slow', function () {
$(this).remove();
});
}
});

Expand All @@ -136,6 +141,9 @@
}
}






})(sx, sx.$, sx._);


15 changes: 13 additions & 2 deletions src/components/UnifyThemeSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ class UnifyThemeSettings extends Component



/**
* @var bool
*/
public $is_show_loader = false;

/**
* @var bool
*/
Expand Down Expand Up @@ -317,6 +322,7 @@ public function rules()
[
'isShowBottomBlock',
'is_image_body_begin',
'is_show_loader',
'is_header_sticky_margin',
'is_header_sticky',
],
Expand Down Expand Up @@ -383,6 +389,7 @@ public function attributeLabels()

'isShowBottomBlock' => "Показывать блок с телефоном и email на всех страницах?",

'is_show_loader' => "Показывать индикатор загрузки перед загрузкой страницы?",
'is_image_body_begin' => "Показывать в начале страницы картинку из анонса?",
'body_begin_image_height_tree' => "Высота блока с картинкой в разделах",
'body_begin_image_height_element' => "Высота блока с картинкой в новостях",
Expand All @@ -409,6 +416,7 @@ public function attributeHints()
'body_outer' => "Задается для центрированных сайтов",
'is_header_sticky' => "Фиксированная шапка будет растянута на весь экран",
'is_show_search_block' => 'При выборе "Да", в шапке будет выведен поисковый блок',
'is_show_loader' => 'Показывать индикатор загрузки?',
]);
}

Expand Down Expand Up @@ -488,6 +496,9 @@ public function getConfigFormFields()
'class' => BoolField::class,
],

'is_show_loader' => [
'class' => BoolField::class,
],


'main_theme_color1' => [
Expand Down Expand Up @@ -583,6 +594,8 @@ public function getConfigFormFields()
],




'is_header_sticky' => [
'class' => BoolField::class,
],
Expand Down Expand Up @@ -747,8 +760,6 @@ public function getConfigFormFields()
],
],
],


];
}

Expand Down
3 changes: 3 additions & 0 deletions src/views/headers/header-mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
/* @var $this yii\web\View */
/* @see https://htmlstream.com/public/preview/unify-v2.6.1/unify-main/shortcodes/headers/classic-header--topbar-1.html */
\skeeks\assets\unify\base\UnifyHsHamburgersAsset::register($this);
\skeeks\assets\unify\base\UnifyHsMegamenuAsset::register($this);

$this->registerJs(<<<JS
/* Перемещаем модальное окно в конец body. */
$('.modal').on('shown.bs.modal', function (e) {
Expand Down
2 changes: 2 additions & 0 deletions src/views/headers/header-v1.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

\skeeks\assets\unify\base\UnifyHsDropdownAsset::register($this);
\skeeks\assets\unify\base\UnifyHsHeaderAsset::register($this);
\skeeks\assets\unify\base\UnifyHsHamburgersAsset::register($this);
\skeeks\assets\unify\base\UnifyHsMegamenuAsset::register($this);

$this->registerJs(<<<JS
Expand Down
2 changes: 2 additions & 0 deletions src/views/headers/header-v2.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/* @var $this yii\web\View */
\skeeks\assets\unify\base\UnifyHsHeaderAsset::register($this);
\skeeks\assets\unify\base\UnifyHsDropdownAsset::register($this);
\skeeks\assets\unify\base\UnifyHsHamburgersAsset::register($this);
\skeeks\assets\unify\base\UnifyHsMegamenuAsset::register($this);

//$this->theme->bodyCssClass = $this->theme->bodyCssClass . " g-mt-80";

Expand Down
2 changes: 2 additions & 0 deletions src/views/headers/header-v3.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

\skeeks\assets\unify\base\UnifyHsDropdownAsset::register($this);
\skeeks\assets\unify\base\UnifyHsHeaderAsset::register($this);
\skeeks\assets\unify\base\UnifyHsHamburgersAsset::register($this);
\skeeks\assets\unify\base\UnifyHsMegamenuAsset::register($this);

$this->registerJs(<<<JS
Expand Down
2 changes: 2 additions & 0 deletions src/views/headers/header-v4.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

\skeeks\assets\unify\base\UnifyHsDropdownAsset::register($this);
\skeeks\assets\unify\base\UnifyHsHeaderAsset::register($this);
\skeeks\assets\unify\base\UnifyHsHamburgersAsset::register($this);
\skeeks\assets\unify\base\UnifyHsMegamenuAsset::register($this);

$this->registerJs(<<<JS
Expand Down
33 changes: 30 additions & 3 deletions src/views/layouts/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,36 @@
</head>
<body class="<?= $this->theme->bodyCssClass; ?>">
<?php $this->beginBody() ?>
<? if ($this->theme->isShowLoader) : ?>
<div class="preloader">
<div id="loaderImage"></div>
<? if ($this->theme->is_show_loader) : ?>
<?
$this->registerCss(<<<CSS
/*************************
*******Preloader CSS*********
**************************/
.sx-preloader {
display: table;
background: #1e1e1e;
z-index: 999999;
position: fixed;
height: 100%;
width: 100%;
left: 0;
top: 0;
}
.sx-loader-image {
display: table-cell;
vertical-align: middle;
overflow: hidden;
text-align: center;
}
CSS
);
?>
<div class="sx-preloader">
<div class="sx-loader-image"></div>
</div>
<? endif; ?>
<div>
Expand Down
9 changes: 7 additions & 2 deletions src/views/modules/cms/content-element/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
?>

<? if ($this->theme->is_image_body_begin) : ?>
<section class="g-bg-cover g-bg-size-cover g-bg-white-gradient-opacity-v1--after sx-body-begin-image-wrapper" data-bg-img-src="<?= $model->image ? $model->image->src : $this->theme->body_begin_no_image; ?>" style="background-image: url('<?= $model->image ? $model->image->src : $this->theme->body_begin_no_image; ?>'); background: center;">
<section class="g-bg-cover g-bg-size-cover g-bg-white-gradient-opacity-v1--after sx-body-begin-image-wrapper" data-bg-img-src="<?= $model->image ? \Yii::$app->imaging->thumbnailUrlOnRequest($model->image->src,
new \skeeks\cms\components\imaging\filters\Thumbnail([
'w' => 1920,
'h' => 500,
]), $model->code
) : $this->theme->body_begin_no_image; ?>" style="background: center;">
<div class="container text-center g-pos-rel g-z-index-1 g-pb-50">
<div class="row d-flex justify-content-center align-content-end flex-wrap g-min-height-<?= $this->theme->body_begin_image_height_element; ?>">
<div class="col-lg-10 mt-auto">
Expand Down Expand Up @@ -101,7 +106,7 @@
<? if (!$this->theme->is_image_body_begin) : ?>
<?= $model->description_short; ?>
<? endif; ?>
<div itemprop="articleBody">
<div itemprop="articleBody" style="overflow: auto;">
<?= $model->description_full; ?>

</div>
Expand Down
9 changes: 2 additions & 7 deletions src/views/modules/cms/tree/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@
<section class="g-bg-cover g-bg-size-cover g-bg-white-gradient-opacity-v1--after sx-body-begin-image-wrapper" data-bg-img-src="<?= $model->image ? \Yii::$app->imaging->thumbnailUrlOnRequest($model->image->src,
new \skeeks\cms\components\imaging\filters\Thumbnail([
'w' => 1920,
'h' => 1080,
'h' => 500,
]), $model->code
) : $this->theme->body_begin_no_image; ?>" style="background-image: url('<?= $model->image ? \Yii::$app->imaging->thumbnailUrlOnRequest($model->image->src,
new \skeeks\cms\components\imaging\filters\Thumbnail([
'w' => 1920,
'h' => 1080,
]), $model->code
) : $this->theme->body_begin_no_image; ?>'); background: center;">
) : $this->theme->body_begin_no_image; ?>" style="background-position: center;">
<div class="container text-center g-pos-rel g-z-index-1 g-pb-50">
<div class="row d-flex justify-content-center align-content-end flex-wrap g-min-height-<?= $this->theme->body_begin_image_height_tree; ?>">
<div class="col-lg-10 mt-auto">
Expand Down

0 comments on commit bca7037

Please sign in to comment.