Import the pebble dev site into devsite/

This commit is contained in:
Katharine Berry 2025-02-17 17:02:33 -08:00
parent 3b92768480
commit 527858cf4c
1359 changed files with 265431 additions and 0 deletions

20
third_party/jquery-mmenu/LICENSE vendored Normal file
View file

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2014 Fred Heusschen
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,138 @@
/*
* jQuery mmenu footer addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
*/
(function( $ ) {
var _PLUGIN_ = 'mmenu',
_ADDON_ = 'footer';
$[ _PLUGIN_ ].addons[ _ADDON_ ] = {
// _init: fired when (re)initiating the plugin
_init: function( $panels )
{
var that = this,
opts = this.opts[ _ADDON_ ];
// Update content
var $footer = $('div.' + _c.footer, this.$menu);
if ( $footer.length )
{
// Auto-update the footer content
if ( opts.update )
{
$panels
.each(
function()
{
var $panl = $(this);
// Find content
var $cnt = $('.' + that.conf.classNames[ _ADDON_ ].panelFooter, $panl),
_cnt = $cnt.html();
if ( !_cnt )
{
_cnt = opts.title;
}
// Update footer info
var updateFooter = function()
{
$footer[ _cnt ? 'show' : 'hide' ]();
$footer.html( _cnt );
};
$panl.on( _e.open, updateFooter );
if ( $panl.hasClass( _c.current ) )
{
updateFooter();
}
}
);
}
// Init other add-ons
if ( $[ _PLUGIN_ ].addons.buttonbars )
{
$[ _PLUGIN_ ].addons.buttonbars._init.call( this, $footer );
}
}
},
// _setup: fired once per menu
_setup: function()
{
var opts = this.opts[ _ADDON_ ];
// Extend shortcut options
if ( typeof opts == 'boolean' )
{
opts = {
add : opts,
update : opts
};
}
if ( typeof opts != 'object' )
{
opts = {};
}
opts = $.extend( true, {}, $[ _PLUGIN_ ].defaults[ _ADDON_ ], opts );
this.opts[ _ADDON_ ] = opts;
// Add markup
if ( opts.add )
{
var content = opts.content
? opts.content
: opts.title;
$( '<div class="' + _c.footer + '" />' )
.appendTo( this.$menu )
.append( content );
this.$menu.addClass( _c.hasfooter );
}
},
// _add: fired once per page load
_add: function()
{
_c = $[ _PLUGIN_ ]._c;
_d = $[ _PLUGIN_ ]._d;
_e = $[ _PLUGIN_ ]._e;
_c.add( 'footer hasfooter' );
glbl = $[ _PLUGIN_ ].glbl;
}
};
// Default options and configuration
$[ _PLUGIN_ ].defaults[ _ADDON_ ] = {
add : false,
content : false,
title : '',
update : false
};
$[ _PLUGIN_ ].configuration.classNames[ _ADDON_ ] = {
panelFooter: 'Footer'
};
var _c, _d, _e, glbl;
})( jQuery );

View file

@ -0,0 +1,386 @@
/*
* jQuery mmenu offCanvas addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
*/
(function( $ ) {
var _PLUGIN_ = 'mmenu',
_ADDON_ = 'offCanvas';
$[ _PLUGIN_ ].addons[ _ADDON_ ] = {
// _init: fired when (re)initiating the plugin
_init: function( $panels ) {},
// _setup: fired once per menu
_setup: function()
{
if ( !this.opts[ _ADDON_ ] )
{
return;
}
var that = this,
opts = this.opts[ _ADDON_ ],
conf = this.conf[ _ADDON_ ];
// Extend shortcut configuration
if ( typeof conf.pageSelector != 'string' )
{
conf.pageSelector = '> ' + conf.pageNodetype;
}
glbl.$allMenus = ( glbl.$allMenus || $() ).add( this.$menu );
// Setup the menu
this.vars.opened = false;
var clsn = [ _c.offcanvas ];
if ( opts.position != 'left' )
{
clsn.push( _c.mm( opts.position ) );
}
if ( opts.zposition != 'back' )
{
clsn.push( _c.mm( opts.zposition ) );
}
this.$menu
.addClass( clsn.join( ' ' ) )
.parent()
.removeClass( _c.wrapper );
// Setup the page
this.setPage( glbl.$page );
// Setup the UI blocker and the window
this[ _ADDON_ + '_initBlocker' ]();
this[ _ADDON_ + '_initWindow' ]();
// Add events
this.$menu
.on( _e.open + ' ' + _e.opening + ' ' + _e.opened + ' ' +
_e.close + ' ' + _e.closing + ' ' + _e.closed + ' ' + _e.setPage,
function( e )
{
e.stopPropagation();
}
)
.on( _e.open + ' ' + _e.close + ' ' + _e.setPage,
function( e )
{
that[ e.type ]();
}
);
// Append to the body
this.$menu[ conf.menuInjectMethod + 'To' ]( conf.menuWrapperSelector );
},
// _add: fired once per page load
_add: function()
{
_c = $[ _PLUGIN_ ]._c;
_d = $[ _PLUGIN_ ]._d;
_e = $[ _PLUGIN_ ]._e;
_c.add( 'offcanvas slideout modal background opening blocker page' );
_d.add( 'style' );
_e.add( 'opening opened closing closed setPage' );
glbl = $[ _PLUGIN_ ].glbl;
},
// _clickAnchor: prevents default behavior when clicking an anchor
_clickAnchor: function( $a, inMenu )
{
if ( !this.opts[ _ADDON_ ] )
{
return false;
}
// Open menu
var id = this.$menu.attr( 'id' );
if ( id && id.length )
{
if ( this.conf.clone )
{
id = _c.umm( id );
}
if ( $a.is( '[href="#' + id + '"]' ) )
{
this.open();
return true;
}
}
// Close menu
if ( !glbl.$page )
{
return;
}
var id = glbl.$page.attr( 'id' );
if ( id && id.length )
{
if ( $a.is( '[href="#' + id + '"]' ) )
{
this.close();
return true;
}
}
return false;
}
};
// Default options and configuration
$[ _PLUGIN_ ].defaults[ _ADDON_ ] = {
position : 'left',
zposition : 'back',
modal : false,
moveBackground : true
};
$[ _PLUGIN_ ].configuration[ _ADDON_ ] = {
pageNodetype : 'div',
pageSelector : null,
menuWrapperSelector : 'body',
menuInjectMethod : 'prepend'
};
// Methods
$[ _PLUGIN_ ].prototype.open = function()
{
if ( this.vars.opened )
{
return false;
}
var that = this;
this._openSetup();
// Without the timeout, the animation won't work because the element had display: none;
setTimeout(
function()
{
that._openFinish();
}, this.conf.openingInterval
);
return 'open';
};
$[ _PLUGIN_ ].prototype._openSetup = function()
{
var that = this;
// Close other menus
glbl.$allMenus.not( this.$menu ).trigger( _e.close );
// Store style and position
glbl.$page.data( _d.style, glbl.$page.attr( 'style' ) || '' );
// Trigger window-resize to measure height
glbl.$wndw.trigger( _e.resize, [ true ] );
var clsn = [ _c.opened ];
// Add options
if ( this.opts[ _ADDON_ ].modal )
{
clsn.push( _c.modal );
}
if ( this.opts[ _ADDON_ ].moveBackground )
{
clsn.push( _c.background );
}
if ( this.opts[ _ADDON_ ].position != 'left' )
{
clsn.push( _c.mm( this.opts[ _ADDON_ ].position ) );
}
if ( this.opts[ _ADDON_ ].zposition != 'back' )
{
clsn.push( _c.mm( this.opts[ _ADDON_ ].zposition ) );
}
if ( this.opts.classes )
{
clsn.push( this.opts.classes );
}
glbl.$html.addClass( clsn.join( ' ' ) );
// Open
setTimeout(function(){
that.vars.opened = true;
},this.conf.openingInterval);
this.$menu.addClass( _c.current + ' ' + _c.opened );
};
$[ _PLUGIN_ ].prototype._openFinish = function()
{
var that = this;
// Callback
this.__transitionend( glbl.$page,
function()
{
that.$menu.trigger( _e.opened );
}, this.conf.transitionDuration
);
// Opening
glbl.$html.addClass( _c.opening );
this.$menu.trigger( _e.opening );
};
$[ _PLUGIN_ ].prototype.close = function()
{
if ( !this.vars.opened )
{
return false;
}
var that = this;
// Callback
this.__transitionend( glbl.$page,
function()
{
that.$menu
.removeClass( _c.current )
.removeClass( _c.opened );
glbl.$html
.removeClass( _c.opened )
.removeClass( _c.modal )
.removeClass( _c.background )
.removeClass( _c.mm( that.opts[ _ADDON_ ].position ) )
.removeClass( _c.mm( that.opts[ _ADDON_ ].zposition ) );
if ( that.opts.classes )
{
glbl.$html.removeClass( that.opts.classes );
}
// Restore style and position
glbl.$page.attr( 'style', glbl.$page.data( _d.style ) );
that.vars.opened = false;
that.$menu.trigger( _e.closed );
}, this.conf.transitionDuration
);
// Closing
glbl.$html.removeClass( _c.opening );
this.$menu.trigger( _e.closing );
return 'close';
};
$[ _PLUGIN_ ].prototype.setPage = function( $page )
{
if ( !$page )
{
$page = $(this.conf[ _ADDON_ ].pageSelector, glbl.$body);
if ( $page.length > 1 )
{
$page = $page.wrapAll( '<' + this.conf[ _ADDON_ ].pageNodetype + ' />' ).parent();
}
}
$page.addClass( _c.page + ' ' + _c.slideout );
glbl.$page = $page;
};
$[ _PLUGIN_ ].prototype[ _ADDON_ + '_initWindow' ] = function()
{
// Prevent tabbing
glbl.$wndw
.on( _e.keydown,
function( e )
{
if ( glbl.$html.hasClass( _c.opened ) )
{
if ( e.keyCode == 9 )
{
e.preventDefault();
return false;
}
}
}
);
// Set page min-height to window height
var _h = 0;
glbl.$wndw
.on( _e.resize,
function( e, force )
{
if ( force || glbl.$html.hasClass( _c.opened ) )
{
var nh = glbl.$wndw.height();
if ( force || nh != _h )
{
_h = nh;
glbl.$page.css( 'minHeight', nh );
}
}
}
);
// Once fired, it can be removed
$[ _PLUGIN_ ].prototype[ _ADDON_ + '_initWindow' ] = function() {};
};
$[ _PLUGIN_ ].prototype[ _ADDON_ + '_initBlocker' ] = function()
{
var that = this;
var $blck = $( '<div id="' + _c.blocker + '" class="' + _c.slideout + '" />' )
.appendTo( glbl.$body );
$blck
.on( _e.touchstart,
function( e )
{
e.preventDefault();
e.stopPropagation();
$blck.trigger( _e.mousedown );
}
)
.on( _e.mousedown,
function( e )
{
e.preventDefault();
if ( !glbl.$html.hasClass( _c.modal ) )
{
glbl.$allMenus.trigger( _e.close );
}
}
);
// Once fired, it can be removed
$[ _PLUGIN_ ].prototype[ _ADDON_ + '_initBlocker' ] = function() {};
};
var _c, _d, _e, glbl;
})( jQuery );

