fix back top link, sidebar fixes, search fixes

pull/3/head
Nasta 9 years ago
parent f3d20d65e7
commit e2910695f8

@ -75,11 +75,10 @@ gulp.task('imagemin', function () {
.pipe(gulp.dest(imgDst)); .pipe(gulp.dest(imgDst));
}); });
gulp.task('js', function () { gulp.task('js-lib', function(){
var libSrc = [ var libSrc = [
'bower_components/jquery/dist/jquery.min.js', 'bower_components/jquery/dist/jquery.min.js',
'bower_components/angular/angular.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-route/angular-route.min.js',
'bower_components/angular-touch/angular-touch.min.js', 'bower_components/angular-touch/angular-touch.min.js',
'bower_components/jquery-ui/jquery-ui.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' '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 = [ var src = [
'src/assets/js/global-variables.js',
'src/assets/js/amcharts-blur-theme.js', 'src/assets/js/amcharts-blur-theme.js',
'src/app/**/*.js', 'src/app/**/*.js',
'!src/app/**/lib/**/*.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('release/js/'));
gulp.src(src).pipe(concat('bundle.min.js')).pipe(uglify()).pipe(gulp.dest(dst));
}); });
gulp.task('font', function () { gulp.task('font', function () {
@ -156,6 +162,6 @@ gulp.task('watch', function () {
gulp.watch(['src/*.html'], ['html']); 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']); gulp.task('default', ['init']);

@ -7,29 +7,16 @@ $height: 52px;
z-index: 9999; z-index: 9999;
display: none; display: none;
text-decoration: none; text-decoration: none;
left: (180px - $height) / 2; right: (180px - $height) / 2;
right: auto !important; bottom: 40px !important;
bottom: 20px !important;
font-size: 45px; font-size: 45px;
line-height: $height;
text-align: center; text-align: center;
opacity: 0.5; opacity: 0.4;
color: $primary; color: $primary;
background-color: rgba(0, 0, 0, 0.75);
border-radius: 50%;
line-height: 46px;
&:hover { &: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; width: 16px;
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
padding-left: 1px;
} }
input { input {
background: none; background: none;
@ -149,6 +150,7 @@ a.al-sidebar-list-link {
width: 120px; width: 120px;
padding: 0; padding: 0;
margin: 0 0 0 -3px; margin: 0 0 0 -3px;
height: 27px;
} }
} }
@ -160,10 +162,6 @@ a.al-sidebar-list-link {
.al-footer { .al-footer {
padding-left: 83px padding-left: 83px
} }
.back-top {
left: 0;
}
} }
@mixin default-sublist() { @mixin default-sublist() {
@ -362,7 +360,7 @@ a.al-sidebar-list-link {
} }
} }
@media (min-width: $resXS) { @media (min-width: $resXS + 1) {
.menu-collapsed { .menu-collapsed {
@include sidebar-collapsed(); @include sidebar-collapsed();
} }
@ -373,9 +371,7 @@ a.al-sidebar-list-link {
} }
@media (max-width: 1120px) { @media (max-width: 1120px) {
.menu-expand { @include sidebar-overlap();
@include sidebar-overlap();
}
} }
@media (max-width: $resXS) { @media (max-width: $resXS) {

@ -9,7 +9,7 @@
<div class="search"> <div class="search">
<i class="ion-ios-search-strong" ng-click="startSearch()"></i> <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>
<div class="al-sidebar-list-block" ng-mouseleave="hideHoverElement()"> <div class="al-sidebar-list-block" ng-mouseleave="hideHoverElement()">

@ -115,11 +115,11 @@ blurAdminApp.directive('sidebar', function () {
selectMenuItem(); selectMenuItem();
}); });
$scope.menuExpand = function() { $scope.menuExpand = function () {
$scope.isMenuCollapsed = false; $scope.isMenuCollapsed = false;
}; };
$scope.menuCollapse = function() { $scope.menuCollapse = function () {
$scope.isMenuCollapsed = true; $scope.isMenuCollapsed = true;
}; };
@ -132,8 +132,8 @@ blurAdminApp.directive('sidebar', function () {
}; };
// watch window resize to change menu collapsed state if needed // watch window resize to change menu collapsed state if needed
$(window).resize(function(){ $(window).resize(function () {
$scope.$apply(function(){ $scope.$apply(function () {
$scope.isMenuCollapsed = $(window).width() <= resWidthCollapseSidebar; $scope.isMenuCollapsed = $(window).width() <= resWidthCollapseSidebar;
}); });
}); });
@ -158,7 +158,7 @@ blurAdminApp.directive('sidebar', function () {
$timeout(function () { $timeout(function () {
if ($scope.anySlideRight) { if ($scope.anySlideRight) {
$scope.menuItems.map(function(val){ $scope.menuItems.map(function (val) {
return val.slideRight = false; return val.slideRight = false;
}); });
$scope.anySlideRight = false; $scope.anySlideRight = false;
@ -177,7 +177,7 @@ blurAdminApp.directive('sidebar', function () {
$scope.showHoverElem = false; $scope.showHoverElem = false;
}; };
$scope.collapseSidebarIfSmallRes = function() { $scope.collapseSidebarIfSmallRes = function () {
if (window.innerWidth <= resWidthCollapseSidebar) { if (window.innerWidth <= resWidthCollapseSidebar) {
$scope.isMenuCollapsed = true; $scope.isMenuCollapsed = true;
} }
@ -187,10 +187,10 @@ blurAdminApp.directive('sidebar', function () {
document.getElementById("searchInput").focus(); document.getElementById("searchInput").focus();
} }
$scope.startSearch = function() { $scope.startSearch = function () {
if ($scope.isMenuCollapsed) { if ($scope.isMenuCollapsed) {
$scope.isMenuCollapsed = false; $scope.isMenuCollapsed = false;
$timeout(function(){ $timeout(function () {
focusSearchInput(); focusSearchInput();
}, 900); }, 900);
} else { } else {
@ -198,7 +198,7 @@ blurAdminApp.directive('sidebar', function () {
} }
}; };
$scope.search = function(event) { $scope.search = function (event) {
if (event.which === 13) { if (event.which === 13) {
$scope.collapseSidebarIfSmallRes(); $scope.collapseSidebarIfSmallRes();
} }

@ -16,7 +16,7 @@
</head> </head>
<body ng-controller="mainCtrl"> <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> <a href="#/dashboard" class="al-logo al-logo-small-rez">Blur Admin</a>
<sidebar is-menu-collapsed="isMenuCollapsed"></sidebar> <sidebar is-menu-collapsed="isMenuCollapsed"></sidebar>

Loading…
Cancel
Save