Browse Source

Fix accidental revert of sidebaR

pull/1129/head
jlukic 10 years ago
parent
commit
33b197621c
17 changed files with 202 additions and 356 deletions
  1. 4
      build/less/definitions/modules/modal.less
  2. 106
      build/less/definitions/modules/sidebar.js
  3. 1
      build/less/definitions/modules/sidebar.less
  4. 2
      build/minified/definitions/modules/modal.min.css
  5. 2
      build/minified/definitions/modules/rating.min.css
  6. 2
      build/minified/definitions/modules/sidebar.min.css
  7. 2
      build/minified/definitions/modules/sidebar.min.js
  8. 52
      build/packaged/definitions/css/semantic.css
  9. 2
      build/packaged/definitions/css/semantic.min.css
  10. 106
      build/packaged/definitions/javascript/semantic.js
  11. 4
      build/packaged/definitions/javascript/semantic.min.js
  12. 3
      build/uncompressed/definitions/modules/modal.css
  13. 48
      build/uncompressed/definitions/modules/rating.css
  14. 1
      build/uncompressed/definitions/modules/sidebar.css
  15. 106
      build/uncompressed/definitions/modules/sidebar.js
  16. 10
      server/layouts/default.html.eco
  17. 107
      src/definitions/modules/sidebar.js

4
build/less/definitions/modules/modal.less

