diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 25c7330..f3c6018 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,39 +2,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -55,111 +32,205 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -215,6 +293,11 @@
true
+
+
+ $PROJECT_DIR$/gulpfile.js
+
+
@@ -276,7 +359,7 @@
-
+
@@ -293,6 +376,10 @@
+
+
+
+
@@ -305,7 +392,7 @@
-
+
@@ -324,6 +411,8 @@
+
+
@@ -337,7 +426,7 @@
-
+
@@ -390,6 +479,14 @@
false
+
+
+ $PROJECT_DIR$/gulpfile.js
+
+
+
+
+
@@ -399,11 +496,12 @@
-
-
-
-
-
+
+
+
+
+
+
@@ -548,7 +646,13 @@
1458042886976
-
+
+ 1458043875334
+
+
+ 1458043875334
+
+
@@ -559,7 +663,7 @@
-
+
@@ -624,58 +728,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -738,26 +790,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -774,14 +806,6 @@
-
-
-
-
-
-
-
-
@@ -846,17 +870,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -974,26 +987,36 @@
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
+
+
+
+
+
-
+
-
-
+
+
@@ -1006,5 +1029,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.jshintrc b/.jshintrc
index 2f30d16..da32b7f 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,33 +1,32 @@
{
- "predef": [
- "server",
- "document",
- "window",
- "-Promise"
- ],
- "browser": true,
- "boss": true,
+ "node": true,
+ "esnext": true,
+ "bitwise": true,
+ "camelcase": true,
"curly": true,
- "debug": false,
- "devel": true,
"eqeqeq": true,
- "evil": true,
- "forin": false,
- "immed": false,
- "laxbreak": false,
+ "immed": true,
+ "indent": 2,
+ "latedef": true,
"newcap": true,
"noarg": true,
- "noempty": false,
- "nonew": false,
- "nomen": false,
- "onevar": false,
- "plusplus": false,
- "regexp": false,
+ "quotmark": "single",
+ "regexp": true,
"undef": true,
- "sub": true,
- "strict": false,
- "white": false,
- "eqnull": true,
- "esnext": true,
- "unused": true
+ "unused": true,
+ "strict": true,
+ "trailing": true,
+ "smarttabs": true,
+ "white": true,
+ "validthis": true,
+ "browser" : true,
+ "jquery":true,
+
+ "globals": {
+
+ "$": false,
+ "EJS": false,
+ "MicroEvent": false
+
+ }
}
diff --git a/gulp/build.js b/gulp/build.js
new file mode 100644
index 0000000..790e92f
--- /dev/null
+++ b/gulp/build.js
@@ -0,0 +1,16 @@
+/**
+ * Created by Martin on 15/03/2016.
+ */
+'use strict';
+
+var gulp = require('gulp');
+
+
+function handleError(err) {
+ console.error(err.toString());
+ this.emit('end');
+}
+
+gulp.task('clean', function () {
+ return gulp.src(['.tmp', 'dist'], { read: false }).pipe($.rimraf());
+});
diff --git a/gulpfile.js b/gulpfile.js
new file mode 100644
index 0000000..2feeb63
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,82 @@
+"use strict";
+var gulp = require('gulp'),
+
+ autoprefixer = require('gulp-autoprefixer'),
+ cssnano = require('gulp-cssnano'),
+ jshint = require('gulp-jshint'),
+ uglify = require('gulp-uglify'),
+
+ rename = require('gulp-rename'),
+ concat = require('gulp-concat'),
+ notify = require('gulp-notify'),
+ cache = require('gulp-cache'),
+ livereload = require('gulp-livereload'),
+ htmlmin = require('gulp-htmlmin'),
+ inject = require('gulp-inject'),
+ del = require('del'),
+ htmlreplace = require('gulp-html-replace');
+
+
+var filePath = {
+ build_dir: './dist'
+};
+
+gulp.task('scripts', function() {
+ return gulp.src(['html/js/shell.js','html/js/app.v3.js'])
+ .pipe(jshint('.jshintrc'))
+ .pipe(jshint.reporter('default'))
+ .pipe(concat('app.js'))
+ /*.pipe(gulp.dest('dist/js'))*/
+ /*.pipe(rename({suffix: '.min'}))*/
+ /* .pipe(uglify())*/
+ /*.pipe(concat('app.js'))*/
+ .pipe(gulp.dest('dist/js'))
+ .pipe(notify({ message: 'Scripts task complete' }));
+});
+
+gulp.task('vendor', function() {
+ return gulp.src(['html/libs/microevent.js','html/js/moment.min.js','html/js/ejs_production.js','html/js/jquery.unveil.js'])
+ .pipe(concat('vendor.js'))
+ .pipe(gulp.dest('dist/js'))
+ .pipe(notify({ message: 'Scripts task complete' }));
+});
+
+gulp.task('styles', function() {
+ return gulp.src(['html/css/app.css','html/css/md.css'])
+ .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
+ /*.pipe(gulp.dest('dist/css'))*/
+ /*.pipe(rename({suffix: '.min'}))*/
+ .pipe(cssnano())
+ .pipe(concat('app.css'))
+ .pipe(gulp.dest('dist/css'))
+ .pipe(notify({ message: 'Styles task complete' }));
+});
+
+gulp.task('partials', function() {
+ gulp.src(['html/ejs/**/*']).pipe(gulp.dest('dist/ejs'));
+ gulp.src(['html/icons/**/*']).pipe(gulp.dest('dist/icons'));
+});
+
+
+
+gulp.task('index', function () {
+ var sources = gulp.src(['js/apps.js', 'css/app.css'], {read: false});
+
+ return gulp.src(['html/index.html'])
+ .pipe(htmlreplace({
+ 'css': 'css/app.css',
+ 'js': 'js/app.js',
+ 'vendor': 'js/vendor.js'
+ }))
+ .pipe(htmlmin({removeComments: true, collapseWhitespace: true, keepClosingSlash: true}))
+ .pipe(gulp.dest('dist/'));
+});
+
+gulp.task('clean', function() {
+ return del(['dist']);
+});
+
+
+gulp.task('default', ['clean'], function() {
+ gulp.start('styles', 'scripts','vendor', 'partials','index');
+});
diff --git a/html/css/app.css b/html/css/app.css
index 4910183..df9673d 100644
--- a/html/css/app.css
+++ b/html/css/app.css
@@ -176,5 +176,5 @@ float:right;
#footer, .mui-appbar {
- background-color: #FB7820;
+ background-color: #775585;
}
diff --git a/html/index.html b/html/index.html
index b41f41c..8c1fd55 100644
--- a/html/index.html
+++ b/html/index.html
@@ -36,14 +36,19 @@
}
-
+
-
+
+
+
-
+
+
+
+
@@ -114,10 +119,7 @@