Skip to content

Commit

Permalink
Add mobile menu (mmenu)
Browse files Browse the repository at this point in the history
  • Loading branch information
Osvaldo Matos-Junior committed May 25, 2014
1 parent c608ac5 commit 7d4cd72
Show file tree
Hide file tree
Showing 9 changed files with 407 additions and 6 deletions.
302 changes: 302 additions & 0 deletions bolao/static/css/jquery.mmenu.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,302 @@
/*
jQuery.mmenu CSS
*/
.mm-page,
.mm-fixed-top,
.mm-fixed-bottom,
.mm-menu.mm-horizontal > .mm-panel {
-webkit-transition: none 0.4s ease;
-moz-transition: none 0.4s ease;
-ms-transition: none 0.4s ease;
-o-transition: none 0.4s ease;
transition: none 0.4s ease;
-webkit-transition-property: top, right, bottom, left, border;
-moz-transition-property: top, right, bottom, left, border;
-ms-transition-property: top, right, bottom, left, border;
-o-transition-property: top, right, bottom, left, border;
transition-property: top, right, bottom, left, border; }

html.mm-opened .mm-page,
html.mm-opened #mm-blocker {
left: 0;
top: 0;
margin: 0;
border: 0px solid rgba(0, 0, 0, 0); }

html.mm-opening .mm-page,
html.mm-opening #mm-blocker {
border: 0px solid rgba(100, 100, 100, 0); }

.mm-menu .mm-hidden {
display: none; }

.mm-fixed-top,
.mm-fixed-bottom {
position: fixed;
left: 0; }

.mm-fixed-top {
top: 0; }

.mm-fixed-bottom {
bottom: 0; }

html.mm-opened .mm-page,
.mm-menu > .mm-panel {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box; }

html.mm-opened {
overflow-x: hidden;
position: relative; }

html.mm-opened .mm-page {
position: relative; }

html.mm-background .mm-page {
background: inherit; }

#mm-blocker {
background: url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==) transparent;
display: none;
width: 100%;
height: 100%;
position: fixed;
z-index: 999999; }

html.mm-opened #mm-blocker,
html.mm-blocking #mm-blocker {
display: block; }

.mm-menu.mm-current {
display: block; }

.mm-menu {
background: inherit;
display: none;
overflow: hidden;
height: 100%;
padding: 0;
position: fixed;
left: 0;
top: 0;
z-index: 0; }
.mm-menu > .mm-panel {
background: inherit;
-webkit-overflow-scrolling: touch;
overflow: scroll;
overflow-x: hidden;
overflow-y: auto;
width: 100%;
height: 100%;
padding: 20px;
position: absolute;
top: 0;
left: 100%;
z-index: 0; }
.mm-menu > .mm-panel.mm-opened {
left: 0%; }
.mm-menu > .mm-panel.mm-subopened {
left: -40%; }
.mm-menu > .mm-panel.mm-highest {
z-index: 1; }
.mm-menu > .mm-panel.mm-hidden {
display: block;
visibility: hidden; }

.mm-menu .mm-list {
padding: 20px 0; }
.mm-menu > .mm-list {
padding: 20px 0 40px 0; }

.mm-panel > .mm-list {
margin-left: -20px;
margin-right: -20px; }
.mm-panel > .mm-list: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: 14px; }
.mm-list a,
.mm-list a:hover {
text-decoration: none; }
.mm-list > li {
position: relative; }
.mm-list > li > a,
.mm-list > li > span {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: inherit;
line-height: 20px;
display: block;
padding: 10px 10px 10px 20px;
margin: 0; }
.mm-list > li:not(.mm-subtitle):not(.mm-label):not(.mm-noresults):after {
content: '';
border-bottom-width: 1px;
border-bottom-style: solid;
display: block;
width: 100%;
position: absolute;
bottom: 0;
left: 0; }
.mm-list > li:not(.mm-subtitle):not(.mm-label):not(.mm-noresults):after {
width: auto;
margin-left: 20px;
position: relative;
left: auto; }
.mm-list a.mm-subopen {
width: 40px;
height: 100%;
padding: 0;
position: absolute;
right: 0;
top: 0;
z-index: 2; }
.mm-list a.mm-subopen:before {
content: '';
border-left-width: 1px;
border-left-style: solid;
display: block;
height: 100%;
position: absolute;
left: 0;
top: 0; }
.mm-list a.mm-subopen.mm-fullsubopen {
width: 100%; }
.mm-list a.mm-subopen.mm-fullsubopen:before {
border-left: none; }
.mm-list a.mm-subopen + a,
.mm-list a.mm-subopen + span {
padding-right: 5px;
margin-right: 40px; }
.mm-list > li.mm-selected > a.mm-subopen {
background: transparent; }
.mm-list > li.mm-selected > a.mm-fullsubopen + a,
.mm-list > li.mm-selected > a.mm-fullsubopen + span {
padding-right: 45px;
margin-right: 0; }
.mm-list a.mm-subclose {
text-indent: 20px;
padding-top: 30px;
margin-top: -20px; }
.mm-list > li.mm-label {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 10px;
text-transform: uppercase;
text-indent: 20px;
line-height: 25px;
padding-right: 5px; }
.mm-list > li.mm-spacer {
padding-top: 40px; }
.mm-list > li.mm-spacer.mm-label {
padding-top: 25px; }
.mm-list a.mm-subopen:after,
.mm-list a.mm-subclose:before {
content: '';
border: 2px solid transparent;
display: block;
width: 7px;
height: 7px;
margin-bottom: -5px;
position: absolute;
bottom: 50%;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg); }
.mm-list a.mm-subopen:after {
border-top: none;
border-left: none;
right: 18px; }
.mm-list a.mm-subclose:before {
border-right: none;
border-bottom: none;
margin-bottom: -15px;
left: 22px; }