View file

@ -0,0 +1,664 @@
/*
* jQuery mmenu v4.7.5
* @requires jQuery 1.7.0 or later
*
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Licensed under the MIT license:
* http://en.wikipedia.org/wiki/MIT_License
*/
(function( $ ) {
var _PLUGIN_ = 'mmenu',
_VERSION_ = '4.7.5';
// Plugin already excists
if ( $[ _PLUGIN_ ] )
{
return;
}
// Global variables
var _c = {}, _d = {}, _e = {},
plugin_initiated = false;
var glbl = {
$wndw: null,
$html: null,
$body: null
};
/*
Class
*/
$[ _PLUGIN_ ] = function( $menu, opts, conf )
{
this.$menu = $menu;
this.opts = opts;
this.conf = conf;
this.vars = {};
if ( typeof this.___deprecated == 'function' )
{
this.___deprecated();
}
this._initMenu();
this._initAnchors();
this._initEvents();
var $panels = this.$menu.children( this.conf.panelNodetype );
for ( var a in $[ _PLUGIN_ ].addons )
{
// Add add-ons to plugin
$[ _PLUGIN_ ].addons[ a ]._add.call( this );
$[ _PLUGIN_ ].addons[ a ]._add = function() {};
// Setup adds-on for menu
$[ _PLUGIN_ ].addons[ a ]._setup.call( this );
}
this._init( $panels );
if ( typeof this.___debug == 'function' )
{
this.___debug();
}
return this;
};
$[ _PLUGIN_ ].version = _VERSION_;
$[ _PLUGIN_ ].addons = {};
$[ _PLUGIN_ ].uniqueId = 0;
$[ _PLUGIN_ ].defaults = {
classes : '',
slidingSubmenus : true,
onClick : {
// close : true,
// blockUI : null,
// preventDefault : null,
setSelected : true
}
};
$[ _PLUGIN_ ].configuration = {
panelNodetype : 'ul, ol, div',
transitionDuration : 400,
openingInterval : 25,
classNames : {
panel : 'Panel',
selected : 'Selected',
label : 'Label',
spacer : 'Spacer'
}
};
$[ _PLUGIN_ ].prototype = {
_init: function( $panels )
{
$panels = $panels.not( '.' + _c.nopanel );
$panels = this._initPanels( $panels );
for ( var a in $[ _PLUGIN_ ].addons )
{
$[ _PLUGIN_ ].addons[ a ]._init.call( this, $panels );
}
this._update();
},
_initMenu: function()
{
var that = this;
// Clone if needed
if ( this.opts.offCanvas && this.conf.clone )
{
this.$menu = this.$menu.clone( true );
this.$menu.add( this.$menu.find( '*' ) ).filter( '[id]' ).each(
function()
{
$(this).attr( 'id', _c.mm( $(this).attr( 'id' ) ) );
}
);
}
// Strip whitespace
this.$menu.contents().each(
function()
{
if ( $(this)[ 0 ].nodeType == 3 )
{
$(this).remove();
}
}
);
this.$menu
.parent()
.addClass( _c.wrapper );
var clsn = [ _c.menu ];
// Add direction class
clsn.push( _c.mm( this.opts.slidingSubmenus ? 'horizontal' : 'vertical' ) );
// Add options classes
if ( this.opts.classes )
{
clsn.push( this.opts.classes );
}
this.$menu.addClass( clsn.join( ' ' ) );
},
_initPanels: function( $panels )
{
var that = this;
// Add List class
this.__findAddBack( $panels, 'ul, ol' )
.not( '.' + _c.nolist )
.addClass( _c.list );
var $lis = this.__findAddBack( $panels, '.' + _c.list ).find( '> li' );
// Refactor Selected class
this.__refactorClass( $lis, this.conf.classNames.selected, 'selected' );
// Refactor Label class
this.__refactorClass( $lis, this.conf.classNames.label, 'label' );
// Refactor Spacer class
this.__refactorClass( $lis, this.conf.classNames.spacer, 'spacer' );
// setSelected-event
$lis
.off( _e.setSelected )
.on( _e.setSelected,
function( e, selected )
{
e.stopPropagation();
$lis.removeClass( _c.selected );
if ( typeof selected != 'boolean' )
{
selected = true;
}
if ( selected )
{
$(this).addClass( _c.selected );
}
}
);
// Refactor Panel class
this.__refactorClass( this.__findAddBack( $panels, '.' + this.conf.classNames.panel ), this.conf.classNames.panel, 'panel' );
// Add Panel class
$panels
.add( this.__findAddBack( $panels, '.' + _c.list ).children().children().filter( this.conf.panelNodetype ).not( '.' + _c.nopanel ) )
.addClass( _c.panel );
var $curpanels = this.__findAddBack( $panels, '.' + _c.panel ),
$allpanels = $('.' + _c.panel, this.$menu);
// Add an ID to all panels
$curpanels
.each(
function( i )
{
var $t = $(this),
id = $t.attr( 'id' ) || that.__getUniqueId();
$t.attr( 'id', id );
}
);
// Add open and close links to menu items
$curpanels
.each(
function( i )
{
var $t = $(this),
$u = $t.is( 'ul, ol' ) ? $t : $t.find( 'ul ,ol' ).first(),
$l = $t.parent(),
$a = $l.children( 'a, span' ),
$p = $l.closest( '.' + _c.panel );
if ( $l.parent().is( '.' + _c.list ) && !$t.data( _d.parent) )
{
$t.data( _d.parent, $l );
var $btn = $( '<a class="' + _c.subopen + '" href="#' + $t.attr( 'id' ) + '" />' ).insertBefore( $a );
if ( !$a.is( 'a' ) )
{
$btn.addClass( _c.fullsubopen );
}
if ( that.opts.slidingSubmenus )
{
$u.prepend( '<li class="' + _c.subtitle + '"><a class="' + _c.subclose + '" href="#' + $p.attr( 'id' ) + '">' + $a.text() + '</a></li>' );
}
}
}
);
if ( this.opts.slidingSubmenus )
{
// Add opened-classes
var $selected = this.__findAddBack( $panels, '.' + _c.list ).find( '> li.' + _c.selected );
$selected
.parents( 'li' )
.removeClass( _c.selected )
.end()
.add( $selected.parents( 'li' ) )
.each(
function()
{
var $t = $(this),
$u = $t.find( '> .' + _c.panel );
if ( $u.length )
{
$t.parents( '.' + _c.panel ).addClass( _c.subopened );
$u.addClass( _c.opened );
}
}
)
.closest( '.' + _c.panel )
.addClass( _c.opened )
.parents( '.' + _c.panel )
.addClass( _c.subopened );
}
else
{
// Replace Selected-class with opened-class in parents from .Selected
var $selected = $('li.' + _c.selected, $allpanels);
$selected
.parents( 'li' )
.removeClass( _c.selected )
.end()
.add( $selected.parents( 'li' ) )
.addClass( _c.opened );
}
// Set current opened
var $current = $allpanels.filter( '.' + _c.opened );
if ( !$current.length )
{
$current = $curpanels.first();
}
$current
.addClass( _c.opened )
.last()
.addClass( _c.current );
// Rearrange markup
if ( this.opts.slidingSubmenus )
{
$curpanels
.not( $current.last() )
.addClass( _c.hidden )
.end()
.appendTo( this.$menu );
}
return $curpanels;
},
_initAnchors: function()
{
var that = this;
glbl.$body
.on( _e.click,
'a',
function( e )
{
var $t = $(this),
fired = false,
inMenu = that.$menu.find( $t ).length;
// Find behavior for addons
for ( var a in $[ _PLUGIN_ ].addons )
{
if ( $[ _PLUGIN_ ].addons[ a ]._clickAnchor &&
( fired = $[ _PLUGIN_ ].addons[ a ]._clickAnchor.call( that, $t, inMenu ) )
) {
break;
}
}
// Open/Close panel
if ( !fired && inMenu )
{
var _h = $t.attr( 'href' ) || '';
if ( _h.slice( 0, 1 ) == '#' )
{
try
{
if ( $(_h, that.$menu).is( '.' + _c.panel ) )
{
fired = true;
$(_h).trigger( that.opts.slidingSubmenus ? _e.open : _e.toggle );
}
}
catch( error ) {}
}
}
if ( fired )
{
e.preventDefault();
}
// All other anchors in lists
if ( !fired && inMenu )
{
if ( $t.is( '.' + _c.list + ' > li > a' )
&& !$t.is( '[rel="external"]' )
&& !$t.is( '[target="_blank"]' ) )
{
// Set selected item
if ( that.__valueOrFn( that.opts.onClick.setSelected, $t ) )
{
$t.parent().trigger( _e.setSelected );
}
// Prevent default / don't follow link. Default: false
var preventDefault = that.__valueOrFn( that.opts.onClick.preventDefault, $t, _h.slice( 0, 1 ) == '#' );
if ( preventDefault )
{
e.preventDefault();
}
// Block UI. Default: false if preventDefault, true otherwise
if ( that.__valueOrFn( that.opts.onClick.blockUI, $t, !preventDefault ) )
{
glbl.$html.addClass( _c.blocking );
}
// Close menu. Default: true if preventDefault, false otherwise
if ( that.__valueOrFn( that.opts.onClick.close, $t, preventDefault ) )
{
that.$menu.trigger( _e.close );
}
}
}
}
);
},
_initEvents: function()
{
var that = this;
this.$menu
.on( _e.toggle + ' ' + _e.open + ' ' + _e.close,
'.' + _c.panel,
function( e )
{
e.stopPropagation();
}
);
if ( this.opts.slidingSubmenus )
{
this.$menu
.on( _e.open,
'.' + _c.panel,
function( e )
{
return that._openSubmenuHorizontal( $(this) );
}
);
}
else
{
this.$menu
.on( _e.toggle,
'.' + _c.panel,
function( e )
{
var $t = $(this);
$t.trigger( $t.parent().hasClass( _c.opened ) ? _e.close : _e.open );
}
)
.on( _e.open,
'.' + _c.panel,
function( e )
{
$(this).parent().addClass( _c.opened );
}
)
.on( _e.close,
'.' + _c.panel,
function( e )
{
$(this).parent().removeClass( _c.opened );
}
);
}
},
_openSubmenuHorizontal: function( $opening )
{
if ( $opening.hasClass( _c.current ) )
{
return false;
}
var $panels = $('.' + _c.panel, this.$menu),
$current = $panels.filter( '.' + _c.current );
$panels
.removeClass( _c.highest )
.removeClass( _c.current )
.not( $opening )
.not( $current )
.addClass( _c.hidden );
if ( $opening.hasClass( _c.opened ) )
{
$current
.addClass( _c.highest )
.removeClass( _c.opened )
.removeClass( _c.subopened );
}
else
{
$opening
.addClass( _c.highest );
$current
.addClass( _c.subopened );
}
$opening
.removeClass( _c.hidden )
.addClass( _c.current );
// Without the timeout, the animation won't work because the element had display: none;
setTimeout(
function()
{
$opening
.removeClass( _c.subopened )
.addClass( _c.opened );
}, this.conf.openingInterval
);
return 'open';
},
_update: function( fn )
{
if ( !this.updates )
{
this.updates = [];
}
if ( typeof fn == 'function' )
{
this.updates.push( fn );
}
else
{
for ( var u = 0, l = this.updates.length; u < l; u++ )
{
this.updates[ u ].call( this, fn );
}
}
},
__valueOrFn: function( o, $e, d )
{
if ( typeof o == 'function' )
{
return o.call( $e[ 0 ] );
}
if ( typeof o == 'undefined' && typeof d != 'undefined' )
{
return d;
}
return o;
},
__refactorClass: function( $e, o, c )
{
return $e.filter( '.' + o ).removeClass( o ).addClass( _c[ c ] );
},
__findAddBack: function( $e, s )
{
return $e.find( s ).add( $e.filter( s ) );
},
__transitionend: function( $e, fn, duration )
{
var _ended = false,
_fn = function()
{
if ( !_ended )
{
fn.call( $e[ 0 ] );
}
_ended = true;
};
$e.one( _e.transitionend, _fn );
$e.one( _e.webkitTransitionEnd, _fn );
setTimeout( _fn, duration * 1.1 );
},
__getUniqueId: function()
{
return _c.mm( $[ _PLUGIN_ ].uniqueId++ );
}
};
/*
jQuery plugin
*/
$.fn[ _PLUGIN_ ] = function( opts, conf )
{
// First time plugin is fired
if ( !plugin_initiated )
{
_initPlugin();
}
// Extend options
opts = $.extend( true, {}, $[ _PLUGIN_ ].defaults, opts );
conf = $.extend( true, {}, $[ _PLUGIN_ ].configuration, conf );
return this.each(
function()
{
var $menu = $(this);
if ( $menu.data( _PLUGIN_ ) )
{
return;
}
$menu.data( _PLUGIN_, new $[ _PLUGIN_ ]( $menu, opts, conf ) );
}
);
};
/*
SUPPORT
*/
$[ _PLUGIN_ ].support = {
touch: 'ontouchstart' in window || navigator.msMaxTouchPoints
};
function _initPlugin()
{
plugin_initiated = true;
glbl.$wndw = $(window);
glbl.$html = $('html');
glbl.$body = $('body');
// Classnames, Datanames, Eventnames
$.each( [ _c, _d, _e ],
function( i, o )
{
o.add = function( c )
{
c = c.split( ' ' );
for ( var d in c )
{
o[ c[ d ] ] = o.mm( c[ d ] );
}
};
}
);
// Classnames
_c.mm = function( c ) { return 'mm-' + c; };
_c.add( 'wrapper menu inline panel nopanel list nolist subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose' );
_c.umm = function( c )
{
if ( c.slice( 0, 3 ) == 'mm-' )
{
c = c.slice( 3 );
}
return c;
};
// Datanames
_d.mm = function( d ) { return 'mm-' + d; };
_d.add( 'parent' );
// Eventnames
_e.mm = function( e ) { return e + '.mm'; };
_e.add( 'toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup' );
$[ _PLUGIN_ ]._c = _c;
$[ _PLUGIN_ ]._d = _d;
$[ _PLUGIN_ ]._e = _e;
$[ _PLUGIN_ ].glbl = glbl;
}
})( jQuery );

