first commit
This commit is contained in:
184
apps/frontend/templates/theme/cosmo/_script_theme.html
Normal file
184
apps/frontend/templates/theme/cosmo/_script_theme.html
Normal file
@@ -0,0 +1,184 @@
|
||||
{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>
|
||||
#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}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
jQuery(function($) {
|
||||
$(document).ready(function(){
|
||||
const baner1Pagination = document.querySelector('#homepage-carousel .swiper-pagination');
|
||||
const baner2Pagination = document.querySelector('#homepage-carouselbaner2 .swiper-pagination');
|
||||
|
||||
const observerPagination = new MutationObserver((mutationsList, observer) => {
|
||||
mutationsList.forEach(mutation => {
|
||||
const svgCode = '<svg width="22" height="20" viewBox="0 0 22 20" xmlns="http://www.w3.org/2000/svg"><path d="M21.4363 9.54809C23.1709 17.6429 17.8385 21.2407 11.0927 18.9921C4.79668 16.8934 2.54809 13.1457 0.749216 9.54809C-0.599941 4.60104 5.2464 1.43094 11.0927 0.553716C20.0871 -0.795589 20.0871 3.25193 21.4363 9.54809Z" fill="white"/></svg>';
|
||||
|
||||
if (mutation.type === 'childList') {
|
||||
mutation.target.querySelectorAll('span').forEach(spanElement => {
|
||||
spanElement.insertAdjacentHTML('beforeend', svgCode);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const configPaginationObserver = { childList: true, subtree: true };
|
||||
|
||||
if(baner1Pagination){
|
||||
observerPagination.observe(baner1Pagination, configPaginationObserver);
|
||||
}
|
||||
if(baner2Pagination){
|
||||
observerPagination.observe(baner2Pagination, configPaginationObserver);
|
||||
}
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
33
apps/frontend/templates/theme/cosmo/gallery_left.html
Normal file
33
apps/frontend/templates/theme/cosmo/gallery_left.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<div class="bg-body">
|
||||
<header>
|
||||
{include_file id="_header"}
|
||||
</header>
|
||||
|
||||
<div id="one-column-layout" class="gallery-left {if $theme_config->getConfigParameter('layout_config.shadow_box') == 'off'} no-shadow{/if}">
|
||||
{if ($theme_config->getConfigParameter('layout_config.wide_card') == 'narrow')}
|
||||
<div class="container">
|
||||
{else}
|
||||
<div class="container-wide">
|
||||
{/if}
|
||||
{php}
|
||||
$c = sfContext::getInstance();
|
||||
if
|
||||
(($c->getModuleName() == 'stProduct' && $c->getActionName() == 'list') ||
|
||||
($c->getModuleName() == 'stProduct' && $c->getActionName() == 'groupList') ||
|
||||
($c->getModuleName() == 'stProduct' && $c->getActionName() == 'producerList') ||
|
||||
($c->getModuleName() == 'stProduct' && $c->getActionName() == 'show') ||
|
||||
($c->getModuleName() == 'stWebpageFrontend' && $c->getActionName() == 'index'))
|
||||
{
|
||||
{/php}
|
||||
{st_get_component module="stNavigationFrontend" component="breadcrumbs"}
|
||||
{php} } {/php}
|
||||
|
||||
{st_get_component module="stProduct" component="filters" modal_only=true}
|
||||
{$content}
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
{include_file id="_footer"}
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
15
apps/frontend/templates/theme/cosmo/homepage.html
Normal file
15
apps/frontend/templates/theme/cosmo/homepage.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<header>
|
||||
{include_file id="_header"}
|
||||
</header>
|
||||
|
||||
<div id="homepage-layout" {if $theme_config->getConfigParameter('layout_config.shadow_box') == 'off'}class="no-shadow"{/if}>
|
||||
{st_get_component module="stSlideBannerFrontend" component="show"}
|
||||
<div class="bg-body">
|
||||
<div id="homepage">
|
||||
{$content}
|
||||
</div>
|
||||
<footer>
|
||||
{include_file id="_footer"}
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
46
apps/frontend/templates/theme/cosmo/one_column.html
Normal file
46
apps/frontend/templates/theme/cosmo/one_column.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{php} $c = sfContext::getInstance(); {/php}
|
||||
<div class="bg-body">
|
||||
<header>
|
||||
{include_file id="_header"}
|
||||
</header>
|
||||
|
||||
<div id="one-column-layout" {if $theme_config->getConfigParameter('layout_config.shadow_box') == 'off'}class="no-shadow"{/if}>
|
||||
{php}
|
||||
if ($c->getModuleName() == 'stProduct' && $c->getActionName() == 'list') {
|
||||
{/php}
|
||||
{slot name="product-list-after-title" hidden="true"}{/slot}
|
||||
{php}}{/php}
|
||||
|
||||
{php}
|
||||
if
|
||||
(($c->getModuleName() == 'stProduct' && $c->getActionName() == 'list') ||
|
||||
($c->getModuleName() == 'stProduct' && $c->getActionName() == 'groupList') ||
|
||||
($c->getModuleName() == 'stProduct' && $c->getActionName() == 'producerList') ||
|
||||
(($c->getModuleName() == 'stProduct' && $c->getActionName() == 'show') && ($this->get_template_vars('theme_config')->getConfigParameter('layout_config.wide_card') != 'narrow'))) {
|
||||
{/php}
|
||||
<div class="container-wide">
|
||||
{php} }else{ {/php}
|
||||
<div class="container">
|
||||
{php} } {/php}
|
||||
|
||||
{php}
|
||||
if
|
||||
(($c->getModuleName() == 'stProduct' && $c->getActionName() == 'list') ||
|
||||
($c->getModuleName() == 'stProduct' && $c->getActionName() == 'groupList') ||
|
||||
($c->getModuleName() == 'stProduct' && $c->getActionName() == 'producerList') ||
|
||||
($c->getModuleName() == 'stProduct' && $c->getActionName() == 'show') ||
|
||||
($c->getModuleName() == 'stWebpageFrontend' && $c->getActionName() == 'index'))
|
||||
{
|
||||
{/php}
|
||||
{st_get_component module="stNavigationFrontend" component="breadcrumbs"}
|
||||
{php} } {/php}
|
||||
|
||||
{st_get_component module="stProduct" component="filters" modal_only=true}
|
||||
{$content}
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
{include_file id="_footer"}
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
34
apps/frontend/templates/theme/cosmo/two_column.html
Normal file
34
apps/frontend/templates/theme/cosmo/two_column.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{php} $c = sfContext::getInstance(); {/php}
|
||||
<div class="bg-body">
|
||||
<header>
|
||||
{include_file id="_header"}
|
||||
</header>
|
||||
|
||||
<div id="two-column-layout" {if $theme_config->getConfigParameter('layout_config.shadow_box') == 'off'}class="no-shadow"{/if}>
|
||||
{php}
|
||||
if ($c->getModuleName() == 'stProduct' && $c->getActionName() == 'list') {
|
||||
{/php}
|
||||
{slot name="product-list-after-title" hidden="true"}{/slot}
|
||||
{php}}{/php}
|
||||
<div class="container-wide">
|
||||
{st_get_component module="stNavigationFrontend" component="breadcrumbs"}
|
||||
<div class="row">
|
||||
<div id="content" class="col-md-9 col-md-push-3 col-lg-9 col-lg-push-3">{$content}</div>
|
||||
<div id="left" class="col-md-3 col-md-pull-9 col-lg-3 col-lg-pull-9 hidden-sm hidden-xs">
|
||||
{strip}
|
||||
<div id="category-thumbnail" class="thumbnail">
|
||||
{st_get_component module="stCategoryTree" component="vertical"}
|
||||
{st_get_component module="stProduct" component="filters"}
|
||||
</div>
|
||||
{/strip}
|
||||
{st_get_component module="stBoxFrontend" component="boxGroup" params="box_group=LEFT"}
|
||||
{st_get_component module="stTrustedShopsFrontend" component="showRatingWidget"}
|
||||
{slot name="left-column-bottom" hidden="true"}{/slot}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
{include_file id="_footer"}
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user