-
46dist/assets/css/style.css
-
2dist/assets/css/style.min.css
-
2dist/assets/css/style.min.css.map
-
BINdist/assets/images/ex/clips-01.jpg
-
BINdist/assets/images/ex/clips-02.jpg
-
BINdist/assets/images/ex/clips-03.jpg
-
BINdist/assets/images/ex/clips-04.jpg
-
BINdist/assets/images/ex/clips-05.jpg
-
BINdist/assets/images/ex/clips-06.jpg
-
BINdist/assets/images/ex/clips-07.jpg
-
BINdist/assets/images/ex/clips-08.jpg
-
BINdist/assets/images/ex/clips-09.jpg
-
BINdist/assets/images/ex/clips-10.jpg
-
BINdist/assets/images/ex/clips-11.jpg
-
BINdist/assets/images/ex/clips-12.jpg
-
BINdist/assets/images/ex/news-01.jpg
-
BINdist/assets/images/ex/news-01.png
-
BINdist/assets/images/ex/news-02.jpg
-
BINdist/assets/images/ex/news-03.jpg
-
BINdist/assets/images/ex/news-04.jpg
-
BINdist/assets/images/ex/news-05.jpg
-
BINdist/assets/images/ex/shorts-01.jpg
-
BINdist/assets/images/ex/shorts-01.png
-
BINdist/assets/images/ex/shorts-02.jpg
-
BINdist/assets/images/ex/shorts-03.jpg
-
BINdist/assets/images/ex/shorts-04.jpg
-
BINdist/assets/images/ex/shorts-05.jpg
-
BINdist/assets/images/ex/shorts-06.jpg
-
BINdist/assets/images/ex/shorts-07.jpg
-
BINdist/assets/images/ex/shorts-08.jpg
-
BINdist/assets/images/ex/shorts-09.jpg
-
BINdist/assets/images/ex/shorts-10.jpg
-
BINdist/assets/images/ex/shorts-11.jpg
-
BINdist/assets/images/ex/shorts-12.jpg
-
BINdist/assets/images/ex/toon-01.jpg
-
BINdist/assets/images/ex/toon-01.png
-
BINdist/assets/images/ex/toon-02.jpg
-
BINdist/assets/images/ex/toon-03.jpg
-
BINdist/assets/images/ex/toon-04.jpg
-
BINdist/assets/images/ex/toon-05.jpg
-
BINdist/assets/images/ex/toon-06.jpg
-
2dist/assets/js/common.min.js
-
2dist/assets/js/common.min.js.map
-
239dist/clips.html
-
138dist/index.html
-
104dist/news.html
-
161dist/shorts.html
-
94dist/toons.html
-
10gulpfile.js
-
3package.json
-
1source.info.json
-
237src/html/clips.html
-
2src/html/include/meta.html
-
136src/html/index.html
-
102src/html/news.html
-
159src/html/shorts.html
-
92src/html/toons.html
-
862src/js/wheeparam.js
-
8src/scss/common/_layout.scss
-
3src/scss/pages/_lists.scss
-
31src/scss/pages/main.scss
-
12724yarn.lock
2
dist/assets/css/style.min.css
File diff suppressed because it is too large
View File
2
dist/assets/css/style.min.css.map
File diff suppressed because it is too large
View File
After Width: 135 | Height: 98 | Size: 7.9 KiB |
After Width: 135 | Height: 98 | Size: 8.0 KiB |
After Width: 135 | Height: 98 | Size: 8.9 KiB |
After Width: 135 | Height: 98 | Size: 7.2 KiB |
After Width: 135 | Height: 98 | Size: 7.8 KiB |
After Width: 135 | Height: 98 | Size: 7.4 KiB |
After Width: 135 | Height: 98 | Size: 8.8 KiB |
After Width: 135 | Height: 98 | Size: 7.6 KiB |
After Width: 135 | Height: 98 | Size: 5.6 KiB |
After Width: 135 | Height: 98 | Size: 8.2 KiB |
After Width: 135 | Height: 98 | Size: 8.2 KiB |
After Width: 135 | Height: 98 | Size: 4.8 KiB |
After Width: 182 | Height: 133 | Size: 13 KiB |
Before Width: 182 | Height: 133 | Size: 33 KiB |
After Width: 182 | Height: 133 | Size: 9.7 KiB |
After Width: 182 | Height: 133 | Size: 9.2 KiB |
After Width: 182 | Height: 133 | Size: 11 KiB |
After Width: 182 | Height: 133 | Size: 9.4 KiB |
After Width: 134 | Height: 220 | Size: 10 KiB |
Before Width: 134 | Height: 220 | Size: 22 KiB |
After Width: 134 | Height: 220 | Size: 9.2 KiB |
After Width: 134 | Height: 220 | Size: 12 KiB |
After Width: 134 | Height: 220 | Size: 12 KiB |
After Width: 134 | Height: 220 | Size: 14 KiB |
After Width: 134 | Height: 220 | Size: 8.6 KiB |
After Width: 134 | Height: 220 | Size: 11 KiB |
After Width: 134 | Height: 220 | Size: 9.4 KiB |
After Width: 134 | Height: 220 | Size: 11 KiB |
After Width: 134 | Height: 220 | Size: 8.6 KiB |
After Width: 134 | Height: 220 | Size: 12 KiB |
After Width: 134 | Height: 220 | Size: 8.0 KiB |
After Width: 216 | Height: 216 | Size: 14 KiB |
Before Width: 216 | Height: 216 | Size: 40 KiB |
After Width: 216 | Height: 216 | Size: 11 KiB |
After Width: 216 | Height: 216 | Size: 12 KiB |
After Width: 216 | Height: 216 | Size: 14 KiB |
After Width: 216 | Height: 216 | Size: 13 KiB |
After Width: 216 | Height: 216 | Size: 13 KiB |
2
dist/assets/js/common.min.js
File diff suppressed because it is too large
View File
2
dist/assets/js/common.min.js.map
File diff suppressed because it is too large
View File
@ -1,862 +0,0 @@ |
|||||
var Wheeparam = { |
|
||||
version: '0.0.1' |
|
||||
}; |
|
||||
|
|
||||
Wheeparam.init = function() {}; |
|
||||
Wheeparam.onDocuemntReady = function(fn) { |
|
||||
if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){ |
|
||||
fn(); |
|
||||
} else { |
|
||||
document.addEventListener('DOMContentLoaded', fn); |
|
||||
} |
|
||||
}; |
|
||||
Wheeparam.Easing = { |
|
||||
easeInQuad: function (t, b, c, d) { |
|
||||
return c*(t/=d)*t + b; |
|
||||
}, |
|
||||
easeOutQuad: function (t, b, c, d) { |
|
||||
return -c *(t/=d)*(t-2) + b; |
|
||||
}, |
|
||||
easeInOutQuad: function (t, b, c, d) { |
|
||||
if ((t/=d/2) < 1) return c/2*t*t + b; |
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b; |
|
||||
}, |
|
||||
easeInCubic: function (t, b, c, d) { |
|
||||
return c*(t/=d)*t*t + b; |
|
||||
}, |
|
||||
easeOutCubic: function (t, b, c, d) { |
|
||||
return c*((t=t/d-1)*t*t + 1) + b; |
|
||||
}, |
|
||||
easeInOutCubic: function (t, b, c, d) { |
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t + b; |
|
||||
return c/2*((t-=2)*t*t + 2) + b; |
|
||||
}, |
|
||||
easeInQuart: function (t, b, c, d) { |
|
||||
return c*(t/=d)*t*t*t + b; |
|
||||
}, |
|
||||
easeOutQuart: function (t, b, c, d) { |
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b; |
|
||||
}, |
|
||||
easeInOutQuart: function (t, b, c, d) { |
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b; |
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b; |
|
||||
}, |
|
||||
easeInQuint: function (t, b, c, d) { |
|
||||
return c*(t/=d)*t*t*t*t + b; |
|
||||
}, |
|
||||
easeOutQuint: function (t, b, c, d) { |
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b; |
|
||||
}, |
|
||||
easeInOutQuint: function (t, b, c, d) { |
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; |
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b; |
|
||||
}, |
|
||||
easeInSine: function (t, b, c, d) { |
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b; |
|
||||
}, |
|
||||
easeOutSine: function (t, b, c, d) { |
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b; |
|
||||
}, |
|
||||
easeInOutSine: function (t, b, c, d) { |
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; |
|
||||
}, |
|
||||
easeInExpo: function (t, b, c, d) { |
|
||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; |
|
||||
}, |
|
||||
easeOutExpo: function (t, b, c, d) { |
|
||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; |
|
||||
}, |
|
||||
easeInOutExpo: function (t, b, c, d) { |
|
||||
if (t==0) return b; |
|
||||
if (t==d) return b+c; |
|
||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; |
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; |
|
||||
}, |
|
||||
easeInCirc: function (t, b, c, d) { |
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; |
|
||||
}, |
|
||||
easeOutCirc: function (t, b, c, d) { |
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b; |
|
||||
}, |
|
||||
easeInOutCirc: function (t, b, c, d) { |
|
||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; |
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; |
|
||||
}, |
|
||||
easeInElastic: function (t, b, c, d) { |
|
||||
var s=1.70158;var p=0;var a=c; |
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; |
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; } |
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a); |
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; |
|
||||
}, |
|
||||
easeOutElastic: function (t, b, c, d) { |
|
||||
var s=1.70158;var p=0;var a=c; |
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; |
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; } |
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a); |
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; |
|
||||
}, |
|
||||
easeInOutElastic: function (t, b, c, d) { |
|
||||
var s=1.70158;var p=0;var a=c; |
|
||||
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); |
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; } |
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a); |
|
||||
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; |
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; |
|
||||
}, |
|
||||
easeInBack: function (t, b, c, d, s) { |
|
||||
if (s == undefined) s = 1.70158; |
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b; |
|
||||
}, |
|
||||
easeOutBack: function (t, b, c, d, s) { |
|
||||
if (s == undefined) s = 1.70158; |
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; |
|
||||
}, |
|
||||
easeInOutBack: function (t, b, c, d, s) { |
|
||||
if (s == undefined) s = 1.70158; |
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; |
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; |
|
||||
}, |
|
||||
easeInBounce: function (t, b, c, d) { |
|
||||
return c - Wheeparam.Easing.easeOutBounce (d-t, 0, c, d) + b; |
|
||||
}, |
|
||||
easeOutBounce: function (t, b, c, d) { |
|
||||
if ((t/=d) < (1/2.75)) { |
|
||||
return c*(7.5625*t*t) + b; |
|
||||
} else if (t < (2/2.75)) { |
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; |
|
||||
} else if (t < (2.5/2.75)) { |
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; |
|
||||
} else { |
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; |
|
||||
} |
|
||||
}, |
|
||||
easeInOutBounce: function (t, b, c, d) { |
|
||||
if (t < d/2) return Wheeparam.Easing.easeInBounce (t*2, 0, c, d) * .5 + b; |
|
||||
return Wheeparam.Easing.easeOutBounce (t*2-d, 0, c, d) * .5 + c*.5 + b; |
|
||||
} |
|
||||
}; |
|
||||
/*! |
|
||||
autosize 4.0.2 |
|
||||
license: MIT |
|
||||
http://www.jacklmoore.com/autosize
|
|
||||
*/ |
|
||||
(function (global, factory) { |
|
||||
if (typeof define === "function" && define.amd) { |
|
||||
define(['module', 'exports'], factory); |
|
||||
} else if (typeof exports !== "undefined") { |
|
||||
factory(module, exports); |
|
||||
} else { |
|
||||
var mod = { |
|
||||
exports: {} |
|
||||
}; |
|
||||
factory(mod, mod.exports); |
|
||||
global.autosize = mod.exports; |
|
||||
} |
|
||||
})(this, function (module, exports) { |
|
||||
'use strict'; |
|
||||
|
|
||||
var map = typeof Map === "function" ? new Map() : function () { |
|
||||
var keys = []; |
|
||||
var values = []; |
|
||||
|
|
||||
return { |
|
||||
has: function has(key) { |
|
||||
return keys.indexOf(key) > -1; |
|
||||
}, |
|
||||
get: function get(key) { |
|
||||
return values[keys.indexOf(key)]; |
|
||||
}, |
|
||||
set: function set(key, value) { |
|
||||
if (keys.indexOf(key) === -1) { |
|
||||
keys.push(key); |
|
||||
values.push(value); |
|
||||
} |
|
||||
}, |
|
||||
delete: function _delete(key) { |
|
||||
var index = keys.indexOf(key); |
|
||||
if (index > -1) { |
|
||||
keys.splice(index, 1); |
|
||||
values.splice(index, 1); |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
}(); |
|
||||
|
|
||||
var createEvent = function createEvent(name) { |
|
||||
return new Event(name, { bubbles: true }); |
|
||||
}; |
|
||||
try { |
|
||||
new Event('test'); |
|
||||
} catch (e) { |
|
||||
// IE does not support `new Event()`
|
|
||||
createEvent = function createEvent(name) { |
|
||||
var evt = document.createEvent('Event'); |
|
||||
evt.initEvent(name, true, false); |
|
||||
return evt; |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
function assign(ta) { |
|
||||
if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return; |
|
||||
|
|
||||
var heightOffset = null; |
|
||||
var clientWidth = null; |
|
||||
var cachedHeight = null; |
|
||||
|
|
||||
function init() { |
|
||||
var style = window.getComputedStyle(ta, null); |
|
||||
|
|
||||
if (style.resize === 'vertical') { |
|
||||
ta.style.resize = 'none'; |
|
||||
} else if (style.resize === 'both') { |
|
||||
ta.style.resize = 'horizontal'; |
|
||||
} |
|
||||
|
|
||||
if (style.boxSizing === 'content-box') { |
|
||||
heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom)); |
|
||||
} else { |
|
||||
heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth); |
|
||||
} |
|
||||
// Fix when a textarea is not on document body and heightOffset is Not a Number
|
|
||||
if (isNaN(heightOffset)) { |
|
||||
heightOffset = 0; |
|
||||
} |
|
||||
|
|
||||
update(); |
|
||||
} |
|
||||
|
|
||||
function changeOverflow(value) { |
|
||||
{ |
|
||||
// Chrome/Safari-specific fix:
|
|
||||
// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
|
|
||||
// made available by removing the scrollbar. The following forces the necessary text reflow.
|
|
||||
var width = ta.style.width; |
|
||||
ta.style.width = '0px'; |
|
||||
// Force reflow:
|
|
||||
/* jshint ignore:start */ |
|
||||
ta.offsetWidth; |
|
||||
/* jshint ignore:end */ |
|
||||
ta.style.width = width; |
|
||||
} |
|
||||
|
|
||||
ta.style.overflowY = value; |
|
||||
} |
|
||||
|
|
||||
function getParentOverflows(el) { |
|
||||
var arr = []; |
|
||||
|
|
||||
while (el && el.parentNode && el.parentNode instanceof Element) { |
|
||||
if (el.parentNode.scrollTop) { |
|
||||
arr.push({ |
|
||||
node: el.parentNode, |
|
||||
scrollTop: el.parentNode.scrollTop |
|
||||
}); |
|
||||
} |
|
||||
el = el.parentNode; |
|
||||
} |
|
||||
|
|
||||
return arr; |
|
||||
} |
|
||||
|
|
||||
function resize() { |
|
||||
if (ta.scrollHeight === 0) { |
|
||||
// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
|
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var overflows = getParentOverflows(ta); |
|
||||
var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
|
|
||||
|
|
||||
ta.style.height = ''; |
|
||||
ta.style.height = ta.scrollHeight + heightOffset + 'px'; |
|
||||
|
|
||||
// used to check if an update is actually necessary on window.resize
|
|
||||
clientWidth = ta.clientWidth; |
|
||||
|
|
||||
// prevents scroll-position jumping
|
|
||||
overflows.forEach(function (el) { |
|
||||
el.node.scrollTop = el.scrollTop; |
|
||||
}); |
|
||||
|
|
||||
if (docTop) { |
|
||||
document.documentElement.scrollTop = docTop; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function update() { |
|
||||
resize(); |
|
||||
|
|
||||
var styleHeight = Math.round(parseFloat(ta.style.height)); |
|
||||
var computed = window.getComputedStyle(ta, null); |
|
||||
|
|
||||
// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
|
|
||||
var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight; |
|
||||
|
|
||||
// The actual height not matching the style height (set via the resize method) indicates that
|
|
||||
// the max-height has been exceeded, in which case the overflow should be allowed.
|
|
||||
if (actualHeight < styleHeight) { |
|
||||
if (computed.overflowY === 'hidden') { |
|
||||
changeOverflow('scroll'); |
|
||||
resize(); |
|
||||
actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight; |
|
||||
} |
|
||||
} else { |
|
||||
// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
|
|
||||
if (computed.overflowY !== 'hidden') { |
|
||||
changeOverflow('hidden'); |
|
||||
resize(); |
|
||||
actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (cachedHeight !== actualHeight) { |
|
||||
cachedHeight = actualHeight; |
|
||||
var evt = createEvent('autosize:resized'); |
|
||||
try { |
|
||||
ta.dispatchEvent(evt); |
|
||||
} catch (err) { |
|
||||
// Firefox will throw an error on dispatchEvent for a detached element
|
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=889376
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var pageResize = function pageResize() { |
|
||||
if (ta.clientWidth !== clientWidth) { |
|
||||
update(); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
var destroy = function (style) { |
|
||||
window.removeEventListener('resize', pageResize, false); |
|
||||
ta.removeEventListener('input', update, false); |
|
||||
ta.removeEventListener('keyup', update, false); |
|
||||
ta.removeEventListener('autosize:destroy', destroy, false); |
|
||||
ta.removeEventListener('autosize:update', update, false); |
|
||||
|
|
||||
Object.keys(style).forEach(function (key) { |
|
||||
ta.style[key] = style[key]; |
|
||||
}); |
|
||||
|
|
||||
map.delete(ta); |
|
||||
}.bind(ta, { |
|
||||
height: ta.style.height, |
|
||||
resize: ta.style.resize, |
|
||||
overflowY: ta.style.overflowY, |
|
||||
overflowX: ta.style.overflowX, |
|
||||
wordWrap: ta.style.wordWrap |
|
||||
}); |
|
||||
|
|
||||
ta.addEventListener('autosize:destroy', destroy, false); |
|
||||
|
|
||||
// IE9 does not fire onpropertychange or oninput for deletions,
|
|
||||
// so binding to onkeyup to catch most of those events.
|
|
||||
// There is no way that I know of to detect something like 'cut' in IE9.
|
|
||||
if ('onpropertychange' in ta && 'oninput' in ta) { |
|
||||
ta.addEventListener('keyup', update, false); |
|
||||
} |
|
||||
|
|
||||
window.addEventListener('resize', pageResize, false); |
|
||||
ta.addEventListener('input', update, false); |
|
||||
ta.addEventListener('autosize:update', update, false); |
|
||||
ta.style.overflowX = 'hidden'; |
|
||||
ta.style.wordWrap = 'break-word'; |
|
||||
|
|
||||
map.set(ta, { |
|
||||
destroy: destroy, |
|
||||
update: update |
|
||||
}); |
|
||||
|
|
||||
init(); |
|
||||
} |
|
||||
|
|
||||
function destroy(ta) { |
|
||||
var methods = map.get(ta); |
|
||||
if (methods) { |
|
||||
methods.destroy(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
function update(ta) { |
|
||||
var methods = map.get(ta); |
|
||||
if (methods) { |
|
||||
methods.update(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
var autosize = null; |
|
||||
|
|
||||
// Do nothing in Node.js environment and IE8 (or lower)
|
|
||||
if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') { |
|
||||
autosize = function autosize(el) { |
|
||||
return el; |
|
||||
}; |
|
||||
autosize.destroy = function (el) { |
|
||||
return el; |
|
||||
}; |
|
||||
autosize.update = function (el) { |
|
||||
return el; |
|
||||
}; |
|
||||
} else { |
|
||||
autosize = function autosize(el, options) { |
|
||||
if (el) { |
|
||||
Array.prototype.forEach.call(el.length ? el : [el], function (x) { |
|
||||
return assign(x, options); |
|
||||
}); |
|
||||
} |
|
||||
return el; |
|
||||
}; |
|
||||
autosize.destroy = function (el) { |
|
||||
if (el) { |
|
||||
Array.prototype.forEach.call(el.length ? el : [el], destroy); |
|
||||
} |
|
||||
return el; |
|
||||
}; |
|
||||
autosize.update = function (el) { |
|
||||
if (el) { |
|
||||
Array.prototype.forEach.call(el.length ? el : [el], update); |
|
||||
} |
|
||||
return el; |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
exports.default = autosize; |
|
||||
module.exports = exports['default']; |
|
||||
}); |
|
||||
/********************************************************************************************************************** |
|
||||
* 숫자에 컴마를 붙여서 리턴한다 |
|
||||
* @returns {*} |
|
||||
*********************************************************************************************************************/ |
|
||||
Number.prototype.numberFormat = function(){ |
|
||||
if(this==0) return 0; |
|
||||
|
|
||||
var reg = /(^[+-]?\d+)(\d{3})/; |
|
||||
var n = (this + ''); |
|
||||
|
|
||||
while (reg.test(n)) n = n.replace(reg, '$1' + ',' + '$2'); |
|
||||
|
|
||||
return n; |
|
||||
}; |
|
||||
String.prototype.numberFormat = function() { return isNaN( parseFloat(this) ) ? "0" : (parseFloat(this)).numberFormat(); }; |
|
||||
|
|
||||
/********************************************************************************************************************** |
|
||||
* 컴마가 붙어있는 숫자에서 콤마를 삭제하고 숫자로 반환한다. |
|
||||
* @returns {*} |
|
||||
*********************************************************************************************************************/ |
|
||||
String.prototype.unNumberFormat = function() { |
|
||||
var str = this; |
|
||||
if(typeof str == 'number') return str; |
|
||||
str = ("" + str).replace(/,/gi,''); // 콤마 제거
|
|
||||
str = str.replace(/(^\s*)|(\s*$)/g, ""); // trim
|
|
||||
|
|
||||
var returnStr = new Number(str); |
|
||||
return isNaN(returnStr) ? str : returnStr; |
|
||||
}; |
|
||||
Number.prototype.unNumberFormat = function() { |
|
||||
return this; |
|
||||
}; |
|
||||
|
|
||||
/********************************************************************************************************************** |
|
||||
* 날짜를 원하는 포맷 형식으로 출력 |
|
||||
* @param f |
|
||||
* @returns {*} |
|
||||
*********************************************************************************************************************/ |
|
||||
Date.prototype.dateFormat = function(f) { |
|
||||
if (!this.valueOf()) return " "; |
|
||||
if (!f) return this; |
|
||||
|
|
||||
var weekName = ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], |
|
||||
shortWeekName = ["일", "월", "화", "수", "목", "금", "토"], |
|
||||
d = this; |
|
||||
|
|
||||
return f.replace(/(yyyy|yy|MM|dd|E|hh|mm|ss|a\/p)/gi, function($1) { |
|
||||
switch ($1) { |
|
||||
case "yyyy": return d.getFullYear(); |
|
||||
case "yy": return (d.getFullYear() % 1000).zf(2); |
|
||||
case "MM": return (d.getMonth() + 1).zf(2); |
|
||||
case "dd": return d.getDate().zf(2); |
|
||||
case "E": return weekName[d.getDay()]; |
|
||||
case "e": return shortWeekName[d.getDay()]; |
|
||||
case "HH": return d.getHours().zf(2); |
|
||||
case "hh": return ((h = d.getHours() % 12) ? h : 12).zf(2); |
|
||||
case "mm": return d.getMinutes().zf(2); |
|
||||
case "ss": return d.getSeconds().zf(2); |
|
||||
case "a/p": return d.getHours() < 12 ? "오전" : "오후"; |
|
||||
default: return $1; |
|
||||
} |
|
||||
}); |
|
||||
}; |
|
||||
String.prototype.string = function(len){var s = '', i = 0; while (i++ < len) { s += this; } return s;}; |
|
||||
String.prototype.zf = function(len){return "0".string(len - this.length) + this;}; |
|
||||
Number.prototype.zf = function(len){return this.toString().zf(len);}; |
|
||||
String.prototype.dateFormat = function(f) { |
|
||||
var d = new Date(this); |
|
||||
return ( d == 'Invalid Date') ? '' : d.dateFormat(f); |
|
||||
} |
|
||||
|
|
||||
/********************************************************************************************************************** |
|
||||
* 숫자를 한글명으로 바꿔서 보여줍니다. |
|
||||
*********************************************************************************************************************/ |
|
||||
Number.prototype.toKorean = function() { |
|
||||
var hanA = new Array("","일","이","삼","사","오","육","칠","팔","구","십"), |
|
||||
danA = new Array("","십","백","천","","십","백","천","","십","백","천","","십","백","천"), |
|
||||
num = new String(this), |
|
||||
result = ''; |
|
||||
|
|
||||
for(var i=0; i<num.length; i++) { |
|
||||
var str = "", |
|
||||
han = hanA[num.charAt(num.length-(i+1))]; |
|
||||
|
|
||||
if(han != "") str += han+danA[i]; |
|
||||
|
|
||||
if(i == 4) str += "만"; |
|
||||
if(i == 8) str += "억"; |
|
||||
if(i == 12) str += "조"; |
|
||||
|
|
||||
result = str + result; |
|
||||
} |
|
||||
|
|
||||
return result; |
|
||||
} |
|
||||
String.prototype.toKorean = function() { |
|
||||
return (this.unNumberFormat()).toKorean(); |
|
||||
} |
|
||||
/************************************************************************************************************************ |
|
||||
* 해당 문자열의 regex 검사 |
|
||||
* @param regexType |
|
||||
*************************************************************************************************************************/ |
|
||||
String.prototype.regex = function(regexType) { |
|
||||
var phoneRegex = /^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/, |
|
||||
phoneWithHypenRegex = /^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})-?([0-9]{3,4})-?([0-9]{4})$/, |
|
||||
telRegex = /(^02.{0}|^01.{1}|[0-9]{3})([0-9]{3,4})([0-9]{4})/, |
|
||||
telCheckRegex = /^\d{2,3}-\d{3,4}-\d{4}$/, |
|
||||
emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, |
|
||||
str = this; |
|
||||
|
|
||||
switch(regexType) { |
|
||||
case "phone" : |
|
||||
var transNum = str.replace(/\s/gi, '').replace(/-/gi,''); |
|
||||
if(transNum.length == 11 || transNum.length == 10) { |
|
||||
if( phoneRegex.test(transNum) ) { |
|
||||
transNum = transNum.replace(phoneWithHypenRegex, '$1-$2-$3'); |
|
||||
return transNum; |
|
||||
} |
|
||||
} |
|
||||
return false; |
|
||||
case "tel": |
|
||||
var transNum = str.replace(/\s/gi, '').replace(/-/gi,''); |
|
||||
transNum = transNum.replace(telRegex, '$1-$2-$3'); |
|
||||
if(telCheckRegex.test(transNum)) { |
|
||||
return transNum; |
|
||||
} |
|
||||
return false; |
|
||||
case "email": |
|
||||
return emailRegex.test(str); |
|
||||
|
|
||||
case "biznum" : |
|
||||
var checkID = new Array(1, 3, 7, 1, 3, 7, 1, 3, 5, 1), |
|
||||
tmpBizID, i, chkSum=0, c2, remander, |
|
||||
bizID = str.replace(/-/gi,''); |
|
||||
|
|
||||
for (i=0; i<=7; i++) chkSum += checkID[i] * bizID.charAt(i); |
|
||||
c2 = "0" + (checkID[8] * bizID.charAt(8)); |
|
||||
c2 = c2.substring(c2.length - 2, c2.length); |
|
||||
chkSum += Math.floor(c2.charAt(0)) + Math.floor(c2.charAt(1)); |
|
||||
remander = (10 - (chkSum % 10)) % 10 ; |
|
||||
|
|
||||
if (Math.floor(bizID.charAt(9)) == remander) return bizID.replace(/(\d{3})(\d{2})(\d{5})/, '$1-$2-$3'); |
|
||||
return false; |
|
||||
} |
|
||||
}; |
|
||||
/************************************************************************************************************ |
|
||||
* 특정 엘리먼트 또는 최상단으로 스크롤을 이동시킵니다. |
|
||||
* @param elementSelector 셀렉터 |
|
||||
* @param animation 애니메이션 효과 |
|
||||
* @param duration 지속시간 |
|
||||
* @constructor |
|
||||
*************************************************************************************************************/ |
|
||||
Wheeparam.ScrollTo = function( elementSelector, animation, duration ) { |
|
||||
elementSelector = typeof elementSelector != 'undefined' && elementSelector ? elementSelector : false; |
|
||||
animation = typeof animation != 'undefined' && animation ? animation : false; |
|
||||
duration = typeof duration != 'undefined' && duration && animation ? duration : 0; |
|
||||
|
|
||||
var start = window.pageYOffset || document.body.scrollTop, |
|
||||
element = elementSelector ? document.querySelector(elementSelector) : document.body, |
|
||||
to = element.offsetTop, |
|
||||
change = to - start, |
|
||||
currentTime = 0, |
|
||||
increment = 20; |
|
||||
|
|
||||
var animateScroll = function() { |
|
||||
currentTime += increment; |
|
||||
var value = animation ? Wheeparam.Easing[animation]( currentTime, start, change, duration ) : to; |
|
||||
|
|
||||
window.scrollTo(0, value); |
|
||||
|
|
||||
if(currentTime < duration) { |
|
||||
setTimeout(animateScroll, increment); |
|
||||
} |
|
||||
} |
|
||||
animateScroll(); |
|
||||
}; |
|
||||
|
|
||||
/************************************************************************************************************ |
|
||||
* 두 배열을 합쳐줍니다. |
|
||||
* @param out 합칠 배열들 |
|
||||
* @returns {*|{}} |
|
||||
************************************************************************************************************/ |
|
||||
Wheeparam.extend = function( out ) { |
|
||||
out = out || {}; |
|
||||
|
|
||||
for (var i = 1; i < arguments.length; i++) { |
|
||||
var obj = arguments[i]; |
|
||||
|
|
||||
if (!obj) |
|
||||
continue; |
|
||||
|
|
||||
for (var key in obj) { |
|
||||
if (obj.hasOwnProperty(key)) { |
|
||||
if (typeof obj[key] === 'object') |
|
||||
out[key] = Wheeparam.extend(out[key], obj[key]); |
|
||||
else |
|
||||
out[key] = obj[key]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return out; |
|
||||
}; |
|
||||
|
|
||||
/************************************************************************************************************ |
|
||||
* 팝업창을 띄웁니다. |
|
||||
* @param options |
|
||||
************************************************************************************************************/ |
|
||||
Wheeparam.popup = function( options ) { |
|
||||
var defaults={ |
|
||||
title : '_blank', |
|
||||
width : 800, |
|
||||
height : 600, |
|
||||
url : '', |
|
||||
onFailed: function() { |
|
||||
alert("팝업 차단 기능이 설정되어있습니다.\n차단 기능을 해제(팝업허용) 한 후 다시 이용해 주십시오."); |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
var option = Wheeparam.extend({}, defaults, options), |
|
||||
cw = screen.availWidth, |
|
||||
ch = screen.availHeight, |
|
||||
sw = option.width, |
|
||||
sh = option.height, |
|
||||
ml = (cw - sw) / 2, |
|
||||
mt = (ch - sh) / 2, |
|
||||
opt = 'width='+sw+',height='+sh+',top='+mt+',left='+ml+',scrollbars=yes,resizable=no', |
|
||||
win = window.open(options.url, options.title, opt); |
|
||||
|
|
||||
if (win == null || typeof(win) == "undefined" || (win == null && win.outerWidth == 0) || (win != null && win.outerHeight == 0)) |
|
||||
{ |
|
||||
option.onFailed(); |
|
||||
return; |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
/************************************************************************************************************ |
|
||||
* 소셜 공유 팝업창을 띄우거나 페이지로 이동합니다. |
|
||||
* @param options |
|
||||
************************************************************************************************************/ |
|
||||
Wheeparam.shareSNS = function( options ) { |
|
||||
var defaults = { |
|
||||
title : '', |
|
||||
provider: '', |
|
||||
url: '', |
|
||||
imgSrc: '', |
|
||||
width: 800, |
|
||||
height: 600, |
|
||||
onFailed: function() { |
|
||||
alert("팝업 차단 기능이 설정되어있습니다.\n차단 기능을 해제(팝업허용) 한 후 다시 이용해 주십시오."); |
|
||||
} |
|
||||
}; |
|
||||
var option = Wheeparam.extend({}, defaults, options); |
|
||||
|
|
||||
if(! option.title) { |
|
||||
option.title = document.querySelector('meta[property="og:title"]') |
|
||||
? document.querySelector('meta[property="og:title"]').getAttribute('content') |
|
||||
: (document.querySelector('title') |
|
||||
? document.querySelector('title').innerText |
|
||||
: '' |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
if(! option.url) { |
|
||||
option.url = window.location.href; |
|
||||
} |
|
||||
|
|
||||
if(! option.imgSrc) { |
|
||||
option.imgSrc = document.querySelector('meta[property="og:image"]') |
|
||||
? document.querySelector('meta[property="og:image"]').getAttribute('content') |
|
||||
: (document.querySelector('link[rel="image_src"]') |
|
||||
? document.querySelector('link[rel="image_src"]').innerText |
|
||||
: '' |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
option.url = encodeURIComponent(option.url); |
|
||||
option.title = encodeURIComponent(option.title); |
|
||||
|
|
||||
var loc = ""; |
|
||||
|
|
||||
switch (option.provider) { |
|
||||
case 'facebook' : |
|
||||
loc = '//www.facebook.com/sharer/sharer.php?u='+option.url; |
|
||||
break; |
|
||||
case 'twitter': |
|
||||
loc = '//twitter.com/home?status='+option.title+' '+ option.url; |
|
||||
break; |
|
||||
case 'google': |
|
||||
loc = '//plus.google.com/share?url='+option.url; |
|
||||
break; |
|
||||
case 'pinterest': |
|
||||
loc = '//www.pinterest.com/pin/create/button/?url='+option.url+ ( option.imgSrc ? '&media='+ option.imgSrc : '' )+'&description='+option.title; |
|
||||
break; |
|
||||
case 'kakaostory': |
|
||||
loc = 'https://story.kakao.com/share?url='+option.url; |
|
||||
break; |
|
||||
case 'band': |
|
||||
loc = 'http://www.band.us/plugin/share?body='+option.title+'%0A'+option.url; |
|
||||
break; |
|
||||
case 'naver': |
|
||||
loc = "http://share.naver.com/web/shareView.nhn?url="+option.url+"&title="+option.title; |
|
||||
break; |
|
||||
case 'line': |
|
||||
loc = "http://line.me/R/msg/text/?" + option.title + encodeURIComponent("\n") + option.url; |
|
||||
break; |
|
||||
} |
|
||||
|
|
||||
if( loc ) { |
|
||||
Wheeparam.popup({ url : loc, width: option.width, height: option.height, onFailed:option.onFailed }); |
|
||||
} |
|
||||
|
|
||||
return false; |
|
||||
}; |
|
||||
/*********************************************************************************************************************** |
|
||||
* 전체체크박스 / 체크박스 연동 |
|
||||
***********************************************************************************************************************/ |
|
||||
Wheeparam.onDocuemntReady(function() { |
|
||||
var checkboxs = document.querySelectorAll('[data-checkbox]'); |
|
||||
if(checkboxs.length > 0) { |
|
||||
for( var i = 0; i<checkboxs.length; i++) { |
|
||||
checkboxs[i].addEventListener('change', function(event) { |
|
||||
var $check = this, |
|
||||
is_all = this.getAttribute('data-checkbox-all') != null ? true : false, |
|
||||
name = this.getAttribute('data-checkbox'), |
|
||||
checked = this.checked, |
|
||||
$allCheck = is_all ? $check : (document.querySelectorAll('[data-checkbox="'+name+'"][data-checkbox-all]').length > 0 ? document.querySelectorAll('[data-checkbox="'+name+'"][data-checkbox-all]')[0] : null ), |
|
||||
checks = document.querySelectorAll('[data-checkbox="'+name+'"]'); |
|
||||
|
|
||||
if(! $allCheck) return; |
|
||||
|
|
||||
if( is_all ) { |
|
||||
for(var k =0; k<checks.length; k++) { |
|
||||
checks[k].checked = checked; |
|
||||
} |
|
||||
} |
|
||||
else { |
|
||||
var is_all_check = true; |
|
||||
for(var k =0; k<checks.length; k++) { |
|
||||
if(checks[k].getAttribute('data-checkbox-all') != null) continue; |
|
||||
if(checks[k].checked == false) { |
|
||||
is_all_check = false; |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
$allCheck.checked = is_all_check; |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
/*********************************************************************************************************************** |
|
||||
* 숫자 3자리마다 Comma 자동 입력 Input |
|
||||
***********************************************************************************************************************/ |
|
||||
Wheeparam.onDocuemntReady(function() { |
|
||||
var $input = document.querySelectorAll('input[data-number-format]'); |
|
||||
if($input.length > 0) { |
|
||||
for(var i=0; i<$input.length; i++) |
|
||||
{ |
|
||||
$input[i].addEventListener('keyup', function() { |
|
||||
var value = this.value.unNumberFormat().numberFormat(); |
|
||||
this.value = value; |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
/*********************************************************************************************************************** |
|
||||
* 숫자만 입력가능한 Input |
|
||||
***********************************************************************************************************************/ |
|
||||
Wheeparam.onDocuemntReady(function() { |
|
||||
var $input = document.querySelectorAll('[data-number-only]'); |
|
||||
if($input.length <=0 ) return; |
|
||||
|
|
||||
for(var i=0; i<$input.length; i++) { |
|
||||
$input[i].addEventListener('keypress', function(e) { |
|
||||
if (e.which != 8 && e.which != 0 && e.which != 45 && (e.which < 48 || e.which > 57)) { |
|
||||
e.preventDefault(); |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
/*********************************************************************************************************************** |
|
||||
* 높이가 자동 조정되는 textarea |
|
||||
***********************************************************************************************************************/ |
|
||||
Wheeparam.onDocuemntReady(function() { |
|
||||
var $input = document.querySelectorAll('textarea[data-autosize]'); |
|
||||
if($input.length > 0) |
|
||||
{ |
|
||||
for(var i =0; i<$input.length; i++) |
|
||||
{ |
|
||||
$input[i].addEventListener('keyup', function() { |
|
||||
autosize(this); |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
/*********************************************************************************************************************** |
|
||||
* 소셜 공유 버튼 |
|
||||
***********************************************************************************************************************/ |
|
||||
Wheeparam.onDocuemntReady(function() { |
|
||||
var $socialParentElement = document.querySelectorAll('[data-sns-share]'); |
|
||||
if($socialParentElement.length > 0) |
|
||||
{ |
|
||||
for(var i =0; i<$socialParentElement.length; i++) |
|
||||
{ |
|
||||
var el = $socialParentElement[i], |
|
||||
title = el.getAttribute('data-title') ? el.getAttribute('data-title') : '', |
|
||||
url = el.getAttribute('data-url') ? el.getAttribute('data-url') : '', |
|
||||
imgSrc = el.getAttribute('data-img-src') ? el.getAttribute('data-img-src') : '', |
|
||||
width = el.getAttribute('data-width') ? el.getAttribute('data-width') : 800, |
|
||||
height = el.getAttribute('data-height') ? el.getAttribute('data-height') : 600, |
|
||||
providers = el.querySelectorAll('[data-sns-provider]'); |
|
||||
|
|
||||
for(var k=0; k<providers.length; k ++) |
|
||||
{ |
|
||||
providers[k].addEventListener('click', function() { |
|
||||
var provider = this.getAttribute('data-sns-provider') ? this.getAttribute('data-sns-provider') : ''; |
|
||||
if(! provider) return false; |
|
||||
|
|
||||
Wheeparam.shareSNS({ |
|
||||
title : title, |
|
||||
provider : provider, |
|
||||
url : url, |
|
||||
imgSrc: imgSrc, |
|
||||
width: width, |
|
||||
height: height |
|
||||
}) |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}); |
|