first commit
This commit is contained in:
153
apps/frontend/templates/theme/watch/_script_theme.html
Normal file
153
apps/frontend/templates/theme/watch/_script_theme.html
Normal file
@@ -0,0 +1,153 @@
|
||||
{literal}
|
||||
<!--[if IE 9]>
|
||||
<style type="text/css">
|
||||
select.form-control
|
||||
{
|
||||
padding-right: 0;
|
||||
background-image: none;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
jQuery(function($) {
|
||||
var menuHeight = $('#header-navbar').height();
|
||||
var dropdown = $('#nav-menu .dropdown-menu');
|
||||
|
||||
$(document).ready(function(){
|
||||
$('body [data-equalizer]').equalizer({ use_tallest: true });
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() > 200) {
|
||||
$('#toTopNew').addClass('show');
|
||||
} else {
|
||||
$('#toTopNew').removeClass('show');
|
||||
}
|
||||
});
|
||||
|
||||
$('#toTopNew').click(function () {
|
||||
$("html, body").animate({
|
||||
scrollTop: 0
|
||||
}, 300);
|
||||
return false;
|
||||
});
|
||||
|
||||
$(window).load(function(){
|
||||
setTimeout(function(){
|
||||
if (($('#chat-application').length == 1) || ($('#livechat').length == 1) || ($('.fb_dialog_content iframe').length == 1)) {
|
||||
$('#toTopNew').addClass('upper');
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
|
||||
var scroll = false;
|
||||
var $window = $(window);
|
||||
$window.scroll(function() {
|
||||
scroll = true;
|
||||
});
|
||||
|
||||
setInterval(function() {
|
||||
if (scroll) {
|
||||
if($window.scrollTop() + $window.height() >= $(document).height()-250) {
|
||||
$('#phone-call').addClass('show');
|
||||
}else{
|
||||
$('#phone-call').removeClass('show');
|
||||
}
|
||||
scroll = false;
|
||||
}
|
||||
}, 255);
|
||||
|
||||
$('#nav-button-search.collapsed').click(function() {
|
||||
setTimeout(function(){
|
||||
$('#nav-search .form-control').focus();
|
||||
}, 300);
|
||||
});
|
||||
|
||||
if ($('#nav-settings > ul > li:empty').length == 2)
|
||||
{
|
||||
$('#nav-button-settings').hide();
|
||||
}
|
||||
|
||||
if ($(window).width() < 768) {
|
||||
var windowHeightMobile = $(window).height();
|
||||
var menuHeightMobile = $('#header-navbar').height();
|
||||
$('#header-navbar .navbar-collapse').css('max-height', windowHeightMobile - menuHeightMobile);
|
||||
};
|
||||
|
||||
$("#homepage-carousel .social .icons").hover(
|
||||
function() {
|
||||
$('#homepage-carousel .social .h5, #homepage-carousel .social .space').css( "opacity", '0' );
|
||||
}, function() {
|
||||
$('#homepage-carousel .social .h5, #homepage-carousel .social .space').css( "opacity", '' );
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
$(window).load(function(){
|
||||
setTimeout(function() {
|
||||
$('#homepage-carousel .social').addClass('show-social');
|
||||
}, 1000);
|
||||
|
||||
setTimeout(function() {
|
||||
$('#homepage-carousel .swiper-pagination').addClass('show-pagination');
|
||||
}, 1200);
|
||||
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
|
||||
{if ($sf_context->getActionName()=='index' && $sf_context->getModuleName()=='stFrontendMain')}
|
||||
{if $theme_config->getConfigParameter('layout_config.menu_show') === 'show'}
|
||||
{literal}
|
||||
<style>
|
||||
@media (min-width: 768px) {
|
||||
#homepage-layout
|
||||
{
|
||||
padding-top: 70px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{/literal}
|
||||
{else}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
jQuery(function($) {
|
||||
$(document).ready(function(){
|
||||
|
||||
const bannerHomepage = $('#homepage-carousel').length;
|
||||
if (bannerHomepage){
|
||||
var st = $(this).scrollTop();
|
||||
if (st > 75){
|
||||
$('#header-navbar').addClass('bg-menu');
|
||||
}else{
|
||||
$('#header-navbar').removeClass('bg-menu');
|
||||
}
|
||||
|
||||
var lastScrollTop = 0;
|
||||
$(window).scroll(function(event){
|
||||
var st = $(this).scrollTop();
|
||||
if (st > 75){
|
||||
$('#header-navbar').addClass('bg-menu');
|
||||
}else{
|
||||
$('#header-navbar').removeClass('bg-menu');
|
||||
}
|
||||
});
|
||||
}else{
|
||||
const topHeight = $('#header-navbar').height();
|
||||
$('#header-navbar').addClass('bg-menu');
|
||||
$('#homepage-layout').css('padding-top', topHeight+20);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
Reference in New Issue
Block a user