mirror of https://github.com/akveo/blur-admin
fix back top link, sidebar fixes, search fixes
parent
f3d20d65e7
commit
e2910695f8
18
gulpfile.js
18
gulpfile.js
|
@ -75,11 +75,10 @@ gulp.task('imagemin', function () {
|
|||
.pipe(gulp.dest(imgDst));
|
||||
});
|
||||
|
||||
gulp.task('js', function () {
|
||||
gulp.task('js-lib', function(){
|
||||
var libSrc = [
|
||||
'bower_components/jquery/dist/jquery.min.js',
|
||||
'bower_components/angular/angular.min.js',
|
||||
'src/assets/js/global-variables.js',
|
||||
'bower_components/angular-route/angular-route.min.js',
|
||||
'bower_components/angular-touch/angular-touch.min.js',
|
||||
'bower_components/jquery-ui/jquery-ui.min.js',
|
||||
|
@ -112,15 +111,22 @@ gulp.task('js', function () {
|
|||
'src/app/components/backTop/lib/jquery.backTop.min.js'
|
||||
];
|
||||
|
||||
return gulp.src(libSrc)
|
||||
.pipe(concat('lib.min.js'))
|
||||
.pipe(stripDebug())
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest('release/js/'));
|
||||
});
|
||||
|
||||
gulp.task('js', function () {
|
||||
var src = [
|
||||
'src/assets/js/global-variables.js',
|
||||
'src/assets/js/amcharts-blur-theme.js',
|
||||
'src/app/**/*.js',
|
||||
'!src/app/**/lib/**/*.js'
|
||||
];
|
||||
var dst = 'release/js/';
|
||||
|
||||
gulp.src(libSrc).pipe(concat('lib.min.js')).pipe(stripDebug()).pipe(uglify()).pipe(gulp.dest(dst));
|
||||
gulp.src(src).pipe(concat('bundle.min.js')).pipe(uglify()).pipe(gulp.dest(dst));
|
||||
gulp.src(src).pipe(concat('bundle.min.js')).pipe(uglify()).pipe(gulp.dest('release/js/'));
|
||||
});
|
||||
|
||||
gulp.task('font', function () {
|
||||
|
@ -156,6 +162,6 @@ gulp.task('watch', function () {
|
|||
gulp.watch(['src/*.html'], ['html']);
|
||||
});
|
||||
|
||||
gulp.task('init', ['minify-css', 'imagemin', 'js', 'font', 'templateCache', 'html']);
|
||||
gulp.task('init', ['minify-css', 'imagemin', 'js-lib', 'js', 'font', 'templateCache', 'html']);
|
||||
|
||||
gulp.task('default', ['init']);
|
|
@ -7,29 +7,16 @@ $height: 52px;
|
|||
z-index: 9999;
|
||||
display: none;
|
||||
text-decoration: none;
|
||||
left: (180px - $height) / 2;
|
||||
right: auto !important;
|
||||
bottom: 20px !important;
|
||||
right: (180px - $height) / 2;
|
||||
bottom: 40px !important;
|
||||
font-size: 45px;
|
||||
line-height: $height;
|
||||
text-align: center;
|
||||
opacity: 0.5;
|
||||
opacity: 0.4;
|
||||
color: $primary;
|
||||
background-color: rgba(0, 0, 0, 0.75);
|
||||
border-radius: 50%;
|
||||
line-height: 46px;
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: $resS) {
|
||||
.back-top {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: $resXS) {
|
||||
.back-top {
|
||||
background-color: rgba(0, 0, 0, 0.75);
|
||||
border-radius: 50%;
|
||||
line-height: 46px;
|
||||
}
|
||||
}
|
|
@ -141,6 +141,7 @@ a.al-sidebar-list-link {
|
|||
width: 16px;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding-left: 1px;
|
||||
}
|
||||
input {
|
||||
background: none;
|
||||
|
@ -149,6 +150,7 @@ a.al-sidebar-list-link {
|
|||
width: 120px;
|
||||
padding: 0;
|
||||
margin: 0 0 0 -3px;
|
||||
height: 27px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,10 +162,6 @@ a.al-sidebar-list-link {
|
|||
.al-footer {
|
||||
padding-left: 83px
|
||||
}
|
||||
|
||||
.back-top {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin default-sublist() {
|
||||
|
@ -362,7 +360,7 @@ a.al-sidebar-list-link {
|
|||
}
|
||||
}
|
||||
|
||||
@media (min-width: $resXS) {
|
||||
@media (min-width: $resXS + 1) {
|
||||
.menu-collapsed {
|
||||
@include sidebar-collapsed();
|
||||
}
|
||||
|
@ -373,9 +371,7 @@ a.al-sidebar-list-link {
|
|||
}
|
||||
|
||||
@media (max-width: 1120px) {
|
||||
.menu-expand {
|
||||
@include sidebar-overlap();
|
||||
}
|
||||
@include sidebar-overlap();
|
||||
}
|
||||
|
||||
@media (max-width: $resXS) {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<div class="search">
|
||||
<i class="ion-ios-search-strong" ng-click="startSearch()"></i>
|
||||
<input id="searchInput" type="text" placeholder="Search for..." ng-keypress="search($event)" ng-blur="collapseSidebarIfSmallRes()">
|
||||
<input id="searchInput" type="text" placeholder="Search for...">
|
||||
</div>
|
||||
|
||||
<div class="al-sidebar-list-block" ng-mouseleave="hideHoverElement()">
|
||||
|
|
|
@ -115,11 +115,11 @@ blurAdminApp.directive('sidebar', function () {
|
|||
selectMenuItem();
|
||||
});
|
||||
|
||||
$scope.menuExpand = function() {
|
||||
$scope.menuExpand = function () {
|
||||
$scope.isMenuCollapsed = false;
|
||||
};
|
||||
|
||||
$scope.menuCollapse = function() {
|
||||
$scope.menuCollapse = function () {
|
||||
$scope.isMenuCollapsed = true;
|
||||
};
|
||||
|
||||
|
@ -132,8 +132,8 @@ blurAdminApp.directive('sidebar', function () {
|
|||
};
|
||||
|
||||
// watch window resize to change menu collapsed state if needed
|
||||
$(window).resize(function(){
|
||||
$scope.$apply(function(){
|
||||
$(window).resize(function () {
|
||||
$scope.$apply(function () {
|
||||
$scope.isMenuCollapsed = $(window).width() <= resWidthCollapseSidebar;
|
||||
});
|
||||
});
|
||||
|
@ -158,7 +158,7 @@ blurAdminApp.directive('sidebar', function () {
|
|||
$timeout(function () {
|
||||
|
||||
if ($scope.anySlideRight) {
|
||||
$scope.menuItems.map(function(val){
|
||||
$scope.menuItems.map(function (val) {
|
||||
return val.slideRight = false;
|
||||
});
|
||||
$scope.anySlideRight = false;
|
||||
|
@ -177,7 +177,7 @@ blurAdminApp.directive('sidebar', function () {
|
|||
$scope.showHoverElem = false;
|
||||
};
|
||||
|
||||
$scope.collapseSidebarIfSmallRes = function() {
|
||||
$scope.collapseSidebarIfSmallRes = function () {
|
||||
if (window.innerWidth <= resWidthCollapseSidebar) {
|
||||
$scope.isMenuCollapsed = true;
|
||||
}
|
||||
|
@ -187,10 +187,10 @@ blurAdminApp.directive('sidebar', function () {
|
|||
document.getElementById("searchInput").focus();
|
||||
}
|
||||
|
||||
$scope.startSearch = function() {
|
||||
$scope.startSearch = function () {
|
||||
if ($scope.isMenuCollapsed) {
|
||||
$scope.isMenuCollapsed = false;
|
||||
$timeout(function(){
|
||||
$timeout(function () {
|
||||
focusSearchInput();
|
||||
}, 900);
|
||||
} else {
|
||||
|
@ -198,7 +198,7 @@ blurAdminApp.directive('sidebar', function () {
|
|||
}
|
||||
};
|
||||
|
||||
$scope.search = function(event) {
|
||||
$scope.search = function (event) {
|
||||
if (event.which === 13) {
|
||||
$scope.collapseSidebarIfSmallRes();
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</head>
|
||||
<body ng-controller="mainCtrl">
|
||||
|
||||
<main ng-if="finishLoading" ng-class="{'menu-collapsed': isMenuCollapsed, 'menu-expand': !isMenuCollapsed}">
|
||||
<main ng-if="finishLoading" ng-class="{ 'menu-collapsed': isMenuCollapsed }">
|
||||
<a href="#/dashboard" class="al-logo al-logo-small-rez">Blur Admin</a>
|
||||
<sidebar is-menu-collapsed="isMenuCollapsed"></sidebar>
|
||||
|
||||
|
|
Loading…
Reference in New Issue