aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gulpfile.js19
-rw-r--r--package.json3
-rw-r--r--src/include/foot.jade2
-rw-r--r--src/include/head.jade8
-rw-r--r--src/include/layout-main.jade21
-rw-r--r--src/index.jade32
-rw-r--r--src/js/BotleaguesApi.js22
7 files changed, 96 insertions, 11 deletions
diff --git a/gulpfile.js b/gulpfile.js
index b7e9091..2abb17e 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -24,9 +24,17 @@ var gulp = require('gulp'),
var bootswatch_theme = 'superhero';
gulp.task('default', [], function() {
+ gulp.start('styles', 'scripts', 'images', 'jade');
+});
+
+gulp.task('all', [], function() {
gulp.start('fonts', 'styles', 'scripts', 'images', 'jade');
});
+gulp.task('rebuild', ['clean'], function() {
+ gulp.start('all');
+});
+
gulp.task('clean', function(cb) {
del(['./build/assets/css', './build/assets/js', './build/assets/less', './build/assets/img', './build/assets/fonts', './build/*.html'], cb)
});
@@ -102,9 +110,8 @@ gulp.task('styles', function() {
gulp.task('scripts', function(){
var fileList = [
+ './bower_components/jquery/dist/jquery.min.js',
'./bower_components/bootstrap/dist/js/bootstrap.min.js',
- './bower_components/jquery/jquery.min.js',
- './src/js/*.js'
];
var dst = './build/assets/js';
@@ -115,6 +122,14 @@ gulp.task('scripts', function(){
.pipe(stripdebug())
.pipe(uglify())
.pipe(gulp.dest(dst));
+
+ var src = './src/js/*.js';
+
+ gulp.src(src)
+ .pipe(changed(dst))
+ .pipe(stripdebug())
+ .pipe(uglify())
+ .pipe(gulp.dest(dst));
});
gulp.task('images', function(){
diff --git a/package.json b/package.json
index 82d01d3..8850d7a 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@
"gulp-foreach": "^0.1.0",
"gulp-if": "^1.2.5",
"gulp-imagemin": "~2.2.1",
- "gulp-jade": "~1.0.0"
+ "gulp-jade": "~1.0.0",
"gulp-jshint": "^1.9.2",
"gulp-less": "^3.0.0",
"gulp-minify-css": "^0.4.5",
@@ -25,6 +25,7 @@
"gulp-uglify": "~1.2.0",
"gulp-util": "^3.0.3",
"merge-stream": "^0.1.7",
+ "markdown-js": "0.0.3"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
diff --git a/src/include/foot.jade b/src/include/foot.jade
new file mode 100644
index 0000000..4bb069f
--- /dev/null
+++ b/src/include/foot.jade
@@ -0,0 +1,2 @@
+script(src='/assets/js/script.js', type='text/javascript')
+script(src='/assets/js/BotleaguesApi.js', type='text/javascript') \ No newline at end of file
diff --git a/src/include/head.jade b/src/include/head.jade
new file mode 100644
index 0000000..63cb17c
--- /dev/null
+++ b/src/include/head.jade
@@ -0,0 +1,8 @@
+title Botleagues
+
+meta(charset='utf-8')
+meta(http-equiv='X-UA-Compatible', content='IE=edge')
+meta(name='viewport', content='width=device-width, initial-scale=1')
+
+link(rel='stylesheet', href='/assets/css/bootswatch.css', type='text/css')
+link(rel='stylesheet', href='/assets/css/font-awesome.css', type='text/css') \ No newline at end of file
diff --git a/src/include/layout-main.jade b/src/include/layout-main.jade
new file mode 100644
index 0000000..68ff9de
--- /dev/null
+++ b/src/include/layout-main.jade
@@ -0,0 +1,21 @@
+doctype html
+html(lang="en")
+ head
+ include ./head.jade
+
+ body
+ .container
+
+ .header.clearfix
+ nav: ul.nav.nav-pills.pull-right
+ li.active(role='presentation'): a(href='#') Home
+ li(role='presentation'): a(href='#') About
+ li(role='presentation'): a(href='#') Contact
+ h3 Botleagues
+
+ block content
+
+ footer.footer: :markdown
+ © [ViviSoft](http://vivisoft.nl/) 2015
+
+ include ./foot.jade \ No newline at end of file
diff --git a/src/index.jade b/src/index.jade
index dda3b97..7ade8fe 100644
--- a/src/index.jade
+++ b/src/index.jade
@@ -1,8 +1,24 @@
-doctype html
-html(lang="en")
- head
- title= Botleagues
- link(rel='stylesheet', href='/assets/css/bootswatch.css', type='text/css')
- link(rel='stylesheet', href='/assets/css/fontawesome.css', type='text/css')
- body
- p Hello world. \ No newline at end of file
+extends ./include/layout-main.jade
+
+block content
+ .jumbotron
+ h1 Welcome
+ p.lead Botleagues: write Java bots for different games, join competitions and win prizes!
+ p.row
+ a.btn.btn-lg.btn-success.pull-right(href='#', role='button') Sign up
+
+ .row.marketing
+ .col-lg-6
+ h4 Subheading
+ p Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.
+ h4 Subheading
+ p Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.
+ h4 Subheading
+ p Maecenas sed diam eget risus varius blandit sit amet non magna.
+ .col-lg-6
+ h4 Subheading
+ p Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.
+ h4 Subheading
+ p Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.
+ h4 Subheading
+ p Maecenas sed diam eget risus varius blandit sit amet non magna. \ No newline at end of file
diff --git a/src/js/BotleaguesApi.js b/src/js/BotleaguesApi.js
new file mode 100644
index 0000000..44e9c0e
--- /dev/null
+++ b/src/js/BotleaguesApi.js
@@ -0,0 +1,22 @@
+function BotleaguesApi(){}
+
+BotleaguesApi.url = 'https://api.local.botleagues.camilstaps.nl';
+
+BotleaguesApi.request = function(user_options) {
+ var options = {
+ endpoint: null,
+ method: 'GET',
+ dataType: 'jsonp',
+ jsonp: 'callback'
+ };
+ for (var name in user_options) {
+ options[name] = user_options[name];
+ }
+
+ console.log(options);
+
+ var url = BotleaguesApi.url + options['endpoint'];
+ delete options['endpoint'];
+
+ jQuery.ajax(url, options);
+} \ No newline at end of file