mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-16 04:51:50 -05:00
Much improved mobile menu
When screen width goes below 1076px the menu disappears, being replaced by a button. Clicking the button displayed the default twitter bootstrap, which was pretty icky. Now it displays a much nicer slide in menu from the right.
This commit is contained in:
176
awx/ui/static/less/jPushMenu.less
Normal file
176
awx/ui/static/less/jPushMenu.less
Normal file
@@ -0,0 +1,176 @@
|
||||
/*********************************************
|
||||
* Copyright (c) 2014 AnsibleWorks, Inc.
|
||||
*
|
||||
* jPushMenu.less
|
||||
*
|
||||
* Custom styles for slideout menu
|
||||
*
|
||||
*/
|
||||
.cbp-spmenu {
|
||||
background: #E8E8E8;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.cbp-spmenu h3 {
|
||||
color: @white;
|
||||
font-size: 14px;
|
||||
padding: 15px 10px 15px 10px;
|
||||
margin: 0;
|
||||
font-weight: 600;
|
||||
background: @grey;
|
||||
}
|
||||
|
||||
.cbp-spmenu a {
|
||||
display: block;
|
||||
color: @grey-txt;
|
||||
font-size: 1.1em;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.cbp-spmenu a:hover {
|
||||
background: #D8D8D8;
|
||||
color: @black;
|
||||
}
|
||||
|
||||
.cbp-spmenu a.active {
|
||||
background: #E8E8E8;
|
||||
color: @black;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Orientation-dependent styles for the content of the menu */
|
||||
|
||||
.cbp-spmenu-vertical {
|
||||
width: 240px;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
z-index: 1100;
|
||||
overflow-y:auto;
|
||||
}
|
||||
|
||||
.cbp-spmenu-vertical a {
|
||||
border-bottom: 1px solid #D8D8D8;
|
||||
padding: 10px 10px 10px 20px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-horizontal {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cbp-spmenu-horizontal h3 {
|
||||
height: 100%;
|
||||
width: 20%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.cbp-spmenu-horizontal a {
|
||||
float: left;
|
||||
width: 20%;
|
||||
padding: 0.8em;
|
||||
border-left: 1px solid #258ecd;
|
||||
}
|
||||
|
||||
/* Vertical menu that slides from the left or right */
|
||||
|
||||
.cbp-spmenu-left {
|
||||
left: -240px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-right {
|
||||
right: -240px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-left.cbp-spmenu-open {
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-right.cbp-spmenu-open {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
/* Horizontal menu that slides from the top or bottom */
|
||||
|
||||
.cbp-spmenu-top {
|
||||
top: -150px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-bottom {
|
||||
bottom: -150px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-top.cbp-spmenu-open {
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-bottom.cbp-spmenu-open {
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
/* Push classes applied to the body */
|
||||
|
||||
.cbp-spmenu-push {
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.cbp-spmenu-push-toright {
|
||||
left: 240px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-push-toleft {
|
||||
left: -240px;
|
||||
}
|
||||
|
||||
/* Transitions */
|
||||
|
||||
.cbp-spmenu,
|
||||
.cbp-spmenu-push {
|
||||
-webkit-transition: all 0.3s ease;
|
||||
-moz-transition: all 0.3s ease;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
/* Example media queries */
|
||||
|
||||
@media screen and (max-width: 55.1875em){
|
||||
|
||||
.cbp-spmenu-horizontal {
|
||||
font-size: 75%;
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-top {
|
||||
top: -110px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-bottom {
|
||||
bottom: -110px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media screen and (max-height: 26.375em){
|
||||
|
||||
.cbp-spmenu-vertical {
|
||||
font-size: 90%;
|
||||
width: 190px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-left,
|
||||
.cbp-spmenu-push-toleft {
|
||||
left: -190px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-right {
|
||||
right: -190px;
|
||||
}
|
||||
|
||||
.cbp-spmenu-push-toright {
|
||||
left: 190px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user