Build JS for myself
This commit is contained in:
parent
c36643279b
commit
d32fa3a50b
10 changed files with 18 additions and 14 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -129,4 +129,4 @@ typings/
|
|||
|
||||
# End of https://www.gitignore.io/api/node,hugo,jetbrains
|
||||
|
||||
static/build/css
|
||||
static/build
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
<script src="/build/js/jquery.min.js"></script>
|
||||
<script src="/build/js/jquery.dropotron.min.js"></script>
|
||||
<script src="/build/js/jquery.scrollgress.min.js"></script>
|
||||
<script src="/build/js/util.js"></script>
|
||||
<script src="/build/js/main.js"></script>
|
||||
<script src="/build/js/app.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
"uglifyify": "3.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"font-awesome": "4.7.0"
|
||||
"font-awesome": "4.7.0",
|
||||
"jquery": "3.2.1"
|
||||
}
|
||||
}
|
||||
|
|
5
static/build/js/jquery.min.js
vendored
5
static/build/js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
2
static/build/js/jquery.scrollgress.min.js
vendored
2
static/build/js/jquery.scrollgress.min.js
vendored
|
@ -1,2 +0,0 @@
|
|||
/* jquery.scrollgress vx.x | (c) @ajlkn | MIT licensed */
|
||||
(function(){var e="scrollwatchResume",t="length",n="removeData",r="data",i="scrollwatch-state",s="scrollwatch-suspended",o="scrollgress-suspended",u="setTimeout",a="trigger",f="scroll",l="scrollwatchSuspend",c=!0,h="scrollwatch",p=null,d="top",v="rangeMin",m="rangeMax",g="scrollgress",y=!1,b="anchor",w="unscrollwatch",E="unscrollgress",S="element",x="-id",T="scroll.",N="height",C="scrollTop",k="center",L="bottom",A=$(window),O=$(document),M=1e3;jQuery.fn[e]=function(){var l,c;if(this[t]==0)return $(this);if(this[t]>1){for(l=0;l<this[t];l++)$(this[l])[e]();return this}return c=$(this),c[r](i,-1)[n](s)[n](o),window[u](function(){A[a](f)},50),c},jQuery.fn[l]=function(){var e,n;if(this[t]==0)return $(this);if(this[t]>1){for(e=0;e<this[t];e++)$(this[e])[l]();return this}return n=$(this),n[r](s,c),window[u](function(){A[a](f)},50),n},jQuery.fn[h]=function(e){var n,a,f,l,w;if(this[t]==0)return $(this);if(this[t]>1){for(n=0;n<this[t];n++)$(this[n])[h](e);return this}return a=jQuery.extend({range:.5,rangeMin:p,rangeMax:p,anchor:d,init:p,on:p,off:p,delay:0},e),a[v]===p&&(a[v]=-1*a.range),a[m]===p&&(a[m]=a.range),f=$(this),a.init&&(w=a.init),f[r](s,y)[r](i,-1)[g](function(e){if(f[r](s)===c){a.on&&a.on(f),f[r](o,c);return}window.clearTimeout(l),l=window[u](function(){var t,n,s=parseInt(f[r](i));if(s==0||s==-1){t=a[v]===y||e>=a[v],n=a[m]===y||e<=a[m];if(t&&n){f[r](i,1),a.on&&a.on(f),w&&(w(f,c),w=p);return}}if(s==1||s==-1){t=a[v]!==y&&e<a[v],n=a[m]!==y&&e>a[m];if(t||n){f[r](i,0),a.off&&a.off(f),w&&(w(f,y),w=p);return}}},w?0:a.delay)},{anchor:a[b]},h),f},jQuery.fn[w]=function(){var e,r;if(this[t]==0)return $(this);if(this[t]>1){for(e=0;e<this[t];e++)$(this[e])[w]();return this}return r=$(this),r[n](i)[E](h),r},jQuery.fn[g]=function(e,n,i){var s,u,l,h,p;if(this[t]==0)return $(this);if(this[t]>1){for(s=0;s<this[t];s++)$(this[s])[g](e,n,i);return $(this)}return i||(i=g),u=jQuery.extend({anchor:d,direction:"both",scope:S,easing:0},n),l=$(this),l[r](i+x)||l[r](i+x,M++),h=l[r](i+x),p=T+i+"-"+h,A.off(p).on(p,function(){var t,n,i,s;if(l[r](o)===c)return;t=l.offset()[d],n=l.outerHeight(),i=O[N]();switch(u.scope){default:case S:switch(u[b]){default:case d:s=(t-A[C]())/n*-1;break;case k:s=(t-A[C]()-(A[N]()-n)/2)/n*-1;break;case L:s=(t-A[C]()-(A[N]()-n))/n*-1}break;case"window":switch(u[b]){default:case d:s=(t-A[C]())/A[N]()*-1;break;case k:s=(t-A[C]()-(A[N]()-n)/2)/A[N]()*-1;break;case L:s=(t-A[C]()-(A[N]()-n))/A[N]()*-1}}u.direction=="forwards"?s=Math.max(0,s):u.direction=="backwards"&&(s=Math.min(0,s)),s>0?s=Math.max(0,s-u.easing/100):s<0&&(s=Math.min(0,s+u.easing/100)),e(s,l)})[a](f),l},jQuery.fn[E]=function(e){var i,s,o,u;if(this[t]==0)return $(this);if(this[t]>1){for(i=0;i<this[t];i++)$(this[i])[E](e);return $(this)}return e||(e=g),s=$(this),s[r](e+x)?(o=s[r](e+x),u=T+e+"-"+o,A.off(u),s[n](e+x),s):s}})();
|
|
@ -0,0 +1,6 @@
|
|||
require('./jquery-global');
|
||||
|
||||
// Install alpha things
|
||||
require('./alpha/jquery.dropotron.min');
|
||||
require('./alpha/util');
|
||||
require('./alpha/main');
|
8
static/src/js/jquery-global.js
vendored
Normal file
8
static/src/js/jquery-global.js
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
const jQuery = require('jquery');
|
||||
|
||||
window.$ = jQuery;
|
||||
window.jQuery = jQuery;
|
||||
global.$ = jQuery;
|
||||
global.jQuery = jQuery;
|
||||
|
||||
module.exports = jQuery;
|
Loading…
Reference in a new issue