.mm-menu.mm-vertical .mm-list .mm-panel {
display: none;
padding: 10px 0 10px 10px; }
.mm-menu.mm-vertical .mm-list .mm-panel li:last-child:after {
border-color: transparent; }
.mm-menu.mm-vertical .mm-list li.mm-opened > .mm-panel {
display: block; }
.mm-menu.mm-vertical .mm-list > li.mm-opened > a.mm-subopen {
height: 40px; }
.mm-menu.mm-vertical .mm-list > li.mm-opened > a.mm-subopen:after {
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
top: 16px;
right: 16px; }

html.mm-opened .mm-page {
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); }

.mm-ismenu {
background: #333333;
color: rgba(255, 255, 255, 0.6); }

.mm-menu .mm-list > li:after {
border-color: rgba(0, 0, 0, 0.15); }
.mm-menu .mm-list > li > a.mm-subclose {
background: rgba(0, 0, 0, 0.1);
color: rgba(255, 255, 255, 0.3); }
.mm-menu .mm-list > li > a.mm-subopen:after, .mm-menu .mm-list > li > a.mm-subclose:before {
border-color: rgba(255, 255, 255, 0.3); }
.mm-menu .mm-list > li > a.mm-subopen:before {
border-color: rgba(0, 0, 0, 0.15); }
.mm-menu .mm-list > li.mm-selected > a:not(.mm-subopen),
.mm-menu .mm-list > li.mm-selected > span {
background: rgba(0, 0, 0, 0.1); }
.mm-menu .mm-list > li.mm-label {
background: rgba(255, 255, 255, 0.05); }
.mm-menu.mm-vertical .mm-list li.mm-opened > a.mm-subopen,
.mm-menu.mm-vertical .mm-list li.mm-opened > ul {
background: rgba(255, 255, 255, 0.05); }

html.mm-opening .mm-page,
html.mm-opening #mm-blocker,
html.mm-opening .mm-fixed-top,
html.mm-opening .mm-fixed-bottom {
left: 80%; }

.mm-menu {
width: 80%; }

@media all and (max-width: 175px) {
.mm-menu {
width: 140px; }

html.mm-opening .mm-page,
html.mm-opening #mm-blocker,
html.mm-opening .mm-fixed-top,
html.mm-opening .mm-fixed-bottom {
left: 140px; } }
@media all and (min-width: 550px) {
.mm-menu {
width: 440px; }

html.mm-opening .mm-page,
html.mm-opening #mm-blocker,
html.mm-opening .mm-fixed-top,
html.mm-opening .mm-fixed-bottom {
left: 440px; } }
52 changes: 52 additions & 0 deletions bolao/static/css/mobile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
html, body
{
padding: 0;
margin: 0;
}

body {
background-color: #f9f9f9;
font-family: Arial, Helvetica, Verdana;
font-size: 14px;
line-height: 22px;
color: #333;
position: relative;
-webkit-text-size-adjust: none;
}
body *
{
text-shadow: none;
}
#page nav
{
display: none;
}

#header,
.header,
#footer
{
background: #555;
font-size: 16px;
font-weight: bold;
color: #fff;
text-align: center;
line-height: 40px;
height: 40px;
padding: 0 50px;
}

#header a,
.header a
{
background: center center no-repeat transparent;
background-image: url( data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADhJREFUeNpi/P//PwOtARMDHQBdLGFBYtMq3BiHT3DRPU4YR4NrNAmPJuHRJDyahEeT8Ii3BCDAAF0WBj5Er5idAAAAAElFTkSuQmCC );

display: block;
width: 40px;
height: 40px;
position: absolute;
top: 0;
left: 10px;
}

14 changes: 14 additions & 0 deletions bolao/static/js/jquery.mmenu.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7d4cd72

Please sign in to comment.