diff --git a/assets/vendor/astroid/scss/_header.scss b/assets/vendor/astroid/scss/_header.scss
index 90f1e9f3..0422dc45 100644
--- a/assets/vendor/astroid/scss/_header.scss
+++ b/assets/vendor/astroid/scss/_header.scss
@@ -272,7 +272,6 @@ header .logo-wrapper {
.astroid-logo {
margin: 0 auto !important;
- justify-content: center;
}
.astroid-sidebar-mobile-menu {
@@ -327,6 +326,13 @@ header .logo-wrapper {
.astroid-sidebar-content {
overflow-y: auto;
+ @media(min-width: 1200px) {
+ padding: 15px 25px;
+ }
+
+ @media(min-width: 1400px) {
+ padding: 15px 35px;
+ }
}
.astroid-sidebar-collapsable {
diff --git a/assets/vendor/astroid/scss/_menu.scss b/assets/vendor/astroid/scss/_menu.scss
index 0de98ea2..61f71504 100644
--- a/assets/vendor/astroid/scss/_menu.scss
+++ b/assets/vendor/astroid/scss/_menu.scss
@@ -254,7 +254,7 @@ ul {
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
- border-bottom: 8px solid #eee;
+ border-bottom: 8px solid var(--bs-border-color);
z-index: 0;
left: 50%;
margin-left: -8px;
@@ -268,29 +268,40 @@ ul {
list-style-type: none;
margin: 0;
padding: 0;
-
+ .nav-title {
+ display: block;
+ }
li {
- width: 100%;
display: block;
- border-bottom: 1px solid $border-color;
+ width: 100%;
+ margin: 10px 0;
+ .nav-item-inner {
+ border-radius: var(--bs-border-radius);
+ }
.as-menu-item {
- padding: 10px;
- width: calc(100% - 50px);
- display: inline-block;
+ display: block;
+ padding: $sidebar-menu-item-padding;
+ flex: auto;
}
- >ul {
- list-style-type: none;
- margin: 0;
- padding: 0;
- padding-left: 20px;
+ ul.nav-child {
display: none;
- border-top: 1px solid #eee;
-
- li {
- &:last-child {
- border-bottom: 0;
+ list-style: none;
+ border-left: 1px dashed var(--bs-border-color);
+ margin-left: 20px;
+ padding-left: 15px;
+ > li > div.nav-item-inner > a {
+ position: relative;
+ &:before {
+ content: "";
+ margin-right: 10px;
+ border-top: 1px dashed var(--bs-border-color);
+ width: 7px;
+ height: 1px;
+ position: absolute;
+ top: 50%;
+ left: -13px;
}
}
}
@@ -301,14 +312,10 @@ ul {
}
}
- >.nav-item-caret {
- width: 50px;
- display: inline-block;
+ .nav-item-caret {
font-size: 13px;
- text-align: right;
- padding: 10px;
+ padding: $sidebar-menu-item-padding;
cursor: pointer;
- float: right;
line-height: inherit;
&:before {
diff --git a/assets/vendor/astroid/scss/_variables.scss b/assets/vendor/astroid/scss/_variables.scss
index b9e14573..ed1eb434 100644
--- a/assets/vendor/astroid/scss/_variables.scss
+++ b/assets/vendor/astroid/scss/_variables.scss
@@ -28,6 +28,7 @@ $sidebar-header-mini-width: 54px !default;
// Menu
$megamenu-gutter-width: 30px !default;
+$sidebar-menu-item-padding: 5px 15px !default;
// Deprecated Variable
$header-sidebar-width: 320px !default;
diff --git a/framework/frontend/header/menu/link.php b/framework/frontend/header/menu/link.php
index af5b0939..8ed7c2b1 100644
--- a/framework/frontend/header/menu/link.php
+++ b/framework/frontend/header/menu/link.php
@@ -151,6 +151,6 @@
parent && $item->deeper == 1)) { ?>
-
+
\ No newline at end of file
diff --git a/framework/library/astroid/Component/Menu.php b/framework/library/astroid/Component/Menu.php
index 8d031562..08cd60d4 100644
--- a/framework/library/astroid/Component/Menu.php
+++ b/framework/library/astroid/Component/Menu.php
@@ -653,9 +653,11 @@ public static function getSidebarMenu($menutype = '')
$options = self::getAstroidMenuOptions($item, $list);
$class = self::getLiClass($item, $options, $default_id, $active_id, $path);
echo '
';
+ echo '';
$document->include('header.menu.link', ['item' => $item, 'options' => $options, 'mobilemenu' => false, 'slidemenu' => 1, 'active' => in_array('nav-item-active', $class)]);
+ echo '
';
if ($item->deeper) {
- echo '';
+ echo '';
} elseif ($item->shallower) {
echo '
';
echo str_repeat('', $item->level_diff);
diff --git a/framework/library/astroid/Component/Utility.php b/framework/library/astroid/Component/Utility.php
index 1092a00c..8a2a7cfb 100644
--- a/framework/library/astroid/Component/Utility.php
+++ b/framework/library/astroid/Component/Utility.php
@@ -213,7 +213,7 @@ public static function typography()
$customselector = $params->get('custom_typography_selectors', '');
$logo_type = $params->get('logo_type', 'none');
- $types = array('body' => 'body, .body', 'h1' => 'h1, .h1', 'h2' => 'h2, .h2', 'h3' => 'h3, .h3', 'h4' => 'h4, .h4', 'h5' => 'h5, .h5', 'h6' => 'h6, .h6', 'logo' => ['.astroid-logo-text', '.astroid-logo-text > a.site-title'], 'logo_tag_line' => '.astroid-logo-text > p.site-tagline', 'menu' => '.astroid-nav > li > .as-menu-item, .astroid-sidebar-menu > li > .as-menu-item, .astroid-mobile-menu > .nav-item > .as-menu-item', 'submenu' => '.nav-submenu-container .nav-submenu > li, .jddrop-content .megamenu-item .megamenu-menu li, .nav-submenu, .astroid-mobile-menu .nav-child .menu-go-back, .astroid-mobile-menu .nav-child .nav-item-submenu > .as-menu-item', 'custom' => $customselector);
+ $types = array('body' => 'body, .body', 'h1' => 'h1, .h1', 'h2' => 'h2, .h2', 'h3' => 'h3, .h3', 'h4' => 'h4, .h4', 'h5' => 'h5, .h5', 'h6' => 'h6, .h6', 'logo' => ['.astroid-logo-text', '.astroid-logo-text > a.site-title'], 'logo_tag_line' => '.astroid-logo-text > p.site-tagline', 'menu' => '.astroid-nav > li > .as-menu-item, .astroid-sidebar-menu > li > .nav-item-inner > .as-menu-item, .astroid-mobile-menu > .nav-item > .as-menu-item', 'submenu' => '.nav-submenu-container .nav-submenu > li, .jddrop-content .megamenu-item .megamenu-menu li, .nav-submenu, .astroid-mobile-menu .nav-child .menu-go-back, .astroid-mobile-menu .nav-child .nav-item-submenu > .as-menu-item, .nav-item-submenu .as-menu-item', 'custom' => $customselector);
$bodyTypography = null;
foreach ($types as $type => $selector) {
@@ -335,7 +335,7 @@ public static function colors()
$main_menu_link_active_color = Style::getColor($params->get('main_menu_link_active_color', ''));
$main_menu_active_background = Style::getColor($params->get('main_menu_active_background', ''));
$main_menu_hover_background = Style::getColor($params->get('main_menu_hover_background', ''));
- $navLink = new Style(['.astroid-nav .nav-link', '.astroid-sidebar-menu .nav-link']);
+ $navLink = new Style(['.astroid-nav .nav-link']);
$navLink->addCss('color', $main_menu_link_color['light']);
$navLink->hover()->addCss('color', $main_menu_link_hover_color['light']);
$navLink->hover()->addCss('background-color', $main_menu_hover_background['light']);
@@ -344,7 +344,7 @@ public static function colors()
$navLink->active('.active')->addCss('background-color', $main_menu_active_background['light']);
$navLink->render(); // render navlink
- $navLink = new Style(['.astroid-nav .nav-link', '.astroid-sidebar-menu .nav-link'], 'dark');
+ $navLink = new Style(['.astroid-nav .nav-link'], 'dark');
$navLink->addCss('color', $main_menu_link_color['dark']);
$navLink->hover()->addCss('color', $main_menu_link_hover_color['dark']);
$navLink->hover()->addCss('background-color', $main_menu_hover_background['dark']);
@@ -383,6 +383,37 @@ public static function colors()
$link->active('.active')->addCss('color', $dropdown_menu_active_link_color['dark'])->addCss('background-color', $dropdown_menu_active_bg_color['dark']);
$dropdown->render(); // render dropdown
+ // Sidebar Submenu
+ $sidebar_menu_style = new Style('.astroid-sidebar-menu');
+ $sidebar_menu_style->child('.nav-item-inner > .as-menu-item')->addCss('color', $main_menu_link_color['light']);
+ $sidebar_menu_style->child('.nav-item-inner > .as-menu-item')->hover()->addCss('color', $main_menu_link_hover_color['light']);
+ $sidebar_menu_style->child('.nav-item-inner')->hover()->addCss('background-color', $main_menu_hover_background['light']);
+ $sidebar_menu_style->child('.nav-item-inner > .as-menu-item')->active('.active')->addCss('color', $main_menu_link_active_color['light']);
+ $sidebar_menu_style->child('.nav-item-inner')->active('.active')->addCss('background-color', $main_menu_active_background['light']);
+ $sidebar_link = $sidebar_menu_style->child('.nav-item-submenu .nav-item-inner');
+ $sidebar_link->child('a.as-menu-item')->addCss('color', $dropdown_link_color['light']);
+ $sidebar_link->hover()->child('a.as-menu-item')->addCss('color', $dropdown_menu_link_hover_color['light']);
+ $sidebar_link->hover()->addCss('background-color', $dropdown_menu_hover_bg_color['light']);
+ $sidebar_link->child('a.as-menu-item')->active()->addCss('color', $dropdown_menu_active_bg_color['light']);
+ $sidebar_link->active()->addCss('background-color', $dropdown_menu_active_bg_color['light']);
+ $sidebar_menu_style->child('.navbar-subnav')->addCss('background-color', $dropdown_bg_color['light']);
+ $sidebar_menu_style->render();
+
+ $sidebar_menu_style = new Style('.astroid-sidebar-menu', 'dark');
+ $sidebar_menu_style->child('.nav-item-inner > .as-menu-item')->addCss('color', $main_menu_link_color['dark']);
+ $sidebar_menu_style->child('.nav-item-inner > .as-menu-item')->hover()->addCss('color', $main_menu_link_hover_color['dark']);
+ $sidebar_menu_style->child('.nav-item-inner')->hover()->addCss('background-color', $main_menu_hover_background['dark']);
+ $sidebar_menu_style->child('.nav-item-inner > .as-menu-item')->active('.active')->addCss('color', $main_menu_link_active_color['dark']);
+ $sidebar_menu_style->child('.nav-item-inner')->active('.active')->addCss('background-color', $main_menu_active_background['dark']);
+ $sidebar_link = $sidebar_menu_style->child('.nav-item-submenu .nav-item-inner');
+ $sidebar_link->child('a.as-menu-item')->addCss('color', $dropdown_link_color['dark']);
+ $sidebar_link->hover()->child('a.as-menu-item')->addCss('color', $dropdown_menu_link_hover_color['dark']);
+ $sidebar_link->hover()->addCss('background-color', $dropdown_menu_hover_bg_color['dark']);
+ $sidebar_link->child('a.as-menu-item')->active()->addCss('color', $dropdown_menu_active_bg_color['dark']);
+ $sidebar_link->active()->addCss('background-color', $dropdown_menu_active_bg_color['dark']);
+ $sidebar_menu_style->child('.navbar-subnav')->addCss('background-color', $dropdown_bg_color['dark']);
+ $sidebar_menu_style->render();
+
// Sticky Menu
$stick_header_mobile_menu_icon_color = Style::getColor($params->get('stick_header_mobile_menu_icon_color', ''));
$stick_header_mobile_menu_active_icon_color = Style::getColor($params->get('stick_header_mobile_menu_active_icon_color', ''));
diff --git a/js/script.js b/js/script.js
index 473e7e8d..e933bef3 100644
--- a/js/script.js
+++ b/js/script.js
@@ -30,10 +30,10 @@
return;
}
$('.astroid-sidebar-menu .nav-item-caret').click(function () {
- $(this).parent('li').siblings('li').children('ul').slideUp();
- $(this).parent('li').siblings('li').children('.nav-item-caret').removeClass('open');
+ $(this).parent().parent('li').siblings('li').children('ul').slideUp();
+ $(this).parent().parent('li').siblings('li').children('div').children('.nav-item-caret').removeClass('open');
$(this).toggleClass('open');
- $(this).siblings('ul').slideToggle();
+ $(this).parent().siblings('ul').slideToggle();
});
$('.astroid-sidebar-collapsable').click(function () {
$('#astroid-header').toggleClass('expanded');
diff --git a/js/script.min.js b/js/script.min.js
index df9f58a0..5b9d3305 100644
--- a/js/script.min.js
+++ b/js/script.min.js
@@ -1 +1 @@
-(function($){var lastScrollTop=0;var windowloaded=false;var initLastScrollTop=function(){var st=$(window).scrollTop();lastScrollTop=st};var isScrollDown=function(){var st=$(window).scrollTop();return st>lastScrollTop};var initMobileMenu=function(){if(!$(".astroid-mobile-menu").length){return}$(".astroid-mobile-menu").astroidMobileMenu();$(".astroid-mobile-menu").removeClass("d-none")};var initOffcanvasMenu=function(){if(!$("#astroid-offcanvas").length){return}if($("#astroid-offcanvas").find("ul.menu").length){$("#astroid-offcanvas").find("ul.menu").astroidMobileMenu()}};var initSidebarMenu=function(){if(!$(".astroid-sidebar-menu").length){return}$(".astroid-sidebar-menu .nav-item-caret").click(function(){$(this).parent("li").siblings("li").children("ul").slideUp();$(this).parent("li").siblings("li").children(".nav-item-caret").removeClass("open");$(this).toggleClass("open");$(this).siblings("ul").slideToggle()});$(".astroid-sidebar-collapsable").click(function(){$("#astroid-header").toggleClass("expanded")})};var initDisplay=function(){setTimeout(function(){$(".d-init").removeClass("d-none")},100)};var initBackToTop=function(){$(window).scroll(function(){if($(this).scrollTop()>=200){$("#astroid-backtotop").fadeIn(200)}else{$("#astroid-backtotop").fadeOut(200)}});$("#astroid-backtotop").on("click",function(e){e.preventDefault();$("body,html").animate({scrollTop:0},500)})};var initHeader=function(){var stickyHeader=$("#astroid-sticky-header");var _header=$("header");if(!_header.length){return false}var _headerTop=_header.offset().top;var _headerHeight=_header.height();var _headerBottom=_headerTop+_headerHeight;if(!stickyHeader.length){return}var _winScroll=$(window).scrollTop();var _breakpoint=deviceBreakpoint(true);if(_breakpoint==="xl"||_breakpoint==="lg"){if(stickyHeader.hasClass("header-sticky-desktop")&&_winScroll>_headerBottom){stickyHeader.removeClass("d-none");stickyHeader.addClass("d-flex")}else if(stickyHeader.hasClass("header-stickyonscroll-desktop")&&_winScroll>_headerBottom&&!isScrollDown()){stickyHeader.removeClass("d-none");stickyHeader.addClass("d-flex")}else{stickyHeader.removeClass("d-flex");stickyHeader.addClass("d-none")}}else if(_breakpoint==="sm"||_breakpoint==="md"){if(stickyHeader.hasClass("header-static-tablet")){if(stickyHeader.hasClass("d-flex")){stickyHeader.addClass("d-none");stickyHeader.removeClass("d-flex")}return}if(stickyHeader.hasClass("header-sticky-tablet")&&_winScroll>_headerBottom){stickyHeader.removeClass("d-none");stickyHeader.addClass("d-flex")}else if(stickyHeader.hasClass("header-stickyonscroll-tablet")&&_winScroll>_headerBottom&&!isScrollDown()){stickyHeader.addClass("d-flex");stickyHeader.removeClass("d-none")}else{stickyHeader.addClass("d-none");stickyHeader.removeClass("d-flex")}}else{if(stickyHeader.hasClass("header-static-mobile")){if(stickyHeader.hasClass("d-flex")){stickyHeader.addClass("d-none");stickyHeader.removeClass("d-flex")}return}if(stickyHeader.hasClass("header-sticky-mobile")&&_winScroll>_headerBottom){stickyHeader.addClass("d-flex");stickyHeader.removeClass("d-none")}else if(stickyHeader.hasClass("header-stickyonscroll-mobile")&&_winScroll>_headerBottom&&!isScrollDown()){stickyHeader.addClass("d-flex");stickyHeader.removeClass("d-none")}else{stickyHeader.addClass("d-none");stickyHeader.removeClass("d-flex")}}};var initEmptyHeaderContent=function(){$(".header-left-section:empty").each(function(){if(!$.trim($(this).html())){$(this).prop("hidden",true)}});$(".header-center-section:empty").each(function(){if(!$.trim($(this).html())){$(this).prop("hidden",true)}});$(".header-right-section:empty").each(function(){if(!$.trim($(this).html())){$(this).prop("hidden",true)}})};var initTooltip=function(){if($('[data-toggle="tooltip"]').length){var tooltipTriggerList=[].slice.call(document.querySelectorAll('[data-toggle="tooltip"]'));var tooltipList=tooltipTriggerList.map(function(tooltipTriggerEl){return new bootstrap.Tooltip(tooltipTriggerEl)})}};var initAnimations=function(){var bindAnimation=function(){$("[data-animation]").each(function(){var _animation=$(this).data("animation");var _delay=$(this).data("animation-delay");var _duration=$(this).data("animation-duration");if(_animation!=""&&elementInViewport($(this))&&!$(this).hasClass("animation-done")){if(_delay!=""&&_delay!=0&&_delay!="0"&&_delay!=undefined){_delay=parseInt(_delay)}else{_delay=0}if(_duration!=""&&_duration!=0&&_duration!="0"&&_duration!=undefined){_duration=parseInt(_duration)+10}else{_duration=1010}var _this=this;$(_this).css("animation-duration",_duration+"ms");setTimeout(function(){$(_this).css("visibility","visible");$(_this).addClass("animate");$(_this).addClass(_animation);$(_this).addClass("animation-done");setTimeout(function(){$(_this).removeClass("animate");$(_this).addClass("animated");$(_this).removeClass(_animation)},_duration+_delay)},_delay)}})};$(window).on("scroll",function(){bindAnimation()});bindAnimation()};var initProgressBar=function(){$(".progress-bar-viewport-animation").each(function(){var _this=$(this);if(!_this.hasClass("viewport-animation-done")&&elementInViewport(_this)){var _width=_this.data("value");_width=parseInt(_width);_this.css("width",_width+"%")}})};var elementInViewport=function(element){var _this=element;var _this_top=_this.offset().top;return _this_top<=window.pageYOffset+parseInt(window.innerHeight)&&_this_top>=window.pageYOffset};var deviceBreakpoint=function(_return){if($(".astroid-breakpoints").length==0){var _breakpoints='';$("body").append(_breakpoints)}var _sizes=["xs","sm","md","lg","xl"];var _device="undefined";_sizes.forEach(function(_size){var _visiblity=$(".astroid-breakpoints .device-"+_size).css("display");if(_visiblity=="block"){_device=_size;return false}});if(_return){return _device}else{$("body").removeClass("astroid-device-xs").removeClass("astroid-device-sm").removeClass("astroid-device-md").removeClass("astroid-device-lg").removeClass("astroid-device-xl");$("body").addClass("astroid-device-"+_device)}};var initPreloader=function(){$("#astroid-preloader").removeClass("d-flex").addClass("d-none")};var setCookie=function(name,value,days){if(days){var date=new Date;date.setTime(date.getTime()+days*24*60*60*1e3);var expires="; expires="+date.toGMTString()}else var expires="";document.cookie=name+"="+value+expires+"; path=/"};var initColorMode=function(){if($(".astroid-color-mode").length){var switcher=$(".astroid-color-mode .switcher"),color_mode="light";if(ASTROID_COLOR_MODE==="auto"){var cur_hour=(new Date).getHours();if(24-cur_hour<7||cur_hour<6){color_mode="dark"}if(color_mode==="dark"){switcher.prop("checked",true)}else{switcher.prop("checked",false)}}else{color_mode=ASTROID_COLOR_MODE}$("html").attr("data-bs-theme",color_mode);switcher.on("change",function(){if(this.checked){switcher.each(function(i,el){if(!this.checked){$(el).prop("checked",true)}});$("html").attr("data-bs-theme","dark");setCookie("astroid-color-mode-"+TEMPLATE_HASH,"dark",3)}else{switcher.each(function(i,el){if(this.checked){$(el).prop("checked",false)}});$("html").attr("data-bs-theme","light");setCookie("astroid-color-mode-"+TEMPLATE_HASH,"light",3)}})}};var docReady=function(){initDisplay();initMobileMenu();initOffcanvasMenu();initSidebarMenu();initColorMode();initBackToTop();initHeader();initEmptyHeaderContent();initTooltip();deviceBreakpoint(false)};var winLoad=function(){initAnimations();deviceBreakpoint(false);initPreloader();initProgressBar();windowloaded=true};var winResize=function(){deviceBreakpoint(false);initHeader()};var winScroll=function(){initHeader();initLastScrollTop();if(windowloaded){initProgressBar()}deviceBreakpoint(false)};$(docReady);$(window).on("load",winLoad);$(window).on("resize",winResize);$(window).on("scroll",winScroll);window.addEventListener("orientationchange",winResize)})(jQuery);(function($){$(document).ready(function(){var bootstrapLoaded=typeof $().tooltip=="function";var mootoolsLoaded=typeof MooTools!="undefined";if(bootstrapLoaded&&mootoolsLoaded){Element.implement({hide:function(){return this},show:function(v){return this},slide:function(v){return this}})}})})(jQuery);
\ No newline at end of file
+(function($){var lastScrollTop=0;var windowloaded=false;var initLastScrollTop=function(){var st=$(window).scrollTop();lastScrollTop=st};var isScrollDown=function(){var st=$(window).scrollTop();return st>lastScrollTop};var initMobileMenu=function(){if(!$(".astroid-mobile-menu").length){return}$(".astroid-mobile-menu").astroidMobileMenu();$(".astroid-mobile-menu").removeClass("d-none")};var initOffcanvasMenu=function(){if(!$("#astroid-offcanvas").length){return}if($("#astroid-offcanvas").find("ul.menu").length){$("#astroid-offcanvas").find("ul.menu").astroidMobileMenu()}};var initSidebarMenu=function(){if(!$(".astroid-sidebar-menu").length){return}$(".astroid-sidebar-menu .nav-item-caret").click(function(){$(this).parent().parent("li").siblings("li").children("ul").slideUp();$(this).parent().parent("li").siblings("li").children("div").children(".nav-item-caret").removeClass("open");$(this).toggleClass("open");$(this).parent().siblings("ul").slideToggle()});$(".astroid-sidebar-collapsable").click(function(){$("#astroid-header").toggleClass("expanded")})};var initDisplay=function(){setTimeout(function(){$(".d-init").removeClass("d-none")},100)};var initBackToTop=function(){$(window).scroll(function(){if($(this).scrollTop()>=200){$("#astroid-backtotop").fadeIn(200)}else{$("#astroid-backtotop").fadeOut(200)}});$("#astroid-backtotop").on("click",function(e){e.preventDefault();$("body,html").animate({scrollTop:0},500)})};var initHeader=function(){var stickyHeader=$("#astroid-sticky-header");var _header=$("header");if(!_header.length){return false}var _headerTop=_header.offset().top;var _headerHeight=_header.height();var _headerBottom=_headerTop+_headerHeight;if(!stickyHeader.length){return}var _winScroll=$(window).scrollTop();var _breakpoint=deviceBreakpoint(true);if(_breakpoint==="xl"||_breakpoint==="lg"){if(stickyHeader.hasClass("header-sticky-desktop")&&_winScroll>_headerBottom){stickyHeader.removeClass("d-none");stickyHeader.addClass("d-flex")}else if(stickyHeader.hasClass("header-stickyonscroll-desktop")&&_winScroll>_headerBottom&&!isScrollDown()){stickyHeader.removeClass("d-none");stickyHeader.addClass("d-flex")}else{stickyHeader.removeClass("d-flex");stickyHeader.addClass("d-none")}}else if(_breakpoint==="sm"||_breakpoint==="md"){if(stickyHeader.hasClass("header-static-tablet")){if(stickyHeader.hasClass("d-flex")){stickyHeader.addClass("d-none");stickyHeader.removeClass("d-flex")}return}if(stickyHeader.hasClass("header-sticky-tablet")&&_winScroll>_headerBottom){stickyHeader.removeClass("d-none");stickyHeader.addClass("d-flex")}else if(stickyHeader.hasClass("header-stickyonscroll-tablet")&&_winScroll>_headerBottom&&!isScrollDown()){stickyHeader.addClass("d-flex");stickyHeader.removeClass("d-none")}else{stickyHeader.addClass("d-none");stickyHeader.removeClass("d-flex")}}else{if(stickyHeader.hasClass("header-static-mobile")){if(stickyHeader.hasClass("d-flex")){stickyHeader.addClass("d-none");stickyHeader.removeClass("d-flex")}return}if(stickyHeader.hasClass("header-sticky-mobile")&&_winScroll>_headerBottom){stickyHeader.addClass("d-flex");stickyHeader.removeClass("d-none")}else if(stickyHeader.hasClass("header-stickyonscroll-mobile")&&_winScroll>_headerBottom&&!isScrollDown()){stickyHeader.addClass("d-flex");stickyHeader.removeClass("d-none")}else{stickyHeader.addClass("d-none");stickyHeader.removeClass("d-flex")}}};var initEmptyHeaderContent=function(){$(".header-left-section:empty").each(function(){if(!$.trim($(this).html())){$(this).prop("hidden",true)}});$(".header-center-section:empty").each(function(){if(!$.trim($(this).html())){$(this).prop("hidden",true)}});$(".header-right-section:empty").each(function(){if(!$.trim($(this).html())){$(this).prop("hidden",true)}})};var initTooltip=function(){if($('[data-toggle="tooltip"]').length){var tooltipTriggerList=[].slice.call(document.querySelectorAll('[data-toggle="tooltip"]'));var tooltipList=tooltipTriggerList.map(function(tooltipTriggerEl){return new bootstrap.Tooltip(tooltipTriggerEl)})}};var initAnimations=function(){var bindAnimation=function(){$("[data-animation]").each(function(){var _animation=$(this).data("animation");var _delay=$(this).data("animation-delay");var _duration=$(this).data("animation-duration");if(_animation!=""&&elementInViewport($(this))&&!$(this).hasClass("animation-done")){if(_delay!=""&&_delay!=0&&_delay!="0"&&_delay!=undefined){_delay=parseInt(_delay)}else{_delay=0}if(_duration!=""&&_duration!=0&&_duration!="0"&&_duration!=undefined){_duration=parseInt(_duration)+10}else{_duration=1010}var _this=this;$(_this).css("animation-duration",_duration+"ms");setTimeout(function(){$(_this).css("visibility","visible");$(_this).addClass("animate");$(_this).addClass(_animation);$(_this).addClass("animation-done");setTimeout(function(){$(_this).removeClass("animate");$(_this).addClass("animated");$(_this).removeClass(_animation)},_duration+_delay)},_delay)}})};$(window).on("scroll",function(){bindAnimation()});bindAnimation()};var initProgressBar=function(){$(".progress-bar-viewport-animation").each(function(){var _this=$(this);if(!_this.hasClass("viewport-animation-done")&&elementInViewport(_this)){var _width=_this.data("value");_width=parseInt(_width);_this.css("width",_width+"%")}})};var elementInViewport=function(element){var _this=element;var _this_top=_this.offset().top;return _this_top<=window.pageYOffset+parseInt(window.innerHeight)&&_this_top>=window.pageYOffset};var deviceBreakpoint=function(_return){if($(".astroid-breakpoints").length==0){var _breakpoints='';$("body").append(_breakpoints)}var _sizes=["xs","sm","md","lg","xl"];var _device="undefined";_sizes.forEach(function(_size){var _visiblity=$(".astroid-breakpoints .device-"+_size).css("display");if(_visiblity=="block"){_device=_size;return false}});if(_return){return _device}else{$("body").removeClass("astroid-device-xs").removeClass("astroid-device-sm").removeClass("astroid-device-md").removeClass("astroid-device-lg").removeClass("astroid-device-xl");$("body").addClass("astroid-device-"+_device)}};var initPreloader=function(){$("#astroid-preloader").removeClass("d-flex").addClass("d-none")};var setCookie=function(name,value,days){if(days){var date=new Date;date.setTime(date.getTime()+days*24*60*60*1e3);var expires="; expires="+date.toGMTString()}else var expires="";document.cookie=name+"="+value+expires+"; path=/"};var initColorMode=function(){if($(".astroid-color-mode").length){var switcher=$(".astroid-color-mode .switcher"),color_mode="light";if(ASTROID_COLOR_MODE==="auto"){var cur_hour=(new Date).getHours();if(24-cur_hour<7||cur_hour<6){color_mode="dark"}if(color_mode==="dark"){switcher.prop("checked",true)}else{switcher.prop("checked",false)}}else{color_mode=ASTROID_COLOR_MODE}$("html").attr("data-bs-theme",color_mode);switcher.on("change",function(){if(this.checked){switcher.each(function(i,el){if(!this.checked){$(el).prop("checked",true)}});$("html").attr("data-bs-theme","dark");setCookie("astroid-color-mode-"+TEMPLATE_HASH,"dark",3)}else{switcher.each(function(i,el){if(this.checked){$(el).prop("checked",false)}});$("html").attr("data-bs-theme","light");setCookie("astroid-color-mode-"+TEMPLATE_HASH,"light",3)}})}};var docReady=function(){initDisplay();initMobileMenu();initOffcanvasMenu();initSidebarMenu();initColorMode();initBackToTop();initHeader();initEmptyHeaderContent();initTooltip();deviceBreakpoint(false)};var winLoad=function(){initAnimations();deviceBreakpoint(false);initPreloader();initProgressBar();windowloaded=true};var winResize=function(){deviceBreakpoint(false);initHeader()};var winScroll=function(){initHeader();initLastScrollTop();if(windowloaded){initProgressBar()}deviceBreakpoint(false)};$(docReady);$(window).on("load",winLoad);$(window).on("resize",winResize);$(window).on("scroll",winScroll);window.addEventListener("orientationchange",winResize)})(jQuery);(function($){$(document).ready(function(){var bootstrapLoaded=typeof $().tooltip=="function";var mootoolsLoaded=typeof MooTools!="undefined";if(bootstrapLoaded&&mootoolsLoaded){Element.implement({hide:function(){return this},show:function(v){return this},slide:function(v){return this}})}})})(jQuery);
\ No newline at end of file
diff --git a/js/videobg.js b/js/videobg.js
index 3843118c..103b12f5 100644
--- a/js/videobg.js
+++ b/js/videobg.js
@@ -19,7 +19,6 @@
var _video = $('', {
playsinline: true,
- autoplay: true,
loop: true,
src: _url,
});
@@ -40,13 +39,15 @@
_video.css('transform', 'translate(-50%, -50%)');
_video.css('max-width', 'inherit');
_video.prop('muted', true);
- $(window).on('load', function () {
- _container.append(_video);
- });
+
+ _container.append(_video);
$(this).prepend(_container);
+
+ _video.prop('muted', true);
+ _video.trigger('play');
});
};
- $(function () {
+ $(document).ready(function () {
$('[data-as-video-bg]').ASVideoBG();
});
}(jQuery));
diff --git a/js/videobg.min.js b/js/videobg.min.js
index 7d54c898..dc5d45ff 100644
--- a/js/videobg.min.js
+++ b/js/videobg.min.js
@@ -1 +1 @@
-(function($){$.fn.ASVideoBG=function(){return this.each(function(){var _url=$(this).data("as-video-bg"),_poster=$(this).data("as-video-poster");$(this).css("position","relative");$(this).children().css("position","relative");$(this).children().css("z-index","1");var _container=$("");_container.addClass("astroid-element-overlay");_container.css("position","absolute");_container.css("top","0");_container.css("left","0");_container.css("width","100%");_container.css("height","100%");_container.css("overflow","hidden");_container.css("z-index","0");var _video=$("",{playsinline:true,autoplay:true,loop:true,src:_url});if(typeof _poster!=="undefined"&&_poster){_container.css("background","url("+_poster+")");_container.css("background-size","cover");_container.css("background-position","center center")}_video.css("position","absolute");_video.css("top","50%");_video.css("left","50%");_video.css("min-width","100%");_video.css("min-height","100%");_video.css("width","auto");_video.css("height","auto");_video.css("z-index","-100");_video.css("transform","translate(-50%, -50%)");_video.css("max-width","inherit");_video.prop("muted",true);$(window).on("load",function(){_container.append(_video)});$(this).prepend(_container)})};$(function(){$("[data-as-video-bg]").ASVideoBG()})})(jQuery);
\ No newline at end of file
+(function($){$.fn.ASVideoBG=function(){return this.each(function(){var _url=$(this).data("as-video-bg"),_poster=$(this).data("as-video-poster");$(this).css("position","relative");$(this).children().css("position","relative");$(this).children().css("z-index","1");var _container=$("");_container.addClass("astroid-element-overlay");_container.css("position","absolute");_container.css("top","0");_container.css("left","0");_container.css("width","100%");_container.css("height","100%");_container.css("overflow","hidden");_container.css("z-index","0");var _video=$("",{playsinline:true,loop:true,src:_url});if(typeof _poster!=="undefined"&&_poster){_container.css("background","url("+_poster+")");_container.css("background-size","cover");_container.css("background-position","center center")}_video.css("position","absolute");_video.css("top","50%");_video.css("left","50%");_video.css("min-width","100%");_video.css("min-height","100%");_video.css("width","auto");_video.css("height","auto");_video.css("z-index","-100");_video.css("transform","translate(-50%, -50%)");_video.css("max-width","inherit");_video.prop("muted",true);_container.append(_video);$(this).prepend(_container);_video.prop("muted",true);_video.trigger("play")})};$(document).ready(function(){$("[data-as-video-bg]").ASVideoBG()})})(jQuery);
\ No newline at end of file