mirror of
https://gitlab.silvrtree.co.uk/martind2000/censis-archive.git
synced 2025-02-10 21:59:17 +00:00
”2016-10-06”
This commit is contained in:
parent
6859a772af
commit
4ea3dde25d
4
mdot/mDotServer.censis/mDotServer.censis/.bowerrc
Normal file
4
mdot/mDotServer.censis/mDotServer.censis/.bowerrc
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"directory": "bower_components/",
|
||||
"timeout": 120000
|
||||
}
|
@ -108,6 +108,7 @@ app.use(function(req, res, next) {
|
||||
// Run 'npm run production' to use dist
|
||||
var staticDir = isProduction ? 'dist' : 'app';
|
||||
var graphFile = isProduction ? 'graph-release' : 'test2';
|
||||
var meetingFile = isProduction ? 'meeting-production' : 'meeting';
|
||||
|
||||
app.use(express.static(path.join(__dirname, staticDir)));
|
||||
app.use(errorhandler({dumpExceptions: true, showStack: true}));
|
||||
@ -129,7 +130,7 @@ app.get('/graph', authentication(({
|
||||
});
|
||||
|
||||
app.get('/meeting', function(req, res) {
|
||||
res.render('meeting',{delimiter: '^'});
|
||||
res.render(meetingFile,{delimiter: '^'});
|
||||
});
|
||||
|
||||
// Glue routes
|
||||
|
@ -88,6 +88,7 @@ gulp.task('styles', function() {
|
||||
});
|
||||
|
||||
|
||||
|
||||
gulp.task('index', function() {
|
||||
|
||||
return gulp.src(['app/index.html'])
|
||||
@ -120,6 +121,64 @@ gulp.task('copy', function() {
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
gulp.task('meeting-css', function() {
|
||||
return gulp.src(['app/css/mui.css', 'app/css/notification.css'])
|
||||
.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
|
||||
.pipe(cssnano())
|
||||
.pipe(concat('meeting.css'))
|
||||
.pipe(gulp.dest('dist/css'));
|
||||
});
|
||||
|
||||
gulp.task('meeting-vendor', function() {
|
||||
return gulp.src(['bower_components/mui/packages/cdn/js/mui.min.js',
|
||||
'bower_components/jquery/dist/jquery.min.js',
|
||||
'bower_components/underscore/underscore-min.js',
|
||||
'bower_components/backbone/backbone-min.js',
|
||||
'bower_components/sugarjs-date/sugar-date.min.js',
|
||||
'bower_components/notification-js/build/notification.min.js'])
|
||||
.pipe(concat('meeting-vendor.js'))
|
||||
.pipe(uglify({mangle: false}))
|
||||
.pipe(gulp.dest('dist/js'));
|
||||
});
|
||||
|
||||
gulp.task('meeting-js', function() {
|
||||
return gulp.src(['app/js/meeting.js'])
|
||||
.pipe(stripDebug())
|
||||
.pipe(jshint('.jshintrc'))
|
||||
.pipe(jshint.reporter('default'))
|
||||
.pipe(babel({presets: ['es2015']}))
|
||||
.pipe(concat('meeting.js'))
|
||||
.pipe(uglify({mangle: true, compress: {sequences: true, // Join consecutive statemets with the “comma operator”
|
||||
properties: true, // Optimize property access: a["foo"] → a.foo
|
||||
dead_code: true, // Discard unreachable code
|
||||
drop_debugger: true, // Discard “debugger” statements
|
||||
unsafe: false, // Some unsafe optimizations (see below)
|
||||
conditionals: true, // Optimize if-s and conditional expressions
|
||||
comparisons: true, // Optimize comparisons
|
||||
evaluate: true, // Evaluate constant expressions
|
||||
booleans: true, // Optimize boolean expressions
|
||||
loops: true, // Optimize loops
|
||||
unused: true, // Drop unused variables/functions
|
||||
hoist_funs: true, // Hoist function declarations
|
||||
hoist_vars: false, // Hoist variable declarations
|
||||
if_return: true, // Optimize if-s followed by return/continue
|
||||
join_vars: true, // Join var declarations
|
||||
cascade: true, // Try to cascade `right` into `left` in sequences
|
||||
side_effects: true, // Drop side-effect-free statements
|
||||
warnings: true, // Warn about potentially dangerous optimizations/code
|
||||
global_defs: {} // global definitions
|
||||
}}))
|
||||
.pipe(update(atob('LyogPT09PT09PQ0KDQpEZXZlbG9wZWQgYnkgTWFydGluIERvbm5lbGx5IG1hcnRpbmQyMDAwe2F0fWdtYWlsLmNvbQ0KDQo9PT09PT09ICovDQoNCg==')))
|
||||
.pipe(gulp.dest('dist/js'));
|
||||
});
|
||||
|
||||
|
||||
|
||||
gulp.task('buildMeeting', function() {
|
||||
gulp.start('meeting-js','meeting-vendor','meeting-css');
|
||||
});
|
||||
|
||||
|
||||
gulp.task('buildJS', function() {
|
||||
gulp.start('appJS','vendor');
|
||||
});
|
||||
@ -135,7 +194,7 @@ gulp.task('normal', ['clean'], function() {
|
||||
});
|
||||
|
||||
gulp.task('default', ['clean'], function() {
|
||||
gulp.start('buildJS','styles','index','partials');
|
||||
gulp.start('buildJS','styles','index','partials','buildMeeting');
|
||||
});
|
||||
|
||||
gulp.task('watch',function() {
|
||||
|
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
||||
<title>Meetings</title>
|
||||
<link href="css/meeting.css" rel="stylesheet" type="text/css"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="mui-container">
|
||||
<div class='mui-row'>
|
||||
<div class="mui-panel">
|
||||
<div class="mui--text-title">Meeting Log</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='mui-row'>
|
||||
<div class="mui-panel">
|
||||
<form id="meetingForm">
|
||||
<legend>New Meeting</legend>
|
||||
<div class="mui-select">
|
||||
<select id="device" name="device" required>
|
||||
<option></option>
|
||||
<option value="1">
|
||||
Large Meeting Room
|
||||
</option>
|
||||
<option value="2">
|
||||
Small Meeting Room
|
||||
</option>
|
||||
<option value="3">
|
||||
Lab
|
||||
</option>
|
||||
</select> <label>Room</label>
|
||||
</div>
|
||||
<div class="mui-row">
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-textfield">
|
||||
<input type="date" placeholder="" id='from' name="from" required/>
|
||||
<label>Day</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-textfield">
|
||||
<input type="time" placeholder="" id='start' name="start" required/>
|
||||
<label>Start</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-textfield">
|
||||
<input type="time" placeholder="" id='end' name="end" required/>
|
||||
<label>End</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mui-textfield mui-textfield--float-label">
|
||||
<input type="number" value="0" id="occupancy" required/> <label>Occupants</label>
|
||||
</div>
|
||||
<button type="submit" class="mui-btn mui-btn--raised">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/meeting-vendor.js"></script>
|
||||
<script src="js/meeting.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user