ServState 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ /*! UIkit 1.2.0 | http://www.getuikit.com | (c) 2013 YOOtheme | MIT License */
2
+
3
+ (function(t,e){"use strict";var i=t.UIkit||{};i.fn||(i.fn=function(e,o){var s=arguments,n=e.match(/^([a-z\-]+)(?:\.([a-z]+))?/i),a=n[1],r=n[2];return i[a]?this.each(function(){var e=t(this),n=e.data(a);n||e.data(a,n=new i[a](this,r?void 0:o)),r&&n[r].apply(n,Array.prototype.slice.call(s,1))}):(t.error("UIkit component ["+a+"] does not exist."),this)},i.version="1.2.0",i.support={},i.support.transition=function(){var t=function(){var t,i=e.body||e.documentElement,o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(t in o)if(void 0!==i.style[t])return o[t]}();return t&&{end:t}}(),i.support.touch="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,i.support.mutationobserver=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver||null,i.Utils={},i.Utils.debounce=function(t,e,i){var o;return function(){var s=this,n=arguments,a=function(){o=null,i||t.apply(s,n)},r=i&&!o;clearTimeout(o),o=setTimeout(a,e),r&&t.apply(s,n)}},i.Utils.options=function(e){if(t.isPlainObject(e))return e;var i=e?e.indexOf("{"):-1,o={};if(-1!=i)try{o=Function("","var json = "+e.substr(i)+"; return JSON.parse(JSON.stringify(json));")()}catch(s){}return o},t.UIkit=i,t.fn.uk=i.fn,t.UIkit.langdirection="rtl"==t("html").attr("dir")?"right":"left",t(function(){if(t(e).trigger("uk-domready"),i.support.mutationobserver){var o=new i.support.mutationobserver(i.Utils.debounce(function(){t(e).trigger("uk-domready")},300));o.observe(document.body,{childList:!0,subtree:!0})}}))})(jQuery,document),function(t){function e(t){return"tagName"in t?t:t.parentNode}function i(t,e,i,o){var s=Math.abs(t-e),n=Math.abs(i-o);return s>=n?t-e>0?"Left":"Right":i-o>0?"Up":"Down"}function o(){u=null,h.last&&(h.el.trigger("longTap"),h={})}function s(){u&&clearTimeout(u),u=null}function n(){a&&clearTimeout(a),r&&clearTimeout(r),l&&clearTimeout(l),u&&clearTimeout(u),a=r=l=u=null,h={}}var a,r,l,u,h={},c=750;t(document).ready(function(){var d,f;t(document.body).bind("touchstart",function(i){d=Date.now(),f=d-(h.last||d),h.el=t(e(i.originalEvent.touches[0].target)),a&&clearTimeout(a),h.x1=i.originalEvent.touches[0].pageX,h.y1=i.originalEvent.touches[0].pageY,f>0&&250>=f&&(h.isDoubleTap=!0),h.last=d,u=setTimeout(o,c)}).bind("touchmove",function(t){s(),h.x2=t.originalEvent.touches[0].pageX,h.y2=t.originalEvent.touches[0].pageY}).bind("touchend",function(){s(),h.x2&&Math.abs(h.x1-h.x2)>30||h.y2&&Math.abs(h.y1-h.y2)>30?l=setTimeout(function(){h.el.trigger("swipe"),h.el.trigger("swipe"+i(h.x1,h.x2,h.y1,h.y2)),h={}},0):"last"in h&&(r=setTimeout(function(){var e=t.Event("tap");e.cancelTouch=n,h.el.trigger(e),h.isDoubleTap?(h.el.trigger("doubleTap"),h={}):a=setTimeout(function(){a=null,h.el.trigger("singleTap"),h={}},250)},0))}).bind("touchcancel",n),t(window).bind("scroll",n)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(e){t.fn[e]=function(t){return this.bind(e,t)}})}(jQuery),function(t,e){"use strict";var i=function(e,i){var o=this;this.options=t.extend({},this.options,i),this.element=t(e),this.element.data("alert")||(this.element.on("click",this.options.trigger,function(t){t.preventDefault(),o.close()}),this.element.data("alert",this))};t.extend(i.prototype,{options:{fade:!0,duration:200,trigger:".uk-alert-close"},close:function(){function t(){e.trigger("closed").remove()}var e=this.element.trigger("close");this.options.fade?e.css("overflow","hidden").css("max-height",e.height()).animate({height:0,opacity:0,"padding-top":0,"padding-bottom":0,"margin-top":0,"margin-bottom":0},this.options.duration,t):t()}}),e.alert=i,t(document).on("click.alert.uikit","[data-uk-alert]",function(o){var s=t(this);if(!s.data("alert")){var n=new i(s,e.Utils.options(s.data("uk-alert")));t(o.target).is(s.data("alert").options.trigger)&&(o.preventDefault(),n.close())}})}(jQuery,jQuery.UIkit),function(t,e){"use strict";var i=function(e,i){var o=this,s=t(e);s.data("buttonRadio")||(this.options=t.extend({},this.options,i),this.element=s.on("click",this.options.target,function(e){e.preventDefault(),s.find(o.options.target).not(this).removeClass("uk-active").blur(),s.trigger("change",[t(this).addClass("uk-active")])}),this.element.data("buttonRadio",this))};t.extend(i.prototype,{options:{target:".uk-button"},getSelected:function(){this.element.find(".uk-active")}});var o=function(e,i){var o=t(e);o.data("buttonCheckbox")||(this.options=t.extend({},this.options,i),this.element=o.on("click",this.options.target,function(e){e.preventDefault(),o.trigger("change",[t(this).toggleClass("uk-active").blur()])}),this.element.data("buttonCheckbox",this))};t.extend(o.prototype,{options:{target:".uk-button"},getSelected:function(){this.element.find(".uk-active")}});var s=function(e,i){var o=this,s=t(e);s.data("button")||(this.options=t.extend({},this.options,i),this.element=s.on("click",function(t){t.preventDefault(),o.toggle(),o.element.blur()}),this.element.data("button",this))};t.extend(s.prototype,{options:{},toggle:function(){this.element.toggleClass("uk-active")}}),e.button=s,e.buttonCheckbox=o,e.buttonRadio=i,t(document).on("click.buttonradio.uikit","[data-uk-button-radio]",function(o){var s=t(this);if(!s.data("buttonRadio")){var n=new i(s,e.Utils.options(s.attr("data-uk-button-radio")));t(o.target).is(n.options.target)&&t(o.target).trigger("click")}}),t(document).on("click.buttoncheckbox.uikit","[data-uk-button-checkbox]",function(i){var s=t(this);if(!s.data("buttonCheckbox")){var n=new o(s,e.Utils.options(s.attr("data-uk-button-checkbox")));t(i.target).is(n.options.target)&&t(i.target).trigger("click")}}),t(document).on("click.button.uikit","[data-uk-button]",function(){var e=t(this);e.data("button")||(new s(e,e.attr("data-uk-button")),e.trigger("click"))})}(jQuery,jQuery.UIkit),function(t,e){"use strict";var i=!1,o=function(e,o){var s=this,n=t(e);n.data("dropdown")||(this.options=t.extend({},this.options,o),this.element=n,this.dropdown=this.element.find(".uk-dropdown"),this.centered=this.dropdown.hasClass("uk-dropdown-center"),this.justified=this.options.justify?t(this.options.justify):!1,this.boundary=t(this.options.boundary),this.boundary.length||(this.boundary=t(window)),"click"==this.options.mode?this.element.on("click",function(e){t(e.target).parents(".uk-dropdown").length||e.preventDefault(),i&&i[0]!=s.element[0]&&i.removeClass("uk-open"),s.element.hasClass("uk-open")?(t(e.target).is("a")||!s.element.find(".uk-dropdown").find(e.target).length)&&(s.element.removeClass("uk-open"),i=!1):(s.checkDimensions(),s.element.addClass("uk-open"),i=s.element,t(document).off("click.outer.dropdown"),setTimeout(function(){t(document).on("click.outer.dropdown",function(e){!i||i[0]!=s.element[0]||!t(e.target).is("a")&&s.element.find(".uk-dropdown").find(e.target).length||(i.removeClass("uk-open"),t(document).off("click.outer.dropdown"))})},10))}):this.element.on("mouseenter",function(){s.remainIdle&&clearTimeout(s.remainIdle),i&&i[0]!=s.element[0]&&i.removeClass("uk-open"),s.checkDimensions(),s.element.addClass("uk-open"),i=s.element}).on("mouseleave",function(){s.remainIdle=setTimeout(function(){s.element.removeClass("uk-open"),s.remainIdle=!1,i&&i[0]==s.element[0]&&(i=!1)},s.options.remaintime)}),this.element.data("dropdown",this))};t.extend(o.prototype,{remainIdle:!1,options:{mode:"hover",remaintime:800,justify:!1,boundary:t(window)},checkDimensions:function(){if(this.dropdown.length){var e=this.dropdown.css("margin-"+t.UIkit.langdirection,"").css("min-width",""),i=e.show().offset(),o=e.outerWidth(),s=this.boundary.width(),n=this.boundary.offset()?this.boundary.offset().left:0;if(this.centered&&(e.css("margin-"+t.UIkit.langdirection,-1*(parseFloat(o)/2-e.parent().width()/2)),i=e.offset(),(o+i.left>s||0>i.left)&&(e.css("margin-"+t.UIkit.langdirection,""),i=e.offset())),this.justified&&this.justified.length){var a=this.justified.outerWidth();if(e.css("min-width",a),"right"==t.UIkit.langdirection){var r=s-(this.justified.offset().left+a),l=s-(e.offset().left+e.outerWidth());e.css("margin-right",r-l)}else e.css("margin-left",this.justified.offset().left-i.left);i=e.offset()}o+(i.left-n)>s&&(e.addClass("uk-dropdown-flip"),i=e.offset()),0>i.left&&e.addClass("uk-dropdown-stack"),e.css("display","")}}}),e.dropdown=o;var s=e.support.touch?"touchstart":"mouseenter";t(document).on(s+".dropdown.uikit","[data-uk-dropdown]",function(){var i=t(this);if(!i.data("dropdown")){var n=new o(i,e.Utils.options(i.data("uk-dropdown")));"mouseenter"==s&&"hover"==n.options.mode&&i.trigger("mouseenter")}})}(jQuery,jQuery.UIkit),function(t,e){"use strict";var i=t(window),o="resize orientationchange",s=function(s,n){var a=this,r=t(s);r.data("gridMatchHeight")||(this.options=t.extend({},this.options,n),this.element=r,this.columns=this.element.children(),this.elements=this.options.target?this.element.find(this.options.target):this.columns,this.columns.length&&(i.on(o,function(){var o=function(){a.match()};return t(function(){o(),i.on("load",o)}),e.Utils.debounce(o,150)}()),t(document).on("uk-domready",function(){a.columns=a.element.children(),a.elements=a.options.target?a.element.find(a.options.target):a.columns,a.match()}),this.element.data("gridMatch",this)))};t.extend(s.prototype,{options:{target:!1},match:function(){this.revert();var e=this.columns.filter(":visible:first");if(e.length){var i=Math.ceil(100*parseFloat(e.css("width"))/parseFloat(e.parent().css("width")))>=100?!0:!1,o=0,s=this;if(!i)return this.elements.each(function(){o=Math.max(o,t(this).outerHeight())}).each(function(e){var i=t(this),n="border-box"==i.css("box-sizing")?"outerHeight":"height",a=s.columns.eq(e),r=i.height()+(o-a[n]());i.css("min-height",r+"px")}),this}},revert:function(){return this.elements.css("min-height",""),this}});var n=function(s){var n=this,a=t(s);a.data("gridMargin")||(this.element=a,this.columns=this.element.children(),this.columns.length&&(i.on(o,function(){var o=function(){n.process()};return t(function(){o(),i.on("load",o)}),e.Utils.debounce(o,150)}()),t(document).on("uk-domready",function(){n.columns=n.element.children(),n.process()}),this.element.data("gridMargin",this)))};t.extend(n.prototype,{process:function(){this.revert();var e=!1,i=this.columns.filter(":visible:first"),o=i.length?i.offset().top:!1;if(o!==!1)return this.columns.each(function(){var i=t(this);i.is(":visible")&&(e?i.addClass("uk-grid-margin"):i.offset().top!=o&&(i.addClass("uk-grid-margin"),e=!0))}),this},revert:function(){return this.columns.removeClass("uk-grid-margin"),this}}),e.gridMatch=s,e.gridMargin=n,t(document).on("uk-domready",function(){t("[data-uk-grid-match],[data-uk-grid-margin]").each(function(){var i,o=t(this);o.is("[data-uk-grid-match]")&&!o.data("gridMatch")&&(i=new s(o,e.Utils.options(o.attr("data-uk-grid-match")))),o.is("[data-uk-grid-margin]")&&!o.data("gridMargin")&&(i=new n(o,e.Utils.options(o.attr("data-uk-grid-margin"))))})})}(jQuery,jQuery.UIkit),function(t,e,i){"use strict";var o=!1,s=t("html"),n=function(i,s){var n=this;this.element=t(i),this.options=t.extend({keyboard:!0,show:!1,bgclose:!0},s),this.transition=e.support.transition,this.dialog=this.element.find(".uk-modal-dialog"),this.element.on("click",".uk-modal-close",function(t){t.preventDefault(),n.hide()}).on("click",function(e){var i=t(e.target);i[0]==n.element[0]&&n.options.bgclose&&n.hide()}),this.options.keyboard&&t(document).on("keyup.ui.modal.escape",function(t){o&&27==t.which&&n.isActive()&&n.hide()})};t.extend(n.prototype,{transition:!1,toggle:function(){this[this.isActive()?"hide":"show"]()},show:function(){this.isActive()||(o&&o.hide(!0),this.resize(),this.element.removeClass("uk-open").show(),o=this,s.addClass("uk-modal-page").height(),this.element.addClass("uk-open").trigger("uk.modal.show"))},hide:function(t){if(this.isActive())if(!t&&e.support.transition){var i=this;this.element.one(e.support.transition.end,function(){i._hide()}).removeClass("uk-open")}else this._hide()},resize:function(){this.dialog.css("margin-left","");var t=parseInt(this.dialog.css("width"),10),e=t+parseInt(this.dialog.css("margin-left"),10)+parseInt(this.dialog.css("margin-right"),10)<i.width();this.dialog.css("margin-left",t&&e?-1*Math.ceil(t/2):"")},_hide:function(){this.element.hide().removeClass("uk-open"),s.removeClass("uk-modal-page"),o===this&&(o=!1),this.element.trigger("uk.modal.hide")},isActive:function(){return o==this}});var a=function(e,i){var o=this,s=t(e);s.data("modal")||(this.options=t.extend({target:s.is("a")?s.attr("href"):!1},i),this.element=s,this.modal=new n(this.options.target,i),s.on("click",function(t){t.preventDefault(),o.show()}),t.each(["show","hide","isActive"],function(t,e){o[e]=function(){return o.modal[e]()}}),this.element.data("modal",this))};a.Modal=n,e.modal=a,t(document).on("click.modal.uikit","[data-uk-modal]",function(){var i=t(this);if(!i.data("modal")){var o=new a(i,e.Utils.options(i.attr("data-uk-modal")));o.show()}}),i.on("resize orientationchange",e.Utils.debounce(function(){o&&o.resize()},150))}(jQuery,jQuery.UIkit,jQuery(window)),function(t,e){"use strict";e.support.touch&&t("html").addClass("uk-touch");var i,o=t(window),s=t(document),n={show:function(e){if(e=t(e),e.length){var a=t("html"),r=e.find(".uk-offcanvas-bar:first"),l=r.hasClass("uk-offcanvas-bar-flip")?-1:1,u=-1==l&&o.width()<window.innerWidth?window.innerWidth-o.width():0;i={x:window.scrollX,y:window.scrollY},e.addClass("uk-active"),a.css({width:window.innerWidth,height:window.innerHeight}).addClass("uk-offcanvas-page"),a.css("margin-left",(r.outerWidth()-u)*l).width(),r.addClass("uk-offcanvas-bar-show").width(),e.off(".ukoffcanvas").on("click.ukoffcanvas swipeRight.ukoffcanvas swipeLeft.ukoffcanvas",function(e){var i=t(e.target);if(!e.type.match(/swipe/)){if(i.hasClass("uk-offcanvas-bar"))return;if(i.parents(".uk-offcanvas-bar:first").length)return}e.stopImmediatePropagation(),n.hide()}),s.on("keydown.offcanvas",function(t){27===t.keyCode&&n.hide()})}},hide:function(e){var o=t("html"),n=t(".uk-offcanvas.uk-active"),a=n.find(".uk-offcanvas-bar:first");n.length&&(t.UIkit.support.transition&&!e?(o.one(t.UIkit.support.transition.end,function(){o.removeClass("uk-offcanvas-page").attr("style",""),n.removeClass("uk-active"),window.scrollTo(i.x,i.y)}).css("margin-left",""),setTimeout(function(){a.removeClass("uk-offcanvas-bar-show")},50)):(o.removeClass("uk-offcanvas-page").attr("style",""),n.removeClass("uk-active"),a.removeClass("uk-offcanvas-bar-show"),window.scrollTo(i.x,i.y)),n.off(".ukoffcanvas"),s.off(".ukoffcanvas"))}},a=function(e,i){var o=this,s=t(e);s.data("offcanvas")||(this.options=t.extend({target:s.is("a")?s.attr("href"):!1},i),this.element=s,s.on("click",function(t){t.preventDefault(),n.show(o.options.target)}),this.element.data("offcanvas",this))};a.offcanvas=n,e.offcanvas=a,s.on("click.offcanvas.uikit","[data-uk-offcanvas]",function(i){i.preventDefault();var o=t(this);o.data("offcanvas")||(new a(o,e.Utils.options(o.attr("data-uk-offcanvas"))),o.trigger("click"))})}(jQuery,jQuery.UIkit),function(t,e){"use strict";function i(e){var i=t(e),o="auto";if(i.is(":visible"))o=i.outerHeight();else{var s={position:i.css("position"),visibility:i.css("visibility"),display:i.css("display")};o=i.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),i.css(s)}return o}var o=function(e,i){var o=this,s=t(e);s.data("nav")||(this.options=t.extend({},this.options,i),this.element=s.on("click",this.options.toggler,function(e){e.preventDefault();var i=t(this);o.open(i.parent()[0]==o.element[0]?i:i.parent("li"))}),this.element.find(this.options.lists).each(function(){var e=t(this),i=e.parent(),s=i.hasClass("uk-active");e.wrap('<div style="overflow:hidden;height:0;position:relative;"></div>'),i.data("list-container",e.parent()),s&&o.open(i,!0)}),this.element.data("nav",this))};t.extend(o.prototype,{options:{toggler:">li.uk-parent > a[href='#']",lists:">li.uk-parent > ul",multiple:!1},open:function(e,o){var s=this.element,n=t(e);this.options.multiple||s.children(".uk-open").not(e).each(function(){t(this).data("list-container")&&t(this).data("list-container").stop().animate({height:0},function(){t(this).parent().removeClass("uk-open")})}),n.toggleClass("uk-open"),n.data("list-container")&&(o?n.data("list-container").stop().height(n.hasClass("uk-open")?"auto":0):n.data("list-container").stop().animate({height:n.hasClass("uk-open")?i(n.data("list-container").find("ul:first")):0}))}}),e.nav=o,t(document).on("uk-domready",function(){t("[data-uk-nav]").each(function(){var i=t(this);i.data("nav")||new o(i,e.Utils.options(i.attr("data-uk-nav")))})})}(jQuery,jQuery.UIkit),function(t,e){"use strict";var i,o,s=function(e,i){var o=this,n=t(e);n.data("tooltip")||(this.options=t.extend({},s.defaults,i),this.element=n.on({focus:function(){o.show()},blur:function(){o.hide()},mouseenter:function(){o.show()},mouseleave:function(){o.hide()}}),this.tip="function"==typeof this.options.src?this.options.src.call(this.element):this.options.src,this.element.attr("data-cached-title",this.element.attr("title")).attr("title",""),this.element.data("tooltip",this))};t.extend(s.prototype,{tip:"",show:function(){if(o&&clearTimeout(o),this.tip.length){i.stop().css({top:-2e3,visibility:"hidden"}).show(),i.html('<div class="uk-tooltip-inner">'+this.tip+"</div>");var e=this,s=t.extend({},this.element.offset(),{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}),n=i[0].offsetWidth,a=i[0].offsetHeight,r="function"==typeof this.options.offset?this.options.offset.call(this.element):this.options.offset,l="function"==typeof this.options.pos?this.options.pos.call(this.element):this.options.pos,u={display:"none",visibility:"visible",top:s.top+s.height+a,left:s.left},h=l.split("-");"left"!=h[0]&&"right"!=h[0]||"right"!=t.UIkit.langdirection||(h[0]="left"==h[0]?"right":"left");var c={bottom:{top:s.top+s.height+r,left:s.left+s.width/2-n/2},top:{top:s.top-a-r,left:s.left+s.width/2-n/2},left:{top:s.top+s.height/2-a/2,left:s.left-n-r},right:{top:s.top+s.height/2-a/2,left:s.left+s.width+r}};t.extend(u,c[h[0]]),2==h.length&&(u.left="left"==h[1]?s.left:s.left+s.width-n);var d=this.checkBoundary(u.left,u.top,n,a);if(d){switch(d){case"x":l=2==h.length?h[0]+"-"+(0>u.left?"left":"right"):0>u.left?"right":"left";break;case"y":l=2==h.length?(0>u.top?"bottom":"top")+"-"+h[1]:0>u.top?"bottom":"top";break;case"xy":l=2==h.length?(0>u.top?"bottom":"top")+"-"+(0>u.left?"left":"right"):0>u.left?"right":"left"}h=l.split("-"),t.extend(u,c[h[0]]),2==h.length&&(u.left="left"==h[1]?s.left:s.left+s.width-n)}o=setTimeout(function(){i.css(u).attr("class","uk-tooltip uk-tooltip-"+l),e.options.animation?i.css({opacity:0,display:"block"}).animate({opacity:1},parseInt(e.options.animation,10)||400):i.show(),o=!1},parseInt(this.options.delay,10)||0)}},hide:function(){this.element.is("input")&&this.element[0]===document.activeElement||(o&&clearTimeout(o),i.stop(),this.options.animation?i.fadeOut(parseInt(this.options.animation,10)||400):i.hide())},content:function(){return this.tip},checkBoundary:function(t,e,i,o){var s="";return(0>t||t+i>window.innerWidth)&&(s+="x"),(0>e||e+o>window.innerHeight)&&(s+="y"),s}}),s.defaults={offset:5,pos:"top",animation:!1,delay:0,src:function(){return this.attr("title")}},e.tooltip=s,t(function(){i=t('<div class="uk-tooltip"></div>').appendTo("body")}),t(document).on("mouseenter.tooltip.uikit focus.tooltip.uikit","[data-uk-tooltip]",function(){var i=t(this);i.data("tooltip")||(new s(i,e.Utils.options(i.attr("data-uk-tooltip"))),i.trigger("mouseenter"))})}(jQuery,jQuery.UIkit),function(t,e){"use strict";var i=function(e,i){var o=this,s=t(e);if(!s.data("switcher")){if(this.options=t.extend({},this.options,i),this.element=s.on("click",this.options.toggler,function(t){t.preventDefault(),o.show(this)}),this.options.connect){this.connect=t(this.options.connect).find(".uk-active").removeClass(".uk-active").end();var n=this.element.find(this.options.toggler).filter(".uk-active");n.length&&this.show(n)}this.element.data("switcher",this)}};t.extend(i.prototype,{options:{connect:!1,toggler:">*"},show:function(e){e=isNaN(e)?t(e):this.element.find(this.options.toggler).eq(e);var i=e;if(!i.hasClass("uk-disabled")){if(this.element.find(this.options.toggler).filter(".uk-active").removeClass("uk-active"),i.addClass("uk-active"),this.options.connect&&this.connect.length){var o=this.element.find(this.options.toggler).index(i);this.connect.children().removeClass("uk-active").eq(o).addClass("uk-active")}this.element.trigger("uk.switcher.show",[i])}}}),e.switcher=i,t(document).on("uk-domready",function(){t("[data-uk-switcher]").each(function(){var o=t(this);o.data("switcher")||new i(o,e.Utils.options(o.attr("data-uk-switcher")))})})}(jQuery,jQuery.UIkit),function(t,e){"use strict";var i=function(e,i){var o=this,s=t(e);if(!s.data("tab")){if(this.element=s,this.options=t.extend({connect:!1},this.options,i),this.options.connect&&(this.connect=t(this.options.connect)),window.location.hash){var n=this.element.children().filter(window.location.hash);n.length&&this.element.children().removeClass("uk-active").filter(n).addClass("uk-active")}var a=t('<li class="uk-tab-responsive uk-active"><a href="javascript:void(0);"></a></li>'),r=a.find("a:first"),l=t('<div class="uk-dropdown uk-dropdown-small"><ul class="uk-nav uk-nav-dropdown"></ul><div>'),u=l.find("ul");r.html(this.element.find("li.uk-active:first").find("a").text()),this.element.hasClass("uk-tab-bottom")&&l.addClass("uk-dropdown-up"),this.element.hasClass("uk-tab-flip")&&l.addClass("uk-dropdown-flip"),this.element.find("a").each(function(e){var i=t(this).parent(),s=t('<li><a href="javascript:void(0);">'+i.text()+"</a></li>").on("click",function(){o.element.data("switcher").show(e)});t(this).parents(".uk-disabled:first").length||u.append(s)}),this.element.uk("switcher",{toggler:">li:not(.uk-tab-responsive)",connect:this.options.connect}),a.append(l).uk("dropdown",{mode:"click"}),this.element.append(a).data({dropdown:a.data("dropdown"),mobilecaption:r}).on("uk.switcher.show",function(t,e){a.addClass("uk-active"),r.html(e.find("a").text())}),this.element.data("tab",this)}};t(document).on("uk-domready",function(){t("[data-uk-tab]").each(function(){var o=t(this);o.data("tab")||new i(o,e.Utils.options(o.attr("data-uk-tab")))})})}(jQuery,jQuery.UIkit),function(t,e){"use strict";var i={},o=function(e,o){var s=this,n=t(e);n.data("search")||(this.options=t.extend({},this.options,o),this.element=n,this.timer=null,this.value=null,this.input=this.element.find(".uk-search-field"),this.form=this.input.length?t(this.input.get(0).form):t(),this.input.attr("autocomplete","off"),this.input.on({keydown:function(t){if(s.form[s.input.val()?"addClass":"removeClass"](s.options.filledClass),t&&t.which&&!t.shiftKey)switch(t.which){case 13:s.done(s.selected),t.preventDefault();break;case 38:s.pick("prev"),t.preventDefault();break;case 40:s.pick("next"),t.preventDefault();break;case 27:case 9:s.hide();break;default:}},keyup:function(){s.trigger()},blur:function(t){setTimeout(function(){s.hide(t)},200)}}),this.form.find("button[type=reset]").bind("click",function(){s.form.removeClass("uk-open").removeClass("uk-loading").removeClass("uk-active"),s.value=null,s.input.focus()}),this.dropdown=t('<div class="uk-dropdown uk-dropdown-search"><ul class="uk-nav uk-nav-search"></ul></div>').appendTo(this.form).find(".uk-nav-search"),this.options.flipDropdown&&this.dropdown.parent().addClass("uk-dropdown-flip"),this.dropdown.on("mouseover",">li",function(){s.pick(t(this))}),this.renderer=new i[this.options.renderer](this),this.element.data("search",this))};t.extend(o.prototype,{options:{source:!1,param:"search",method:"post",minLength:3,delay:300,flipDropdown:!1,match:":not(.uk-skip)",skipClass:"uk-skip",loadingClass:"uk-loading",filledClass:"uk-active",listClass:"results",hoverClass:"uk-active",onLoadedResults:function(t){return t},renderer:"default"},request:function(e){var i=this;this.form.addClass(this.options.loadingClass),this.options.source?t.ajax(t.extend({url:this.options.source,type:this.options.method,dataType:"json",success:function(t){t=i.options.onLoadedResults.apply(this,[t]),i.form.removeClass(i.options.loadingClass),i.suggest(t)}},e)):this.form.removeClass(i.options.loadingClass)},pick:function(t){var e=!1;if("string"==typeof t||t.hasClass(this.options.skipClass)||(e=t),"next"==t||"prev"==t){var i=this.dropdown.children().filter(this.options.match);if(this.selected){var o=i.index(this.selected);e="next"==t?i.eq(i.length>o+1?o+1:0):i.eq(0>o-1?i.length-1:o-1)}else e=i["next"==t?"first":"last"]()}e&&e.length&&(this.selected=e,this.dropdown.children().removeClass(this.options.hoverClass),this.selected.addClass(this.options.hoverClass))},trigger:function(){var t=this,e=this.value,i={};return this.value=this.input.val(),this.value.length<this.options.minLength?this.hide():(this.value!=e&&(this.timer&&window.clearTimeout(this.timer),this.timer=window.setTimeout(function(){i[t.options.param]=t.value,t.request({data:i})},this.options.delay,this)),this)},done:function(t){this.renderer.done(t)},suggest:function(t){t&&(t===!1?this.hide():(this.selected=null,this.dropdown.empty(),this.renderer.suggest(t),this.show()))},show:function(){this.visible||(this.visible=!0,this.form.addClass("uk-open"))},hide:function(){this.visible&&(this.visible=!1,this.form.removeClass(this.options.loadingClass).removeClass("uk-open"))}}),o.addRenderer=function(t,e){i[t]=e};var s=function(e){this.search=e,this.options=t.extend({},s.defaults,e.options)};t.extend(s.prototype,{done:function(t){return t?(t.hasClass(this.options.moreResultsClass)?this.search.form.submit():t.data("choice")&&(window.location=t.data("choice").url),this.search.hide(),void 0):(this.search.form.submit(),void 0)},suggest:function(e){var i=this,o={click:function(e){e.preventDefault(),i.done(t(this).parent())}};this.options.msgResultsHeader&&t("<li>").addClass(this.options.resultsHeaderClass+" "+this.options.skipClass).html(this.options.msgResultsHeader).appendTo(this.search.dropdown),e.results&&e.results.length>0?(t(e.results).each(function(){var e=t('<li><a href="#">'+this.title+"</a></li>").data("choice",this);this.text&&e.find("a").append("<div>"+this.text+"</div>"),i.search.dropdown.append(e)}),this.options.msgMoreResults&&(t("<li>").addClass("uk-nav-divider "+i.options.skipClass).appendTo(i.dropdown),t("<li>").addClass(i.options.moreResultsClass).html('<a href="#">'+i.options.msgMoreResults+"</a>").appendTo(i.search.dropdown).on(o)),i.search.dropdown.find("li>a").on(o)):this.options.msgNoResults&&t("<li>").addClass(this.options.noResultsClass+" "+this.options.skipClass).html("<a>"+this.options.msgNoResults+"</a>").appendTo(i.search.dropdown)}}),s.defaults={resultsHeaderClass:"uk-nav-header",moreResultsClass:"",noResultsClass:"",msgResultsHeader:"Search Results",msgMoreResults:"More Results",msgNoResults:"No results found"},o.addRenderer("default",s),e.search=o,t(document).on("focus.search.uikit","[data-uk-search]",function(){var i=t(this);i.data("search")||new o(i,e.Utils.options(i.attr("data-uk-search")))})}(jQuery,jQuery.UIkit),function(t,e){"use strict";function i(t,e){var i=t;if(!i.is(":visible"))return!1;var s=o.scrollLeft(),n=o.scrollTop(),a=i.offset(),r=a.left,l=a.top;return l+i.height()>=n&&l-e.topoffset<=n+o.height()&&r+i.width()>=s&&r-e.leftoffset<=s+o.width()?!0:!1}var o=t(window),s=function(n,a){var r=t(n);if(!r.data("scrollspy")){this.options=t.extend({},s.defaults,a),this.element=t(n);var l,u,h,c=this,d=function(){var t=i(c.element,c.options);t&&!u&&(l&&clearTimeout(l),h||(c.element.addClass(c.options.initcls),c.offset=c.element.offset(),h=!0,c.element.trigger("uk-scrollspy-init")),l=setTimeout(function(){t&&c.element.addClass("uk-scrollspy-inview").addClass(c.options.cls).width()},c.options.delay),u=!0,c.element.trigger("uk.scrollspy.inview")),!t&&u&&c.options.repeat&&(c.element.removeClass("uk-scrollspy-inview").removeClass(c.options.cls),u=!1,c.element.trigger("uk.scrollspy.outview"))};o.on("scroll",d).on("resize orientationchange",e.Utils.debounce(d,50)),d(),this.element.data("scrollspy",this)}};s.defaults={cls:"uk-scrollspy-inview",initcls:"uk-scrollspy-init-inview",topoffset:0,leftoffset:0,repeat:!1,delay:0},e.scrollspy=s;var n=function(s,a){var r=t(s);if(!r.data("scrollspynav")){this.element=r,this.options=t.extend({},n.defaults,a);var l,u=[],h=this.element.find("a[href^='#']").each(function(){u.push(t(this).attr("href"))}),c=t(u.join(",")),d=this,f=function(){l=[];for(var t=0;c.length>t;t++)i(c.eq(t),d.options)&&l.push(c.eq(t));if(l.length){var e=o.scrollTop(),s=function(){for(var t=0;l.length>t;t++)if(l[t].offset().top>=e)return l[t]}();if(!s)return;d.options.closest?h.closest(d.options.closest).removeClass(d.options.cls).end().filter("a[href='#"+s.attr("id")+"']").closest(d.options.closest).addClass(d.options.cls):h.removeClass(d.options.cls).filter("a[href='#"+s.attr("id")+"']").addClass(d.options.cls)}};this.options.smoothscroll&&e.smoothScroll&&h.each(function(){new e.smoothScroll(this,d.options.smoothscroll)}),f(),o.on("scroll",f).on("resize orientationchange",e.Utils.debounce(f,50)),this.element.data("scrollspynav",this)}};n.defaults={cls:"uk-active",closest:!1,topoffset:0,leftoffset:0,smoothscroll:!1},e.scrollspynav=n,s.isInView=i,t(document).on("uk-domready",function(){t("[data-uk-scrollspy]").each(function(){var i=t(this);i.data("scrollspy")||new s(i,e.Utils.options(i.attr("data-uk-scrollspy")))}),t("[data-uk-scrollspy-nav]").each(function(){var i=t(this);i.data("scrollspynav")||new n(i,e.Utils.options(i.attr("data-uk-scrollspy-nav")))})})}(jQuery,jQuery.UIkit),function(t,e){"use strict";var i=function(e,o){var s=this,n=t(e);n.data("smoothScroll")||(this.options=t.extend({},i.defaults,o),this.element=n.on("click",function(){var e=t(this.hash).length?t(this.hash):t("body"),i=e.offset().top-s.options.offset,o=t(document).height(),n=t(window).height();return e.outerHeight(),i+n>o&&(i=o-n),t("html,body").stop().animate({scrollTop:i},s.options.duration,s.options.transition),!1}),this.element.data("smoothScroll",this))};i.defaults={duration:1e3,transition:"easeOutExpo",offset:0},e.smoothScroll=i,t.easing.easeOutExpo||(t.easing.easeOutExpo=function(t,e,i,o,s){return e==s?i+o:o*(-Math.pow(2,-10*e/s)+1)+i}),t(document).on("click.smooth-scroll.uikit","[data-uk-smooth-scroll]",function(){var o=t(this);o.data("smoothScroll")||(new i(o,e.Utils.options(o.attr("data-uk-smooth-scroll"))),o.trigger("click"))})}(jQuery,jQuery.UIkit);
@@ -0,0 +1,3 @@
1
+ module ServState
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,2 @@
1
+ $wrapperMinWidth: 480px;
2
+ $wrapperMaxWidth: 960px;
@@ -0,0 +1,15 @@
1
+ #wrapper {
2
+ min-width: $wrapperMinWidth;
3
+ max-width: $wrapperMaxWidth;
4
+ margin: 0 auto;
5
+ padding: 10px;
6
+ }
7
+ .uk-width-medium-1-2 {
8
+ padding: 10px;
9
+ }
10
+ .uk-width-medium-1-4 {
11
+ padding: 10px;
12
+ }
13
+ .uk-panel {
14
+ margin-bottom: 10px;
15
+ }
@@ -0,0 +1,2 @@
1
+ @import "base";
2
+ @import "custom";
@@ -0,0 +1,61 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>Test Wrapper Page</title>
5
+ <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
6
+ <script type="text/javascript" src="js/uikit.js"></script>
7
+ <link rel="stylesheet" href="css/uikit.gradient.min.css">
8
+
9
+ <!-- Custom includes -->
10
+ <script type="text/javascript" src="js/app.js"></script>
11
+ <link rel="stylesheet" href="style.css">
12
+ </head>
13
+ <body>
14
+ <div id="wrapper">
15
+ <header>
16
+ <h1><%=@name %> state</h1>
17
+ </header>
18
+ <div class="uk-panel uk-panel-box">
19
+ <div class="uk-panel-title">System</div>
20
+ <div class="uk-grid">
21
+ <div class="uk-width-medium-1-2">
22
+ <h4>Uptime</h4>
23
+ <p id="uptime"></p>
24
+ </div>
25
+ <div class="uk-width-medium-1-2">
26
+ <h4>CPU usage</h4>
27
+ <div class="uk-progress" id="cpu_total_handler">
28
+ <div class="uk-progress-bar" id="cpu_total" style="width: 0%"></div>
29
+ </div>
30
+ </div>
31
+ <div class="uk-width-medium-1-2">
32
+ <h4>Memory usage</h4>
33
+ <p>Ram</p>
34
+ <div class="uk-progress" id="ram_usage_handler">
35
+ <div class="uk-progress-bar" id="ram_usage" style="width: 0%"></div>
36
+ </div>
37
+ <p>Swap</p>
38
+ <div class="uk-progress">
39
+ <div class="uk-progress-bar" id="swap_usage" style="width: 0%"></div>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+
45
+
46
+ <div class="uk-panel uk-panel-box">
47
+ <div class="uk-panel-title">Networking</div>
48
+ <div class="uk-grid" id="traffic">
49
+ </div>
50
+ </div>
51
+
52
+ <div class="uk-panel uk-panel-box">
53
+ <div class="uk-panel-title">Disks</div>
54
+ <div class="uk-grid" id="disks">
55
+ </div>
56
+ </div>
57
+
58
+ <footer></footer>
59
+ </div>
60
+ </body>
61
+ </html>
data/lib/ServState.rb ADDED
@@ -0,0 +1,6 @@
1
+ require_relative "ServState/version"
2
+ require_relative "ServState/main"
3
+
4
+ module ServState
5
+ # Your code goes here...
6
+ end
metadata ADDED
@@ -0,0 +1,145 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ServState
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Denis Sergienko
8
+ - Igor Kroosh
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-11-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sinatra
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rack
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: sass
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: bundler
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ version: '1.3'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '1.3'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rake
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ description: Simple tool to watch your linux server state
85
+ email:
86
+ - olol.toor@gmail.com
87
+ executables:
88
+ - servstate
89
+ extensions: []
90
+ extra_rdoc_files: []
91
+ files:
92
+ - .gitignore
93
+ - .rvmrc
94
+ - Gemfile
95
+ - LICENSE.txt
96
+ - README.md
97
+ - Rakefile
98
+ - ServState.gemspec
99
+ - bin/servstate
100
+ - lib/ServState.rb
101
+ - lib/ServState/info.rb
102
+ - lib/ServState/main.rb
103
+ - lib/ServState/public/css/uikit.almost-flat.css
104
+ - lib/ServState/public/css/uikit.almost-flat.min.css
105
+ - lib/ServState/public/css/uikit.css
106
+ - lib/ServState/public/css/uikit.gradient.css
107
+ - lib/ServState/public/css/uikit.gradient.min.css
108
+ - lib/ServState/public/css/uikit.min.css
109
+ - lib/ServState/public/fonts/FontAwesome.otf
110
+ - lib/ServState/public/fonts/fontawesome-webfont.eot
111
+ - lib/ServState/public/fonts/fontawesome-webfont.ttf
112
+ - lib/ServState/public/fonts/fontawesome-webfont.woff
113
+ - lib/ServState/public/js/app.js
114
+ - lib/ServState/public/js/uikit.js
115
+ - lib/ServState/public/js/uikit.min.js
116
+ - lib/ServState/version.rb
117
+ - lib/ServState/views/css/base.scss
118
+ - lib/ServState/views/css/custom.scss
119
+ - lib/ServState/views/css/style.scss
120
+ - lib/ServState/views/index.erb
121
+ homepage: http://github.com/ololyay/ServState
122
+ licenses:
123
+ - MIT
124
+ metadata: {}
125
+ post_install_message:
126
+ rdoc_options: []
127
+ require_paths:
128
+ - lib
129
+ required_ruby_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ requirements: []
140
+ rubyforge_project:
141
+ rubygems_version: 2.1.4
142
+ signing_key:
143
+ specification_version: 4
144
+ summary: http://github.com/ololyay/ServState
145
+ test_files: []