Skip to content

Commit

Permalink
added black and white colors
Browse files Browse the repository at this point in the history
  • Loading branch information
FrDH committed Apr 9, 2014
1 parent f51ee5c commit 1ceb1bf
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions demo/colors.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,18 @@
{
background: #333;
}
#themes a.black:before
{
background: #000;
}
#themes a.light:before
{
background: #f3f3f3;
}
#themes a.white:before
{
background: #fff;
}
#themes a.army:before,
html.army .mm-menu
{
Expand All @@ -69,9 +77,21 @@
$html = $('html');

$('#themes a').click(function() {
$menu[ this.className == 'light' ? 'addClass' : 'removeClass' ]( 'mm-light' );
$html.removeAttr( 'class' );
$html.addClass( this.className == 'light' ? 'mm-light' : this.className );
$menu.removeClass( 'mm-black' ).removeClass( 'mm-light' ).removeClass( 'mm-white' );

switch( this.className )
{
case 'black':
case 'light':
case 'white':
$html.addClass( 'mm-' + this.className );
$menu.addClass( 'mm-' + this.className );
break;

default:
$html.addClass( this.className );
}
});

$menu.mmenu();
Expand All @@ -93,7 +113,9 @@

<div id="themes">
<a href="#menu" class="dark">Dark theme <small>(default)</small></a>
<a href="#menu" class="light">Light theme</a>
<a href="#menu" class="black">Black theme <small>(predefined)</small></a>
<a href="#menu" class="light">Light theme <small>(predefined)</small></a>
<a href="#menu" class="white">White theme <small>(predefined)</small></a>
<a href="#menu" class="army">Army <small>(dark theme with custom background)</small></a>
<a href="#menu" class="navy">Navy <small>(dark theme with custom background)</small></a>
<a href="#menu" class="bordeau">Bordeau <small>(dark theme with custom background)</small></a>
Expand Down

0 comments on commit 1ceb1bf

Please sign in to comment.