View file

@ -0,0 +1,99 @@
/*
jQuery.mmenu buttonbars addon CSS
*/
@import "../inc/variables";
.mm-buttonbar
{
border: 1px solid transparent;
border-radius: $mm_padding / 2;
text-align: center;
line-height: $mm_buttonbarHeight;
overflow: hidden;
display: block;
padding: 0;
margin: 0;
position: relative;
@include mm_clearfix;
> *
{
border-left: 1px solid transparent;
box-sizing: border-box;
display: block;
width: 100%;
height: 100%;
float: left;
@include mm_ellipsis;
}
> a
{
text-decoration: none;
}
> input
{
position: absolute;
left: -1000px;
top: -1000px;
}
> input:checked + label
{
border-color: transparent !important;
}
> *:first-child,
> input:first-child + *
{
border-left: none;
}
&.mm-buttonbar-2 > *
{
width: 50%;
}
&.mm-buttonbar-3 > *
{
width: 33.33%;
}
&.mm-buttonbar-4 > *
{
width: 25%;
}
&.mm-buttonbar-5 > *
{
width: 20%;
}
}
.mm-header .mm-buttonbar
{
margin-top: $mm_headerHeight - ( $mm_buttonbarHeight * 2 );
margin-left: -( $mm_btnSize - $mm_padding );
margin-right: -( $mm_btnSize - $mm_padding );
}
.mm-footer .mm-buttonbar
{
border: none;
border-radius: none;
line-height: $mm_footerHeight;
margin: ( -$mm_padding ) ( -$mm_padding ) 0 ( -( $mm_padding * 2 ) );
> *
{
border-left: none;
}
}
.mm-list > li > .mm-buttonbar
{
margin: $mm_padding ( $mm_padding * 2 );
}
@include mm_colors_buttonbars;

