update resume
This commit is contained in:
1 parent
fc44782dce
commit
b3b4e9e43f
2 files changed
+118
-65
No files matched your search
+111
-60
@@ -9,7 +9,7 @@ require('../../script/lib/svg3dtagcloud');
|
|||||||
|
|
||||||
require('../../script/lib/touchSwipe');
|
require('../../script/lib/touchSwipe');
|
||||||
|
|
||||||
var pop = require('../../script/tmodjs/resume/pop');
|
var demote = require('browser-demote');
|
||||||
|
|
||||||
var scrolling = false;
|
var scrolling = false;
|
||||||
|
|
||||||
@@ -27,40 +27,35 @@ var cssSupports = (function() {
|
|||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
|
|
||||||
return function(prop) {
|
return function(prop) {
|
||||||
if ( prop in div.style ) return true;
|
if (prop in div.style) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
var ua = navigator.userAgent.toLowerCase();
|
var ua = navigator.userAgent.toLowerCase();
|
||||||
|
|
||||||
if(ua.match(/(iphone|ipod|android|ios)/i)) {
|
if (ua.match(/(iphone|ipod|android|ios)/i)) {
|
||||||
isMobile = true;
|
isMobile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!cssSupports('order')){
|
|
||||||
var popDom = $(pop({browser:'浏览器'}));
|
|
||||||
$('body').append(popDom);
|
|
||||||
|
|
||||||
if(isMobile) {
|
|
||||||
$('#visit-btn').one('tap',function(){
|
|
||||||
popDom.remove();
|
|
||||||
|
|
||||||
|
demote.use({
|
||||||
|
refuse: 'order',
|
||||||
|
continueFunction: function(event) {
|
||||||
|
if (isMobile) {
|
||||||
runOnMobile();
|
runOnMobile();
|
||||||
})
|
} else {
|
||||||
}else{
|
|
||||||
$('#visit-btn').one('click',function(){
|
|
||||||
popDom.remove();
|
|
||||||
|
|
||||||
runOnPC();
|
runOnPC();
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}else{
|
if (demote.status.isShow) {
|
||||||
if(isMobile) {
|
|
||||||
|
} else {
|
||||||
|
if (isMobile) {
|
||||||
runOnMobile();
|
runOnMobile();
|
||||||
}else{
|
} else {
|
||||||
runOnPC();
|
runOnPC();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,12 +64,12 @@ function runOnMobile() {
|
|||||||
$('.up-icon').show();
|
$('.up-icon').show();
|
||||||
|
|
||||||
$(document).swipe({
|
$(document).swipe({
|
||||||
swipe:function(event, direction, distance, duration, fingerCount) {
|
swipe: function(event, direction, distance, duration, fingerCount) {
|
||||||
|
|
||||||
if(duration < 300) {
|
if (duration < 300) {
|
||||||
if(direction == "up"){
|
if (direction == "up") {
|
||||||
navigateDown();
|
navigateDown();
|
||||||
}else if(direction == "down"){
|
} else if (direction == "down") {
|
||||||
navigateUp();
|
navigateUp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -84,7 +79,7 @@ function runOnMobile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function runOnPC() {
|
function runOnPC() {
|
||||||
$(document).on("mousewheel DOMMouseScroll", function (e) {
|
$(document).on("mousewheel DOMMouseScroll", function(e) {
|
||||||
if (!scrolling) {
|
if (!scrolling) {
|
||||||
if (e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0) {
|
if (e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0) {
|
||||||
navigateUp();
|
navigateUp();
|
||||||
@@ -107,25 +102,27 @@ function navigateDown() {
|
|||||||
|
|
||||||
function slidePage(isNext) {
|
function slidePage(isNext) {
|
||||||
scrolling = true;
|
scrolling = true;
|
||||||
list.css({display:'none'});
|
list.css({
|
||||||
|
display: 'none'
|
||||||
|
});
|
||||||
// var prev = getPrev(pos);
|
// var prev = getPrev(pos);
|
||||||
// list.eq(prev).addClass('fadeOutUp');
|
// list.eq(prev).addClass('fadeOutUp');
|
||||||
// list.eq(prev).one("animationend", onOutAnimationend);
|
// list.eq(prev).one("animationend", onOutAnimationend);
|
||||||
list.eq(pos).one("animationend", onInAnimationend);
|
list.eq(pos).one("animationend", onInAnimationend);
|
||||||
|
|
||||||
if(isNext) {
|
if (isNext) {
|
||||||
list.eq(pos).removeAttr('style').addClass('bounceInUp');
|
list.eq(pos).removeAttr('style').addClass('bounceInUp');
|
||||||
}else{
|
} else {
|
||||||
list.eq(pos).removeAttr('style').addClass('bounceInDown');
|
list.eq(pos).removeAttr('style').addClass('bounceInDown');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pos == 3 && !svgObject) {
|
if (pos == 3 && !svgObject) {
|
||||||
setTagCloud();
|
setTagCloud();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isMobile && pos < list.length - 1){
|
if (isMobile && pos < list.length - 1) {
|
||||||
$('.up-icon').show();
|
$('.up-icon').show();
|
||||||
}else{
|
} else {
|
||||||
$('.up-icon').hide();
|
$('.up-icon').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -142,7 +139,7 @@ function onInAnimationend(event) {
|
|||||||
|
|
||||||
function getPrev(p) {
|
function getPrev(p) {
|
||||||
p--;
|
p--;
|
||||||
if(p < 0) {
|
if (p < 0) {
|
||||||
p = list.length - 1;
|
p = list.length - 1;
|
||||||
}
|
}
|
||||||
return p;
|
return p;
|
||||||
@@ -150,7 +147,7 @@ function getPrev(p) {
|
|||||||
|
|
||||||
function getNext(p) {
|
function getNext(p) {
|
||||||
p++;
|
p++;
|
||||||
if(p > list.length - 1) {
|
if (p > list.length - 1) {
|
||||||
p = 0;
|
p = 0;
|
||||||
}
|
}
|
||||||
return p;
|
return p;
|
||||||
@@ -159,27 +156,83 @@ function getNext(p) {
|
|||||||
function setTagCloud() {
|
function setTagCloud() {
|
||||||
var curElement = $('#skill');
|
var curElement = $('#skill');
|
||||||
|
|
||||||
var entries = [
|
var entries = [{
|
||||||
{ label: 'HTML5',url: 'javascript:void(0);',target: ''},
|
label: 'HTML5',
|
||||||
{ label: 'CSS3',url: 'javascript:void(0);',target: ''},
|
url: 'javascript:void(0);',
|
||||||
{ label: 'JavaScript',url: 'javascript:void(0);',target: ''},
|
target: ''
|
||||||
{ label: 'jQuery',url: 'javascript:void(0);',target: ''},
|
}, {
|
||||||
{ label: 'Zepto',url: 'javascript:void(0);',target: ''},
|
label: 'CSS3',
|
||||||
{ label: 'ActionScript',url: 'javascript:void(0);',target: ''},
|
url: 'javascript:void(0);',
|
||||||
{ label: 'Node',url: 'javascript:void(0);',target: ''},
|
target: ''
|
||||||
{ label: 'Express',url: 'javascript:void(0);',target: ''},
|
}, {
|
||||||
{ label: 'Vue',url: 'javascript:void(0);',target: ''},
|
label: 'JavaScript',
|
||||||
{ label: 'Angular',url: 'javascript:void(0);',target: ''},
|
url: 'javascript:void(0);',
|
||||||
{ label: 'Egret',url: 'javascript:void(0);',target: ''},
|
target: ''
|
||||||
{ label: 'HTML',url: 'javascript:void(0);',target: ''},
|
}, {
|
||||||
{ label: 'CSS',url: 'javascript:void(0);',target: ''},
|
label: 'jQuery',
|
||||||
{ label: 'Photoshop',url: 'javascript:void(0);',target: ''},
|
url: 'javascript:void(0);',
|
||||||
{ label: 'Flash',url: 'javascript:void(0);',target: ''},
|
target: ''
|
||||||
{ label: 'Grunt',url: 'javascript:void(0);',target: ''},
|
}, {
|
||||||
{ label: 'Gulp',url: 'javascript:void(0);',target: ''},
|
label: 'Zepto',
|
||||||
{ label: 'WebPack',url: 'javascript:void(0);',target: ''},
|
url: 'javascript:void(0);',
|
||||||
{ label: 'WordPress',url: 'javascript:void(0);',target: ''}
|
target: ''
|
||||||
];
|
}, {
|
||||||
|
label: 'ActionScript',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'Node',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'Express',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'Vue',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'Angular',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'Egret',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'HTML',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'CSS',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'Photoshop',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'Flash',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'Grunt',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'Gulp',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'WebPack',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}, {
|
||||||
|
label: 'WordPress',
|
||||||
|
url: 'javascript:void(0);',
|
||||||
|
target: ''
|
||||||
|
}];
|
||||||
|
|
||||||
var settings = {
|
var settings = {
|
||||||
entries: entries,
|
entries: entries,
|
||||||
@@ -197,5 +250,3 @@ function setTagCloud() {
|
|||||||
|
|
||||||
svgObject = true;
|
svgObject = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
+7
-5
@@ -84,14 +84,14 @@ init = (pathName) => {
|
|||||||
.pipe(plumber({
|
.pipe(plumber({
|
||||||
errorHandler: onErrorHandler
|
errorHandler: onErrorHandler
|
||||||
}))
|
}))
|
||||||
.pipe(babel({
|
|
||||||
presets: ['env']
|
|
||||||
}))
|
|
||||||
.pipe(webpack({
|
.pipe(webpack({
|
||||||
output: {
|
output: {
|
||||||
filename: 'index.js',
|
filename: 'index.js',
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
.pipe(babel({
|
||||||
|
presets: ['env']
|
||||||
|
}))
|
||||||
//.pipe(webpack( require('./webpack.config.js')(pathConfig.scriptBuildPath) ))
|
//.pipe(webpack( require('./webpack.config.js')(pathConfig.scriptBuildPath) ))
|
||||||
.pipe(gulp.dest(pathConfig.babelOutPath))
|
.pipe(gulp.dest(pathConfig.babelOutPath))
|
||||||
.on("end", reload);
|
.on("end", reload);
|
||||||
@@ -105,7 +105,9 @@ init = (pathName) => {
|
|||||||
.pipe(plumber({
|
.pipe(plumber({
|
||||||
errorHandler: onErrorHandler
|
errorHandler: onErrorHandler
|
||||||
}))
|
}))
|
||||||
.pipe(uglify())
|
.pipe(uglify({
|
||||||
|
ie8: true
|
||||||
|
}))
|
||||||
.pipe(gulp.dest(config.build))
|
.pipe(gulp.dest(config.build))
|
||||||
.on("end", reload);
|
.on("end", reload);
|
||||||
});
|
});
|
||||||
@@ -181,7 +183,7 @@ init = (pathName) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('dev', function() {
|
gulp.task('dev', function() {
|
||||||
runSequence('stylus_build', 'swig_build', 'htmlmin_build', 'tmod_build', 'babel_build', 'server');
|
runSequence('stylus_build', 'swig_build', 'htmlmin_build', 'tmod_build', 'babel_build', 'uglify_build', 'server');
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user