@@ -30,5 +30,31 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@section scripts{
|
@section scripts{
|
||||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
<script>
|
||||||
|
$(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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,8 @@ var gulp = require("gulp"),
|
|||||||
concat = require("gulp-concat"),
|
concat = require("gulp-concat"),
|
||||||
cssmin = require("gulp-cssmin"),
|
cssmin = require("gulp-cssmin"),
|
||||||
uglify = require("gulp-uglify"),
|
uglify = require("gulp-uglify"),
|
||||||
project = require("./project.json");
|
project = require("./project.json"),
|
||||||
|
jshint = require('gulp-jshint');
|
||||||
|
|
||||||
var paths = {
|
var paths = {
|
||||||
webroot: "./" + project.webroot + "/"
|
webroot: "./" + project.webroot + "/"
|
||||||
@@ -27,7 +28,10 @@ gulp.task("clean:css", function (cb) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("clean", ["clean:js", "clean:css"]);
|
gulp.task("clean", ["clean:js", "clean:css"]);
|
||||||
|
gulp.task("jshint", function () {
|
||||||
|
return gulp.src("js/**")
|
||||||
|
.pipe(jshint());
|
||||||
|
});
|
||||||
gulp.task("min:js", function () {
|
gulp.task("min:js", function () {
|
||||||
gulp.src([paths.js, "!" + paths.minJs], { base: "." })
|
gulp.src([paths.js, "!" + paths.minJs], { base: "." })
|
||||||
.pipe(concat(paths.concatJsDest))
|
.pipe(concat(paths.concatJsDest))
|
||||||
@@ -42,4 +46,4 @@ gulp.task("min:css", function () {
|
|||||||
.pipe(gulp.dest("."));
|
.pipe(gulp.dest("."));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("min", ["min:js", "min:css"]);
|
gulp.task("min", ["min:js", "min:css"]);
|
||||||
@@ -8,5 +8,8 @@
|
|||||||
"gulp-uglify": "1.2.0",
|
"gulp-uglify": "1.2.0",
|
||||||
"rimraf": "2.2.8",
|
"rimraf": "2.2.8",
|
||||||
"font-awesome": "4.4.0"
|
"font-awesome": "4.4.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"gulp-jshint": "^1.11.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,6 @@
|
|||||||
"**.vspscc"
|
"**.vspscc"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
|
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp jshint", "gulp min" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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%}
|
.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}
|
||||||
@@ -1,30 +1,4 @@
|
|||||||
// Write your Javascript code.
|
(function (i, s, o, g, r, a, m) {
|
||||||
$(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['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
||||||
(i[r].q = i[r].q || []).push(arguments)
|
(i[r].q = i[r].q || []).push(arguments)
|
||||||
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
||||||
|
|||||||
35
src/DotNetMashup.Web/wwwroot/js/site.min.js
vendored
35
src/DotNetMashup.Web/wwwroot/js/site.min.js
vendored
@@ -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');
|
||||||
Reference in New Issue
Block a user