View file

@ -0,0 +1,53 @@
/*
jQuery.mmenu counters addon CSS
*/
@import "../inc/variables";
em.mm-counter
{
font: inherit;
font-size: $mm_fontSize;
font-style: normal;
text-indent: 0;
line-height: $mm_btnSize / 2;
display: block;
margin-top: -( $mm_btnSize / 4 );
position: absolute;
right: $mm_subopenWidth;
top: 50%;
+ a.mm-subopen
{
padding-left: $mm_counterWidth;
+ a,
+ span
{
margin-right: $mm_counterWidth + $mm_subopenWidth;
}
}
+ a.mm-fullsubopen
{
padding-left: 0;
}
}
// vertical submenu
.mm-vertical
{
em.mm-counter
{
top: ( $mm_btnSize / 4 ) + 2;
margin-top: 0;
}
}
// Search
.mm-nosubresults > em.mm-counter
{
display: none;
}
@include mm_colors_counters;

View file

@ -0,0 +1,17 @@
/*
jQuery.mmenu dragOpen addon CSS
*/
@import "../inc/variables";
html.mm-opened.mm-dragging
{
.mm-menu,
.mm-page,
.mm-fixed-top,
.mm-fixed-bottom,
#mm-blocker
{
@include mm_webkit-prefix( "transition-duration", 0s );
}
}

View file

@ -0,0 +1,34 @@
/*
jQuery.mmenu footer addon CSS
*/
@import "../inc/variables";
.mm-footer
{
background: inherit;
border-top: 1px solid transparent;
text-align: center;
line-height: $mm_footerHeight - ( $mm_padding * 2 );
box-sizing: border-box;
width: 100%;
height: $mm_footerHeight;
padding: $mm_padding $mm_padding 0 ( $mm_padding * 2 );
position: absolute;
z-index: 2;
bottom: 0;
left: 0;
}
.mm-menu.mm-hasfooter
{
> .mm-panel:after
{
height: $mm_footerHeight + $mm_btnSize;
}
}
@include mm_colors_footer;

View file

@ -0,0 +1,142 @@
/*
jQuery.mmenu header addon CSS
*/
@import "../inc/variables";
.mm-header
{
background: inherit;
border-bottom: 1px solid transparent;
text-align: center;
line-height: $mm_btnSize / 2;
box-sizing: border-box;
width: 100%;
height: $mm_headerHeight;
padding: 0 ( $mm_btnSize + $mm_padding );
position: absolute;
z-index: 2;
top: 0;
left: 0;
.mm-title,
.mm-prev,
.mm-next,
.mm-close
{
padding-top: $mm_headerPaddingTop;
}
.mm-title
{
@include mm_ellipsis;
display: inline-block;
width: 100%;
position: relative;
}
.mm-prev,
.mm-next,
.mm-close
{
text-decoration: none;
display: block;
box-sizing: border-box;
min-width: $mm_padding;
height: 100%;
position: absolute;
top: 0;
z-index: 1;
}
.mm-prev
{
padding-left: ( $mm_padding * 2 );
padding-right: $mm_padding;
left: 0;
}
.mm-next,
.mm-close
{
padding-left: $mm_padding;
padding-right: ( $mm_padding * 2 );
right: 0;
}
[href]
{
&.mm-prev:before,
&.mm-next:after
{
@include mm_arrow;
}
&.mm-prev:before
{
@include mm_arrow-prev;
margin-left: 2px;
margin-right: $mm_padding / 2;
}
&.mm-next:after,
&.mm-close:after
{
margin-left: $mm_padding / 2;
margin-right: -2px;
}
&.mm-next:after
{
@include mm_arrow-next;
}
&.mm-close:after
{
content: 'x';
}
}
}
.mm-menu.mm-hassearch .mm-header
{
height: $mm_headerHeight - $mm_padding;
top: $mm_searchHeight;
.mm-title,
.mm-prev,
.mm-next,
.mm-close
{
padding-top: $mm_headerPaddingTop - $mm_padding;
}
}
$mm_paddingBeneathHeader: $mm_padding * 2 !default;
.mm-menu.mm-hasheader
{
li.mm-subtitle
{
display: none;
}
> .mm-panel
{
padding-top: $mm_headerHeight + $mm_paddingBeneathHeader;
&.mm-list
{
padding-top: $mm_headerHeight;
}
> .mm-list:first-child
{
margin-top: -$mm_paddingBeneathHeader;
}
}
&.mm-hassearch > .mm-panel
{
padding-top: $mm_headerHeight + $mm_searchHeight + $mm_padding;
&.mm-list
{
padding-top: $mm_headerHeight + $mm_searchHeight - $mm_padding;
}
}
}
@include mm_colors_header;

View file

@ -0,0 +1,40 @@
/*
jQuery.mmenu labels addon CSS
*/
@import "../inc/variables";
.mm-list
{
li.mm-label
{
> span
{
@include mm_ellipsis;
padding: 0;
line-height: $mm_labelHeight;
}
&.mm-opened a.mm-subopen:after
{
@include mm_webkit-prefix( "transform", rotate( 45deg ) );
}
}
li.mm-collapsed:not( .mm-uncollapsed )
{
display: none;
}
}
.mm-menu.mm-vertical .mm-list
{
> li.mm-label
{
> a.mm-subopen:after
{
top: ( $mm_labelHeight / 2 ) - 4;
}
}
}
@include mm_colors_labels;

View file

@ -0,0 +1,70 @@
/*
jQuery.mmenu offcanvas addon CSS
*/
@import "../inc/variables";
// Animations
.mm-page
{
box-sizing: border-box;
position: relative;
-webkit-transition: -webkit-transform $mm_transitionDuration $mm_transitionFunction;
-ms-transition: -ms-transform $mm_transitionDuration $mm_transitionFunction;
transition: transform $mm_transitionDuration $mm_transitionFunction;
}
// Container, Page, Blocker
html.mm-opened
{
overflow: hidden;
position: relative;
body
{
overflow: hidden;
}
}
html.mm-background .mm-page
{
background: inherit;
}
#mm-blocker
{
background: rgba( 3, 2, 1, 0 );
display: none;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 999999;
}
html.mm-opened,
html.mm-blocking
{
#mm-blocker
{
display: block;
}
}
// Menu
.mm-menu
{
&.mm-offcanvas
{
display: none;
position: fixed;
}
&.mm-current
{
display: block;
}
}
@include mm_sizing;

