Skip to content

Commit

Permalink
Merge pull request #45 from GDG-Xian/reset_base_style
Browse files Browse the repository at this point in the history
Reset base style
  • Loading branch information
greatghoul committed Nov 9, 2015
2 parents 5fb35ce + 1304fff commit 29b5320
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
12 changes: 8 additions & 4 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
*/

var gulp = require('gulp');
var plumber = require('gulp-plumber');
var sequence = require('run-sequence');
var gulpif = require('gulp-if');
var watch = require('gulp-watch');
var clean = require('gulp-clean');
Expand All @@ -20,12 +22,12 @@ gulp.task('dev', function() {
});

gulp.task('clean', function() {
return gulp.src('build/*', { read: false })
gulp.src('build/*', { read: false })
.pipe(clean({ force: true }));
});

gulp.task('copy', function() {
return gulp.src(paths.staticFiles, { base: 'src' })
gulp.src(paths.staticFiles, { base: 'src' })
.pipe(gulp.dest('build/'));
});

Expand All @@ -37,14 +39,16 @@ gulp.task('jshint', function() {

gulp.task('scripts', function() {
gulp.src('src/js/*.js')
.pipe(plumber())
.pipe(browserify({ debug: !production }))
.pipe(gulpif(production, uglify({ mangle: false })))
.pipe(gulp.dest('build/js/'));
});

gulp.task('styles', function() {
return gulp.src(paths.styles)
.pipe(sass())
.pipe(plumber())
.pipe(sass({ debugInfo: true }))
.pipe(gulpif(production, minifycss()))
.pipe(gulp.dest('build/css/'));
});
Expand All @@ -67,4 +71,4 @@ gulp.task('zip', ['build'], function() {
});

//run all tasks after build directory has been cleaned
gulp.task('default', ['clean', 'build']);
gulp.task('default', ['build']);
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
"gulp-cleanhtml": "^0.1.0",
"gulp-coffee": "^2.3.1",
"gulp-concat": "^2.4.3",
"gulp-if": "^1.2.5",
"gulp-jshint": "^1.9.2",
"gulp-minify-css": "^0.4.4",
"gulp-plumber": "^1.0.1",
"gulp-sass": "^1.3.2",
"gulp-strip-debug": "^1.0.2",
"gulp-uglify": "^1.1.0",
"gulp-watch": "^4.1.0",
"gulp-zip": "^2.0.2"
"gulp-zip": "^2.0.2",
"run-sequence": "^1.1.4"
},
"dependencies": {
"angular": "^1.4.1",
"angular-elastic": "^2.3.5",
"browserify": "^10.2.4",
"gulp-if": "^1.2.5",
"jquery": "^2.1.4",
"sugar": "^1.4.1",
"sugarjs": "0.0.2",
"underscore": "^1.8.3",
"vinyl-source-stream": "^1.1.0"
}
Expand Down
16 changes: 15 additions & 1 deletion src/css/contentstyle.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#transit-notify-list {
[class*='transit-'], [class*='transit-'] * {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
width: auto;
height: auto;
background: none;
border-radius: 0;
text-align: left;
}

.transit-notify-list {
background: transparent;
position: fixed;
margin: 0;
Expand Down
4 changes: 2 additions & 2 deletions src/js/lib/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var utils = require('./utils');
var notifyList = [];
var tpls = {
notify: '<div class="transit-notify transit-{1}">{2}</div>',
list: '<div id="transit-notify-list">' +
list: '<div class="transit-notify-list">' +
' <div class="transit-list-inner"></div>' +
'</div>',
success: '<div class="transit-result transit-success">{1}</div>',
Expand All @@ -15,7 +15,7 @@ var tpls = {
};

function getNotifyList() {
var $notifyList = $('#transit-notify-list');
var $notifyList = $('.transit-notify-list');
if ($notifyList.size() === 0) {
$notifyList = $(tpls.list).appendTo('body');
}
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "TransIt",
"description": "让划词翻译更简单",
"version": "1.4",
"version": "1.3.3",

"icons": {
"48": "img/icon48.png",
Expand Down

0 comments on commit 29b5320

Please sign in to comment.