diff --git a/client/gulpfile.js b/client/gulpfile.js index cb4ff435..23d654dc 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -27,10 +27,10 @@ gulp.task('html', function() { }); gulp.task('css', function() { - gulp.src('./src/*.css') + gulp.src('./src/css/*.css') .pipe(autoprefixer()) .pipe(minifyCSS()) - .pipe(gulp.dest('./dist')); + .pipe(gulp.dest('./dist/css')); }); gulp.task('js', function() { @@ -70,14 +70,19 @@ function js(watch) { return rebundle(); } -gulp.task('gzip', ['html', 'css', 'js'], function() { - gulp.src('./dist/*.{html,css,js}') +gulp.task('fonts', function() { + gulp.src('./src/font/*') + .pipe(gulp.dest('./dist/font')); +}); + +gulp.task('gzip', ['html', 'css', 'js', 'fonts'], function() { + gulp.src('./dist/**/!(*.gz)') .pipe(gzip()) .pipe(gulp.dest('./dist')); }); gulp.task('gzip:watch', function() { - gulp.src('./dist/*.{html,css,js}') + gulp.src('./dist/**/*.{html,css,js}') .pipe(gzip()) .pipe(gulp.dest('./dist')); }); @@ -89,4 +94,4 @@ gulp.task('watch', ['default'], function() { return js(true); }); -gulp.task('default', ['html', 'css', 'js', 'gzip']); \ No newline at end of file +gulp.task('default', ['html', 'css', 'js', 'fonts', 'gzip']); \ No newline at end of file diff --git a/client/src/css/fontello.css b/client/src/css/fontello.css new file mode 100644 index 00000000..4140939a --- /dev/null +++ b/client/src/css/fontello.css @@ -0,0 +1,54 @@ +@font-face { + font-family: 'fontello'; + src: url('../font/fontello.eot?73444496'); + src: url('../font/fontello.eot?73444496#iefix') format('embedded-opentype'), + url('../font/fontello.woff?73444496') format('woff'), + url('../font/fontello.ttf?73444496') format('truetype'), + url('../font/fontello.svg?73444496#fontello') format('svg'); + font-weight: normal; + font-style: normal; +} +/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ +/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ +/* +@media screen and (-webkit-min-device-pixel-ratio:0) { + @font-face { + font-family: 'fontello'; + src: url('../font/fontello.svg?73444496#fontello') format('svg'); + } +} +*/ + + [class^="icon-"]:before, [class*=" icon-"]:before { + font-family: "fontello"; + font-style: normal; + font-weight: normal; + speak: none; + + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: .2em; + text-align: center; + /* opacity: .8; */ + + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + + /* fix buttons height, for twitter bootstrap */ + line-height: 1em; + + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + margin-left: .2em; + + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ +} + +.icon-cog:before { content: '\e800'; } /* '' */ +.icon-ellipsis:before { content: '\e801'; } /* '' */ \ No newline at end of file diff --git a/client/src/style.css b/client/src/css/style.css similarity index 98% rename from client/src/style.css rename to client/src/css/style.css index a7dfdcaa..0147b7ac 100644 --- a/client/src/style.css +++ b/client/src/css/style.css @@ -26,6 +26,10 @@ p { line-height: 1.5; } +i[class^="icon-"]:before, i[class*=" icon-"]:before { + margin: 0; +} + .tablist { position: fixed; left: 0; diff --git a/client/src/font/fontello.eot b/client/src/font/fontello.eot new file mode 100644 index 00000000..e982f220 Binary files /dev/null and b/client/src/font/fontello.eot differ diff --git a/client/src/font/fontello.svg b/client/src/font/fontello.svg new file mode 100644 index 00000000..b947f26e --- /dev/null +++ b/client/src/font/fontello.svg @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/client/src/font/fontello.ttf b/client/src/font/fontello.ttf new file mode 100644 index 00000000..7f7297f8 Binary files /dev/null and b/client/src/font/fontello.ttf differ diff --git a/client/src/font/fontello.woff b/client/src/font/fontello.woff new file mode 100644 index 00000000..1a501827 Binary files /dev/null and b/client/src/font/fontello.woff differ diff --git a/client/src/index.html b/client/src/index.html index 94c57f0a..7faca1bb 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -7,8 +7,8 @@
- +
diff --git a/client/src/js/components/MessageBox.jsx b/client/src/js/components/MessageBox.jsx index 99577be8..115998a9 100644 --- a/client/src/js/components/MessageBox.jsx +++ b/client/src/js/components/MessageBox.jsx @@ -4,7 +4,6 @@ var _ = require('lodash'); var Infinite = require('react-infinite'); var util = require('../util'); -var messageStore = require('../stores/message'); var messageLineStore = require('../stores/messageLine'); var selectedTabStore = require('../stores/selectedTab'); var messageActions = require('../actions/message'); diff --git a/client/src/js/components/TabList.jsx b/client/src/js/components/TabList.jsx index 45b00381..86b30771 100644 --- a/client/src/js/components/TabList.jsx +++ b/client/src/js/components/TabList.jsx @@ -71,7 +71,7 @@ var TabList = React.createClass({ {tabs}