View file

@ -0,0 +1,125 @@
/*
jQuery.mmenu searchfield addon CSS
*/
@import "../inc/variables";
.mm-search,
.mm-search input
{
box-sizing: border-box;
}
.mm-list
{
> li.mm-search
{
padding: $mm_padding;
margin-top: -( $mm_padding * 2 );
}
> li.mm-subtitle + li.mm-search
{
margin-top: 0;
}
}
div.mm-panel > div.mm-search
{
padding: 0 0 $mm_padding 0;
}
.mm-menu.mm-hasheader .mm-list > li.mm-search
{
margin-top: 0;
}
.mm-menu > .mm-search
{
background: inherit;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
}
.mm-search
{
padding: $mm_padding;
input
{
border: none;
border-radius: $mm_searchfieldHeight;
font: inherit;
font-size: $mm_fontSize;
line-height: $mm_searchfieldHeight;
outline: none;
display: block;
width: 100%;
height: $mm_searchfieldHeight;
margin: 0;
padding: 0 $mm_padding;
}
input::-ms-clear
{
display: none;
}
}
.mm-menu .mm-noresultsmsg
{
text-align: center;
font-size: round( $mm_fontSize * 1.5 );
display: none;
padding: ( $mm_btnSize * 1.5 ) 0;
&:after
{
border: none !important;
}
}
.mm-noresults .mm-noresultsmsg
{
display: block;
}
$mm_paddingBeneathHeader: $mm_padding * 2 !default;
.mm-menu
{
li.mm-nosubresults > a.mm-subopen
{
display: none;
+ a,
+ span
{
padding-right: 10px;
}
}
&.mm-hassearch
{
> .mm-panel
{
padding-top: $mm_searchHeight + $mm_paddingBeneathHeader;
> .mm-list:first-child
{
margin-top: -$mm_paddingBeneathHeader;
}
}
}
&.mm-hasheader
{
> .mm-panel
{
> div.mm-search:first-child
{
margin-top: -$mm_padding;
+ .mm-list
{
padding-top: 0;
}
}
}
}
}
@include mm_colors_searchfield;

View file

@ -0,0 +1,178 @@
/*
jQuery.mmenu toggles addon CSS
*/
@import "../inc/variables";
input.mm-toggle,
input.mm-check
{
position: absolute;
left: -10000px;
}
label.mm-toggle,
label.mm-check
{
margin: 0;
position: absolute;
bottom: 50%;
z-index: 2;
&:before
{
content: '';
display: block;
}
}
// styling
label.mm-toggle
{
border-radius: $mm_toggleHeight;
width: $mm_toggleWidth;
height: $mm_toggleHeight;
margin-bottom: -( $mm_toggleHeight / 2 );
&:before
{
border-radius: $mm_toggleHeight;
width: $mm_toggleHeight - 2;
height: $mm_toggleHeight - 2;
margin: 1px;
}
}
input.mm-toggle:checked ~ label.mm-toggle:before
{
float: right;
}
label.mm-check
{
width: $mm_checkWidth;
height: $mm_checkHeight;
margin-bottom: -( $mm_checkHeight / 2 );
&:before
{
border-left: 3px solid;
border-bottom: 3px solid;
width: 40%;
height: 20%;
margin: 25% 0 0 20%;
opacity: 0.1;
@include mm-webkit-prefix( 'transform', rotate( -45deg ) );
}
}
input.mm-check:checked ~ label.mm-check:before
{
opacity: 1;
}
// vertical submenu
.mm-menu.mm-vertical .mm-list
{
> li label
{
&.mm-toggle,
&.mm-check
{
bottom: auto;
margin-bottom: 0;
}
&.mm-toggle
{
top: ( $mm_btnSize - $mm_toggleHeight ) / 2;
}
&.mm-check
{
top: ( $mm_btnSize - $mm_checkHeight ) / 2;
}
}
}
// positioning
label
{
&.mm-toggle,
&.mm-check
{
right: $mm_padding * 2;
}
}
label.mm-toggle
{
+ a,
+ span
{
margin-right: $mm_toggleWidth + ( $mm_padding * 2 );
}
}
label.mm-check
{
+ a,
+ span
{
margin-right: $mm_checkWidth + ( $mm_padding * 2 );
}
}
// positioning with subopen
a.mm-subopen + label
{
&.mm-toggle,
&.mm-check
{
right: $mm_subopenWidth + $mm_padding;
}
}
a.mm-subopen + label.mm-toggle
{
+ a,
+ span
{
margin-right: $mm_subopenWidth + $mm_toggleWidth + $mm_padding;
}
}
a.mm-subopen + label.mm-check
{
+ a,
+ span
{
margin-right: $mm_subopenWidth + $mm_checkWidth + $mm_padding;
}
}
// positioning with counter
em.mm-counter + a.mm-subopen + label
{
&.mm-toggle,
&.mm-check
{
right: $mm_counterWidth + $mm_subopenWidth + $mm_padding;
}
}
em.mm-counter + a.mm-subopen + label.mm-toggle
{
+ a,
+ span
{
margin-right: $mm_counterWidth + $mm_subopenWidth + $mm_toggleWidth + $mm_padding;
}
}
em.mm-counter + a.mm-subopen + label.mm-check
{
+ a,
+ span
{
margin-right: $mm_counterWidth + $mm_subopenWidth + $mm_checkWidth + $mm_padding;
}
}
@include mm_colors_toggles;
@include mm_colors_checks;

View file

@ -0,0 +1,152 @@
/*
jQuery.mmenu effects extension CSS
*/
@import "../inc/variables";
// Slide
html.mm-slide
{
.mm-menu
{
-webkit-transition: -webkit-transform $mm_transitionDuration $mm_transitionFunction;
transition: transform $mm_transitionDuration $mm_transitionFunction;
}
// Left
&.mm-opened .mm-menu
{
@include mm_webkit-prefix( 'transform', translateX( -$mm_subpanelOffset ) );
}
&.mm-opening .mm-menu
{
@include mm_webkit-prefix( 'transform', translateX( 0% ) );
}
// Right
&.mm-right
{
&.mm-opened .mm-menu
{
@include mm_webkit-prefix( 'transform', translateX( $mm_subpanelOffset ) );
}
&.mm-opening .mm-menu
{
@include mm_webkit-prefix( 'transform', translateX( 0% ) );
}
}
// Top
&.mm-top
{
&.mm-opened .mm-menu
{
@include mm_webkit-prefix( 'transform', translateY( -$mm_subpanelOffset ) );
}
&.mm-opening .mm-menu
{
@include mm_webkit-prefix( 'transform', translateY( 0% ) );
}
}
// Bottom
&.mm-bottom
{
&.mm-opened .mm-menu
{
@include mm_webkit-prefix( 'transform', translateY( $mm_subpanelOffset ) );
}
&.mm-opening .mm-menu
{
@include mm_webkit-prefix( 'transform', translateY( 0% ) );
}
}
}
// Zoom menu
$mm_scaleDown: 0.7;
$mm_scaleUp: 1.5;
html.mm-zoom-menu
{
.mm-menu
{
-webkit-transition: -webkit-transform $mm_transitionDuration $mm_transitionFunction;
transition: transform $mm_transitionDuration $mm_transitionFunction;
}
// Left
&.mm-opened .mm-menu
{
@include mm_webkit-prefix( 'transform', scale( $mm_scaleDown, $mm_scaleDown ) translateX( -$mm_subpanelOffset ) );
@include mm_webkit-prefix( 'transform-origin', left center );
}
&.mm-opening .mm-menu
{
@include mm_webkit-prefix( 'transform', scale( 1, 1 ) translateX( 0% ) );
}
// Right
&.mm-right
{
&.mm-opened .mm-menu
{
@include mm_webkit-prefix( 'transform', scale( $mm_scaleDown, $mm_scaleDown) translateX( $mm_subpanelOffset ) );
@include mm_webkit-prefix( 'transform-origin', right center );
}
&.mm-opening .mm-menu
{
@include mm_webkit-prefix( 'transform', scale( 1, 1 ) translateX( 0% ) );
}
}
// Top
&.mm-top
{
&.mm-opened .mm-menu
{
@include mm_webkit-prefix( 'transform', scale( $mm_scaleDown, $mm_scaleDown ) translateY( -$mm_subpanelOffset ) );
@include mm_webkit-prefix( 'transform-origin', center top );
}
&.mm-opening .mm-menu
{
@include mm_webkit-prefix( 'transform', scale( 1, 1 ) translateY( 0% ) );
}
}
// Bottom
&.mm-bottom
{
&.mm-opened .mm-menu
{
@include mm_webkit-prefix( 'transform', scale( $mm_scaleDown, $mm_scaleDown ) translateY( $mm_subpanelOffset ) );
@include mm_webkit-prefix( 'transform-origin', center bottom );
}
&.mm-opening .mm-menu
{
@include mm_webkit-prefix( 'transform', scale( 1, 1 ) translateY( 0% ) );
}
}
}
// Zoom panels
html.mm-zoom-panels .mm-menu.mm-horizontal > .mm-panel
{
@include mm_webkit-prefix( 'transform', scale( $mm_scaleUp, $mm_scaleUp ) translateX( 100% ) );
@include mm_webkit-prefix( 'transform-origin', left center );
-webkit-transition-property: -webkit-transform, left;
transition-property: transform, left;
&.mm-opened
{
@include mm_webkit-prefix( 'transform', scale( 1, 1 ) translateX( 0% ) );
&.mm-subopened
{
@include mm_webkit-prefix( 'transform', scale( $mm_scaleDown, $mm_scaleDown ) translateX( -$mm_subpanelOffset ) );
}
}
}

