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');
|
||||
|
||||
var pop = require('../../script/tmodjs/resume/pop');
|
||||
var demote = require('browser-demote');
|
||||
|
||||
var scrolling = false;
|
||||
|
||||
@@ -27,40 +27,35 @@ var cssSupports = (function() {
|
||||
var div = document.createElement('div');
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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();
|
||||
})
|
||||
}else{
|
||||
$('#visit-btn').one('click',function(){
|
||||
popDom.remove();
|
||||
|
||||
} else {
|
||||
runOnPC();
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
if(isMobile) {
|
||||
if (demote.status.isShow) {
|
||||
|
||||
} else {
|
||||
if (isMobile) {
|
||||
runOnMobile();
|
||||
}else{
|
||||
} else {
|
||||
runOnPC();
|
||||
}
|
||||
}
|
||||
@@ -69,12 +64,12 @@ function runOnMobile() {
|
||||
$('.up-icon').show();
|
||||
|
||||
$(document).swipe({
|
||||
swipe:function(event, direction, distance, duration, fingerCount) {
|
||||
swipe: function(event, direction, distance, duration, fingerCount) {
|
||||
|
||||
if(duration < 300) {
|
||||
if(direction == "up"){
|
||||
if (duration < 300) {
|
||||
if (direction == "up") {
|
||||
navigateDown();
|
||||
}else if(direction == "down"){
|
||||
} else if (direction == "down") {
|
||||
navigateUp();
|
||||
}
|
||||
}
|
||||
@@ -84,7 +79,7 @@ function runOnMobile() {
|
||||
}
|
||||
|
||||
function runOnPC() {
|
||||
$(document).on("mousewheel DOMMouseScroll", function (e) {
|
||||
$(document).on("mousewheel DOMMouseScroll", function(e) {
|
||||
if (!scrolling) {
|
||||
if (e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0) {
|
||||
navigateUp();
|
||||
@@ -107,25 +102,27 @@ function navigateDown() {
|
||||
|
||||
function slidePage(isNext) {
|
||||
scrolling = true;
|
||||
list.css({display:'none'});
|
||||
list.css({
|
||||
display: 'none'
|
||||
});
|
||||
// var prev = getPrev(pos);
|
||||
// list.eq(prev).addClass('fadeOutUp');
|
||||
// list.eq(prev).one("animationend", onOutAnimationend);
|
||||
list.eq(pos).one("animationend", onInAnimationend);
|
||||
|
||||
if(isNext) {
|
||||
if (isNext) {
|
||||
list.eq(pos).removeAttr('style').addClass('bounceInUp');
|
||||
}else{
|
||||
} else {
|
||||
list.eq(pos).removeAttr('style').addClass('bounceInDown');
|
||||
}
|
||||
|
||||
if(pos == 3 && !svgObject) {
|
||||
if (pos == 3 && !svgObject) {
|
||||
setTagCloud();
|
||||
}
|
||||
|
||||
if(isMobile && pos < list.length - 1){
|
||||
if (isMobile && pos < list.length - 1) {
|
||||
$('.up-icon').show();
|
||||
}else{
|
||||
} else {
|
||||
$('.up-icon').hide();
|
||||
}
|
||||
}
|
||||
@@ -142,7 +139,7 @@ function onInAnimationend(event) {
|
||||
|
||||
function getPrev(p) {
|
||||
p--;
|
||||
if(p < 0) {
|
||||
if (p < 0) {
|
||||
p = list.length - 1;
|
||||
}
|
||||
return p;
|
||||
@@ -150,7 +147,7 @@ function getPrev(p) {
|
||||
|
||||
function getNext(p) {
|
||||
p++;
|
||||
if(p > list.length - 1) {
|
||||
if (p > list.length - 1) {
|
||||
p = 0;
|
||||
}
|
||||
return p;
|
||||
@@ -159,27 +156,83 @@ function getNext(p) {
|
||||
function setTagCloud() {
|
||||
var curElement = $('#skill');
|
||||
|
||||
var entries = [
|
||||
{ label: 'HTML5',url: 'javascript:void(0);',target: ''},
|
||||
{ label: 'CSS3',url: 'javascript:void(0);',target: ''},
|
||||
{ label: 'JavaScript',url: 'javascript:void(0);',target: ''},
|
||||
{ label: 'jQuery',url: 'javascript:void(0);',target: ''},
|
||||
{ label: 'Zepto',url: 'javascript:void(0);',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 entries = [{
|
||||
label: 'HTML5',
|
||||
url: 'javascript:void(0);',
|
||||
target: ''
|
||||
}, {
|
||||
label: 'CSS3',
|
||||
url: 'javascript:void(0);',
|
||||
target: ''
|
||||
}, {
|
||||
label: 'JavaScript',
|
||||
url: 'javascript:void(0);',
|
||||
target: ''
|
||||
}, {
|
||||
label: 'jQuery',
|
||||
url: 'javascript:void(0);',
|
||||
target: ''
|
||||
}, {
|
||||
label: 'Zepto',
|
||||
url: 'javascript:void(0);',
|
||||
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 = {
|
||||
entries: entries,
|
||||
@@ -197,5 +250,3 @@ function setTagCloud() {
|
||||
|
||||
svgObject = true;
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -84,14 +84,14 @@ init = (pathName) => {
|
||||
.pipe(plumber({
|
||||
errorHandler: onErrorHandler
|
||||
}))
|
||||
.pipe(babel({
|
||||
presets: ['env']
|
||||
}))
|
||||
.pipe(webpack({
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
}
|
||||
}))
|
||||
.pipe(babel({
|
||||
presets: ['env']
|
||||
}))
|
||||
//.pipe(webpack( require('./webpack.config.js')(pathConfig.scriptBuildPath) ))
|
||||
.pipe(gulp.dest(pathConfig.babelOutPath))
|
||||
.on("end", reload);
|
||||
@@ -105,7 +105,9 @@ init = (pathName) => {
|
||||
.pipe(plumber({
|
||||
errorHandler: onErrorHandler
|
||||
}))
|
||||
.pipe(uglify())
|
||||
.pipe(uglify({
|
||||
ie8: true
|
||||
}))
|
||||
.pipe(gulp.dest(config.build))
|
||||
.on("end", reload);
|
||||
});
|
||||
@@ -181,7 +183,7 @@ init = (pathName) => {
|
||||
});
|
||||
|
||||
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