mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 20:07:37 -02:30
Add mobile menu styles and click handlers
Signed-off-by: Marliana Lara <mlara@redhat.com>
This commit is contained in:
@@ -2328,3 +2328,11 @@ body {
|
|||||||
.btn {
|
.btn {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@breakpoint-sm: 700px;
|
||||||
|
|
||||||
|
@media screen and (max-width: @breakpoint-sm) {
|
||||||
|
#content-container {
|
||||||
|
padding-top: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -83,8 +83,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-side {
|
&-side {
|
||||||
background: @at-color-side-nav-background;
|
|
||||||
color: @at-color-side-nav-content;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
top: @at-height-top-side-nav-makeup;
|
top: @at-height-top-side-nav-makeup;
|
||||||
@@ -94,11 +92,12 @@
|
|||||||
z-index: @at-z-index-side-nav;
|
z-index: @at-z-index-side-nav;
|
||||||
|
|
||||||
.at-Layout-sideNavItem {
|
.at-Layout-sideNavItem {
|
||||||
|
background: @at-color-side-nav-background;
|
||||||
|
color: @at-color-side-nav-content;
|
||||||
display: flex;
|
display: flex;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|
||||||
|
|
||||||
> i.fa {
|
> i.fa {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
@@ -124,6 +123,7 @@
|
|||||||
|
|
||||||
.at-Layout-sideNavSpacer {
|
.at-Layout-sideNavSpacer {
|
||||||
height: @at-height-side-nav-spacer;
|
height: @at-height-side-nav-spacer;
|
||||||
|
background: @at-color-side-nav-background;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--expanded {
|
&--expanded {
|
||||||
@@ -173,3 +173,40 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@breakpoint-sm: 700px;
|
||||||
|
|
||||||
|
@media screen and (max-width: @breakpoint-sm) {
|
||||||
|
.at-Layout {
|
||||||
|
&-side {
|
||||||
|
top: 60px;
|
||||||
|
|
||||||
|
.at-Layout-sideNavItem.at-Layout-sideNavToggle {
|
||||||
|
display: flex;
|
||||||
|
height: 40px;
|
||||||
|
align-items: center;
|
||||||
|
width: 55px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.at-Layout-sideNavItem,
|
||||||
|
.at-Layout-sideNavSpacer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--expanded {
|
||||||
|
width: 100vw;
|
||||||
|
z-index: @at-z-index-side-nav;
|
||||||
|
|
||||||
|
.at-Layout-sideNavItem,
|
||||||
|
.at-Layout-sideNavSpacer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.at-Layout-main {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,14 +4,24 @@ function atSideNavLink (scope, element, attrs, ctrl) {
|
|||||||
scope.layoutVm = ctrl;
|
scope.layoutVm = ctrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
function AtSideNavController () {
|
function AtSideNavController ($scope) {
|
||||||
const vm = this || {};
|
let vm = this || {};
|
||||||
|
|
||||||
vm.isExpanded = false;
|
vm.isExpanded = false;
|
||||||
|
|
||||||
vm.toggleExpansion = () => {
|
vm.toggleExpansion = () => {
|
||||||
vm.isExpanded = !vm.isExpanded;
|
vm.isExpanded = !vm.isExpanded;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
document.body.onclick = (e) => {
|
||||||
|
if ($(e.target).parents(".at-Layout-side").length === 0) {
|
||||||
|
vm.isExpanded = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.$on('$locationChangeStart', function(event) {
|
||||||
|
vm.isExpanded = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function atSideNav () {
|
function atSideNav () {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="at-Layout-side"
|
<div class="at-Layout-side"
|
||||||
ng-class="{'at-Layout-side--expanded': vm.isExpanded && layoutVm.isLoggedIn}">
|
ng-class="{'at-Layout-side--expanded': vm.isExpanded && layoutVm.isLoggedIn}" ng-show="layoutVm.isLoggedIn && !layoutVm.licenseIsMissing">
|
||||||
<div class="at-Layout-sideNavItem" ng-click="vm.toggleExpansion()"
|
<div class="at-Layout-sideNavItem at-Layout-sideNavToggle" ng-click="vm.toggleExpansion()"
|
||||||
ng-show="layoutVm.isLoggedIn && !layoutVm.licenseIsMissing">
|
ng-show="layoutVm.isLoggedIn && !layoutVm.licenseIsMissing">
|
||||||
<i class="fa fa-bars"></i>
|
<i class="fa fa-bars"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@breadcrumb-breakpoint: 900px;
|
@breadcrumb-breakpoint: 900px;
|
||||||
|
@breakpoint-sm: 700px;
|
||||||
|
|
||||||
@media screen and (max-width: @breadcrumb-breakpoint) {
|
@media screen and (max-width: @breadcrumb-breakpoint) {
|
||||||
.BreadCrumb-menuLinkImage {
|
.BreadCrumb-menuLinkImage {
|
||||||
@@ -95,3 +96,11 @@
|
|||||||
padding: 0 21px;
|
padding: 0 21px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @breakpoint-sm) {
|
||||||
|
.BreadCrumb {
|
||||||
|
padding-left: 50px;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user