View file

@ -0,0 +1,24 @@
/*
jQuery.mmenu fullscreen extension CSS
*/
@import "../inc/variables";
$mm_fs_class : ".mm-fullscreen";
$mm_fs_full : 1 !default;
$mm_fs_min : 140px !default;
$mm_fs_max : 10000px !default;
@include mm_sizing( $mm_fs_class,
$mm_fs_full, $mm_fs_min, $mm_fs_max );
@include mm_sizing_right( $mm_fs_class,
$mm_fs_full, $mm_fs_min, $mm_fs_max);
@include mm_sizing_zposition( $mm_fs_class,
$mm_fs_full, $mm_fs_min, $mm_fs_max );
html.mm-opened#{$mm_fs_class} .mm-page
{
box-shadow: none !important;
}

View file

@ -0,0 +1,31 @@
/*
jQuery.mmenu iconbar extension CSS
*/
@import "../inc/variables";
$mm_ib_pageOffset: $mm_btnSize + ( $mm_padding * 2 ) !default;
body
{
overflow-x: hidden;
}
.mm-page
{
background: inherit;
min-height: 100vh;
padding-right: $mm_ib_pageOffset;
@include mm-webkit-prefix( 'transform', translateX( $mm_ib_pageOffset ) );
}
.mm-menu
{
&:first-child,
&.mm-current
{
display: block;
}
}

View file

@ -0,0 +1,98 @@
/*
jQuery.mmenu position extension CSS
*/
@import "../inc/variables";
// top
// bottom
.mm-menu.mm-top,
.mm-menu.mm-bottom
{
width: 100%;
min-width: 100%;
max-width: 100%;
}
// right
.mm-menu.mm-right
{
left: auto;
right: 0;
}
// bottom
.mm-menu.mm-bottom
{
top: auto;
bottom: 0;
}
@include mm_sizing_right;
/*
jQuery.mmenu z-position extension CSS
*/
// reset defaults
html.mm-front
{
.mm-page,
#mm-blocker
{
@include mm-webkit-prefix( 'transform', translate( 0, 0 ) !important );
z-index: 0;
}
}
// styling
.mm-menu.mm-front
{
z-index: 1;
box-shadow: 0 0 15px rgba( 0, 0, 0, 0.5 );
}
html.mm-opened.mm-next .mm-page
{
box-shadow: none;
}
// animations
.mm-menu
{
&.mm-front,
&.mm-next
{
-webkit-transition: -webkit-transform $mm_transitionDuration $mm_transitionFunction;
transition: transform $mm_transitionDuration $mm_transitionFunction;
@include mm-webkit-prefix( 'transform', translate( -100%, 0 ) );
&.mm-right
{
@include mm-webkit-prefix( 'transform', translate( 100%, 0 ) );
}
}
&.mm-front
{
&.mm-top
{
@include mm-webkit-prefix( 'transform', translate( 0, -100% ) );
}
&.mm-bottom
{
@include mm-webkit-prefix( 'transform', translate( 0, 100% ) );
}
}
}
html.mm-opening .mm-menu
{
&.mm-front,
&.mm-next
{
@include mm-webkit-prefix( 'transform', translate( 0, 0 ) );
}
}
@include mm_sizing_zposition;

View file

@ -0,0 +1,82 @@
/*
jQuery.mmenu themes extension CSS
*/
@import "../inc/variables";
@mixin mm_apply_theme()
{
@include mm_colors( $mm_t_cls,
$mm_t_backgroundColor, $mm_t_pageShadow,
$mm_t_textColor, $mm_t_dimmedTextColor,
$mm_t_emphasizedBackgroundColor, $mm_t_highlightedBackgroundColor,
$mm_t_borderColor );
@include mm_colors_buttonbars( $mm_t_cls,
$mm_t_backgroundColor,
$mm_t_textColor );
@include mm_colors_checks( $mm_t_cls,
$mm_t_textColor );
@include mm_colors_counters( $mm_t_cls,
$mm_t_dimmedTextColor );
@include mm_colors_footer( $mm_t_cls,
$mm_t_dimmedTextColor,
$mm_t_borderColor );
@include mm_colors_header( $mm_t_cls,
$mm_t_dimmedTextColor,
$mm_t_borderColor );
@include mm_colors_labels( $mm_t_cls,
$mm_t_highlightedBackgroundColor );
@include mm_colors_searchfield( $mm_t_cls,
$mm_t_inputBackgroundColor, $mm_t_textColor,
$mm_t_dimmedTextColor );
@include mm_colors_toggles( $mm_t_cls,
$mm_t_backgroundColor,
$mm_t_borderColor );
}
// Light
$mm_t_cls : ".mm-light";
$mm_t_pageShadow : 0 0 10px rgba( 0, 0, 0, 0.3 );
$mm_t_borderColor : rgba( 0, 0, 0, 0.1 );
$mm_t_backgroundColor : #f3f3f3;
$mm_t_emphasizedBackgroundColor : rgba( 255, 255, 255, 0.6 );
$mm_t_highlightedBackgroundColor: rgba( 0, 0, 0, 0.03 );
$mm_t_textColor : rgba( 0, 0, 0, 0.6 );
$mm_t_dimmedTextColor : rgba( 0, 0, 0, 0.3 );
$mm_t_inputBackgroundColor : rgba( 0, 0, 0, 0.1 );
@include mm_apply_theme;
// White
$mm_t_cls : ".mm-white";
$mm_t_pageShadow : 0 0 10px rgba( 0, 0, 0, 0.3 );
$mm_t_borderColor : rgba( 0, 0, 0, 0.1 );
$mm_t_backgroundColor : #fff;
$mm_t_emphasizedBackgroundColor : rgba( 0, 0, 0, 0.06 );
$mm_t_highlightedBackgroundColor: rgba( 0, 0, 0, 0.03 );
$mm_t_textColor : rgba( 0, 0, 0, 0.6 );
$mm_t_dimmedTextColor : rgba( 0, 0, 0, 0.3 );
$mm_t_inputBackgroundColor : rgba( 0, 0, 0, 0.1 );
@include mm_apply_theme;
// Black
$mm_t_cls : ".mm-black";
$mm_t_pageShadow : none;
$mm_t_borderColor : rgba( 255, 255, 255, 0.2 );
$mm_t_backgroundColor : #000;
$mm_t_emphasizedBackgroundColor : rgba( 255, 255, 255, 0.25 );
$mm_t_highlightedBackgroundColor: rgba( 255, 255, 255, 0.15 );
$mm_t_textColor : rgba( 255, 255, 255, 0.6 );
$mm_t_dimmedTextColor : rgba( 255, 255, 255, 0.3 );
$mm_t_inputBackgroundColor : rgba( 255, 255, 255, 0.3 );
@include mm_apply_theme;

View file