@ -294,6 +294,10 @@
Size
---------------*/
.ui.modal {
font-size: @medium;
}
/* Small */
.ui.small.modal > .header {
font-size: @smallHeaderSize;

106
build/less/definitions/modules/sidebar.js

@ -110,6 +110,10 @@ $.fn.sidebar = function(parameters) {
bind: {
clickaway: function() {
$(window).on('DOMMouseScroll' + eventNamespace, function(event){
event.preventDefault();
});
$context
.on('click' + eventNamespace, module.event.clickaway)
.on('touchend' + eventNamespace, module.event.clickaway)
@ -121,6 +125,7 @@ $.fn.sidebar = function(parameters) {
$context
.off(eventNamespace)
;
$(window).off('DOMMouseScroll' + eventNamespace);
}
},
@ -134,33 +139,6 @@ $.fn.sidebar = function(parameters) {
$fixed = $pusher.find(selector.fixed);
},
convert: {
toAbsolute: function() {
window.scrollTo(0, 0);
/* var
scrollTop = $(document).scrollTop()
;
$fixed
.each(function() {
console.log('translate3d(0, ' + scrollTop + 'px, 0px)');
$(this)
.css({
transform: 'translate3d(0, ' + scrollTop + 'px, 0px)'
})
;
})
;*/
},
toFixed: function() {
window.scrollTo(0, 0);
/* $fixed
.css({
transform: 'translate3d(0, 0px, 0px)'
})
;*/
}
},
setup: {
layout: function() {
if( $context.find(selector.pusher).size() === 0 ) {
@ -225,7 +203,6 @@ $.fn.sidebar = function(parameters) {
if(settings.animation !== 'overlay') {
module.hideAll();
}
module.convert.toAbsolute();
module.pushPage(function() {
$.proxy(callback, element)();
$.proxy(settings.onShow, element)();
@ -246,7 +223,6 @@ $.fn.sidebar = function(parameters) {
module.debug('Hiding sidebar', callback);
if(module.is.visible()) {
module.pullPage(function() {
module.convert.toFixed();
$.proxy(callback, element)();
$.proxy(settings.onHidden, element)();
});
@ -280,34 +256,44 @@ $.fn.sidebar = function(parameters) {
? $context
: (settings.animation == 'overlay')
? $module
: $pusher
: $pusher,
animation
;
callback = $.isFunction(callback)
? callback
: function(){}
;
module.verbose('Adding context push state', $context);
if(settings.animation !== 'overlay') {
module.remove.allVisible();
}
animation = function() {
module.set.visible();
module.set.animation();
module.set.direction();
requestAnimationFrame(function() {
module.set.active();
module.set.inward();
module.set.pushed();
});
};
$transition
.on(transitionEnd, function(event) {
if( event.target == $transition[0] ) {
$transition.off(transitionEnd);
module.remove.inward();
module.set.active();
module.bind.clickaway();
$.proxy(callback, element)();
}
})
;
module.set.visible();
module.set.animation();
module.set.direction();
requestAnimationFrame(function() {
module.set.inward();
module.set.pushed();
});
module.verbose('Adding context push state', $context);
if(settings.animation === 'overlay') {
requestAnimationFrame(animation);
}
else {
if(settings.animation !== 'safe') {
window.scrollTo(0, 0);
}
module.remove.allVisible();
animation();
}
},
pullPage: function(callback) {
@ -341,28 +327,9 @@ $.fn.sidebar = function(parameters) {
module.remove.pushed();
},
add: {
bodyCSS: function(direction, distance) {
var
style
;
if(direction !== className.bottom) {
style = ''
+ '<style title="' + namespace + '">'
+ 'body.pushed {'
+ ''
+ '}'
+ '</style>'
;
}
$head.append(style);
module.debug('Adding body css to head', $style);
}
},
set: {
active: function() {
$module.addClass(className.active);
$context.addClass(className.active);
},
direction: function(direction) {
direction = direction || module.get.direction();
@ -389,13 +356,8 @@ $.fn.sidebar = function(parameters) {
}
},
remove: {
bodyCSS: function() {
module.debug('Removing body css styles', $style);
module.refresh();
$style.remove();
},
active: function() {
$module.removeClass(className.active);
$context.removeClass(className.active);
},
visible: function() {
$module.removeClass(className.visible);
@ -478,11 +440,8 @@ $.fn.sidebar = function(parameters) {
return false;
}
},
open: function() {
return $module.hasClass(className.active);
},
closed: function() {
return !module.is.open();
return !module.is.visible();
},
visible: function() {
return $module.hasClass(className.visible);
@ -687,7 +646,7 @@ $.fn.sidebar.settings = {
verbose : false,
performance : false,
animation : 'scale down',
animation : 'overlay',
mobileAnimation : 'slide along',
context : 'body',
@ -716,7 +675,6 @@ $.fn.sidebar.settings = {
selector: {
sidebar : '.ui.sidebar',
fixed : '.ui.fixed',
pusher : '.pusher',
page : '.page',
omitted : 'script, link, style, .ui.modal, .ui.nag'

1
build/less/definitions/modules/sidebar.less

@ -72,6 +72,7 @@
.pushable > .pusher > .page {
position: relative;
min-height: 100%;
background: @bodyBackground;
}

2
build/minified/definitions/modules/modal.min.css

@ -11,4 +11,4 @@
* Released: 09/03/2014
*/
.ui.modal{display:none;position:fixed;z-index:1001;top:50%;left:50%;text-align:left;width:90%;margin-left:-45%;background:#fff;border:none;box-shadow:0 0 8px rgba(0,0,0,.8);border-radius:.25rem;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;will-change:top,left,margin,transform,opacity}.ui.modal>.icon:first-child+*,.ui.modal>:first-child:not(.icon){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.ui.modal>:last-child{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.ui.modal>.close{cursor:pointer;position:absolute;top:-2.5em;right:-2.5em;z-index:1;opacity:.8;font-size:1.25em;color:#fff;width:2.25em;height:2.25em;padding:.625em 0 0}.ui.modal>.close:hover{opacity:1}.ui.modal>.header{display:block;font-family:'Open Sans',"Helvetica Neue",Arial,Helvetica,sans-serif;background:-webkit-linear-gradient(transparent,rgba(0,0,0,.05)) #fff;background:linear-gradient(transparent,rgba(0,0,0,.05)) #fff;margin:0;padding:1.5rem 2rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05);font-size:1.6em;font-weight:700;color:rgba(0,0,0,.85);border-bottom:1px solid rgba(0,0,0,.1)}.ui.modal>.content{display:table;table-layout:fixed;width:100%;font-size:1em;line-height:1.4;padding:2rem;background:#fff}.ui.modal>.content>.image{display:table-cell;width:'';vertical-align:top}.ui.modal>.content>.description{display:table-cell;min-width:'';vertical-align:top}.ui.modal>.content>.icon+.description,.ui.modal>.content>.image+.description{padding-left:1em}.ui.modal>.content>.image>i.icon{font-size:8rem;margin:0;opacity:1}.ui.modal .actions{background:#efefef;padding:1rem 2rem;border-top:1px solid rgba(0,0,0,.1);text-align:right}.ui.modal .actions>.button{margin-left:.75em}@media only screen and (max-width:767px){.ui.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.modal{width:88%;margin:0 0 0 -44%}}@media only screen and (min-width:992px){.ui.modal{width:74%;margin:0 0 0 -37%}}@media only screen and (min-width:1400px){.ui.modal{width:56%;margin:0 0 0 -28%}}@media only screen and (min-width:1900px){.ui.modal{width:42%;margin:0 0 0 -21%}}@media only screen and (max-width:767px){.ui.modal .content>.image{display:block;padding:0 0 1em}.ui.modal .content>.description{display:block;padding:0 0 1em;box-shadow:none}.ui.modal .content .image{width:auto!important;max-width:100%}.ui.modal .actions{padding-bottom:0}.ui.modal .actions>.button,.ui.modal .actions>.buttons{margin-bottom:1em}}@media only screen and (max-width:992px){.ui.modal>.close{top:1rem;right:1rem;color:rgba(0,0,0,.8)}}.ui.basic.modal{background-color:transparent;border:none;box-shadow:none;color:#fff}.ui.basic.modal>.actions,.ui.basic.modal>.content,.ui.basic.modal>.header{background-color:transparent}.ui.basic.modal>.header{color:#fff}.ui.basic.modal>.close{top:1.5rem;right:1rem}.ui.scrolling.dimmable.dimmed{overflow:hidden}.ui.scrolling.dimmable.dimmed>.dimmer{overflow:auto}.ui.scrolling.dimmable>.dimmer{position:fixed}.ui.modal.scrolling{position:static;margin:3rem auto}.ui.active.modal{display:block}.ui.fullscreen.modal{width:95%!important;margin:3rem 0 3rem -47.5%}.ui.fullscreen.modal>.close{top:1rem;right:1rem;color:rgba(0,0,0,.8)}.ui.small.modal>.header{font-size:1.3em}@media only screen and (max-width:767px){.ui.small.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.small.modal{width:52.8%;margin:0 0 0 -26.4%}}@media only screen and (min-width:992px){.ui.small.modal{width:44.4%;margin:0 0 0 -22.2%}}@media only screen and (min-width:1400px){.ui.small.modal{width:33.6%;margin:0 0 0 -16.8%}}@media only screen and (min-width:1900px){.ui.small.modal{width:25.2%;margin:0 0 0 -12.6%}}.ui.large.modal>.header{font-size:1.6em}@media only screen and (max-width:767px){.ui.large.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.large.modal{width:88%;margin:0 0 0 -44%}}@media only screen and (min-width:992px){.ui.large.modal{width:88.8%;margin:0 0 0 -44.4%}}@media only screen and (min-width:1400px){.ui.large.modal{width:67.2%;margin:0 0 0 -33.6%}}@media only screen and (min-width:1900px){.ui.large.modal{width:50.4%;margin:0 0 0 -25.2%}}
.ui.modal{display:none;position:fixed;z-index:1001;top:50%;left:50%;text-align:left;width:90%;margin-left:-45%;background:#fff;border:none;box-shadow:0 0 8px rgba(0,0,0,.8);border-radius:.25rem;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;will-change:top,left,margin,transform,opacity}.ui.modal>.icon:first-child+*,.ui.modal>:first-child:not(.icon){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.ui.modal>:last-child{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.ui.modal>.close{cursor:pointer;position:absolute;top:-2.5em;right:-2.5em;z-index:1;opacity:.8;font-size:1.25em;color:#fff;width:2.25em;height:2.25em;padding:.625em 0 0}.ui.modal>.close:hover{opacity:1}.ui.modal>.header{display:block;font-family:'Open Sans',"Helvetica Neue",Arial,Helvetica,sans-serif;background:-webkit-linear-gradient(transparent,rgba(0,0,0,.05)) #fff;background:linear-gradient(transparent,rgba(0,0,0,.05)) #fff;margin:0;padding:1.5rem 2rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05);font-size:1.6em;font-weight:700;color:rgba(0,0,0,.85);border-bottom:1px solid rgba(0,0,0,.1)}.ui.modal>.content{display:table;table-layout:fixed;width:100%;font-size:1em;line-height:1.4;padding:2rem;background:#fff}.ui.modal>.content>.image{display:table-cell;width:'';vertical-align:top}.ui.modal>.content>.description{display:table-cell;min-width:'';vertical-align:top}.ui.modal>.content>.icon+.description,.ui.modal>.content>.image+.description{padding-left:1em}.ui.modal>.content>.image>i.icon{font-size:8rem;margin:0;opacity:1}.ui.modal .actions{background:#efefef;padding:1rem 2rem;border-top:1px solid rgba(0,0,0,.1);text-align:right}.ui.modal .actions>.button{margin-left:.75em}@media only screen and (max-width:767px){.ui.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.modal{width:88%;margin:0 0 0 -44%}}@media only screen and (min-width:992px){.ui.modal{width:74%;margin:0 0 0 -37%}}@media only screen and (min-width:1400px){.ui.modal{width:56%;margin:0 0 0 -28%}}@media only screen and (min-width:1900px){.ui.modal{width:42%;margin:0 0 0 -21%}}@media only screen and (max-width:767px){.ui.modal .content>.image{display:block;padding:0 0 1em}.ui.modal .content>.description{display:block;padding:0 0 1em;box-shadow:none}.ui.modal .content .image{width:auto!important;max-width:100%}.ui.modal .actions{padding-bottom:0}.ui.modal .actions>.button,.ui.modal .actions>.buttons{margin-bottom:1em}}@media only screen and (max-width:992px){.ui.modal>.close{top:1rem;right:1rem;color:rgba(0,0,0,.8)}}.ui.basic.modal{background-color:transparent;border:none;box-shadow:none;color:#fff}.ui.basic.modal>.actions,.ui.basic.modal>.content,.ui.basic.modal>.header{background-color:transparent}.ui.basic.modal>.header{color:#fff}.ui.basic.modal>.close{top:1.5rem;right:1rem}.ui.scrolling.dimmable.dimmed{overflow:hidden}.ui.scrolling.dimmable.dimmed>.dimmer{overflow:auto}.ui.scrolling.dimmable>.dimmer{position:fixed}.ui.modal.scrolling{position:static;margin:3rem auto}.ui.active.modal{display:block}.ui.fullscreen.modal{width:95%!important;margin:3rem 0 3rem -47.5%}.ui.fullscreen.modal>.close{top:1rem;right:1rem;color:rgba(0,0,0,.8)}.ui.modal{font-size:1em}.ui.small.modal>.header{font-size:1.3em}@media only screen and (max-width:767px){.ui.small.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.small.modal{width:52.8%;margin:0 0 0 -26.4%}}@media only screen and (min-width:992px){.ui.small.modal{width:44.4%;margin:0 0 0 -22.2%}}@media only screen and (min-width:1400px){.ui.small.modal{width:33.6%;margin:0 0 0 -16.8%}}@media only screen and (min-width:1900px){.ui.small.modal{width:25.2%;margin:0 0 0 -12.6%}}.ui.large.modal>.header{font-size:1.6em}@media only screen and (max-width:767px){.ui.large.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.large.modal{width:88%;margin:0 0 0 -44%}}@media only screen and (min-width:992px){.ui.large.modal{width:88.8%;margin:0 0 0 -44.4%}}@media only screen and (min-width:1400px){.ui.large.modal{width:67.2%;margin:0 0 0 -33.6%}}@media only screen and (min-width:1900px){.ui.large.modal{width:50.4%;margin:0 0 0 -25.2%}}

2
build/minified/definitions/modules/rating.min.css
File diff suppressed because it is too large
View File

2
build/minified/definitions/modules/sidebar.min.css
File diff suppressed because it is too large
View File

2
build/minified/definitions/modules/sidebar.min.js
File diff suppressed because it is too large
View File

52
build/packaged/definitions/css/semantic.css

@ -18433,6 +18433,9 @@ body.ui.dimmed.dimmable > :not(.dimmer) {
/*--------------
Size
---------------*/
.ui.modal {
font-size: 1em;
}
/* Small */
.ui.small.modal > .header {
font-size: 1.3em;
@ -19241,23 +19244,6 @@ a.ui.nag {
/*------------------
Load Default
-------------------*/
/*******************************
Rating
*******************************/
/*-------------------
Types
--------------------*/
/* Star */
/* Heart */
/*-------------------
States
--------------------*/
/*-------------------
Variations
--------------------*/
/*------------------
Load Theme
-------------------*/
/*******************************
Site Settings
*******************************/
@ -19349,6 +19335,23 @@ a.ui.nag {
/*--- Standard ---*/
/*--- Emotive ---*/
/*--- Neutrals ---*/
/*******************************
Rating
*******************************/
/*-------------------
Types
--------------------*/
/* Star */
/* Heart */
/*-------------------
States
--------------------*/
/*-------------------
Variations
--------------------*/
/*------------------
Load Theme
-------------------*/
/*------------------
Load Site
-------------------*/
@ -19476,25 +19479,25 @@ a.ui.nag {
Variations
*******************************/
.ui.mini.rating .icon {
font-size: 0.7em;
font-size: 0.7rem;
}
.ui.tiny.rating .icon {
font-size: 0.8em;
font-size: 0.8rem;
}
.ui.small.rating .icon {
font-size: 0.875em;
font-size: 0.875rem;
}
.ui.rating .icon {
font-size: 1em;
font-size: 1rem;
}
.ui.large.rating .icon {
font-size: 1.125em;
font-size: 1.1rem;
}
.ui.huge.rating .icon {
font-size: 1.375em;
font-size: 1.5rem;
}
.ui.massive.rating .icon {
font-size: 1.5em;
font-size: 2rem;
}
/* Realign */
.ui.large.rating,
@ -20424,6 +20427,7 @@ a.ui.nag {
---------------*/
.pushable > .pusher > .page {
position: relative;
min-height: 100%;
background: #fcfcfc;
}
/*--------------

2
build/packaged/definitions/css/semantic.min.css
File diff suppressed because it is too large
View File

106
build/packaged/definitions/javascript/semantic.js

@ -11938,6 +11938,10 @@ $.fn.sidebar = function(parameters) {
bind: {
clickaway: function() {
$(window).on('DOMMouseScroll' + eventNamespace, function(event){
event.preventDefault();
});
$context
.on('click' + eventNamespace, module.event.clickaway)
.on('touchend' + eventNamespace, module.event.clickaway)
@ -11949,6 +11953,7 @@ $.fn.sidebar = function(parameters) {
$context
.off(eventNamespace)
;
$(window).off('DOMMouseScroll' + eventNamespace);
}
},
@ -11962,33 +11967,6 @@ $.fn.sidebar = function(parameters) {
$fixed = $pusher.find(selector.fixed);
},
convert: {
toAbsolute: function() {
window.scrollTo(0, 0);
/* var
scrollTop = $(document).scrollTop()
;
$fixed
.each(function() {
console.log('translate3d(0, ' + scrollTop + 'px, 0px)');
$(this)
.css({
transform: 'translate3d(0, ' + scrollTop + 'px, 0px)'
})
;
})
;*/
},
toFixed: function() {
window.scrollTo(0, 0);
/* $fixed
.css({
transform: 'translate3d(0, 0px, 0px)'
})
;*/
}
},
setup: {
layout: function() {
if( $context.find(selector.pusher).size() === 0 ) {
@ -12053,7 +12031,6 @@ $.fn.sidebar = function(parameters) {
if(settings.animation !== 'overlay') {
module.hideAll();
}
module.convert.toAbsolute();
module.pushPage(function() {
$.proxy(callback, element)();
$.proxy(settings.onShow, element)();
@ -12074,7 +12051,6 @@ $.fn.sidebar = function(parameters) {
module.debug('Hiding sidebar', callback);
if(module.is.visible()) {
module.pullPage(function() {
module.convert.toFixed();
$.proxy(callback, element)();
$.proxy(settings.onHidden, element)();
});
@ -12108,34 +12084,44 @@ $.fn.sidebar = function(parameters) {
? $context
: (settings.animation == 'overlay')
? $module
: $pusher
: $pusher,
animation
;
callback = $.isFunction(callback)
? callback
: function(){}
;
module.verbose('Adding context push state', $context);
if(settings.animation !== 'overlay') {
module.remove.allVisible();
}
animation = function() {
module.set.visible();
module.set.animation();
module.set.direction();
requestAnimationFrame(function() {
module.set.active();
module.set.inward();
module.set.pushed();
});
};
$transition
.on(transitionEnd, function(event) {
if( event.target == $transition[0] ) {
$transition.off(transitionEnd);
module.remove.inward();
module.set.active();
module.bind.clickaway();
$.proxy(callback, element)();
}
})
;
module.set.visible();
module.set.animation();
module.set.direction();
requestAnimationFrame(function() {
module.set.inward();
module.set.pushed();
});
module.verbose('Adding context push state', $context);
if(settings.animation === 'overlay') {
requestAnimationFrame(animation);
}
else {
if(settings.animation !== 'safe') {
window.scrollTo(0, 0);
}
module.remove.allVisible();
animation();
}
},
pullPage: function(callback) {
@ -12169,28 +12155,9 @@ $.fn.sidebar = function(parameters) {
module.remove.pushed();
},
add: {
bodyCSS: function(direction, distance) {
var
style
;
if(direction !== className.bottom) {
style = ''
+ '<style title="' + namespace + '">'
+ 'body.pushed {'
+ ''
+ '}'
+ '</style>'
;
}
$head.append(style);
module.debug('Adding body css to head', $style);
}
},
set: {
active: function() {
$module.addClass(className.active);
$context.addClass(className.active);
},
direction: function(direction) {
direction = direction || module.get.direction();
@ -12217,13 +12184,8 @@ $.fn.sidebar = function(parameters) {
}
},
remove: {
bodyCSS: function() {
module.debug('Removing body css styles', $style);
module.refresh();
$style.remove();
},
active: function() {
$module.removeClass(className.active);
$context.removeClass(className.active);
},
visible: function() {
$module.removeClass(className.visible);
@ -12306,11 +12268,8 @@ $.fn.sidebar = function(parameters) {
return false;
}
},
open: function() {
return $module.hasClass(className.active);
},
closed: function() {
return !module.is.open();
return !module.is.visible();
},
visible: function() {
return $module.hasClass(className.visible);
@ -12515,7 +12474,7 @@ $.fn.sidebar.settings = {
verbose : false,
performance : false,
animation : 'scale down',
animation : 'overlay',
mobileAnimation : 'slide along',
context : 'body',
@ -12544,7 +12503,6 @@ $.fn.sidebar.settings = {
selector: {
sidebar : '.ui.sidebar',
fixed : '.ui.fixed',
pusher : '.pusher',
page : '.page',
omitted : 'script, link, style, .ui.modal, .ui.nag'

4
build/packaged/definitions/javascript/semantic.min.js
File diff suppressed because it is too large
View File

3
build/uncompressed/definitions/modules/modal.css

@ -414,6 +414,9 @@
/*--------------
Size
---------------*/
.ui.modal {
font-size: 1em;
}
/* Small */
.ui.small.modal > .header {
font-size: 1.3em;

48
build/uncompressed/definitions/modules/rating.css

@ -45,23 +45,6 @@
/*------------------
Load Default
-------------------*/
/*******************************
Rating
*******************************/
/*-------------------
Types
--------------------*/
/* Star */
/* Heart */
/*-------------------
States
--------------------*/
/*-------------------
Variations
--------------------*/
/*------------------
Load Theme
-------------------*/
/*******************************
Site Settings
*******************************/
@ -153,6 +136,23 @@
/*--- Standard ---*/
/*--- Emotive ---*/
/*--- Neutrals ---*/
/*******************************
Rating
*******************************/
/*-------------------
Types
--------------------*/
/* Star */
/* Heart */
/*-------------------
States
--------------------*/
/*-------------------
Variations
--------------------*/
/*------------------
Load Theme
-------------------*/
/*------------------
Load Site
-------------------*/
@ -280,25 +280,25 @@
Variations
*******************************/
.ui.mini.rating .icon {
font-size: 0.7em;
font-size: 0.7rem;
}
.ui.tiny.rating .icon {
font-size: 0.8em;
font-size: 0.8rem;
}
.ui.small.rating .icon {
font-size: 0.875em;
font-size: 0.875rem;
}
.ui.rating .icon {
font-size: 1em;
font-size: 1rem;
}
.ui.large.rating .icon {
font-size: 1.125em;
font-size: 1.1rem;
}
.ui.huge.rating .icon {
font-size: 1.375em;
font-size: 1.5rem;
}
.ui.massive.rating .icon {
font-size: 1.5em;
font-size: 2rem;
}
/* Realign */
.ui.large.rating,

1
build/uncompressed/definitions/modules/sidebar.css

@ -200,6 +200,7 @@
---------------*/
.pushable > .pusher > .page {
position: relative;
min-height: 100%;
background: #fcfcfc;
}
/*--------------

106
build/uncompressed/definitions/modules/sidebar.js

@ -110,6 +110,10 @@ $.fn.sidebar = function(parameters) {
bind: {
clickaway: function() {
$(window).on('DOMMouseScroll' + eventNamespace, function(event){
event.preventDefault();
});
$context
.on('click' + eventNamespace, module.event.clickaway)
.on('touchend' + eventNamespace, module.event.clickaway)
@ -121,6 +125,7 @@ $.fn.sidebar = function(parameters) {
$context
.off(eventNamespace)
;
$(window).off('DOMMouseScroll' + eventNamespace);
}
},
@ -134,33 +139,6 @@ $.fn.sidebar = function(parameters) {
$fixed = $pusher.find(selector.fixed);
},
convert: {
toAbsolute: function() {
window.scrollTo(0, 0);
/* var
scrollTop = $(document).scrollTop()
;
$fixed
.each(function() {
console.log('translate3d(0, ' + scrollTop + 'px, 0px)');
$(this)
.css({
transform: 'translate3d(0, ' + scrollTop + 'px, 0px)'
})
;
})
;*/
},
toFixed: function() {
window.scrollTo(0, 0);
/* $fixed
.css({
transform: 'translate3d(0, 0px, 0px)'
})
;*/
}
},
setup: {
layout: function() {
if( $context.find(selector.pusher).size() === 0 ) {
@ -225,7 +203,6 @@ $.fn.sidebar = function(parameters) {
if(settings.animation !== 'overlay') {
module.hideAll();
}
module.convert.toAbsolute();
module.pushPage(function() {
$.proxy(callback, element)();
$.proxy(settings.onShow, element)();
@ -246,7 +223,6 @@ $.fn.sidebar = function(parameters) {
module.debug('Hiding sidebar', callback);
if(module.is.visible()) {
module.pullPage(function() {
module.convert.toFixed();
$.proxy(callback, element)();
$.proxy(settings.onHidden, element)();
});
@ -280,34 +256,44 @@ $.fn.sidebar = function(parameters) {
? $context
: (settings.animation == 'overlay')
? $module
: $pusher
: $pusher,
animation
;
callback = $.isFunction(callback)
? callback
: function(){}
;
module.verbose('Adding context push state', $context);
if(settings.animation !== 'overlay') {
module.remove.allVisible();
}
animation = function() {
module.set.visible();
module.set.animation();
module.set.direction();
requestAnimationFrame(function() {
module.set.active();
module.set.inward();
module.set.pushed();
});
};
$transition
.on(transitionEnd, function(event) {
if( event.target == $transition[0] ) {
$transition.off(transitionEnd);
module.remove.inward();
module.set.active();
module.bind.clickaway();
$.proxy(callback, element)();
}
})
;
module.set.visible();
module.set.animation();
module.set.direction();
requestAnimationFrame(function() {
module.set.inward();
module.set.pushed();
});
module.verbose('Adding context push state', $context);
if(settings.animation === 'overlay') {
requestAnimationFrame(animation);
}
else {
if(settings.animation !== 'safe') {
window.scrollTo(0, 0);
}
module.remove.allVisible();
animation();
}
},
pullPage: function(callback) {
@ -341,28 +327,9 @@ $.fn.sidebar = function(parameters) {
module.remove.pushed();
},
add: {
bodyCSS: function(direction, distance) {
var
style
;
if(direction !== className.bottom) {
style = ''
+ '<style title="' + namespace + '">'
+ 'body.pushed {'
+ ''
+ '}'
+ '</style>'
;
}
$head.append(style);
module.debug('Adding body css to head', $style);
}
},
set: {
active: function() {
$module.addClass(className.active);
$context.addClass(className.active);
},
direction: function(direction) {
direction = direction || module.get.direction();
@ -389,13 +356,8 @@ $.fn.sidebar = function(parameters) {
}
},
remove: {
bodyCSS: function() {
module.debug('Removing body css styles', $style);
module.refresh();
$style.remove();
},
active: function() {
$module.removeClass(className.active);
$context.removeClass(className.active);
},
visible: function() {
$module.removeClass(className.visible);
@ -478,11 +440,8 @@ $.fn.sidebar = function(parameters) {
return false;
}
},
open: function() {
return $module.hasClass(className.active);
},
closed: function() {
return !module.is.open();
return !module.is.visible();
},
visible: function() {
return $module.hasClass(className.visible);
@ -687,7 +646,7 @@ $.fn.sidebar.settings = {
verbose : false,
performance : false,
animation : 'scale down',
animation : 'overlay',
mobileAnimation : 'slide along',
context : 'body',
@ -716,7 +675,6 @@ $.fn.sidebar.settings = {
selector: {
sidebar : '.ui.sidebar',
fixed : '.ui.fixed',
pusher : '.pusher',
page : '.page',
omitted : 'script, link, style, .ui.modal, .ui.nag'

10
server/layouts/default.html.eco

@ -156,7 +156,7 @@
<i class="download icon"></i> <b>Download</b>
</a>
<div class="item">
<a href="/element.html" class="ui small <%= if @document.elementType is 'element' then 'teal ' %>inverted header">Elements</a>
<a href="/element.html" class="ui small <%= if @document.elementType is 'element' then 'active ' %>inverted header">Elements</a>
<div class="menu">
<% for element in uiElements: %>
<a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
@ -164,7 +164,7 @@
</div>
</div>
<div class="item">
<a href="/collection.html" class="ui small <%= if @document.elementType is 'collection' then 'teal ' %> inverted header">Collections</a>
<a href="/collection.html" class="ui small <%= if @document.elementType is 'collection' then 'active ' %> inverted header">Collections</a>
<div class="menu">
<% for element in uiCollections: %>
<a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
@ -172,7 +172,7 @@
</div>
</div>
<div class="item">
<div class="ui small <%= if @document.elementType is 'view' then 'teal ' %> inverted header">Views</div>
<div class="ui small <%= if @document.elementType is 'view' then 'active ' %> inverted header">Views</div>
<div class="menu">
<% for element in uiViews: %>
<a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
@ -180,7 +180,7 @@
</div>
</div>
<div class="item">
<a href="/module.html" class="ui small <%= if @document.elementType is 'module' then 'teal ' %> inverted header">Modules</a>
<a href="/module.html" class="ui small <%= if @document.elementType is 'module' then 'active ' %> inverted header">Modules</a>
<div class="menu">
<% for element in uiModules: %>
<a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
@ -188,7 +188,7 @@
</div>
</div>
<div class="item">
<a href="/module.html" class="ui small <%= if @document.elementType is 'behavior' then 'teal ' %> inverted header">Behavior</a>
<a href="/module.html" class="ui small <%= if @document.elementType is 'behavior' then 'active ' %> inverted header">Behavior</a>
<div class="menu">
<% for element in uiBehavior: %>
<a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>

107
src/definitions/modules/sidebar.js

@ -110,6 +110,10 @@ $.fn.sidebar = function(parameters) {
bind: {
clickaway: function() {
$(window).on('DOMMouseScroll' + eventNamespace, function(event){
event.preventDefault();
});
$context
.on('click' + eventNamespace, module.event.clickaway)
.on('touchend' + eventNamespace, module.event.clickaway)
@ -121,6 +125,7 @@ $.fn.sidebar = function(parameters) {
$context
.off(eventNamespace)
;
$(window).off('DOMMouseScroll' + eventNamespace);
}
},
@ -134,33 +139,6 @@ $.fn.sidebar = function(parameters) {
$fixed = $pusher.find(selector.fixed);
},
convert: {
toAbsolute: function() {
window.scrollTo(0, 0);
/* var
scrollTop = $(document).scrollTop()
;
$fixed
.each(function() {
console.log('translate3d(0, ' + scrollTop + 'px, 0px)');
$(this)
.css({
transform: 'translate3d(0, ' + scrollTop + 'px, 0px)'
})
;
})
;*/
},
toFixed: function() {
window.scrollTo(0, 0);
/* $fixed
.css({
transform: 'translate3d(0, 0px, 0px)'
})
;*/
}
},
setup: {
layout: function() {
if( $context.find(selector.pusher).size() === 0 ) {
@ -225,7 +203,6 @@ $.fn.sidebar = function(parameters) {
if(settings.animation !== 'overlay') {
module.hideAll();
}
module.convert.toAbsolute();
module.pushPage(function() {
$.proxy(callback, element)();
$.proxy(settings.onShow, element)();
@ -246,7 +223,6 @@ $.fn.sidebar = function(parameters) {
module.debug('Hiding sidebar', callback);
if(module.is.visible()) {
module.pullPage(function() {
module.convert.toFixed();
$.proxy(callback, element)();
$.proxy(settings.onHidden, element)();
});
@ -280,34 +256,45 @@ $.fn.sidebar = function(parameters) {
? $context
: (settings.animation == 'overlay')
? $module
: $pusher
: $pusher,
animation
;
callback = $.isFunction(callback)
? callback
: function(){}
;
module.verbose('Adding context push state', $context);
if(settings.animation !== 'overlay') {
module.remove.allVisible();
}
animation = function() {
module.set.visible();
module.set.animation();
module.set.direction();
requestAnimationFrame(function() {
module.set.active();
module.set.inward();
module.set.pushed();
});
};
$transition
.on(transitionEnd, function(event) {
if( event.target == $transition[0] ) {
$transition.off(transitionEnd);
module.remove.inward();
module.set.active();
module.bind.clickaway();
$.proxy(callback, element)();
}
})
;
module.set.visible();
module.set.animation();
module.set.direction();
requestAnimationFrame(function() {
module.set.inward();
module.set.pushed();
});
module.verbose('Adding context push state', $context);
if(settings.animation === 'overlay') {
requestAnimationFrame(animation);
}
else {
if(settings.animation !== 'safe') {
$module.scrollTop(0);
window.scrollTo(0, 0);
}
module.remove.allVisible();
animation();
}
},
pullPage: function(callback) {
@ -341,28 +328,9 @@ $.fn.sidebar = function(parameters) {
module.remove.pushed();
},
add: {
bodyCSS: function(direction, distance) {
var
style
;
if(direction !== className.bottom) {
style = ''
+ '<style title="' + namespace + '">'
+ 'body.pushed {'
+ ''
+ '}'
+ '</style>'
;
}
$head.append(style);
module.debug('Adding body css to head', $style);
}
},
set: {
active: function() {
$module.addClass(className.active);
$context.addClass(className.active);
},
direction: function(direction) {
direction = direction || module.get.direction();
@ -389,13 +357,8 @@ $.fn.sidebar = function(parameters) {
}
},
remove: {
bodyCSS: function() {
module.debug('Removing body css styles', $style);
module.refresh();
$style.remove();
},
active: function() {
$module.removeClass(className.active);
$context.removeClass(className.active);
},
visible: function() {
$module.removeClass(className.visible);
@ -478,11 +441,8 @@ $.fn.sidebar = function(parameters) {
return false;
}
},
open: function() {
return $module.hasClass(className.active);
},
closed: function() {
return !module.is.open();
return !module.is.visible();
},
visible: function() {
return $module.hasClass(className.visible);
@ -687,7 +647,7 @@ $.fn.sidebar.settings = {
verbose : false,
performance : false,
animation : 'scale down',
animation : 'overlay',
mobileAnimation : 'slide along',
context : 'body',
@ -716,7 +676,6 @@ $.fn.sidebar.settings = {
selector: {
sidebar : '.ui.sidebar',
fixed : '.ui.fixed',
pusher : '.pusher',
page : '.page',
omitted : 'script, link, style, .ui.modal, .ui.nag'

Loading…
Cancel
Save