diff --git a/src/DotNetMashup.Web/Views/Home/Index.cshtml b/src/DotNetMashup.Web/Views/Home/Index.cshtml
index e3dbd67..0484e76 100644
--- a/src/DotNetMashup.Web/Views/Home/Index.cshtml
+++ b/src/DotNetMashup.Web/Views/Home/Index.cshtml
@@ -30,5 +30,31 @@
}
@section scripts{
-
+
}
\ No newline at end of file
diff --git a/src/DotNetMashup.Web/gulpfile.js b/src/DotNetMashup.Web/gulpfile.js
index 684c5ac..c103133 100644
--- a/src/DotNetMashup.Web/gulpfile.js
+++ b/src/DotNetMashup.Web/gulpfile.js
@@ -5,7 +5,8 @@ var gulp = require("gulp"),
concat = require("gulp-concat"),
cssmin = require("gulp-cssmin"),
uglify = require("gulp-uglify"),
- project = require("./project.json");
+ project = require("./project.json"),
+ jshint = require('gulp-jshint');
var paths = {
webroot: "./" + project.webroot + "/"
@@ -27,7 +28,10 @@ gulp.task("clean:css", function (cb) {
});
gulp.task("clean", ["clean:js", "clean:css"]);
-
+gulp.task("jshint", function () {
+ return gulp.src("js/**")
+ .pipe(jshint());
+});
gulp.task("min:js", function () {
gulp.src([paths.js, "!" + paths.minJs], { base: "." })
.pipe(concat(paths.concatJsDest))
@@ -42,4 +46,4 @@ gulp.task("min:css", function () {
.pipe(gulp.dest("."));
});
-gulp.task("min", ["min:js", "min:css"]);
+gulp.task("min", ["min:js", "min:css"]);
\ No newline at end of file
diff --git a/src/DotNetMashup.Web/package.json b/src/DotNetMashup.Web/package.json
index 9e53931..b5d861a 100644
--- a/src/DotNetMashup.Web/package.json
+++ b/src/DotNetMashup.Web/package.json
@@ -8,5 +8,8 @@
"gulp-uglify": "1.2.0",
"rimraf": "2.2.8",
"font-awesome": "4.4.0"
+ },
+ "dependencies": {
+ "gulp-jshint": "^1.11.2"
}
}
diff --git a/src/DotNetMashup.Web/project.json b/src/DotNetMashup.Web/project.json
index cdbd7f1..de2aad7 100644
--- a/src/DotNetMashup.Web/project.json
+++ b/src/DotNetMashup.Web/project.json
@@ -46,6 +46,6 @@
"**.vspscc"
],
"scripts": {
- "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
+ "prepublish": [ "npm install", "bower install", "gulp clean", "gulp jshint", "gulp min" ]
}
}
\ No newline at end of file
diff --git a/src/DotNetMashup.Web/wwwroot/css/site.min.css b/src/DotNetMashup.Web/wwwroot/css/site.min.css
index d28d11a..b845fec 100644
--- a/src/DotNetMashup.Web/wwwroot/css/site.min.css
+++ b/src/DotNetMashup.Web/wwwroot/css/site.min.css
@@ -1 +1 @@
-.pill,.tile{border:1px solid #03A9F4}.body-content{padding-left:15px;padding-right:15px}input,select,textarea{max-width:280px}.carousel-caption{z-index:10!important}.carousel-caption p{font-size:20px;line-height:1.4}@media (min-width:768px){.carousel-caption{z-index:10!important}}.tile{border-radius:25px;background-color:#F5F5F5;margin-bottom:5px;padding:10px;white-space:pre-wrap}.img,.pill{border-radius:50%}body{padding-top:50px;background-color:#616161}.pill,footer{background-color:#F5F5F5;padding:10px}footer{width:100%}
\ No newline at end of file
+.pill,.tile{border:1px solid #03A9F4}.tile{border-radius:5px;background-color:#fff;margin-bottom:20px;-webkit-box-shadow:7px 10px 20px -7px rgba(0,0,0,.75);-moz-box-shadow:7px 10px 20px -7px rgba(0,0,0,.75);box-shadow:7px 10px 20px -7px rgba(0,0,0,.75);padding:5px;-moz-transition:opacity .5s ease-in;-o-transition:opacity .5s ease-in;-webkit-transition:opacity .5s ease-in;transition:opacity .5s ease-in;opacity:0}.img,.pill{border-radius:50%}.tile.show{opacity:1}body{background-color:#f5f8fa}.pill,footer{background-color:#fff;padding:10px}footer{width:100%}.headerwrap{background-color:#00BCD4;width:100%;height:80px;z-index:1000;-webkit-box-shadow:0 10px 9px -8px rgba(0,0,0,.75);-moz-box-shadow:0 10px 9px -8px rgba(0,0,0,.75);box-shadow:0 10px 9px -8px rgba(0,0,0,.75)}@media screen and (min-width:480px){.headerwrap{position:fixed;top:0}.body-content{margin-top:180px}}.breakword{word-wrap:break-word}.breakword,code,pre{-ms-word-wrap:break-word}code,pre{white-space:pre-wrap;word-wrap:break-word}.head,a.headlink,a.headlink:hover,a.headlink:visited{color:#FFF;text-align:center}blockquote.twitter-tweet{display:inline-block;font-family:"Helvetica Neue",Roboto,"Segoe UI",Calibri,sans-serif;font-size:12px;font-weight:700;line-height:16px;border-color:#eee #ddd #bbb;border-radius:5px;border-style:solid;border-width:1px;box-shadow:0 1px 3px rgba(0,0,0,.15);margin:10px 5px;padding:0 16px 16px;max-width:468px}blockquote.twitter-tweet p{font-size:16px;font-weight:400;line-height:20px}blockquote.twitter-tweet a{color:inherit;font-weight:400;text-decoration:none;outline:0}blockquote.twitter-tweet a:focus,blockquote.twitter-tweet a:hover{text-decoration:underline}
\ No newline at end of file
diff --git a/src/DotNetMashup.Web/wwwroot/js/site.js b/src/DotNetMashup.Web/wwwroot/js/site.js
index 47fdf39..1c00b6f 100644
--- a/src/DotNetMashup.Web/wwwroot/js/site.js
+++ b/src/DotNetMashup.Web/wwwroot/js/site.js
@@ -1,30 +1,4 @@
-// Write your Javascript code.
-$(document).ready(function(){
- var page = @Model.CurrentPage;
- $('img').addClass('img-responsive');
- $('.tile').addClass('show');
- var loading = false;
- $(window).on('scroll', function () {
- var loadingImage = $('.loadWheel');
- if($(window).scrollTop() + $(window).height() == $(document).height() && !loading ) {
- loading = true
- loadingImage.show();
- $.ajax('/Home/Tiles', {data:{page:page+1}})
- .done(function(data){
- page++;
- loading = false;
- loadingImage.hide();
- var resd = $(data);
- resd.find('img').addClass('img-responsive');
- $('#tilesContainer').append(resd).find('.tile').addClass('show');
- })
- .error(function(){
- loadingImage.hide();
- });
- }
- });
-});
-(function (i, s, o, g, r, a, m) {
+(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
diff --git a/src/DotNetMashup.Web/wwwroot/js/site.min.js b/src/DotNetMashup.Web/wwwroot/js/site.min.js
index e69de29..b7671b5 100644
--- a/src/DotNetMashup.Web/wwwroot/js/site.min.js
+++ b/src/DotNetMashup.Web/wwwroot/js/site.min.js
@@ -0,0 +1,35 @@
+// Write your Javascript code.
+$(document).ready(function(){
+ var page = @Model.CurrentPage;
+ $('img').addClass('img-responsive');
+ $('.tile').addClass('show');
+ var loading = false;
+ $(window).on('scroll', function () {
+ var loadingImage = $('.loadWheel');
+ if($(window).scrollTop() + $(window).height() == $(document).height() && !loading ) {
+ loading = true
+ loadingImage.show();
+ $.ajax('/Home/Tiles', {data:{page:page+1}})
+ .done(function(data){
+ page++;
+ loading = false;
+ loadingImage.hide();
+ var resd = $(data);
+ resd.find('img').addClass('img-responsive');
+ $('#tilesContainer').append(resd).find('.tile').addClass('show');
+ })
+ .error(function(){
+ loadingImage.hide();
+ });
+ }
+ });
+});
+(function (i, s, o, g, r, a, m) {
+ i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
+ (i[r].q = i[r].q || []).push(arguments)
+ }, i[r].l = 1 * new Date(); a = s.createElement(o),
+ m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
+})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+
+ga('create', 'UA-48128396-3', 'auto');
+ga('send', 'pageview');
\ No newline at end of file