diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 47b406f..40bc89a 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -472,7 +472,12 @@ } // 在所有的頁面(包含首頁)執行下面這幾個函數 - window.has_topest_banner = ($('[data-pp="300"] .w-ad-banner').length != 0); + if($('.header-banner .jp-jplayer').length == 0){ + $('.layout-header .header-banner .w-ba-banner').addClass('no-video'); + window.has_topest_banner = false; + }else{ + window.has_topest_banner = true; + } initdata1(); orbit.sitemenuDropdown(); orbit.goBackTop('top', 800); @@ -707,6 +712,9 @@ function transdate(){ window.clearTimeout(window.focus_timeout_id); } var _this = $(document.activeElement);//$(this); + if(_this.is('body')){ + return; + } if($('body').css('position') != 'fixed' && !_this.hasClass('close-screen-btn') && !_this.hasClass('navbar-toggle')){ var ele_offset = _this[0].getBoundingClientRect().top; if(_this.parents('.kenjohn.navFixed').length == 0) @@ -741,7 +749,7 @@ function transdate(){ } } - headerH(); + headerH(); $(window).resize(function() { headerH(); }) diff --git a/assets/stylesheets/template/layout/header.scss b/assets/stylesheets/template/layout/header.scss index 5f6c2eb..2e62dd3 100644 --- a/assets/stylesheets/template/layout/header.scss +++ b/assets/stylesheets/template/layout/header.scss @@ -156,15 +156,17 @@ a#content{ position: absolute; } } - @media screen and (min-width: 769px){ - height: 100vh!important; + &:not(.no-video){ + @media screen and (min-width: 769px){ + height: 100vh!important; + } + @media screen and(min-width:$screen-xs) and (max-width:768px){ + height: 1000px!important; + } + @media screen and (max-width: $screen-xs){ + height: 720px!important; + } } - @media screen and(min-width:$screen-xs) and (max-width:768px){ - height: 1000px!important; - } - @media screen and (max-width: $screen-xs){ - height: 720px!important; - } } } .jp-jplayer{