mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
@@ -2327,4 +2327,4 @@ body {
|
|||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,6 @@
|
|||||||
|
|
||||||
&-side {
|
&-side {
|
||||||
background: @at-color-side-nav-background;
|
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 +93,12 @@
|
|||||||
z-index: @at-z-index-side-nav;
|
z-index: @at-z-index-side-nav;
|
||||||
|
|
||||||
.at-Layout-sideNavItem {
|
.at-Layout-sideNavItem {
|
||||||
|
background: inherit;
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
@@ -123,6 +123,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.at-Layout-sideNavSpacer {
|
.at-Layout-sideNavSpacer {
|
||||||
|
background: inherit;
|
||||||
height: @at-height-side-nav-spacer;
|
height: @at-height-side-nav-spacer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,3 +174,45 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@breakpoint-sm: 700px;
|
||||||
|
|
||||||
|
@media screen and (max-width: @breakpoint-sm) {
|
||||||
|
.at-Layout {
|
||||||
|
&-side {
|
||||||
|
top: 60px;
|
||||||
|
background-color: transparent;
|
||||||
|
|
||||||
|
.at-Layout-sideNavItem.at-Layout-sideNavToggle {
|
||||||
|
display: flex;
|
||||||
|
height: 40px;
|
||||||
|
align-items: center;
|
||||||
|
width: 55px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.at-Layout-sideNavItem,
|
||||||
|
.at-Layout-sideNavSpacer {
|
||||||
|
display: none;
|
||||||
|
background-color: @at-color-side-nav-background;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--expanded {
|
||||||
|
width: 100vw;
|
||||||
|
z-index: @at-z-index-side-nav;
|
||||||
|
|
||||||
|
.at-Layout-sideNavItem,
|
||||||
|
.at-Layout-sideNavSpacer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.at-Layout-main {
|
||||||
|
padding-left: 0;
|
||||||
|
|
||||||
|
#content-container {
|
||||||
|
padding-top: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,18 +2,39 @@ const templateUrl = require('~components/layout/side-nav.partial.html');
|
|||||||
|
|
||||||
function atSideNavLink (scope, element, attrs, ctrl) {
|
function atSideNavLink (scope, element, attrs, ctrl) {
|
||||||
scope.layoutVm = ctrl;
|
scope.layoutVm = ctrl;
|
||||||
|
|
||||||
|
document.on('click', (e) => {
|
||||||
|
if ($(e.target).parents('.at-Layout-side').length === 0) {
|
||||||
|
scope.$emit('clickOutsideSideNav');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function AtSideNavController () {
|
function AtSideNavController ($scope, $window) {
|
||||||
const vm = this || {};
|
let vm = this || {};
|
||||||
|
const breakpoint = 700;
|
||||||
|
|
||||||
vm.isExpanded = false;
|
vm.isExpanded = false;
|
||||||
|
|
||||||
vm.toggleExpansion = () => {
|
vm.toggleExpansion = () => {
|
||||||
vm.isExpanded = !vm.isExpanded;
|
vm.isExpanded = !vm.isExpanded;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.$watch('layoutVm.currentState', () => {
|
||||||
|
if ($window.innerWidth <= breakpoint) {
|
||||||
|
vm.isExpanded = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$scope.$on('clickOutsideSideNav', () => {
|
||||||
|
if ($window.innerWidth <= breakpoint) {
|
||||||
|
vm.isExpanded = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AtSideNavController.$inject = ['$scope', '$window'];
|
||||||
|
|
||||||
function atSideNav () {
|
function atSideNav () {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
let path = require('path');
|
let path = require('path');
|
||||||
|
const webpackConfig = require('../../../build/webpack.test.js');
|
||||||
|
|
||||||
module.exports = config => {
|
module.exports = config => {
|
||||||
config.set({
|
config.set({
|
||||||
@@ -30,22 +31,7 @@ module.exports = config => {
|
|||||||
return '/static/partials' + filepath;
|
return '/static/partials' + filepath;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
webpack: {
|
webpack: webpackConfig,
|
||||||
module: {
|
|
||||||
loaders: [
|
|
||||||
{
|
|
||||||
test: /\.js$/,
|
|
||||||
loader: 'babel',
|
|
||||||
exclude: /node_modules/
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.json$/,
|
|
||||||
loader: 'json',
|
|
||||||
exclude: /node_modules/
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
webpackMiddleware: {
|
webpackMiddleware: {
|
||||||
noInfo: 'errors-only'
|
noInfo: 'errors-only'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user