@ -0,0 +1,60 @@
/*
jQuery.mmenu widescreen extension CSS
To use on widescreens only, include it using a mediaquery:
<link type="text/css" href="mmenu-widescreen.css" media="all and (min-width: 900px)"/>
*/
@import "../inc/variables";
$mm_ws_menuWidth: 0.3 !default;
// Positioning and sizing
html, body
{
overflow: auto;
}
body
{
padding-left: percentage( $mm_ws_menuWidth ) !important;
position: relative;
}
#mm-blocker
{
display: none !important;
}
.mm-page
{
box-shadow: none !important;
background: inherit;
box-sizing: border-box;
min-height: 100vh;
height: auto !important;
margin: 0 !important;
position: relative !important;
top: 0 !important;
z-index: 1;
}
.mm-menu
{
width: percentage( $mm_ws_menuWidth ) !important;
z-index: 0;
&.mm-top,
&.mm-right,
&.mm-bottom
{
top: 0 !important;
right: auto !important;
bottom: auto !important;
left: 0 !important;
}
&:first-child,
&.mm-current
{
display: block;
}
}

View file

@ -0,0 +1,198 @@
@mixin mm_colors( $cls: "",
$baseBg: $mm_backgroundColor, $pageShadow: $mm_pageShadow,
$color: $mm_textColor, $dimmedColor: $mm_dimmedTextColor,
$emphasizedBg: $mm_emphasizedBackgroundColor, $highlightedBg: $mm_highlightedBackgroundColor,
$borderColor: $mm_borderColor
) {
html.mm-opened#{$cls} .mm-page
{
box-shadow: $pageShadow;
}
.mm-menu#{$cls}
{
background: $baseBg;
color: $color;
.mm-list
{
> li:after
{
border-color: $borderColor;
}
> li
{
> a
{
&.mm-subclose
{
background: $emphasizedBg;
color: $dimmedColor;
}
&.mm-subopen:after,
&.mm-subclose:before
{
border-color: $dimmedColor;
}
&.mm-subopen:before
{
border-color: $borderColor;
}
}
}
> li.mm-selected
{
> a:not(.mm-subopen),
> span
{
background: $emphasizedBg;
}
}
> li.mm-label
{
background: $highlightedBg;
}
}
&.mm-vertical .mm-list
{
li.mm-opened
{
> a.mm-subopen,
> ul
{
background: $highlightedBg;
}
}
}
}
}
@mixin mm_colors_buttonbars( $cls: "",
$baseBg: $mm_backgroundColor,
$color: $mm_textColor
) {
.mm-menu#{$cls}
{
.mm-buttonbar
{
border-color: $color;
background: $baseBg;
> *
{
border-color: $color;
}
> input:checked + label
{
background: $color;
color: $baseBg;
}
}
}
}
@mixin mm_colors_checks( $cls: "",
$color: $mm_textColor
) {
.mm-menu#{$cls} label.mm-check:before
{
border-color: $color;
}
}
@mixin mm_colors_counters( $cls: "",
$dimmedColor: $mm_dimmedTextColor
) {
.mm-menu#{$cls} em.mm-counter
{
color: $dimmedColor;
}
}
@mixin mm_colors_footer( $cls: "",
$dimmedColor: $mm_dimmedTextColor,
$borderColor: $mm_borderColor
) {
.mm-menu#{$cls}
{
.mm-footer
{
border-color: $borderColor;
color: $dimmedColor;
}
}
}
@mixin mm_colors_header( $cls: "",
$dimmedColor: $mm_dimmedTextColor,
$borderColor: $mm_borderColor
) {
.mm-menu#{$cls}
{
.mm-header
{
border-color: $borderColor;
color: $dimmedColor;
.mm-prev:before,
.mm-next:after,
.mm-close:after
{
border-color: $dimmedColor;
}
}
}
}
@mixin mm_colors_labels( $cls: "",
$highlightedBg: $mm_highlightedBackgroundColor
) {
.mm-menu#{$cls}
{
.mm-list li.mm-label > div > div
{
background: $highlightedBg;
}
}
}
@mixin mm_colors_searchfield( $cls: "",
$inputBg: $mm_dimmedTextColor, $color: $mm_textColor,
$dimmedColor: $mm_dimmedTextColor
) {
.mm-menu#{$cls}
{
.mm-search input
{
background: $inputBg;
color: $color;
}
.mm-noresultsmsg
{
color: $dimmedColor;
}
}
}
@mixin mm_colors_toggles( $cls: "",
$buttonBg: $mm_backgroundColor,
$offBg: $mm_borderColor, $onBg: $mm_toggleCheckedColor
) {
.mm-menu#{$cls}
{
label.mm-toggle
{
background: $offBg;
&:before
{
background: $buttonBg;
}
}
input.mm-toggle:checked ~ label.mm-toggle
{
background: $onBg;
}
}
}

View file

