From bca7037259851adbb6ae877da89ca40d63658241 Mon Sep 17 00:00:00 2001 From: semenov Date: Sun, 29 Sep 2019 20:32:02 +0300 Subject: [PATCH] dev --- src/UnifyTheme.php | 2 +- src/assets/UnifyDefaultAsset.php | 8 +++-- src/assets/UnifyThemeAsset.php | 8 ++--- src/assets/src/css/unify-custom.css | 4 +++ src/assets/src/js/unify-custom.js | 12 +++++-- src/components/UnifyThemeSettings.php | 15 +++++++-- src/views/headers/header-mobile.php | 3 ++ src/views/headers/header-v1.php | 2 ++ src/views/headers/header-v2.php | 2 ++ src/views/headers/header-v3.php | 2 ++ src/views/headers/header-v4.php | 2 ++ src/views/layouts/main.php | 33 +++++++++++++++++-- .../modules/cms/content-element/default.php | 9 +++-- src/views/modules/cms/tree/default.php | 9 ++--- 14 files changed, 87 insertions(+), 24 deletions(-) diff --git a/src/UnifyTheme.php b/src/UnifyTheme.php index 166e1d1..4ca9a17 100644 --- a/src/UnifyTheme.php +++ b/src/UnifyTheme.php @@ -516,7 +516,7 @@ static public function initBeforeRender() /** * @var bool */ - public $isShowLoader = false; + public $is_show_loader = false; /** * @var bool diff --git a/src/assets/UnifyDefaultAsset.php b/src/assets/UnifyDefaultAsset.php index 0a6f394..697b09f 100644 --- a/src/assets/UnifyDefaultAsset.php +++ b/src/assets/UnifyDefaultAsset.php @@ -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', diff --git a/src/assets/UnifyThemeAsset.php b/src/assets/UnifyThemeAsset.php index 78956cd..fde63b8 100644 --- a/src/assets/UnifyThemeAsset.php +++ b/src/assets/UnifyThemeAsset.php @@ -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, ]; } \ No newline at end of file diff --git a/src/assets/src/css/unify-custom.css b/src/assets/src/css/unify-custom.css index cb9a51a..267b896 100644 --- a/src/assets/src/css/unify-custom.css +++ b/src/assets/src/css/unify-custom.css @@ -400,3 +400,7 @@ html.mm-right .mm-menu.mm-fx-menu-slide { .u-btn-primary, a.g-bg-primary { color: #fff !important; } + + + + diff --git a/src/assets/src/js/unify-custom.js b/src/assets/src/js/unify-custom.js index f4c95d7..b95bb3d 100644 --- a/src/assets/src/js/unify-custom.js +++ b/src/assets/src/js/unify-custom.js @@ -110,6 +110,11 @@ return false; }); + + + $('.sx-preloader').fadeOut('slow', function () { + $(this).remove(); + }); } }); @@ -136,6 +141,9 @@ } } + + + + + })(sx, sx.$, sx._); - - diff --git a/src/components/UnifyThemeSettings.php b/src/components/UnifyThemeSettings.php index d94b3bb..3c56cd4 100644 --- a/src/components/UnifyThemeSettings.php +++ b/src/components/UnifyThemeSettings.php @@ -127,6 +127,11 @@ class UnifyThemeSettings extends Component + /** + * @var bool + */ + public $is_show_loader = false; + /** * @var bool */ @@ -317,6 +322,7 @@ public function rules() [ 'isShowBottomBlock', 'is_image_body_begin', + 'is_show_loader', 'is_header_sticky_margin', 'is_header_sticky', ], @@ -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' => "Высота блока с картинкой в новостях", @@ -409,6 +416,7 @@ public function attributeHints() 'body_outer' => "Задается для центрированных сайтов", 'is_header_sticky' => "Фиксированная шапка будет растянута на весь экран", 'is_show_search_block' => 'При выборе "Да", в шапке будет выведен поисковый блок', + 'is_show_loader' => 'Показывать индикатор загрузки?', ]); } @@ -488,6 +496,9 @@ public function getConfigFormFields() 'class' => BoolField::class, ], + 'is_show_loader' => [ + 'class' => BoolField::class, + ], 'main_theme_color1' => [ @@ -583,6 +594,8 @@ public function getConfigFormFields() ], + + 'is_header_sticky' => [ 'class' => BoolField::class, ], @@ -747,8 +760,6 @@ public function getConfigFormFields() ], ], ], - - ]; } diff --git a/src/views/headers/header-mobile.php b/src/views/headers/header-mobile.php index a7ad036..3dabffc 100644 --- a/src/views/headers/header-mobile.php +++ b/src/views/headers/header-mobile.php @@ -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(<<registerJs(<<theme->bodyCssClass = $this->theme->bodyCssClass . " g-mt-80"; diff --git a/src/views/headers/header-v3.php b/src/views/headers/header-v3.php index f609aa2..c5f140c 100644 --- a/src/views/headers/header-v3.php +++ b/src/views/headers/header-v3.php @@ -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(<<registerJs(<< beginBody() ?> - theme->isShowLoader) : ?> -
-
+ theme->is_show_loader) : ?> + registerCss(<< +
+
diff --git a/src/views/modules/cms/content-element/default.php b/src/views/modules/cms/content-element/default.php index faf24c5..8f131ba 100644 --- a/src/views/modules/cms/content-element/default.php +++ b/src/views/modules/cms/content-element/default.php @@ -13,7 +13,12 @@ ?> theme->is_image_body_begin) : ?> -
+
@@ -101,7 +106,7 @@ theme->is_image_body_begin) : ?> description_short; ?> -
+
description_full; ?>
diff --git a/src/views/modules/cms/tree/default.php b/src/views/modules/cms/tree/default.php index 383f337..15840c2 100644 --- a/src/views/modules/cms/tree/default.php +++ b/src/views/modules/cms/tree/default.php @@ -11,14 +11,9 @@
+ ) : $this->theme->body_begin_no_image; ?>" style="background-position: center;">