diff --git a/Gulpfile.js b/Gulpfile.js index 9c6dcc3a..1d7507e7 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -46,6 +46,16 @@ gulp.task('styl', function () { .pipe(notify('Stylus!!')) }) +gulp.task('styl-popup', function () { + return gulp.src('src/browser/popup/styles/app.styl') + .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')})) + .pipe(styl()) + .pipe(autoprefixer()) + .pipe(gulp.dest('src/browser/popup/styles/')) + .pipe(livereload()) + .pipe(notify('Stylus!! @POPUP')) +}) + gulp.task('bs', function () { return gulp.src('src/browser/shared/styles/bootstrap.styl') .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')})) @@ -76,6 +86,7 @@ gulp.task('watch-main', function () { ['src/browser/main/index.inject.html', 'src/browser/main/**/*.js', 'src/browser/main/**/*.css', 'src/browser/shared/**/*.js', 'src/browser/shared/**/*.css'], ['inject-main']) gulp.watch('src/browser/main/styles/**/*.styl', ['styl']) + gulp.watch('src/browser/popup/styles/**/*.styl', ['styl-popup']) gulp.watch('src/browser/shared/styles/**/*.styl', ['bs']) livereload.listen() }) diff --git a/src/browser/main/tpls/directives/side-nav.tpl.html b/src/browser/main/tpls/directives/side-nav.tpl.html index e7fa9b34..4d98b1d3 100644 --- a/src/browser/main/tpls/directives/side-nav.tpl.html +++ b/src/browser/main/tpls/directives/side-nav.tpl.html @@ -21,8 +21,8 @@
- - + diff --git a/src/browser/popup/index.html b/src/browser/popup/index.html index 86808488..ed7f3c2c 100644 --- a/src/browser/popup/index.html +++ b/src/browser/popup/index.html @@ -13,6 +13,7 @@ + @@ -25,14 +26,12 @@
- -
- -
+ diff --git a/src/browser/popup/styles/_popup.styl b/src/browser/popup/styles/_popup.styl index 9f3e25e5..87f2338b 100644 --- a/src/browser/popup/styles/_popup.styl +++ b/src/browser/popup/styles/_popup.styl @@ -26,6 +26,7 @@ padding: 0 border-right: 1px solid $baseBorderColor li + white-space nowrap &:nth-child(even) background-color $baseBackgroundColor &:nth-child(odd) diff --git a/src/browser/popup/styles/app.css b/src/browser/popup/styles/app.css new file mode 100644 index 00000000..7721a28d --- /dev/null +++ b/src/browser/popup/styles/app.css @@ -0,0 +1,68 @@ +.popup-body .search-block { + padding: 5px; + height: 44px; + position: absolute; + top: 0; + width: 100%; +} +.popup-body .result-block { + position: absolute; + top: 44px; + bottom: 0; + width: 100%; + overflow: hidden; +} +.popup-body .result-block .left-pane { + margin: 0; + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 40%; + overflow-y: auto; + overflow-x: hidden; +} +.popup-body .result-block .result-list { + list-style: none; + padding: 0; + border-right: 1px solid #001a20; +} +.popup-body .result-block .result-list li { + white-space: nowrap; +} +.popup-body .result-block .result-list li:nth-child(even) { + background-color: #002b36; +} +.popup-body .result-block .result-list li:nth-child(odd) { + background-color: #00323f; +} +.popup-body .result-block .result-list li.active { + color: #fff; + background-color: #088cff; +} +.popup-body .result-block .result-list li a { + display: block; + padding: 5px 10px; + border-bottom: 1px solid #001a20; +} +.popup-body .result-block .right-pane { + position: absolute; + left: 40%; + top: 0; + bottom: 0; + width: 60%; + overflow-y: auto; + overflow-x: hidden; +} +.popup-body .result-block .result-detail-control { + position: absolute; + top: 0; + width: 100%; + height: 34px; +} +.popup-body .result-block .result-detail-content { + position: absolute; + top: 34px; + bottom: 0; + width: 100%; +} diff --git a/src/browser/popup/styles/main.styl b/src/browser/popup/styles/app.styl similarity index 100% rename from src/browser/popup/styles/main.styl rename to src/browser/popup/styles/app.styl diff --git a/src/browser/shared/config/env.js b/src/browser/shared/config/env.js index d8d15783..51fe6bc9 100644 --- a/src/browser/shared/config/env.js +++ b/src/browser/shared/config/env.js @@ -1,4 +1,4 @@ /* global angular */ angular.module('codexen.shared') - .constant('apiUrl', 'http://localhost:8000/') - // .constant('apiUrl', 'http://codexen-server-dev.elasticbeanstalk.com/') + // .constant('apiUrl', 'http://localhost:8000/') + .constant('apiUrl', 'http://codexen-server-dev.elasticbeanstalk.com/') diff --git a/src/main.js b/src/main.js index 91b4f428..8b76a5b4 100644 --- a/src/main.js +++ b/src/main.js @@ -87,16 +87,14 @@ app.on('ready', function () { var fromMain // Register a 'ctrl+x' shortcut listener. - var ret = globalShortcut.register('ctrl+tab+shift', function () { + globalShortcut.register('ctrl+tab+shift', function () { if (popUpWindow.isVisible()) { hidePopUp() return } fromMain = mainWindow ? mainWindow.isFocused() : false popUpWindow.show() - }) - if (!ret) console.log('registerion fails') // MENU var Menu = require('menu')