diff --git a/gulpfile.js b/gulpfile.js index e095f25..3401661 100644 --- a/gulpfile.js +++ b/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']); \ No newline at end of file diff --git a/src/app/components/backTop/_backTop.scss b/src/app/components/backTop/_backTop.scss index b9317cc..3e8aab2 100644 --- a/src/app/components/backTop/_backTop.scss +++ b/src/app/components/backTop/_backTop.scss @@ -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; - } -} \ No newline at end of file diff --git a/src/app/components/sidebar/_sidebar.scss b/src/app/components/sidebar/_sidebar.scss index 7f6da25..ec75b36 100644 --- a/src/app/components/sidebar/_sidebar.scss +++ b/src/app/components/sidebar/_sidebar.scss @@ -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) { diff --git a/src/app/components/sidebar/sidebar.html b/src/app/components/sidebar/sidebar.html index f75274c..2b28bf7 100644 --- a/src/app/components/sidebar/sidebar.html +++ b/src/app/components/sidebar/sidebar.html @@ -9,7 +9,7 @@
diff --git a/src/app/components/sidebar/sidebar.js b/src/app/components/sidebar/sidebar.js index 793c930..e1e8f4e 100644 --- a/src/app/components/sidebar/sidebar.js +++ b/src/app/components/sidebar/sidebar.js @@ -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(); } diff --git a/src/index.html b/src/index.html index cc7afc1..0a8c3ca 100644 --- a/src/index.html +++ b/src/index.html @@ -16,7 +16,7 @@ -
+