29 changed files with 95 additions and 7301 deletions
Split View
Diff Options
-
2build/minified/collections/message.min.css
-
2build/minified/collections/table.min.css
-
247build/minified/modules/behavior/animation.js
-
1build/minified/modules/behavior/animation.min.js
-
8build/minified/modules/dropdown.js
-
1build/minified/modules/magic.min.css
-
1build/minified/views/video.min.css
-
247build/packaged/modules/behavior/animation.js
-
8build/packaged/modules/dropdown.js
-
2build/packaged/semantic.min.css
-
8build/packaged/semantic.min.js
-
17build/uncompressed/collections/message.css
-
3build/uncompressed/collections/table.css
-
247build/uncompressed/modules/behavior/animation.js
-
8build/uncompressed/modules/dropdown.js
-
6401build/uncompressed/modules/magic.css
-
12build/uncompressed/modules/transition.css
-
43build/uncompressed/views/video.css
-
2node/Gruntfile.js
-
42node/src/documents/collections/message.html
-
1node/src/documents/collections/table.html
-
17node/src/files/components/semantic/collections/message.css
-
3node/src/files/components/semantic/collections/table.css
-
8node/src/files/components/semantic/modules/dropdown.js
-
12node/src/files/components/semantic/modules/transition.css
-
28src/collections/message.less
-
3src/collections/table.less
-
8src/modules/dropdown.js
-
14src/modules/transition.less
@ -1 +1 @@ |
|||
.ui.message{position:relative;min-height:18px;margin:1em 0;height:auto;background-color:#EFEFEF;padding:1em;line-height:1.33;color:rgba(0,0,0,.6);-webkit-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;-moz-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;-o-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;-ms-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:.325em;-moz-border-radius:.325em;border-radius:.325em}.ui.segment:first-child{margin-top:0}.ui.segment:last-child{margin-bottom:0}.ui.message .header{margin:0;font-size:1.33em;font-weight:700}.ui.message .header+p{margin-top:0}.ui.message p{opacity:.85;margin:1em 0}.ui.message>:first-child{margin-top:0}.ui.message>:last-child{margin-bottom:0}.ui.message ul.list{opacity:.85;list-style-position:inside;margin:.2em 0;padding:0}.ui.message ul.list li{position:relative;list-style-type:none;font-style:italic;margin:0 0 0 1em;padding:0}.ui.message ul.list li:before{position:absolute;content:'\2022';top:-.05em;left:-.8em;height:100%;vertical-align:baseline;opacity:.5}.ui.message ul.list li:first-child{margin-top:0}.ui.message>.icon.close{cursor:pointer;position:absolute;top:1em;right:.5em;opacity:.7;-webkit-transition:opacity .1s linear;-moz-transition:opacity .1s linear;-o-transition:opacity .1s linear;-ms-transition:opacity .1s linear;transition:opacity .1s linear}.ui.message>.icon.close:hover{opacity:1}.ui.message.visible,.ui.header.visible{display:block!important}.ui.message.hidden,.ui.header.hidden{display:none}.ui.compact.message{display:inline-block}.ui.attached.message{margin-left:-1px;margin-right:-1px;margin-bottom:-1px;-webkit-border-radius:.325em .325em 0 0;-moz-border-radius:.325em .325em 0 0;border-radius:.325em .325em 0 0;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.1) inset;-moz-box-shadow:0 0 0 1px rgba(0,0,0,.1) inset;box-shadow:0 0 0 1px rgba(0,0,0,.1) inset}.ui.bottom.attached.message{margin-top:-1px;-webkit-border-radius:0 0 .325em .325em;-moz-border-radius:0 0 .325em .325em;border-radius:0 0 .325em .325em}.ui.icon.message{display:table;width:100%}.ui.icon.message>.icon{display:table-cell;vertical-align:middle;font-size:3.8em;padding-right:.4em;opacity:.2}.ui.icon.message>.content{display:table-cell;vertical-align:middle}.ui.inverted.message{background-color:rgba(255,255,255,.05);color:rgba(255,255,255,.95)}.ui.black.message{background-color:#333;color:rgba(255,255,255,.95)}.ui.blue.message,.ui.info.message{background-color:#E6F4F9;color:#4D8796}.ui.green.message{background-color:#DEFCD5;color:#52A954}.ui.yellow.message,.ui.warning.message{background-color:#F6F3D5;color:#96904D}.ui.red.message{background-color:#F1D7D7;color:#A95252}.ui.success.message,.ui.positive.message{background-color:#5BBD72;color:#FFF}.ui.error.message,.ui.negative.message{background-color:#D95C5C;color:#FFF}.ui.small.message{font-size:.875em}.ui.message{font-size:1em}.ui.large.message{font-size:1.125em}.ui.huge.message{font-size:1.5em}.ui.massive.message{font-size:2em} |
|||
.ui.message{position:relative;min-height:18px;margin:1em 0;height:auto;background-color:#EFEFEF;padding:1em;line-height:1.33;color:rgba(0,0,0,.6);-webkit-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;-moz-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;-o-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;-ms-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:.325em;-moz-border-radius:.325em;border-radius:.325em}.ui.segment:first-child{margin-top:0}.ui.segment:last-child{margin-bottom:0}.ui.message .header{margin:0;font-size:1.33em;font-weight:700}.ui.message p{opacity:.85;margin:.3em 0}.ui.message>:first-child{margin-top:0}.ui.message>:last-child{margin-bottom:0}.ui.message ul.list{opacity:.85;list-style-position:inside;margin:.2em 0;padding:0}.ui.message ul.list li{position:relative;list-style-type:none;font-style:italic;margin:0 0 0 1em;padding:0}.ui.message ul.list li:before{position:absolute;content:'\2022';top:-.05em;left:-.8em;height:100%;vertical-align:baseline;opacity:.5}.ui.message ul.list li:first-child{margin-top:0}.ui.message>.icon.close{cursor:pointer;position:absolute;top:1em;right:.5em;opacity:.7;-webkit-transition:opacity .1s linear;-moz-transition:opacity .1s linear;-o-transition:opacity .1s linear;-ms-transition:opacity .1s linear;transition:opacity .1s linear}.ui.message>.icon.close:hover{opacity:1}.ui.message.visible,.ui.header.visible{display:block!important}.ui.message.hidden,.ui.header.hidden{display:none}.ui.compact.message{display:inline-block}.ui.attached.message{margin-left:-1px;margin-right:-1px;margin-bottom:-1px;-webkit-border-radius:.325em .325em 0 0;-moz-border-radius:.325em .325em 0 0;border-radius:.325em .325em 0 0;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.1) inset;-moz-box-shadow:0 0 0 1px rgba(0,0,0,.1) inset;box-shadow:0 0 0 1px rgba(0,0,0,.1) inset}.ui.bottom.attached.message{margin-top:-1px;-webkit-border-radius:0 0 .325em .325em;-moz-border-radius:0 0 .325em .325em;border-radius:0 0 .325em .325em}.ui.icon.message{display:table;width:100%}.ui.icon.message>.icon{display:table-cell;vertical-align:middle;font-size:3.8em;padding-right:.4em;opacity:.2}.ui.icon.message>.content{display:table-cell;vertical-align:top}.ui.inverted.message{background-color:rgba(255,255,255,.05);color:rgba(255,255,255,.95)}.ui.floating.message{-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.05) inset;-moz-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.05) inset;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.05) inset}.ui.black.message{background-color:#333;color:rgba(255,255,255,.95)}.ui.blue.message,.ui.info.message{background-color:#E6F4F9;color:#4D8796}.ui.green.message{background-color:#DEFCD5;color:#52A954}.ui.yellow.message,.ui.warning.message{background-color:#F6F3D5;color:#96904D}.ui.red.message{background-color:#F1D7D7;color:#A95252}.ui.success.message,.ui.positive.message{background-color:#5BBD72;color:#FFF}.ui.error.message,.ui.negative.message{background-color:#D95C5C;color:#FFF}.ui.small.message{font-size:.875em}.ui.message{font-size:1em}.ui.large.message{font-size:1.125em}.ui.huge.message{font-size:1.5em}.ui.massive.message{font-size:2em} |
2
build/minified/collections/table.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,247 +0,0 @@ |
|||
/* ****************************** |
|||
Animation |
|||
Author: Jack Lukic |
|||
Notes: First Commit May 24, 2012 |
|||
|
|||
A collection of FX/Animations |
|||
|
|||
****************************** */ |
|||
|
|||
;(function ( $, window, document, undefined ) { |
|||
|
|||
|
|||
// handles simplification of animation settings
|
|||
$.animationSettings = function(settings, duration, easing, complete) { |
|||
// no parameters
|
|||
if(duration === undefined) { |
|||
settings = settings; |
|||
} |
|||
// duration is actually settings object
|
|||
else if(typeof duration == 'object') { |
|||
settings = $.extend({} , settings, duration); |
|||
} |
|||
// easing is actually complete callback
|
|||
else if(typeof easing == 'function') { |
|||
settings = $.extend({} , settings, { |
|||
duration: duration, |
|||
complete: easing |
|||
}); |
|||
} |
|||
// easing is actually settings
|
|||
else if(typeof easing == 'object') { |
|||
settings = $.extend(true, {} , settings, {duration: duration}, easing); |
|||
} |
|||
//
|
|||
else { |
|||
settings = $.extend({} , settings, { |
|||
duration : duration, |
|||
easing : easing, |
|||
complete : complete |
|||
}); |
|||
} |
|||
return settings; |
|||
}; |
|||
|
|||
/* ****************************** |
|||
Pop In - |
|||
Animates one at a time |
|||
scaling in |
|||
****************************** */ |
|||
|
|||
$.fn.popIn = function(duration, easing, complete) { |
|||
var |
|||
settings = $.animationSettings($.fn.popIn.settings, duration, easing, complete), |
|||
|
|||
$this = $(this), |
|||
totalElements = $this.size(), |
|||
currentElement = 0, |
|||
callback = function() { |
|||
var |
|||
elementsDoneAnimating = ($this.filter(':animated').size() == 0) |
|||
; |
|||
currentElement++; |
|||
$(this) |
|||
.css('transform', '') |
|||
.removeClass(settings.className.init) |
|||
; |
|||
$.proxy(settings.eachComplete, this)(); |
|||
if(currentElement == totalElements) { |
|||
$.proxy(settings.complete, $this)(); |
|||
} |
|||
}, |
|||
animate = function(index) { |
|||
$(this) |
|||
.delay(settings.delay * index) |
|||
.animate({ |
|||
opacity : settings.endOpacity, |
|||
transform : 'scale('+ settings.endScale +')' |
|||
}, settings.duration, settings.easing, callback) |
|||
; |
|||
} |
|||
; |
|||
if(settings.isLegacyBrowser) { |
|||
$this |
|||
.show() |
|||
; |
|||
} |
|||
else { |
|||
$this |
|||
.addClass(settings.className.init) |
|||
.show() |
|||
.css({ |
|||
opacity : settings.startOpacity, |
|||
transform : 'scale('+ settings.startScale +')' |
|||
}) |
|||
.each(animate) |
|||
; |
|||
} |
|||
return $(this); |
|||
}; |
|||
|
|||
$.fn.popOut = function(duration, easing, complete) { |
|||
var |
|||
parameters = $.animationSettings($.fn.popIn.settings, duration, easing, complete), |
|||
// flip some defaults
|
|||
defaults = { |
|||
complete: function() { |
|||
$(this).hide(); |
|||
$.proxy(parameters.complete, this)(); |
|||
}, |
|||
startOpacity : parameters.endOpacity, |
|||
endOpacity : 0, |
|||
startScale : parameters.endScale, |
|||
endScale : parameters.startScale |
|||
}, |
|||
settings = $.extend(true, {}, parameters, defaults) |
|||
; |
|||
$(this) |
|||
.popIn(settings) |
|||
; |
|||
}; |
|||
|
|||
$.fn.popIn.settings = { |
|||
|
|||
// legacy browser
|
|||
isLegacyBrowser: false, |
|||
|
|||
// class given until animation ends
|
|||
className: { |
|||
init : 'init' |
|||
}, |
|||
// duration of each animation
|
|||
duration : 450, |
|||
// easing for animation
|
|||
easing : 'easeOutExpo', |
|||
// delay before each
|
|||
delay : 100, |
|||
|
|||
startOpacity : 0, |
|||
endOpacity : 1, |
|||
|
|||
startScale : 0.7, |
|||
endScale : 1, |
|||
// called after each element completes
|
|||
eachComplete : function(){}, |
|||
// called after entire chain of animation completes
|
|||
complete : function(){} |
|||
}; |
|||
|
|||
|
|||
$.fn.kenBurns = function(duration, easing, complete) { |
|||
var |
|||
settings = $.animationSettings($.fn.kenBurns.settings, duration, easing, complete), |
|||
module = { |
|||
|
|||
randomPosition: function(starting, rangeMin, rangeMax) { |
|||
var |
|||
rangeMax = (rangeMax !== undefined) |
|||
? rangeMax |
|||
: rangeMin, |
|||
number = Math.random() * ((starting + rangeMax) - (starting - rangeMin) ) + (starting - rangeMin) |
|||
; |
|||
return parseInt(number, 10); |
|||
}, |
|||
|
|||
animate: function() { |
|||
var |
|||
startingPosition = {}, |
|||
endingPosition = {}, |
|||
startingScale, |
|||
endingScale |
|||
; |
|||
|
|||
startingPosition = (settings.useStartPosition) |
|||
? { |
|||
x: parseInt( $(this).css('background-position-x'), 10), |
|||
y: parseInt( $(this).css('background-position-y'), 10) |
|||
} |
|||
: { |
|||
x: module.randomPosition(50, settings.xRange), |
|||
y: module.randomPosition(50, settings.yRange) |
|||
} |
|||
; |
|||
// determine direction of animation based on origin position
|
|||
endingPosition.x = (startingPosition.x > 50) |
|||
? module.randomPosition(startingPosition.x, settings.xMaxTravelDistance, -settings.xMinTravelDistance) |
|||
: module.randomPosition(startingPosition.x, -settings.xMinTravelDistance, settings.xMaxTravelDistance) |
|||
; |
|||
endingPosition.y = (startingPosition.y > 50) |
|||
? module.randomPosition(startingPosition.y, settings.yMaxTravelDistance, -settings.yMinTravelDistance) |
|||
: module.randomPosition(startingPosition.y, -settings.yMinTravelDistance, settings.yMaxTravelDistance) |
|||
; |
|||
|
|||
/*console.log(startingPosition.x + '% ' + startingPosition.y + '%'); |
|||
console.log(endingPosition.x + '% ' + endingPosition.y + '%');*/ |
|||
|
|||
$(this) |
|||
.css({ |
|||
backgroundPosition: startingPosition.x + '%', |
|||
backgroundPositionY: startingPosition.y + '%' |
|||
}) |
|||
.stop() |
|||
.animate({ |
|||
backgroundPosition: endingPosition.x + '%', |
|||
backgroundPositionY: endingPosition.y + '%' |
|||
}, settings.duration, settings.easing, settings.complete) |
|||
; |
|||
} |
|||
|
|||
} |
|||
; |
|||
if(!settings.isLegacyBrowser) { |
|||
$(this) |
|||
.each(module.animate) |
|||
; |
|||
} |
|||
return $(this); |
|||
}; |
|||
|
|||
$.fn.kenBurns.settings = { |
|||
|
|||
// legacy browser
|
|||
isLegacyBrowser : false, |
|||
|
|||
// duration of animation
|
|||
duration : 10000, |
|||
// easing for animation
|
|||
easing : 'linear', |
|||
useStartPosition : false, |
|||
|
|||
xRange : 40, |
|||
yRange : 20, |
|||
|
|||
xMinTravelDistance : 30, |
|||
xMaxTravelDistance : 60, |
|||
|
|||
yMinTravelDistance : 20, |
|||
yMaxTravelDistance : 40, |
|||
|
|||
// not yet implemented, need css hook for background-size
|
|||
scale : 0.1, |
|||
|
|||
// called after entire chain of animation completes
|
|||
complete : function(){} |
|||
}; |
|||
|
|||
|
|||
})( jQuery, window , document ); |
@ -1 +0,0 @@ |
|||
!function(a,b,c,d){a.animationSettings=function(b,c,e,f){return b=c===d?b:"object"==typeof c?a.extend({},b,c):"function"==typeof e?a.extend({},b,{duration:c,complete:e}):"object"==typeof e?a.extend(!0,{},b,{duration:c},e):a.extend({},b,{duration:c,easing:e,complete:f})},a.fn.popIn=function(b,c,d){var e=a.animationSettings(a.fn.popIn.settings,b,c,d),f=a(this),g=f.size(),h=0,i=function(){0==f.filter(":animated").size(),h++,a(this).css("transform","").removeClass(e.className.init),a.proxy(e.eachComplete,this)(),h==g&&a.proxy(e.complete,f)()},j=function(b){a(this).delay(e.delay*b).animate({opacity:e.endOpacity,transform:"scale("+e.endScale+")"},e.duration,e.easing,i)};return e.isLegacyBrowser?f.show():f.addClass(e.className.init).show().css({opacity:e.startOpacity,transform:"scale("+e.startScale+")"}).each(j),a(this)},a.fn.popOut=function(b,c,d){var e=a.animationSettings(a.fn.popIn.settings,b,c,d),f={complete:function(){a(this).hide(),a.proxy(e.complete,this)()},startOpacity:e.endOpacity,endOpacity:0,startScale:e.endScale,endScale:e.startScale},g=a.extend(!0,{},e,f);a(this).popIn(g)},a.fn.popIn.settings={isLegacyBrowser:!1,className:{init:"init"},duration:450,easing:"easeOutExpo",delay:100,startOpacity:0,endOpacity:1,startScale:.7,endScale:1,eachComplete:function(){},complete:function(){}},a.fn.kenBurns=function(b,c,e){var f=a.animationSettings(a.fn.kenBurns.settings,b,c,e),g={randomPosition:function(a,b,c){var c=c!==d?c:b,e=Math.random()*(a+c-(a-b))+(a-b);return parseInt(e,10)},animate:function(){var b={},c={};b=f.useStartPosition?{x:parseInt(a(this).css("background-position-x"),10),y:parseInt(a(this).css("background-position-y"),10)}:{x:g.randomPosition(50,f.xRange),y:g.randomPosition(50,f.yRange)},c.x=b.x>50?g.randomPosition(b.x,f.xMaxTravelDistance,-f.xMinTravelDistance):g.randomPosition(b.x,-f.xMinTravelDistance,f.xMaxTravelDistance),c.y=b.y>50?g.randomPosition(b.y,f.yMaxTravelDistance,-f.yMinTravelDistance):g.randomPosition(b.y,-f.yMinTravelDistance,f.yMaxTravelDistance),a(this).css({backgroundPosition:b.x+"%",backgroundPositionY:b.y+"%"}).stop().animate({backgroundPosition:c.x+"%",backgroundPositionY:c.y+"%"},f.duration,f.easing,f.complete)}};return f.isLegacyBrowser||a(this).each(g.animate),a(this)},a.fn.kenBurns.settings={isLegacyBrowser:!1,duration:1e4,easing:"linear",useStartPosition:!1,xRange:40,yRange:20,xMinTravelDistance:30,xMaxTravelDistance:60,yMinTravelDistance:20,yMaxTravelDistance:40,scale:.1,complete:function(){}}}(jQuery,window,document); |
1
build/minified/modules/magic.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1 +0,0 @@ |
|||
.video.module{position:relative;background:#333 url(/images/icon-placeholder-logo.png) no-repeat center center}.video.module .play{cursor:pointer;position:absolute;top:0;left:0;z-index:100;-ms-filter:"alpha(Opacity=60)";filter:alpha(opacity=60);opacity:.6;width:100%;height:100%;background:url(/images/icon-play.png) no-repeat center center;-webkit-transition:opacity .3s;-moz-transition:opacity .3s;-o-transition:opacity .3s;-ms-transition:opacity .3s;transition:opacity .3s}.video.module .play:hover{opacity:1}.video.module .placeholder{width:100%;height:100%}.video.module .embed{display:none}.video.module.active .play,.video.module.active .placeholder{display:none}.video.module.active .embed{display:block} |
@ -1,247 +0,0 @@ |
|||
/* ****************************** |
|||
Animation |
|||
Author: Jack Lukic |
|||
Notes: First Commit May 24, 2012 |
|||
|
|||
A collection of FX/Animations |
|||
|
|||
****************************** */ |
|||
|
|||
;(function ( $, window, document, undefined ) { |
|||
|
|||
|
|||
// handles simplification of animation settings
|
|||
$.animationSettings = function(settings, duration, easing, complete) { |
|||
// no parameters
|
|||
if(duration === undefined) { |
|||
settings = settings; |
|||
} |
|||
// duration is actually settings object
|
|||
else if(typeof duration == 'object') { |
|||
settings = $.extend({} , settings, duration); |
|||
} |
|||
// easing is actually complete callback
|
|||
else if(typeof easing == 'function') { |
|||
settings = $.extend({} , settings, { |
|||
duration: duration, |
|||
complete: easing |
|||
}); |
|||
} |
|||
// easing is actually settings
|
|||
else if(typeof easing == 'object') { |
|||
settings = $.extend(true, {} , settings, {duration: duration}, easing); |
|||
} |
|||
//
|
|||
else { |
|||
settings = $.extend({} , settings, { |
|||
duration : duration, |
|||
easing : easing, |
|||
complete : complete |
|||
}); |
|||
} |
|||
return settings; |
|||
}; |
|||
|
|||
/* ****************************** |
|||
Pop In - |
|||
Animates one at a time |
|||
scaling in |
|||
****************************** */ |
|||
|
|||
$.fn.popIn = function(duration, easing, complete) { |
|||
var |
|||
settings = $.animationSettings($.fn.popIn.settings, duration, easing, complete), |
|||
|
|||
$this = $(this), |
|||
totalElements = $this.size(), |
|||
currentElement = 0, |
|||
callback = function() { |
|||
var |
|||
elementsDoneAnimating = ($this.filter(':animated').size() == 0) |
|||
; |
|||
currentElement++; |
|||
$(this) |
|||
.css('transform', '') |
|||
.removeClass(settings.className.init) |
|||
; |
|||
$.proxy(settings.eachComplete, this)(); |
|||
if(currentElement == totalElements) { |
|||
$.proxy(settings.complete, $this)(); |
|||
} |
|||
}, |
|||
animate = function(index) { |
|||
$(this) |
|||
.delay(settings.delay * index) |
|||
.animate({ |
|||
opacity : settings.endOpacity, |
|||
transform : 'scale('+ settings.endScale +')' |
|||
}, settings.duration, settings.easing, callback) |
|||
; |
|||
} |
|||
; |
|||
if(settings.isLegacyBrowser) { |
|||
$this |
|||
.show() |
|||
; |
|||
} |
|||
else { |
|||
$this |
|||
.addClass(settings.className.init) |
|||
.show() |
|||
.css({ |
|||
opacity : settings.startOpacity, |
|||
transform : 'scale('+ settings.startScale +')' |
|||
}) |
|||
.each(animate) |
|||
; |
|||
} |
|||
return $(this); |
|||
}; |
|||
|
|||
$.fn.popOut = function(duration, easing, complete) { |
|||
var |
|||
parameters = $.animationSettings($.fn.popIn.settings, duration, easing, complete), |
|||
// flip some defaults
|
|||
defaults = { |
|||
complete: function() { |
|||
$(this).hide(); |
|||
$.proxy(parameters.complete, this)(); |
|||
}, |
|||
startOpacity : parameters.endOpacity, |
|||
endOpacity : 0, |
|||
startScale : parameters.endScale, |
|||
endScale : parameters.startScale |
|||
}, |
|||
settings = $.extend(true, {}, parameters, defaults) |
|||
; |
|||
$(this) |
|||
.popIn(settings) |
|||
; |
|||
}; |
|||
|
|||
$.fn.popIn.settings = { |
|||
|
|||
// legacy browser
|
|||
isLegacyBrowser: false, |
|||
|
|||
// class given until animation ends
|
|||
className: { |
|||
init : 'init' |
|||
}, |
|||
// duration of each animation
|
|||
duration : 450, |
|||
// easing for animation
|
|||
easing : 'easeOutExpo', |
|||
// delay before each
|
|||
delay : 100, |
|||
|
|||
startOpacity : 0, |
|||
endOpacity : 1, |
|||
|
|||
startScale : 0.7, |
|||
endScale : 1, |
|||
// called after each element completes
|
|||
eachComplete : function(){}, |
|||
// called after entire chain of animation completes
|
|||
complete : function(){} |
|||
}; |
|||
|
|||
|
|||
$.fn.kenBurns = function(duration, easing, complete) { |
|||
var |
|||
settings = $.animationSettings($.fn.kenBurns.settings, duration, easing, complete), |
|||
module = { |
|||
|
|||
randomPosition: function(starting, rangeMin, rangeMax) { |
|||
var |
|||
rangeMax = (rangeMax !== undefined) |
|||
? rangeMax |
|||
: rangeMin, |
|||
number = Math.random() * ((starting + rangeMax) - (starting - rangeMin) ) + (starting - rangeMin) |
|||
; |
|||
return parseInt(number, 10); |
|||
}, |
|||
|
|||
animate: function() { |
|||
var |
|||
startingPosition = {}, |
|||
endingPosition = {}, |
|||
startingScale, |
|||
endingScale |
|||
; |
|||
|
|||
startingPosition = (settings.useStartPosition) |
|||
? { |
|||
x: parseInt( $(this).css('background-position-x'), 10), |
|||
y: parseInt( $(this).css('background-position-y'), 10) |
|||
} |
|||
: { |
|||
x: module.randomPosition(50, settings.xRange), |
|||
y: module.randomPosition(50, settings.yRange) |
|||
} |
|||
; |
|||
// determine direction of animation based on origin position
|
|||
endingPosition.x = (startingPosition.x > 50) |
|||
? module.randomPosition(startingPosition.x, settings.xMaxTravelDistance, -settings.xMinTravelDistance) |
|||
: module.randomPosition(startingPosition.x, -settings.xMinTravelDistance, settings.xMaxTravelDistance) |
|||
; |
|||
endingPosition.y = (startingPosition.y > 50) |
|||
? module.randomPosition(startingPosition.y, settings.yMaxTravelDistance, -settings.yMinTravelDistance) |
|||
: module.randomPosition(startingPosition.y, -settings.yMinTravelDistance, settings.yMaxTravelDistance) |
|||
; |
|||
|
|||
/*console.log(startingPosition.x + '% ' + startingPosition.y + '%'); |
|||
console.log(endingPosition.x + '% ' + endingPosition.y + '%');*/ |
|||
|
|||
$(this) |
|||
.css({ |
|||
backgroundPosition: startingPosition.x + '%', |
|||
backgroundPositionY: startingPosition.y + '%' |
|||
}) |
|||
.stop() |
|||
.animate({ |
|||
backgroundPosition: endingPosition.x + '%', |
|||
backgroundPositionY: endingPosition.y + '%' |
|||
}, settings.duration, settings.easing, settings.complete) |
|||
; |
|||
} |
|||
|
|||
} |
|||
; |
|||
if(!settings.isLegacyBrowser) { |
|||
$(this) |
|||
.each(module.animate) |
|||
; |
|||
} |
|||
return $(this); |
|||
}; |
|||
|
|||
$.fn.kenBurns.settings = { |
|||
|
|||
// legacy browser
|
|||
isLegacyBrowser : false, |
|||
|
|||
// duration of animation
|
|||
duration : 10000, |
|||
// easing for animation
|
|||
easing : 'linear', |
|||
useStartPosition : false, |
|||
|
|||
xRange : 40, |
|||
yRange : 20, |
|||
|
|||
xMinTravelDistance : 30, |
|||
xMaxTravelDistance : 60, |
|||
|
|||
yMinTravelDistance : 20, |
|||
yMaxTravelDistance : 40, |
|||
|
|||
// not yet implemented, need css hook for background-size
|
|||
scale : 0.1, |
|||
|
|||
// called after entire chain of animation completes
|
|||
complete : function(){} |
|||
}; |
|||
|
|||
|
|||
})( jQuery, window , document ); |
2
build/packaged/semantic.min.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
8
build/packaged/semantic.min.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,247 +0,0 @@ |
|||
/* ****************************** |
|||
Animation |
|||
Author: Jack Lukic |
|||
Notes: First Commit May 24, 2012 |
|||
|
|||
A collection of FX/Animations |
|||
|
|||
****************************** */ |
|||
|
|||
;(function ( $, window, document, undefined ) { |
|||
|
|||
|
|||
// handles simplification of animation settings
|
|||
$.animationSettings = function(settings, duration, easing, complete) { |
|||
// no parameters
|
|||
if(duration === undefined) { |
|||
settings = settings; |
|||
} |
|||
// duration is actually settings object
|
|||
else if(typeof duration == 'object') { |
|||
settings = $.extend({} , settings, duration); |
|||
} |
|||
// easing is actually complete callback
|
|||
else if(typeof easing == 'function') { |
|||
settings = $.extend({} , settings, { |
|||
duration: duration, |
|||
complete: easing |
|||
}); |
|||
} |
|||
// easing is actually settings
|
|||
else if(typeof easing == 'object') { |
|||
settings = $.extend(true, {} , settings, {duration: duration}, easing); |
|||
} |
|||
//
|
|||
else { |
|||
settings = $.extend({} , settings, { |
|||
duration : duration, |
|||
easing : easing, |
|||
complete : complete |
|||
}); |
|||
} |
|||
return settings; |
|||
}; |
|||
|
|||
/* ****************************** |
|||
Pop In - |
|||
Animates one at a time |
|||
scaling in |
|||
****************************** */ |
|||
|
|||
$.fn.popIn = function(duration, easing, complete) { |
|||
var |
|||
settings = $.animationSettings($.fn.popIn.settings, duration, easing, complete), |
|||
|
|||
$this = $(this), |
|||
totalElements = $this.size(), |
|||
currentElement = 0, |
|||
callback = function() { |
|||
var |
|||
elementsDoneAnimating = ($this.filter(':animated').size() == 0) |
|||
; |
|||
currentElement++; |
|||
$(this) |
|||
.css('transform', '') |
|||
.removeClass(settings.className.init) |
|||
; |
|||
$.proxy(settings.eachComplete, this)(); |
|||
if(currentElement == totalElements) { |
|||
$.proxy(settings.complete, $this)(); |
|||
} |
|||
}, |
|||
animate = function(index) { |
|||
$(this) |
|||
.delay(settings.delay * index) |
|||
.animate({ |
|||
opacity : settings.endOpacity, |
|||
transform : 'scale('+ settings.endScale +')' |
|||
}, settings.duration, settings.easing, callback) |
|||
; |
|||
} |
|||
; |
|||
if(settings.isLegacyBrowser) { |
|||
$this |
|||
.show() |
|||
; |
|||
} |
|||
else { |
|||
$this |
|||
.addClass(settings.className.init) |
|||
.show() |
|||
.css({ |
|||
opacity : settings.startOpacity, |
|||
transform : 'scale('+ settings.startScale +')' |
|||
}) |
|||
.each(animate) |
|||
; |
|||
} |
|||
return $(this); |
|||
}; |
|||
|
|||
$.fn.popOut = function(duration, easing, complete) { |
|||
var |
|||
parameters = $.animationSettings($.fn.popIn.settings, duration, easing, complete), |
|||
// flip some defaults
|
|||
defaults = { |
|||
complete: function() { |
|||
$(this).hide(); |
|||
$.proxy(parameters.complete, this)(); |
|||
}, |
|||
startOpacity : parameters.endOpacity, |
|||
endOpacity : 0, |
|||
startScale : parameters.endScale, |
|||
endScale : parameters.startScale |
|||
}, |
|||
settings = $.extend(true, {}, parameters, defaults) |
|||
; |
|||
$(this) |
|||
.popIn(settings) |
|||
; |
|||
}; |
|||
|
|||
$.fn.popIn.settings = { |
|||
|
|||
// legacy browser
|
|||
isLegacyBrowser: false, |
|||
|
|||
// class given until animation ends
|
|||
className: { |
|||
init : 'init' |
|||
}, |
|||
// duration of each animation
|
|||
duration : 450, |
|||
// easing for animation
|
|||
easing : 'easeOutExpo', |
|||
// delay before each
|
|||
delay : 100, |
|||
|
|||
startOpacity : 0, |
|||
endOpacity : 1, |
|||
|
|||
startScale : 0.7, |
|||
endScale : 1, |
|||
// called after each element completes
|
|||
eachComplete : function(){}, |
|||
// called after entire chain of animation completes
|
|||
complete : function(){} |
|||
}; |
|||
|
|||
|
|||
$.fn.kenBurns = function(duration, easing, complete) { |
|||
var |
|||
settings = $.animationSettings($.fn.kenBurns.settings, duration, easing, complete), |
|||
module = { |
|||
|
|||
randomPosition: function(starting, rangeMin, rangeMax) { |
|||
var |
|||
rangeMax = (rangeMax !== undefined) |
|||
? rangeMax |
|||
: rangeMin, |
|||
number = Math.random() * ((starting + rangeMax) - (starting - rangeMin) ) + (starting - rangeMin) |
|||
; |
|||
return parseInt(number, 10); |
|||
}, |
|||
|
|||
animate: function() { |
|||
var |
|||
startingPosition = {}, |
|||
endingPosition = {}, |
|||
startingScale, |
|||
endingScale |
|||
; |
|||
|
|||
startingPosition = (settings.useStartPosition) |
|||
? { |
|||
x: parseInt( $(this).css('background-position-x'), 10), |
|||
y: parseInt( $(this).css('background-position-y'), 10) |
|||
} |
|||
: { |
|||
x: module.randomPosition(50, settings.xRange), |
|||
y: module.randomPosition(50, settings.yRange) |
|||
} |
|||
; |
|||
// determine direction of animation based on origin position
|
|||
endingPosition.x = (startingPosition.x > 50) |
|||
? module.randomPosition(startingPosition.x, settings.xMaxTravelDistance, -settings.xMinTravelDistance) |
|||
: module.randomPosition(startingPosition.x, -settings.xMinTravelDistance, settings.xMaxTravelDistance) |
|||
; |
|||
endingPosition.y = (startingPosition.y > 50) |
|||
? module.randomPosition(startingPosition.y, settings.yMaxTravelDistance, -settings.yMinTravelDistance) |
|||
: module.randomPosition(startingPosition.y, -settings.yMinTravelDistance, settings.yMaxTravelDistance) |
|||
; |
|||
|
|||
/*console.log(startingPosition.x + '% ' + startingPosition.y + '%'); |
|||
console.log(endingPosition.x + '% ' + endingPosition.y + '%');*/ |
|||
|
|||
$(this) |
|||
.css({ |
|||
backgroundPosition: startingPosition.x + '%', |
|||
backgroundPositionY: startingPosition.y + '%' |
|||
}) |
|||
.stop() |
|||
.animate({ |
|||
backgroundPosition: endingPosition.x + '%', |
|||
backgroundPositionY: endingPosition.y + '%' |
|||
}, settings.duration, settings.easing, settings.complete) |
|||
; |
|||
} |
|||
|
|||
} |
|||
; |
|||
if(!settings.isLegacyBrowser) { |
|||
$(this) |
|||
.each(module.animate) |
|||
; |
|||
} |
|||
return $(this); |
|||
}; |
|||
|
|||
$.fn.kenBurns.settings = { |
|||
|
|||
// legacy browser
|
|||
isLegacyBrowser : false, |
|||
|
|||
// duration of animation
|
|||
duration : 10000, |
|||
// easing for animation
|
|||
easing : 'linear', |
|||
useStartPosition : false, |
|||
|
|||
xRange : 40, |
|||
yRange : 20, |
|||
|
|||
xMinTravelDistance : 30, |
|||
xMaxTravelDistance : 60, |
|||
|
|||
yMinTravelDistance : 20, |
|||
yMaxTravelDistance : 40, |
|||
|
|||
// not yet implemented, need css hook for background-size
|
|||
scale : 0.1, |
|||
|
|||
// called after entire chain of animation completes
|
|||
complete : function(){} |
|||
}; |
|||
|
|||
|
|||
})( jQuery, window , document ); |
6401
build/uncompressed/modules/magic.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,43 +0,0 @@ |
|||
/*--------------- |
|||
Video Module |
|||
----------------*/ |
|||
.video.module { |
|||
position: relative; |
|||
background: #333333 url(/images/icon-placeholder-logo.png) no-repeat center center; |
|||
} |
|||
.video.module .play { |
|||
cursor: pointer; |
|||
position: absolute; |
|||
top: 0px; |
|||
left: 0px; |
|||
z-index: 100; |
|||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; |
|||
filter: alpha(opacity=60); |
|||
opacity: 0.6; |
|||
width: 100%; |
|||
height: 100%; |
|||
background: url(/images/icon-play.png) no-repeat center center; |
|||
-webkit-transition: opacity 0.3s; |
|||
-moz-transition: opacity 0.3s; |
|||
-o-transition: opacity 0.3s; |
|||
-ms-transition: opacity 0.3s; |
|||
transition: opacity 0.3s; |
|||
} |
|||
.video.module .play:hover { |
|||
opacity: 1; |
|||
} |
|||
.video.module .placeholder { |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
.video.module .embed { |
|||
display: none; |
|||
} |
|||
/* Video Active */ |
|||
.video.module.active .play, |
|||
.video.module.active .placeholder { |
|||
display: none; |
|||
} |
|||
.video.module.active .embed { |
|||
display: block; |
|||
} |
Write
Preview
Loading…
Cancel
Save