@ -0,0 +1,87 @@
// Arrows
@mixin mm_arrow
{
content: '';
border: 2px solid transparent;
display: inline-block;
width: 7px;
height: 7px;
@include mm_webkit-prefix( "transform", rotate( -45deg ) );
}
@mixin mm_arrow-prev
{
border-right: none;
border-bottom: none;
}
@mixin mm_arrow-next
{
border-top: none;
border-left: none;
}
// Borders
@mixin mm_border( $border, $pseudo, $size, $pos1, $pos2 )
{
&:#{$pseudo}
{
content: '';
border-#{$border}-width: 1px;
border-#{$border}-style: solid;
display: block;
#{$size}: 100%;
position: absolute;
#{$pos1}: 0;
#{$pos2}: 0;
}
}
@mixin mm_border-top
{
@include mm_border( "top", "before", "width", "top", "left" );
}
@mixin mm_border-right
{
@include mm_border( "right", "after", "height", "right", "top" );
}
@mixin mm_border-bottom
{
@include mm_border( "bottom", "after", "width", "bottom", "left" );
}
@mixin mm_border-left
{
@include mm_border( "left", "before", "height", "left", "top" );
}
// Misc
@mixin mm_vendor-prefix( $prop, $val )
{
-webkit-#{$prop}: $val;
-moz-#{$prop}: $val;
-ms-#{$prop}: $val;
-o-#{$prop}: $val;
#{$prop}: $val;
}
@mixin mm_webkit-prefix( $prop, $val )
{
// we're not yet ready to drop vendor prefixes due to IE9 and older versions of FF
@include mm_vendor_prefix( $prop, $val );
// -webkit-#{$prop}: $val;
// #{$prop}: $val;
}
@mixin mm_ellipsis()
{
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
@mixin mm_clearfix()
{
&:after
{
content: '';
display: block;
clear: both;
}
}

View file

@ -0,0 +1,92 @@
// Sizing left (default)
@mixin mm_sizing( $cls: "",
$width: $mm_width, $minWidth: $mm_minWidth, $maxWidth: $mm_maxWidth
) {
.mm-menu#{$cls}
{
width: percentage( $width );
min-width: $minWidth;
max-width: $maxWidth;
}
html.mm-opening#{$cls}
{
.mm-page,
#mm-blocker
{
@include mm-webkit-prefix( 'transform', translate( percentage( $width ), 0 ) );
}
}
@media all and (max-width: $minWidth / $width ) {
html.mm-opening#{$cls}
{
.mm-page,
#mm-blocker
{
@include mm-webkit-prefix( 'transform', translate( $minWidth, 0 ) );
}
}
}
@media all and (min-width: $maxWidth / $width ) {
html.mm-opening#{$cls}
{
.mm-page,
#mm-blocker
{
@include mm-webkit-prefix( 'transform', translate( $maxWidth, 0 ) );
}
}
}
}
// Sizing right
@mixin mm_sizing_right( $cls: "",
$width: $mm_width, $minWidth: $mm_minWidth, $maxWidth: $mm_maxWidth
) {
html.mm-right.mm-opening#{$cls}
{
.mm-page,
#mm-blocker
{
@include mm-webkit-prefix( 'transform', translate( -( percentage( $width ) ), 0 ) );
}
}
@media all and ( max-width: $minWidth / $width ) {
html.mm-right.mm-opening#{$cls}
{
.mm-page,
#mm-blocker
{
@include mm-webkit-prefix( 'transform', translate( -$minWidth, 0 ) );
}
}
}
@media all and ( min-width: $maxWidth / $width ) {
html.mm-right.mm-opening#{$cls}
{
.mm-page,
#mm-blocker
{
@include mm-webkit-prefix( 'transform', translate( -$maxWidth, 0 ) );
}
}
}
}
// Sizing z-position
@mixin mm_sizing_zposition( $cls: "",
$height: $mm_height, $minHeight: $mm_minHeight, $maxHeight: $mm_maxHeight
) {
// top
// bottom
.mm-menu.mm-front#{$cls}
{
&.mm-top,
&.mm-bottom
{
height: percentage( $height );
min-height: $minHeight;
max-height: $maxHeight;
}
}
}

View file

@ -0,0 +1,58 @@
// Animations
$mm_transitionDuration: 0.4s !default;
$mm_transitionFunction: ease !default;
// Sizes
$mm_width : 0.8 !default;
$mm_minWidth : 140px !default;
$mm_maxWidth : 440px !default;
$mm_height : 0.8 !default;
$mm_minHeight : 140px !default;
$mm_maxHeight : 880px !default;
$mm_btnSize : 40px !default;
$mm_padding : 10px !default;
$mm_fontSize : 14px !default;
$mm_subpanelOffset : 30% !default;
$mm_subopenWidth : $mm_btnSize !default;
// Addon sizes
$mm_buttonbarHeight : $mm_btnSize - ( $mm_padding * 2 ) !default;
$mm_counterWidth : $mm_btnSize !default;
$mm_toggleHeight : $mm_btnSize - $mm_padding !default;
$mm_toggleWidth : ( $mm_toggleHeight * 2 ) - $mm_padding !default;
$mm_checkHeight : $mm_btnSize - $mm_padding !default;
$mm_checkWidth : $mm_btnSize - $mm_padding !default;
$mm_footerHeight : $mm_btnSize;
$mm_headerHeight : $mm_btnSize * 1.5 !default;
$mm_headerPaddingTop : $mm_headerHeight / 2 !default;
$mm_labelHeight : ( $mm_btnSize / 2 ) + ( $mm_padding / 2 ) !default;
$mm_searchHeight : $mm_btnSize + $mm_padding !default;
$mm_searchfieldHeight : $mm_searchHeight - ( $mm_padding * 2 ) !default;
// Colors
$mm_pageShadow : none; //0 0 20px rgba( 0, 0, 0, 0.5 ) !default;
$mm_borderColor : rgba( 0, 0, 0, 0.15 ) !default;
$mm_backgroundColor : #222 !default;
$mm_emphasizedBackgroundColor : rgba( 0, 0, 0, 0.1 ) !default;
$mm_highlightedBackgroundColor : rgba( 255, 255, 255, 0.05 ) !default;
$mm_textColor : rgba( 255, 255, 255, 0.8 ) !default;
$mm_dimmedTextColor : rgba( 255, 255, 255, 0.5 ) !default;
// Addon colors
$mm_toggleCheckedColor : #4bd963 !default;
@import "mixins";
@import "sizing";
@import "colors";

View file

@ -0,0 +1,15 @@
@import "jquery.mmenu";
@import "addons/jquery.mmenu.buttonbars";
@import "addons/jquery.mmenu.counters";
@import "addons/jquery.mmenu.dragopen";
@import "addons/jquery.mmenu.footer";
@import "addons/jquery.mmenu.header";
@import "addons/jquery.mmenu.labels";
@import "addons/jquery.mmenu.searchfield";
@import "addons/jquery.mmenu.toggles";
@import "extensions/jquery.mmenu.effects";
@import "extensions/jquery.mmenu.fullscreen";
@import "extensions/jquery.mmenu.positioning";
@import "extensions/jquery.mmenu.themes";

View file

@ -0,0 +1,298 @@
/*
jQuery.mmenu panels CSS
*/
@import "inc/variables";
// Animations
.mm-menu.mm-horizontal > .mm-panel
{
-webkit-transition: -webkit-transform $mm_transitionDuration $mm_transitionFunction;
transition: transform $mm_transitionDuration $mm_transitionFunction;
}
// Generic classes
.mm-menu .mm-hidden
{
display: none;
}
// Container
.mm-wrapper
{
overflow-x: hidden;
position: relative;
}
// Menu
.mm-menu,
.mm-menu > .mm-panel
{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 0;
}
.mm-menu
{
background: inherit;
display: block;
overflow: hidden;
padding: 0;
> .mm-panel
{
background: inherit;
-webkit-overflow-scrolling: touch;
overflow: scroll;
overflow-x: hidden;
overflow-y: auto;
box-sizing: border-box;
padding: $mm_padding * 2;
@include mm_webkit-prefix( 'transform', translateX( 100% ) );
&.mm-opened
{
@include mm_webkit-prefix( 'transform', translateX( 0% ) );
}
&.mm-subopened
{
@include mm_webkit-prefix( 'transform', translateX( -$mm_subpanelOffset ) );
}
&.mm-highest
{
z-index: 1;
}
}
// Lists
.mm-list
{
padding: ( $mm_btnSize / 2 ) 0;
}
> .mm-list
{
padding-bottom: 0;
&:after
{
content: '';
display: block;
height: $mm_btnSize;
}
}
}
.mm-panel > .mm-list
{
margin-left: -( $mm_padding * 2 );
margin-right: -( $mm_padding * 2 );
&:first-child
{
padding-top: 0;
}
}
.mm-list,
.mm-list > li
{
list-style: none;
display: block;
padding: 0;
margin: 0;
}
.mm-list
{
font: inherit;
font-size: $mm_fontSize;
a,
a:hover
{
text-decoration: none;
}
> li
{
position: relative;
> a,
> span
{
@include mm_ellipsis;
color: inherit;
line-height: $mm_btnSize - ( $mm_padding * 2 );
display: block;
padding: $mm_padding $mm_padding $mm_padding ( $mm_padding * 2 );
margin: 0;
}
}
> li:not(.mm-subtitle):not(.mm-label):not(.mm-search):not(.mm-noresults)
{
@include mm_border-bottom;
&:after
{
width: auto;
margin-left: ( $mm_padding * 2 );
position: relative;
left: auto;
}
}
// subopen/close
a.mm-subopen
{
@include mm_border-left;
background: rgba( 3, 2, 1, 0 );
width: $mm_subopenWidth;
height: 100%;
padding: 0;
position: absolute;
right: 0;
top: 0;
z-index: 2;
&.mm-fullsubopen
{
width: 100%;
&:before
{
border-left: none;
}
}
+ a,
+ span
{
padding-right: ( $mm_padding / 2 );
margin-right: $mm_subopenWidth;
}
}
> li.mm-selected
{
> a.mm-subopen
{
background: transparent;
}
> a.mm-fullsubopen
{
+ a,
+ span
{
padding-right: $mm_btnSize + ( $mm_padding / 2 );
margin-right: 0;
}
}
}
a.mm-subclose
{
text-indent: $mm_btnSize - ( $mm_padding * 2 );
padding-top: ( $mm_btnSize / 2 ) + $mm_padding;
margin-top: -( $mm_btnSize / 2 );
}
// Labels
> li.mm-label
{
@include mm_ellipsis;
font-size: 10px;
text-transform: uppercase;
text-indent: $mm_padding * 2;
line-height: $mm_labelHeight;
padding-right: $mm_padding / 2;
}
// Spacers
> li.mm-spacer
{
padding-top: $mm_btnSize;
&.mm-label
{
padding-top: $mm_labelHeight;
}
}
// Arrows
a.mm-subopen:after,
a.mm-subclose:before
{
@include mm_arrow;
margin-bottom: -5px;
position: absolute;
bottom: 50%;
}
a.mm-subopen:after
{
@include mm_arrow-next;
right: 18px;
}
a.mm-subclose:before
{
@include mm_arrow-prev;
margin-bottom: -( $mm_padding * 2 ) + 5;
left: 22px;
}
}
// vertical submenu
.mm-menu.mm-vertical .mm-list
{
.mm-panel
{
display: none;
padding: $mm_padding 0 $mm_padding $mm_padding;
li:last-child:after
{
border-color: transparent;
}
}
li.mm-opened > .mm-panel
{
display: block;
}
> li
{
> a.mm-subopen
{
height: $mm_btnSize;
&:after
{
top: ( $mm_btnSize / 2 ) - 4;
bottom: auto;
}
}
&.mm-opened
{
> a.mm-subopen:after
{
@include mm_webkit-prefix( "transform", rotate( 45deg ) );
}
}
&.mm-label > a.mm-subopen
{
height: $mm_labelHeight;
}
}
}
@include mm_colors;

View file

@ -0,0 +1,6 @@
/*
jQuery.mmenu CSS
*/
@import "jquery.mmenu.oncanvas";
@import "addons/jquery.mmenu.offcanvas";