diff --git a/.gitignore b/.gitignore index c8d3cb5e3b6397a34e84f454baf681a3be6965e0..8ead07700a59405913e9a5477648bd8eb3baf480 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ ~dev_rating/application/cache/ ~dev_rating/application/logs/*/ ~dev_rating/application/config/ -~dev_rating/application/static/ +~dev_rating/static/* +!~dev_rating/static/img/ +deploy/node_modules nbproject/ *.*~ /.project diff --git a/deploy/gulp-install.sh b/deploy/gulp-install.sh new file mode 100755 index 0000000000000000000000000000000000000000..3a06b625872d79c4e9be12e7f07f1652d5e46900 --- /dev/null +++ b/deploy/gulp-install.sh @@ -0,0 +1,6 @@ +npm install --save-dev gulp +npm install --save-dev gulp-rename +npm install --save-dev gulp-concat-css +npm install --save-dev gulp-minify-css +npm install --save-dev gulp-less +npm install --save-dev gulp-autoprefixer diff --git a/deploy/gulpfile.js b/deploy/gulpfile.js new file mode 100644 index 0000000000000000000000000000000000000000..4f6c6aaf6590f133661b73af000ef2aa8033441d --- /dev/null +++ b/deploy/gulpfile.js @@ -0,0 +1,49 @@ +'use strict'; +var gulp = require('gulp'); +var prefix = require('gulp-autoprefixer'); //префиксы +var concatCss = require('gulp-concat-css'); //конкатенация +var minifyCss = require('gulp-minify-css'); //минификация +var rename = require('gulp-rename'); //переименовывание +var less = require('gulp-less'); + +var SRC_PATH = '../media/'; +var DEST_PATH = '../~dev_rating/static/'; + +gulp.task('less', function () { + gulp.src(SRC_PATH + 'less/**/*.less') + .pipe(less()) + .pipe(gulp.dest(DEST_PATH + 'css/')); +}); + +gulp.task('copyCss', function() { + gulp.src(SRC_PATH + 'css/**/*.css').pipe(gulp.dest(DEST_PATH + 'css/')); +}); + +gulp.task('copyJs', function() { + gulp.src(SRC_PATH + 'js/**/*.js').pipe(gulp.dest(DEST_PATH + 'js/')); +}); + +// gulp.task('css', ['less'], function() { +// return gulp.src('css/*.css') +// .pipe(concatCss('styles/bundle.css')) +// .pipe(prefix('last 2 versions', '> 1%', 'ie9')) +// .pipe(minifyCss('')) +// .pipe(rename({suffix: '.min'})) +// .pipe(gulp.dest('out/')); +// }); + +// gulp.task('copyHtml', function() { +// gulp.src('source/*.html').pipe(gulp.dest('public')); +// }); + +gulp.task('watch', function () { + gulp.watch(SRC_PATH + 'css/*.css', ['copyCss']); + gulp.watch(SRC_PATH + 'less/*.less', ['less']); +}); + +// gulp.task('watch', function () { +// gulp.watch(SRC_PATH + 'less/*.less', ['less']); +// }); + + +gulp.task('default', ['less','copyCss', 'copyJs']); diff --git a/~dev_rating/application/views/sign.twig b/~dev_rating/application/views/sign.twig index 5fbb3f61145571d4d1770822314eb1ae3e209722..eebf4cef09e001f7bc439a564ca9f456f887631a 100644 --- a/~dev_rating/application/views/sign.twig +++ b/~dev_rating/application/views/sign.twig @@ -15,6 +15,7 @@ <head> <title>{% block pagename %}Вход в систему{% endblock %} | {{ System.Title }}</title> <link href='https://fonts.googleapis.com/css?family=PT+Sans&subset=cyrillic-ext,latin' rel='stylesheet' type='text/css'> + {{ HTML.script('static/js/libs/jquery-1.11.1.min.js')|raw }} {{ HTML.style('static/css/common.css')|raw }} {{ HTML.style('static/css/sign/sign.css')|raw }}