mirror of
https://github.com/moonlight-stream/moonlight-stream.github.io.git
synced 2026-02-16 02:20:56 +00:00
Bare bones of new site
This commit is contained in:
87
js/init.js
Normal file
87
js/init.js
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
Escape Velocity by HTML5 UP
|
||||
html5up.net | @n33co
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
skel.init({
|
||||
reset: 'full',
|
||||
breakpoints: {
|
||||
'global': { range: '*', href: 'css/style.css' },
|
||||
'desktop': { range: '641-', href: 'css/style-desktop.css', containers: 1200, grid: { gutters: 50 } },
|
||||
'1000px': { range: '641-1200', href: 'css/style-1000px.css', containers: 1000, grid: { gutters: 35 }, viewport: { width: 1080 } },
|
||||
'mobile': { range: '-640', href: 'css/style-mobile.css', containers: '100%', grid: { collapse: true, gutters: 10 }, viewport: { scalable: false } }
|
||||
}
|
||||
}, {
|
||||
layers: {
|
||||
layers: {
|
||||
navPanel: {
|
||||
hidden: true,
|
||||
breakpoints: 'mobile',
|
||||
position: 'top-left',
|
||||
side: 'left',
|
||||
animation: 'pushX',
|
||||
width: '80%',
|
||||
height: '100%',
|
||||
clickToClose: true,
|
||||
html: '<div data-action="navList" data-args="nav"></div>',
|
||||
orientation: 'vertical'
|
||||
},
|
||||
titleBar: {
|
||||
breakpoints: 'mobile',
|
||||
position: 'top-left',
|
||||
side: 'top',
|
||||
height: 44,
|
||||
width: '100%',
|
||||
html: '<span class="toggle" data-action="toggleLayer" data-args="navPanel"></span><span class="title" data-action="copyHTML" data-args="logo"></span>'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
||||
var $window = $(window),
|
||||
$body = $('body');
|
||||
|
||||
// Disable animations/transitions until the page has loaded.
|
||||
$body.addClass('is-loading');
|
||||
|
||||
$window.on('load', function() {
|
||||
$body.removeClass('is-loading');
|
||||
});
|
||||
|
||||
// Forms (IE<10).
|
||||
var $form = $('form');
|
||||
if ($form.length > 0) {
|
||||
|
||||
$form.find('.form-button-submit')
|
||||
.on('click', function() {
|
||||
$(this).parents('form').submit();
|
||||
return false;
|
||||
});
|
||||
|
||||
if (skel.vars.IEVersion < 10) {
|
||||
$.fn.n33_formerize=function(){var _fakes=new Array(),_form = $(this);_form.find('input[type=text],textarea').each(function() { var e = $(this); if (e.val() == '' || e.val() == e.attr('placeholder')) { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } }).blur(function() { var e = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) return; if (e.val() == '') { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } }).focus(function() { var e = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) return; if (e.val() == e.attr('placeholder')) { e.removeClass('formerize-placeholder'); e.val(''); } }); _form.find('input[type=password]').each(function() { var e = $(this); var x = $($('<div>').append(e.clone()).remove().html().replace(/type="password"/i, 'type="text"').replace(/type=password/i, 'type=text')); if (e.attr('id') != '') x.attr('id', e.attr('id') + '_fakeformerizefield'); if (e.attr('name') != '') x.attr('name', e.attr('name') + '_fakeformerizefield'); x.addClass('formerize-placeholder').val(x.attr('placeholder')).insertAfter(e); if (e.val() == '') e.hide(); else x.hide(); e.blur(function(event) { event.preventDefault(); var e = $(this); var x = e.parent().find('input[name=' + e.attr('name') + '_fakeformerizefield]'); if (e.val() == '') { e.hide(); x.show(); } }); x.focus(function(event) { event.preventDefault(); var x = $(this); var e = x.parent().find('input[name=' + x.attr('name').replace('_fakeformerizefield', '') + ']'); x.hide(); e.show().focus(); }); x.keypress(function(event) { event.preventDefault(); x.val(''); }); }); _form.submit(function() { $(this).find('input[type=text],input[type=password],textarea').each(function(event) { var e = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) e.attr('name', ''); if (e.val() == e.attr('placeholder')) { e.removeClass('formerize-placeholder'); e.val(''); } }); }).bind("reset", function(event) { event.preventDefault(); $(this).find('select').val($('option:first').val()); $(this).find('input,textarea').each(function() { var e = $(this); var x; e.removeClass('formerize-placeholder'); switch (this.type) { case 'submit': case 'reset': break; case 'password': e.val(e.attr('defaultValue')); x = e.parent().find('input[name=' + e.attr('name') + '_fakeformerizefield]'); if (e.val() == '') { e.hide(); x.show(); } else { e.show(); x.hide(); } break; case 'checkbox': case 'radio': e.attr('checked', e.attr('defaultValue')); break; case 'text': case 'textarea': e.val(e.attr('defaultValue')); if (e.val() == '') { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } break; default: e.val(e.attr('defaultValue')); break; } }); window.setTimeout(function() { for (x in _fakes) _fakes[x].trigger('formerize_sync'); }, 10); }); return _form; };
|
||||
$form.n33_formerize();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// CSS polyfills (IE<9).
|
||||
if (skel.vars.IEVersion < 9)
|
||||
$(':last-child').addClass('last-child');
|
||||
|
||||
// Dropdowns.
|
||||
$('#nav > ul').dropotron({
|
||||
mode: 'fade',
|
||||
noOpenerFade: true,
|
||||
alignment: 'center',
|
||||
detach: false
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
2
js/jquery.dropotron.min.js
vendored
Normal file
2
js/jquery.dropotron.min.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/* jquery.dropotron.js v1.4.2 | (c) n33 | n33.co | MIT licensed */
|
||||
(function(e){var t="openerActiveClass",n="left",r="doCollapseAll",i="position",s="trigger",o="disableSelection_dropotron",u="addClass",a="doCollapse",f=!1,l="outerWidth",c="removeClass",h="preventDefault",p="dropotron",d="clearTimeout",v="length",m="right",g="speed",y=!0,b="parent",w="none",E="stopPropagation",S=":visible",x="absolute",T="click",N="doExpand",C="css",k="center",L="toggle",A="baseZIndex",O="offsetX",M="alignment",_="children",D="submenuClassPrefix",P="doToggle",H="hover",B="ul",j="relative",F="opacity",I="z-index",q="opener",R="find",U="px",z=null,W="fadeTo",X="offset";e.fn[o]=function(){return e(this)[C]("user-select",w)[C]("-khtml-user-select",w)[C]("-moz-user-select",w)[C]("-o-user-select",w)[C]("-webkit-user-select",w)},e.fn[p]=function(t){var n;if(this[v]>1)for(n=0;n<this[v];n++)e(this[n])[p](t);return e[p](e.extend({selectorParent:e(this)},t))},e[p]=function(w){var et=e.extend({selectorParent:z,baseZIndex:1e3,menuClass:p,expandMode:H,hoverDelay:150,hideDelay:250,openerClass:q,openerActiveClass:"active",submenuClassPrefix:"level-",mode:"fade",speed:"fast",easing:"swing",alignment:n,offsetX:0,offsetY:0,globalOffsetY:0,IEOffsetX:0,IEOffsetY:0,noOpenerFade:y,detach:y,cloneOnDetach:y},w),tt=et.selectorParent,nt=tt[R](B),rt=e("body"),it=e(window),st=f,ot=z,ut=z;tt.on(r,function(){nt[s](a)}),nt.each(function(){var r=e(this),p=r[b]();et.hideDelay>0&&r.add(p).on("mouseleave",function(){window[d](ut),ut=window.setTimeout(function(){r[s](a)},et.hideDelay)}),r[o]().hide()[u](et.menuClass)[C](i,x).on("mouseenter",function(){window[d](ut)}).on(N,function(){var o,h,v,w,E,T,N,_,D,P,H;if(r.is(S))return f;window[d](ut),nt.each(function(){var t=e(this);e.contains(t.get(0),p.get(0))||t[s](a)}),o=p[X](),h=p[i](),v=p[b]()[i](),w=p[l](),E=r[l](),T=r[C](I)==et[A];if(T){et.detach?N=o:N=h,P=N.top+p.outerHeight()+et.globalOffsetY,_=et[M],r[c](n)[c](m)[c](k);switch(et[M]){case m:D=N[n]-E+w,D<0&&(D=N[n],_=n);break;case k:D=N[n]-Math.floor((E-w)/2),D<0?(D=N[n],_=n):D+E>it.width()&&(D=N[n]-E+w,_=m);break;case n:default:D=N[n],D+E>it.width()&&(D=N[n]-E+w,_=m)}r[u](_)}else{p[C](i)==j||p[C](i)==x?(P=et.offsetY,D=-1*h[n]):(P=h.top+et.offsetY,D=0);switch(et[M]){case m:D+=-1*p[b]()[l]()+et[O];break;case k:case n:default:D+=p[b]()[l]()+et[O]}}navigator.userAgent.match(/MSIE ([0-9]+)\./)&&RegExp.$1<8&&(D+=et.IEOffsetX,P+=et.IEOffsetY),r[C](n,D+U)[C]("top",P+U),r[C](F,"0.01").show(),H=f,p[C](i)==j||p[C](i)==x?D=-1*h[n]:D=0,r[X]()[n]<0?(D+=p[b]()[l]()-et[O],H=y):r[X]()[n]+E>it.width()&&(D+=-1*p[b]()[l]()-et[O],H=y),H&&r[C](n,D+U),r.hide()[C](F,"1");switch(et.mode){case"zoom":st=y,p[u](et[t]),r.animate({width:L,height:L},et[g],et.easing,function(){st=f});break;case"slide":st=y,p[u](et[t]),r.animate({height:L},et[g],et.easing,function(){st=f});break;case"fade":st=y,T&&!et.noOpenerFade?(et[g]=="slow"?H=80:et[g]=="fast"?H=40:H=Math.floor(et[g]/2),p[W](H,.01,function(){p[u](et[t]),p[W](et[g],1),r.fadeIn(et[g],function(){st=f})})):(p[u](et[t]),p[W](et[g],1),r.fadeIn(et[g],function(){st=f}));break;case"instant":default:p[u](et[t]),r.show()}return f}).on(a,function(){return r.is(S)?(r.hide(),p[c](et[t]),r[R]("."+et[t])[c](et[t]),r[R](B).hide(),f):f}).on(P,function(){return r.is(S)?r[s](a):r[s](N),f}),p[o]()[u](q)[C]("cursor","pointer").on(T,function(e){if(st)return;e[h](),e[E](),r[s](P)}),et.expandMode==H&&p[H](function(){if(st)return;ot=window.setTimeout(function(){r[s](N)},et.hoverDelay)},function(){window[d](ot)})}),nt[R]("a")[C]("display","block").on(T,function(t){if(st)return;e(this).attr("href")[v]<1&&t[h]()}),tt[R]("li")[C]("white-space","nowrap").each(function(){var t=e(this),n=t[_]("a"),i=t[_](B);n.on(T,function(t){e(this).attr("href")[v]<1?t[h]():t[E]()}),n[v]>0&&i[v]==0&&t.on(T,function(e){if(st)return;tt[s](r),e[E]()})}),tt[_]("li").each(function(){var t,n,r,i,s=e(this),o=s[_](B);if(o[v]>0){et.detach&&(et.cloneOnDetach&&(t=o.clone(),t.attr("class","").hide().appendTo(o[b]())),o.detach().appendTo(rt));for(n=et[A],r=1,i=o;i[v]>0;r++)i[C](I,n++),et[D]&&i[u](et[D]+(n-1-et[A])),i=i[R]("> li > ul")}}),it.on("scroll",function(){tt[s](r)}).on("keypress",function(e){!st&&e.keyCode==27&&(e[h](),tt[s](r))}),rt.on(T,function(){st||tt[s](r)})}})(jQuery);
|
||||
4
js/jquery.min.js
vendored
Normal file
4
js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
js/skel-layers.min.js
vendored
Normal file
2
js/skel-layers.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
js/skel.min.js
vendored
Normal file
2
js/skel.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user