mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
XEDITION 업데이트
This commit is contained in:
parent
9aa5a2e976
commit
64085a2f63
16 changed files with 64 additions and 110 deletions
8
layouts/xedition/js/SmoothScroll.min.js
vendored
8
layouts/xedition/js/SmoothScroll.min.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
// SmoothScroll for websites v1.2.1
|
||||
// Licensed under the terms of the MIT license.
|
||||
|
||||
// People involved
|
||||
// - Balazs Galambosi (maintainer)
|
||||
// - Michael Herf (Pulse Algorithm)
|
||||
|
||||
!function(){function e(){var e=!1;e&&c("keydown",r),v.keyboardSupport&&!e&&u("keydown",r)}function t(){if(document.body){var t=document.body,o=document.documentElement,n=window.innerHeight,r=t.scrollHeight;if(S=document.compatMode.indexOf("CSS")>=0?o:t,w=t,e(),x=!0,top!=self)y=!0;else if(r>n&&(t.offsetHeight<=n||o.offsetHeight<=n)){var a=!1,i=function(){a||o.scrollHeight==document.height||(a=!0,setTimeout(function(){o.style.height=document.height+"px",a=!1},500))};if(o.style.height="auto",setTimeout(i,10),S.offsetHeight<=n){var l=document.createElement("div");l.style.clear="both",t.appendChild(l)}}v.fixedBackground||b||(t.style.backgroundAttachment="scroll",o.style.backgroundAttachment="scroll")}}function o(e,t,o,n){if(n||(n=1e3),d(t,o),1!=v.accelerationMax){var r=+new Date,a=r-C;if(a<v.accelerationDelta){var i=(1+30/a)/2;i>1&&(i=Math.min(i,v.accelerationMax),t*=i,o*=i)}C=+new Date}if(M.push({x:t,y:o,lastX:0>t?.99:-.99,lastY:0>o?.99:-.99,start:+new Date}),!T){var l=e===document.body,u=function(){for(var r=+new Date,a=0,i=0,c=0;c<M.length;c++){var s=M[c],d=r-s.start,f=d>=v.animationTime,h=f?1:d/v.animationTime;v.pulseAlgorithm&&(h=p(h));var m=s.x*h-s.lastX>>0,w=s.y*h-s.lastY>>0;a+=m,i+=w,s.lastX+=m,s.lastY+=w,f&&(M.splice(c,1),c--)}l?window.scrollBy(a,i):(a&&(e.scrollLeft+=a),i&&(e.scrollTop+=i)),t||o||(M=[]),M.length?E(u,e,n/v.frameRate+1):T=!1};E(u,e,0),T=!0}}function n(e){x||t();var n=e.target,r=l(n);if(!r||e.defaultPrevented||s(w,"embed")||s(n,"embed")&&/\.pdf/i.test(n.src))return!0;var a=e.wheelDeltaX||0,i=e.wheelDeltaY||0;return a||i||(i=e.wheelDelta||0),!v.touchpadSupport&&f(i)?!0:(Math.abs(a)>1.2&&(a*=v.stepSize/120),Math.abs(i)>1.2&&(i*=v.stepSize/120),o(r,-a,-i),void e.preventDefault())}function r(e){var t=e.target,n=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey&&e.keyCode!==H.spacebar;if(/input|textarea|select|embed/i.test(t.nodeName)||t.isContentEditable||e.defaultPrevented||n)return!0;if(s(t,"button")&&e.keyCode===H.spacebar)return!0;var r,a=0,i=0,u=l(w),c=u.clientHeight;switch(u==document.body&&(c=window.innerHeight),e.keyCode){case H.up:i=-v.arrowScroll;break;case H.down:i=v.arrowScroll;break;case H.spacebar:r=e.shiftKey?1:-1,i=-r*c*.9;break;case H.pageup:i=.9*-c;break;case H.pagedown:i=.9*c;break;case H.home:i=-u.scrollTop;break;case H.end:var d=u.scrollHeight-u.scrollTop-c;i=d>0?d+10:0;break;case H.left:a=-v.arrowScroll;break;case H.right:a=v.arrowScroll;break;default:return!0}o(u,a,i),e.preventDefault()}function a(e){w=e.target}function i(e,t){for(var o=e.length;o--;)z[N(e[o])]=t;return t}function l(e){var t=[],o=S.scrollHeight;do{var n=z[N(e)];if(n)return i(t,n);if(t.push(e),o===e.scrollHeight){if(!y||S.clientHeight+10<o)return i(t,document.body)}else if(e.clientHeight+10<e.scrollHeight&&(overflow=getComputedStyle(e,"").getPropertyValue("overflow-y"),"scroll"===overflow||"auto"===overflow))return i(t,e)}while(e=e.parentNode)}function u(e,t,o){window.addEventListener(e,t,o||!1)}function c(e,t,o){window.removeEventListener(e,t,o||!1)}function s(e,t){return(e.nodeName||"").toLowerCase()===t.toLowerCase()}function d(e,t){e=e>0?1:-1,t=t>0?1:-1,(k.x!==e||k.y!==t)&&(k.x=e,k.y=t,M=[],C=0)}function f(e){if(e){e=Math.abs(e),D.push(e),D.shift(),clearTimeout(A);var t=D[0]==D[1]&&D[1]==D[2],o=h(D[0],120)&&h(D[1],120)&&h(D[2],120);return!(t||o)}}function h(e,t){return Math.floor(e/t)==e/t}function m(e){var t,o,n;return e*=v.pulseScale,1>e?t=e-(1-Math.exp(-e)):(o=Math.exp(-1),e-=1,n=1-Math.exp(-e),t=o+n*(1-o)),t*v.pulseNormalize}function p(e){return e>=1?1:0>=e?0:(1==v.pulseNormalize&&(v.pulseNormalize/=m(1)),m(e))}var w,g={frameRate:150,animationTime:800,stepSize:120,pulseAlgorithm:!0,pulseScale:8,pulseNormalize:1,accelerationDelta:20,accelerationMax:1,keyboardSupport:!0,arrowScroll:50,touchpadSupport:!0,fixedBackground:!0,excluded:""},v=g,b=!1,y=!1,k={x:0,y:0},x=!1,S=document.documentElement,D=[120,120,120],H={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},v=g,M=[],T=!1,C=+new Date,z={};setInterval(function(){z={}},1e4);var A,N=function(){var e=0;return function(t){return t.uniqueID||(t.uniqueID=e++)}}(),E=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e,t,o){window.setTimeout(e,o||1e3/60)}}(),K=/chrome/i.test(window.navigator.userAgent),L="onmousewheel"in document;L&&K&&(u("mousedown",a),u("mousewheel",n),u("load",t))}();
|
||||
1
layouts/xedition/js/gnb.mobile.min.js
vendored
1
layouts/xedition/js/gnb.mobile.min.js
vendored
|
|
@ -1 +0,0 @@
|
|||
!function(a){a(function(){a(".gnb");a("#mobile_menu_btn").on("click",function(){var b=a(this);b.hasClass("opened")?a("#gnb").find(">ul").slideUp(200):a("#gnb").find(">ul:not(:animated)").slideDown(200),b.toggleClass("opened")})})}(jQuery);
|
||||
1
layouts/xedition/js/gnb.pc.min.js
vendored
1
layouts/xedition/js/gnb.pc.min.js
vendored
|
|
@ -1 +0,0 @@
|
|||
!function(a){a(function(){var b=(a(".fixed_header .header_wrap"),a(".gnb"));a(".hover"),a(".click > a"),a(".search_area");b.find(">ul>li>a").mouseover(function(){b.find(">ul>li>ul:visible").hide().parent("li").removeClass("on"),a(this).next("ul:hidden").stop().fadeIn(200).parent("li").addClass("on")}).focus(function(){a(this).mouseover()}).end().mouseleave(function(){b.find(">ul>li>ul").hide().parent().removeClass("on")}),b.find(">ul>li>ul>li>a").mouseover(function(){b.find(">ul>li>ul>li>ul:visible").hide().parent("li").removeClass("on"),a(this).next("ul:hidden").stop().fadeIn(200).parent("li").addClass("on")}).focus(function(){a(this).mouseover()}).end().mouseleave(function(){b.find(">ul>li>ul>li>ul").hide().parent().removeClass("on")})})}(jQuery);
|
||||
|
|
@ -102,60 +102,10 @@
|
|||
})
|
||||
})(jQuery);
|
||||
|
||||
(function($) {
|
||||
"use strict";
|
||||
var $window = $(window);
|
||||
var windowHeight = $window.height();
|
||||
|
||||
$window.resize(function() {
|
||||
windowHeight = $window.height()
|
||||
});
|
||||
|
||||
$.fn.parallax = function(xpos, speedFactor, outerHeight) {
|
||||
var $this = $(this);
|
||||
var getHeight;
|
||||
var firstTop;
|
||||
$this.each(function() {
|
||||
firstTop = $this.offset().top;
|
||||
});
|
||||
|
||||
if (outerHeight) {
|
||||
getHeight = function(object) {
|
||||
return object.outerHeight(true)
|
||||
}
|
||||
} else {
|
||||
getHeight = function(object) {
|
||||
return object.height()
|
||||
}
|
||||
}
|
||||
if (arguments.length < 1 || xpos === null)
|
||||
xpos = "50%";
|
||||
if (arguments.length < 2 || speedFactor === null)
|
||||
speedFactor = 0.1;
|
||||
if (arguments.length < 3 || outerHeight === null)
|
||||
outerHeight = true;
|
||||
function update() {
|
||||
var pos = $window.scrollTop();
|
||||
$this.each(function() {
|
||||
var $element = $(this);
|
||||
var top = $element.offset().top;
|
||||
var height = getHeight($element);
|
||||
|
||||
if (top + height < pos || top > pos + windowHeight) {
|
||||
return
|
||||
}
|
||||
$this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px")
|
||||
})
|
||||
}
|
||||
$window.bind('scroll', update).resize(update);
|
||||
update()
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
(function($){
|
||||
$(function(){
|
||||
$('.bg-holder').parallaxScroll({
|
||||
friction: 0.5
|
||||
friction: 0.2
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
|||
1
layouts/xedition/js/layout.min.js
vendored
1
layouts/xedition/js/layout.min.js
vendored
|
|
@ -1 +0,0 @@
|
|||
!function(a){"use strict";a(function(){var b=300,c=a(".fixed_header .header_wrap"),d=(a(".gnb"),a(".hover"),a(".click > a")),e=a(".search_area");if(c.length){var f=(c.height(),!1),g=c.find(".header h1 img"),h=g.data("logo"),i=g.attr("src");a(window).scroll(function(){var d=a(this).scrollTop();d>=b?f||(c.addClass("shrink"),h&&g.attr("src",h),f=!0):f&&(c.removeClass("shrink"),h&&g.attr("src",i),f=!1)}),a(window).triggerHandler("scroll")}d.click(function(){return e.is(":hidden")&&(e.fadeIn().find("input").focus(),a(".magazine").length>0?(a(".custom_area").css("opacity",0),a(".side").css("opacity",0)):a(".header").css("opacity",0)),!1}),a(".btn_close").click(function(){var b=a(this);return b.parent().fadeOut().find("input").val(""),a(".magazine").length>0?(a(".custom_area").css("opacity",1),a(".side").css("opacity",1)):a(".header").css("opacity",1),d.focus(),!1}),a.isFunction(a.fn.camera)&&a(".camera_wrap").length&&a(".camera_wrap").camera({height:"600px",pagination:!0,thumbnails:!1,playPause:!1,loader:"none",fx:"simpleFade",time:3e3});var j=function(){var b=a(".btn_top"),c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;a(window).scroll(function(){a(this).scrollTop()>150&&c>1e3?b.fadeIn(100):b.fadeOut(100)}),b.click(function(){return a("html, body").animate({scrollTop:0},400),!1})};j(),a(".sub_type3 .bg_img").parallax("50%",.4)})}(jQuery),function(a){"use strict";var b=a(window),c=b.height();b.resize(function(){c=b.height()}),a.fn.parallax=function(d,e,f){function g(){var f=b.scrollTop();j.each(function(){var b=a(this),g=b.offset().top,k=h(b);f>g+k||g>f+c||j.css("backgroundPosition",d+" "+Math.round((i-f)*e)+"px")})}var h,i,j=a(this);j.each(function(){i=j.offset().top}),h=f?function(a){return a.outerHeight(!0)}:function(a){return a.height()},(arguments.length<1||null===d)&&(d="50%"),(arguments.length<2||null===e)&&(e=.1),(arguments.length<3||null===f)&&(f=!0),b.bind("scroll",g).resize(g),g()}}(jQuery),function(a){a(function(){a(".bg-holder").parallaxScroll({friction:.5})})}(jQuery);
|
||||
1
layouts/xedition/js/welcome.min.js
vendored
1
layouts/xedition/js/welcome.min.js
vendored
|
|
@ -1 +0,0 @@
|
|||
!function(a){"user strict";a(function(){a(".fe_box").on("mouseenter mouseleave",function(b){$this=a(this),"mouseenter"==b.type?$this.addClass("on"):$this.removeClass("on")})})}(jQuery),function(a){"user strict";var b=a(window),c=b.height();b.resize(function(){c=b.height()}),a.fn.parallax=function(d,e,f){function g(){var f=b.scrollTop();j.each(function(){var b=a(this),g=b.offset().top,k=h(b);f>g+k||g>f+c||j.css("backgroundPosition",d+" "+Math.round((i-f)*e)+"px")})}var h,i,j=a(this);j.each(function(){i=j.hasClass("xeicon")?j.offset().top+600:j.offset().top}),h=f?function(a){return a.outerHeight(!0)}:function(a){return a.height()},(arguments.length<1||null===d)&&(d="50%"),(arguments.length<2||null===e)&&(e=.1),(arguments.length<3||null===f)&&(f=!0),b.bind("scroll",g).resize(g),g()}}(jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue