Commit 6d84938d authored by imac's avatar imac

[Update]Redmine - #641 : Image transition

parent de26c331
...@@ -1092,7 +1092,7 @@ aside.news-wrapper { ...@@ -1092,7 +1092,7 @@ aside.news-wrapper {
position: relative; position: relative;
height: 100%; height: 100%;
background: #fff; background: #fff;
overflow-y: hidden; overflow-x: hidden;
opacity: 0; opacity: 0;
border-left: 1px solid rgba(26,26,26,0.1); border-left: 1px solid rgba(26,26,26,0.1);
} }
...@@ -1154,7 +1154,9 @@ label.chevron.bottom { ...@@ -1154,7 +1154,9 @@ label.chevron.bottom {
width: 120%; width: 120%;
} }
label.chevron.bottom::first-letter {
text-transform: uppercase;
}
.pa_format ul li img { .pa_format ul li img {
vertical-align: top; vertical-align: top;
margin-top: -50px; margin-top: -50px;
...@@ -1200,6 +1202,7 @@ label.chevron.bottom { ...@@ -1200,6 +1202,7 @@ label.chevron.bottom {
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
} }
.list li .format-desc,
.pa_format li .format-desc{ .pa_format li .format-desc{
font-size: 9px; font-size: 9px;
line-height: 12px; line-height: 12px;
...@@ -1328,7 +1331,7 @@ label.chevron.bottom { ...@@ -1328,7 +1331,7 @@ label.chevron.bottom {
position: relative; position: relative;
} }
.product-list figure img{ .product-list figure img{
height: 100%; height: 180px;
object-fit: cover; object-fit: cover;
} }
...@@ -1606,6 +1609,7 @@ label.chevron.bottom { ...@@ -1606,6 +1609,7 @@ label.chevron.bottom {
left: 0; left: 0;
opacity: 0; opacity: 0;
visibility: hidden; visibility: hidden;
margin-left: -4px;
} }
.filter-list .top-header{ .filter-list .top-header{
margin-bottom: 25px; margin-bottom: 25px;
...@@ -1739,21 +1743,36 @@ label.chevron.bottom { ...@@ -1739,21 +1743,36 @@ label.chevron.bottom {
left: 0; left: 0;
right: 0; right: 0;
height: 100%; height: 100%;
top: -100%; top: 0;
bottom: 0; bottom: 0;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-position: 90%; background-position: 90%;
z-index: 0;
}
.top-100{
/*top: -100%;*/
}
.transition-0{
-webkit-transition: all 0s ease-in-out;
-moz-transition: all 0s ease-in-out;
-o-transition: all 0s ease-in-out;
-ms-transition: all 0s ease-in-out;
transition: all 0s ease-in-out;
}
.transition-1{
-webkit-transition: all 1s ease-in-out; -webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out; -moz-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out; -o-transition: all 1s ease-in-out;
-ms-transition: all 1s ease-in-out; -ms-transition: all 1s ease-in-out;
transition: all 1s ease-in-out; transition: all 1s ease-in-out;
z-index: 0;
} }
.cover-wrapper.current-cover{ .cover-wrapper.current-cover{
z-index: 3 !important ;
top: 0 !important; top: 0 !important;
z-index: 3 !important; }
.cover-wrapper.last-current-cover{
z-index: 3 !important ;
} }
.cover-wrapper.current-cover p{ .cover-wrapper.current-cover p{
opacity: 1; opacity: 1;
...@@ -1765,12 +1784,10 @@ label.chevron.bottom { ...@@ -1765,12 +1784,10 @@ label.chevron.bottom {
} }
.cover-wrapper.prev{ .cover-wrapper.prev{
top: -100%; top: -100%;
z-index: 4 !important;
} }
.cover-wrapper.next{ .cover-wrapper.next{
top: 100%;
display: block; display: block;
z-index: 2;
top: 0;
} }
.cover-wrapper.last{ .cover-wrapper.last{
/*z-index: 0;*/ /*z-index: 0;*/
...@@ -1804,7 +1821,7 @@ label.chevron.bottom { ...@@ -1804,7 +1821,7 @@ label.chevron.bottom {
margin-top: 27px; margin-top: 27px;
} }
.panel .product-list article { .panel .product-list article {
height: 195px; /* height: 195px;*/
width: 170px; width: 170px;
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
......
...@@ -37,7 +37,7 @@ $(function(){ ...@@ -37,7 +37,7 @@ $(function(){
$('.gallery-wrapper').removeClass('hidden-elem').addClass('animated visible-elem fadeInUp'); $('.gallery-wrapper').removeClass('hidden-elem').addClass('animated visible-elem fadeInUp');
},0) },0)
}); });
}); });
//Get file name of uploaded file //Get file name of uploaded file
$('#file-p').on('change',function(e){ $('#file-p').on('change',function(e){
var fileName = e.target.files[0].name; var fileName = e.target.files[0].name;
...@@ -101,12 +101,13 @@ $(function(){ ...@@ -101,12 +101,13 @@ $(function(){
{ {
srcImage = $('#home .img-wrapper').data('defaultimg'); srcImage = $('#home .img-wrapper').data('defaultimg');
} }
setTimeout(function(){ $('.img-wrapper').stop().animate({
opacity: 1,
}, 500, function() {
$('.img-wrapper').css({ $('.img-wrapper').css({
'background-image': "url("+ srcImage +")", 'background-image': "url("+ srcImage +")"
'opacity' : 1 })
}).one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {}); });
},300)
} }
$.fn.showSubmenu = function(){ $.fn.showSubmenu = function(){
var currentPage = $('.container').data('page'); var currentPage = $('.container').data('page');
...@@ -255,13 +256,13 @@ $(function(){ ...@@ -255,13 +256,13 @@ $(function(){
} }
}, },
}); });
$(document).on('click', '.moveDown', function(){ $(document).on('click', '.moveDown', function(){
$.fn.fullpage.moveSectionDown(); $.fn.fullpage.moveSectionDown();
}); });
} }
$.fn.getMenuBg = function(){ $.fn.getMenuBg = function(){
//debugger; //debugger;
var imgSrc = $('header .nav-content > ul').find(' > li.current').data('img'); var imgSrc = $('header .nav-content > ul').find(' > li.current').data('img');
navwWidth = $('.nav-wrapper').width(); navwWidth = $('.nav-wrapper').width();
...@@ -288,6 +289,7 @@ $.fn.getMenuBg = function(){ ...@@ -288,6 +289,7 @@ $.fn.getMenuBg = function(){
maxHeight = productHeight > windowHeight ? productHeight : containerHeight, maxHeight = productHeight > windowHeight ? productHeight : containerHeight,
galleryWidth = windowWidth - navPhototequeWidth, galleryWidth = windowWidth - navPhototequeWidth,
filterWidth = $('.right-container .left-panel').outerWidth(), filterWidth = $('.right-container .left-panel').outerWidth(),
lastSectionHeight = $('#catalogue .panel-content section').last().outerHeight(),
footerContact = $('.contact-form .footer').outerHeight(); footerContact = $('.contact-form .footer').outerHeight();
$('.gallery-wrapper').outerWidth(galleryWidth).css('margin-left',navPhototequeWidth) ; $('.gallery-wrapper').outerWidth(galleryWidth).css('margin-left',navPhototequeWidth) ;
$('.main,.load-page').outerHeight(containerHeight); $('.main,.load-page').outerHeight(containerHeight);
...@@ -299,6 +301,7 @@ $.fn.getMenuBg = function(){ ...@@ -299,6 +301,7 @@ $.fn.getMenuBg = function(){
$('.right-panel').outerWidth(windowWidth - (navMenuWidth + filterWidth)); $('.right-panel').outerWidth(windowWidth - (navMenuWidth + filterWidth));
$('.contact-form').height(windowHeight - footerHeight); $('.contact-form').height(windowHeight - footerHeight);
$('.contact-form .inner-form').outerHeight(windowHeight - footerContact); $('.contact-form .inner-form').outerHeight(windowHeight - footerContact);
if (lastSectionHeight < windowHeight - footerHeight)
$('#catalogue .panel-content section').last().height(windowHeight - footerHeight); $('#catalogue .panel-content section').last().height(windowHeight - footerHeight);
} }
//Wordpress js login //Wordpress js login
...@@ -346,32 +349,44 @@ $.fn.animation = function(){ ...@@ -346,32 +349,44 @@ $.fn.animation = function(){
setTimeout(function(){$('.form-wrapper').removeClass('hidden-elem').addClass('animated fadeInUp')},1000) setTimeout(function(){$('.form-wrapper').removeClass('hidden-elem').addClass('animated fadeInUp')},1000)
animateOnScroll(); animateOnScroll();
} }
function onScrollCover(event){ function onScrollCover(direction){
$('.subcat a').each(function () { cover = $('.subcat a.active').attr("href");
if ($(this).hasClass('active')){
cover = $(this).attr("href");
$('.cover-wrapper').each(function () { $('.cover-wrapper').each(function () {
$('.cover-wrapper').last().addClass('last');
$('.cover-wrapper').first().addClass('first');
coverWrapper = $(this).data('cat'); coverWrapper = $(this).data('cat');
if (coverWrapper == cover) { if (coverWrapper == cover && !($(this).hasClass('current-cover'))) {
$('.cover-wrapper').removeClass('last-current-cover');
$('.current-cover').addClass('last-current-cover');
$('.cover-wrapper').removeClass('prev next current-cover'); $('.cover-wrapper').removeClass('prev next current-cover');
$(this).prev('.cover-wrapper').addClass('prev'); //animated slideInUp visible-elem $(this).prevAll('.cover-wrapper').addClass('prev');
$(this).next('.cover-wrapper').addClass('next'); $(this).nextAll('.cover-wrapper').addClass('next');
$(this).addClass('current-cover'); $(this).addClass('current-cover ');
if ($('.first').hasClass('prev')) {
$('.next').css('z-index','1');
}
}
});
} }
}); });
}; };
var lastScrollTop = 0;
function onScroll(event){ function onScroll(event){
var scrollPos = $(this).scrollTop(), var st = $(this).scrollTop();
items = event.data.items; if (st > lastScrollTop){
onScrollCover(); var direction = "down";
$(items).each(function () { }
else if(st === lastScrollTop)
{
//In IE this is an important condition because there seems to be some instances where the last scrollTop is equal to the new one
}
else {
var direction = "up";
}
lastScrollTop = st;
var scrollPos = $(this).scrollTop(),
//items = event.data.items;
items = "li .subcat a";
if ( timer ) clearTimeout(timer);
timer = setTimeout(function(){
onScrollCover(direction);
}, 330);
$(items).each(function () {
var currLink = $(this); var currLink = $(this);
var refElement = $(currLink.attr("href")); var refElement = $(currLink.attr("href"));
//console.log(currLink); //console.log(currLink);
...@@ -424,10 +439,18 @@ function scrollAnchor(elemId, skipZero){ ...@@ -424,10 +439,18 @@ function scrollAnchor(elemId, skipZero){
$(window).load( function() { $(window).load( function() {
initFunction(); initFunction();
});//END document load });//END document load
$(window).on("scroll",{ items: "li .subcat a"},onScroll) var timer;
$(window).scroll(function(e) {
onScroll(e)
/* clearTimeout(timer);
timer = setTimeout(function() {
$(window).trigger("scrollStop");
}, 330);*/
});
//$(window).bind("scrollStop",onScroll)
$(document).ready(function(){ $(document).ready(function(){
$('.nav-content li').on('mouseover',function(){ $('.nav-content li').on('mouseover',function(){
$(this).stop(true,true).fadeImage(); $(this).stop(false,true).fadeImage();
}); });
// Catalog Page : Change product image depending on selected color // Catalog Page : Change product image depending on selected color
$('.product-list article ul li').on('mouseover',function(){ $('.product-list article ul li').on('mouseover',function(){
...@@ -449,6 +472,13 @@ $(document).ready(function(){ ...@@ -449,6 +472,13 @@ $(document).ready(function(){
$.fn.responsive(); $.fn.responsive();
$('.list-color-filter li').setBgColorList(); $('.list-color-filter li').setBgColorList();
$.fn.animation(); //Global animation for entire site $.fn.animation(); //Global animation for entire site
//TODO
$('.cover-wrapper').last().addClass('last');
$('.cover-wrapper').first().addClass('first');
}); //end document ready }); //end document ready
$(window).resize(function() { $(window).resize(function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment