From 1e26aee2f721c4feb96ed77dd7e8b79476dc02e9 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Thu, 9 Oct 2014 07:36:22 +0000 Subject: [PATCH 01/68] Added link on location element to Google Maps --- css/style.min.css | 3 ++- sass/style.scss | 4 ++++ script/base.js | 5 +++++ script/base.min.js | 2 +- script/functions.js | 8 +++++--- script/functions.min.js | 2 +- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/css/style.min.css b/css/style.min.css index 46dded5..06d7209 100644 --- a/css/style.min.css +++ b/css/style.min.css @@ -1 +1,2 @@ -html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover{text-decoration:underline}a:focus{text-decoration:underline}.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(0,0,0,0)), color-stop(50%, #939393), color-stop(100%, rgba(0,0,0,0)));background:-webkit-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:-o-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:-ms-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:linear-gradient(to right, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px}.button-container .refresh-button{color:#82b541}.button-container .adv-button.active{color:#dd4b39}.button-container .twitter-button{color:#55acee}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;padding-bottom:100px}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} +html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover{text-decoration:underline}a:focus{text-decoration:underline}.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px}.button-container .refresh-button{color:#82b541}.button-container .adv-button.active{color:#dd4b39}.button-container .twitter-button{color:#55acee}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;padding-bottom:100px}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} +/*# sourceMappingURL=style.min.css.map */ diff --git a/sass/style.scss b/sass/style.scss index 89c7780..eaed2cd 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -156,6 +156,10 @@ a { .location { top: -80px; font-size: 1.5em; + cursor: pointer; + &:hover { + text-decoration: underline; + } .fa { margin-right: 15px; } diff --git a/script/base.js b/script/base.js index 98d04f6..c95201d 100644 --- a/script/base.js +++ b/script/base.js @@ -55,6 +55,11 @@ $(document).ready(function() { action(buttonAction); }); }); + /* Click action for location */ + $('#location').on("click", function() { + var latlong = $(this).attr("data-latlong"); + window.location.href = "https://www.google.com/maps/place/" + latlong; + }); }); // Clear session on tab close diff --git a/script/base.min.js b/script/base.min.js index 50d9c0a..27ccf63 100644 --- a/script/base.min.js +++ b/script/base.min.js @@ -1 +1 @@ -$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})})}),$(window).bind("beforeunload",function(){action("clear")}); \ No newline at end of file +$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a})}),$(window).bind("beforeunload",function(){action("clear")}); \ No newline at end of file diff --git a/script/functions.js b/script/functions.js index c65d0ca..47824eb 100644 --- a/script/functions.js +++ b/script/functions.js @@ -55,6 +55,8 @@ function output(type, setFlag) { $.get(ip_geocode, function(response) { // Add it to the element with an animation $('#location').text(response.city + ", " + response.region_name + ", " + response.country_code).addClass('fadeInDown'); + // Add latlong for maps href + $('#location').attr('data-latlong', response.latitude + '+' + response.longitude); // Set the global location globalLocation = response.city + ", " + response.region_name + ", " + response.country_code; // Set the sunrise/sunset times @@ -208,9 +210,9 @@ function action(type) { var url = "https://github.com/stefanbc/uptimey"; // Get the current uptime var uptime = ""; - if ($("#days").text() != 0) uptime += $("#days").text() + " days "; - if ($("#hours").text() != 0) uptime += $("#hours").text() + " hours "; - if ($("#minutes").text() != 0) uptime += $("#minutes").text() + " minutes"; + if ($("#days").text() !== 0) uptime += $("#days").text() + " days "; + if ($("#hours").text() !== 0) uptime += $("#hours").text() + " hours "; + if ($("#minutes").text() !== 0) uptime += $("#minutes").text() + " minutes"; // Set the tweet var text = "My server has been online for " + uptime + ". Can you beat this uptime? via"; // Set the hashtag diff --git a/script/functions.min.js b/script/functions.min.js index bba04b8..be54900 100644 --- a/script/functions.min.js +++ b/script/functions.min.js @@ -1 +1 @@ -function output(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://freegeoip.net/json/"+a;$.get(b,function(a){$("#location").text(a.city+", "+a.region_name+", "+a.country_code).addClass("fadeInDown"),globalLocation=a.city+", "+a.region_name+", "+a.country_code,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})},"jsonp"),$(".location-inner").addClass("fadeInDown")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeInDown"),$("#hours").text(a[1]).addClass("fadeInDown"),$("#minutes").text(a[2]).addClass("fadeInDown"),$(".bottom-container").addClass("fadeInDown")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeInDown"),$("#time").text(a[1]).addClass("fadeInDown"),$("#since").text(a[2]).addClass("fadeInDown"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeInDown")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeInDown")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!=$("#days").text()&&(d+=$("#days").text()+" days "),0!=$("#hours").text()&&(d+=$("#hours").text()+" hours "),0!=$("#minutes").text()&&(d+=$("#minutes").text()+" minutes");var e="My server has been online for "+d+". Can you beat this uptime? via",f="uptimey,devbranch";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="script/ajax.php",globalLocation,globalSunrise,globalSunset; \ No newline at end of file +function output(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://freegeoip.net/json/"+a;$.get(b,function(a){$("#location").text(a.city+", "+a.region_name+", "+a.country_code).addClass("fadeInDown"),$("#location").attr("data-latlong",a.latitude+"+"+a.longitude),globalLocation=a.city+", "+a.region_name+", "+a.country_code,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})},"jsonp"),$(".location-inner").addClass("fadeInDown")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeInDown"),$("#hours").text(a[1]).addClass("fadeInDown"),$("#minutes").text(a[2]).addClass("fadeInDown"),$(".bottom-container").addClass("fadeInDown")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeInDown"),$("#time").text(a[1]).addClass("fadeInDown"),$("#since").text(a[2]).addClass("fadeInDown"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeInDown")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeInDown")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").text()&&(d+=$("#days").text()+" days "),0!==$("#hours").text()&&(d+=$("#hours").text()+" hours "),0!==$("#minutes").text()&&(d+=$("#minutes").text()+" minutes");var e="My server has been online for "+d+". Can you beat this uptime? via",f="uptimey,devbranch";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="script/ajax.php",globalLocation,globalSunrise,globalSunset; \ No newline at end of file From f6c026e835991ff44fe2cfff4756f000077386bc Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Sun, 9 Nov 2014 21:10:05 +0000 Subject: [PATCH 02/68] Fixed update issue and changed geoip service --- README.md | 24 ++++++++++++------------ index.html | 2 +- script/ajax.php | 8 ++++---- script/functions.js | 7 ++++--- script/functions.min.js | 2 +- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e378a50..7d20fe6 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -uptimey -======= +# Welcome to your new Koding workspace -Are you proud of your server uptime because you put a lot of time into configuring it? +This workspace, which lives inside the 'Workspaces' folder of your +home directory, is the place where you can store all relevant and +related files to this project. -Showcase your server uptime with **uptimey** - a beautiful Server Uptime Monitor! +Workspaces help keep your projects organized. You can create any +number of sub-folders within this workspace in order to further +organize your work. -Just fork the repo on your web server and then access `/uptimey` in your browser. Simple as that! +As you move back and forth between your workspaces, Koding will try +and remember everything about each workspace. This includes things +like IDE settings, files open, Terminals open, etc. -**Features** +You can create as many new workspaces as you need on your VM. -* Background image is the Bing image of the day and it changes automatically! -* Works on Linux, Windows, Mac OS servers - -![Screenshot](http://i.imgur.com/isg9t8n.png) - -Made by [Stefan Cosma](http://coderbits.com/stefanbc) +Enjoy and Happy Koding! \ No newline at end of file diff --git a/index.html b/index.html index 816b400..05c6ab9 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ - Uptimey - Beautiful Server Uptime Monitor + Uptimey | Beautiful Server Uptime Monitor diff --git a/script/ajax.php b/script/ajax.php index 8ab39d4..529b8d0 100644 --- a/script/ajax.php +++ b/script/ajax.php @@ -61,6 +61,10 @@ echo $currentDate . ';' . $currentTime . ';' . $sinceDate; // Set the session $_SESSION['time'] = $currentDate . ';' . $currentTime . ';' . $sinceDate; + // Set last time the request was sent + if (empty($flag)) { + $_SESSION['last'] = time(); + } break; case 'image': // Load the XML file from Bing @@ -115,10 +119,6 @@ $formatUptime .= "0;"; // Return the formated tim echo $formatUptime; - // Set last time the request for uptime was sent - if (empty($flag)) { - $_SESSION['last'] = time(); - } // Set last response $_SESSION['uptime'] = $formatUptime; $_SESSION['uptimeSeconds'] = $totalSeconds; diff --git a/script/functions.js b/script/functions.js index 47824eb..b794878 100644 --- a/script/functions.js +++ b/script/functions.js @@ -50,15 +50,16 @@ function output(type, setFlag) { }) .done(function(location) { // Set up the URL for location call using ipinfo.io - var ip_geocode = "http://freegeoip.net/json/" + location; + // var ip_geocode = "http://freegeoip.net/json/" + location; + var ip_geocode = "http://www.telize.com/geoip/" + location; // Get the response and set the value $.get(ip_geocode, function(response) { // Add it to the element with an animation - $('#location').text(response.city + ", " + response.region_name + ", " + response.country_code).addClass('fadeInDown'); + $('#location').text(response.city + ", " + response.region + ", " + response.country_code).addClass('fadeInDown'); // Add latlong for maps href $('#location').attr('data-latlong', response.latitude + '+' + response.longitude); // Set the global location - globalLocation = response.city + ", " + response.region_name + ", " + response.country_code; + globalLocation = response.city + ", " + response.region + ", " + response.country_code; // Set the sunrise/sunset times $.simpleWeather({ location: globalLocation, diff --git a/script/functions.min.js b/script/functions.min.js index be54900..a09c38d 100644 --- a/script/functions.min.js +++ b/script/functions.min.js @@ -1 +1 @@ -function output(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://freegeoip.net/json/"+a;$.get(b,function(a){$("#location").text(a.city+", "+a.region_name+", "+a.country_code).addClass("fadeInDown"),$("#location").attr("data-latlong",a.latitude+"+"+a.longitude),globalLocation=a.city+", "+a.region_name+", "+a.country_code,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})},"jsonp"),$(".location-inner").addClass("fadeInDown")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeInDown"),$("#hours").text(a[1]).addClass("fadeInDown"),$("#minutes").text(a[2]).addClass("fadeInDown"),$(".bottom-container").addClass("fadeInDown")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeInDown"),$("#time").text(a[1]).addClass("fadeInDown"),$("#since").text(a[2]).addClass("fadeInDown"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeInDown")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeInDown")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").text()&&(d+=$("#days").text()+" days "),0!==$("#hours").text()&&(d+=$("#hours").text()+" hours "),0!==$("#minutes").text()&&(d+=$("#minutes").text()+" minutes");var e="My server has been online for "+d+". Can you beat this uptime? via",f="uptimey,devbranch";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="script/ajax.php",globalLocation,globalSunrise,globalSunset; \ No newline at end of file +function output(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://www.telize.com/geoip/"+a;$.get(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country_code).addClass("fadeInDown"),$("#location").attr("data-latlong",a.latitude+"+"+a.longitude),globalLocation=a.city+", "+a.region+", "+a.country_code,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})},"jsonp"),$(".location-inner").addClass("fadeInDown")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeInDown"),$("#hours").text(a[1]).addClass("fadeInDown"),$("#minutes").text(a[2]).addClass("fadeInDown"),$(".bottom-container").addClass("fadeInDown")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeInDown"),$("#time").text(a[1]).addClass("fadeInDown"),$("#since").text(a[2]).addClass("fadeInDown"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeInDown")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeInDown")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").text()&&(d+=$("#days").text()+" days "),0!==$("#hours").text()&&(d+=$("#hours").text()+" hours "),0!==$("#minutes").text()&&(d+=$("#minutes").text()+" minutes");var e="My server has been online for "+d+". Can you beat this uptime? via",f="uptimey,devbranch";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="script/ajax.php",globalLocation,globalSunrise,globalSunset; \ No newline at end of file From d8747acd977d51c8e18c920ae7802741b490b1de Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Sun, 9 Nov 2014 21:12:15 +0000 Subject: [PATCH 03/68] Updated Readme --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7d20fe6..4e8e0d8 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -# Welcome to your new Koding workspace +uptimey +======= -This workspace, which lives inside the 'Workspaces' folder of your -home directory, is the place where you can store all relevant and -related files to this project. +Are you proud of your server uptime because you put a lot of time into configuring it? -Workspaces help keep your projects organized. You can create any -number of sub-folders within this workspace in order to further -organize your work. +Showcase your server uptime with **uptimey** - a beautiful Server Uptime Monitor! -As you move back and forth between your workspaces, Koding will try -and remember everything about each workspace. This includes things -like IDE settings, files open, Terminals open, etc. +Just fork the repo on your web server and then access `/uptimey` in your browser. Simple as that! -You can create as many new workspaces as you need on your VM. +**Features** -Enjoy and Happy Koding! \ No newline at end of file +* Background image is the Bing image of the day and it changes automatically! +* Works on Linux, Windows, Mac OS servers + +![Screenshot](http://i.imgur.com/isg9t8n.png) + +Made by [Stefan Cosma](http://coderbits.com/stefanbc) \ No newline at end of file From 4cd78aefc6e47188f4550b012a5478f2c078d9f4 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Thu, 13 Nov 2014 09:31:00 +0000 Subject: [PATCH 04/68] New folder structure. Concat js files. Changed update animation --- .../ajax.php => core/assets/app.handler.php | 0 favicon.ico => core/assets/img/favicon.ico | Bin core/dest/css/_animate.min.css | 7 + .../dest/css/_normalize.css | 0 .../dest/css/screen.min.css | 2 +- core/dest/css/screen.min.css.map | 7 + core/dest/js/app.min.js | 1 + {script => core/js}/base.js | 2 +- {script => core/js}/functions.js | 24 +- {script => core/js}/require.config.js | 10 +- sass/style.scss => core/sass/screen.scss | 23 +- css/animate.css | 3303 ----------------- gruntfile.js | 26 +- index.html | 12 +- package.json | 21 +- script/base.min.js | 1 - script/functions.min.js | 1 - 17 files changed, 82 insertions(+), 3358 deletions(-) rename script/ajax.php => core/assets/app.handler.php (100%) rename favicon.ico => core/assets/img/favicon.ico (100%) create mode 100644 core/dest/css/_animate.min.css rename css/normalize.css => core/dest/css/_normalize.css (100%) rename css/style.min.css => core/dest/css/screen.min.css (98%) create mode 100644 core/dest/css/screen.min.css.map create mode 100644 core/dest/js/app.min.js rename {script => core/js}/base.js (98%) rename {script => core/js}/functions.js (95%) rename {script => core/js}/require.config.js (71%) rename sass/style.scss => core/sass/screen.scss (94%) delete mode 100644 css/animate.css delete mode 100644 script/base.min.js delete mode 100644 script/functions.min.js diff --git a/script/ajax.php b/core/assets/app.handler.php similarity index 100% rename from script/ajax.php rename to core/assets/app.handler.php diff --git a/favicon.ico b/core/assets/img/favicon.ico similarity index 100% rename from favicon.ico rename to core/assets/img/favicon.ico diff --git a/core/dest/css/_animate.min.css b/core/dest/css/_animate.min.css new file mode 100644 index 0000000..9195e57 --- /dev/null +++ b/core/dest/css/_animate.min.css @@ -0,0 +1,7 @@ + +@charset "UTF-8";/*! +Animate.css - http://daneden.me/animate +Licensed under the MIT license - http://opensource.org/licenses/MIT + +Copyright (c) 2014 Daniel Eden +*/.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}@-webkit-keyframes bounce{0%,100%,20%,53%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{0%,100%,20%,53%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;-ms-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(0.75,1.25,1);transform:scale3d(0.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(0.75,1.25,1);transform:scale3d(0.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}100%{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}100%{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;-ms-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}100%{-webkit-transform:none;transform:none}}@keyframes wobble{0%{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}100%{-webkit-transform:none;transform:none}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes bounceIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn;-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounceInDown{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;transform:none}}@keyframes bounceInDown{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes bounceInRight{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut;-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY;-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}100%{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}100%{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{opacity:1}100%{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{0%{opacity:1}100%{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{0%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{0%{-webkit-transform-origin:center;transform-origin:center;opacity:1}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{0%{-webkit-transform-origin:center;transform-origin:center;opacity:1}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}100%{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}100%{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}100%{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}100%{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}100%{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%);visibility:visible}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slideInDown{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%);visibility:visible}100%{-webkit-transform:translateY(0);transform:translateY(0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slideInLeft{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translateX(100%);transform:translateX(100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slideInRight{0%{-webkit-transform:translateX(100%);transform:translateX(100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translateY(100%);transform:translateY(100%);visibility:visible}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slideInUp{0%{-webkit-transform:translateY(100%);transform:translateY(100%);visibility:visible}100%{-webkit-transform:translateY(0);transform:translateY(0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{visibility:hidden;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes slideOutDown{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{visibility:hidden;-webkit-transform:translateY(100%);transform:translateY(100%)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{visibility:hidden;-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slideOutLeft{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{visibility:hidden;-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slideOutRight{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{visibility:hidden;-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes slideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{visibility:hidden;-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp} \ No newline at end of file diff --git a/css/normalize.css b/core/dest/css/_normalize.css similarity index 100% rename from css/normalize.css rename to core/dest/css/_normalize.css diff --git a/css/style.min.css b/core/dest/css/screen.min.css similarity index 98% rename from css/style.min.css rename to core/dest/css/screen.min.css index 06d7209..b02c84f 100644 --- a/css/style.min.css +++ b/core/dest/css/screen.min.css @@ -1,2 +1,2 @@ html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover{text-decoration:underline}a:focus{text-decoration:underline}.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px}.button-container .refresh-button{color:#82b541}.button-container .adv-button.active{color:#dd4b39}.button-container .twitter-button{color:#55acee}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;padding-bottom:100px}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} -/*# sourceMappingURL=style.min.css.map */ +/*# sourceMappingURL=screen.min.css.map */ diff --git a/core/dest/css/screen.min.css.map b/core/dest/css/screen.min.css.map new file mode 100644 index 0000000..35aa6f4 --- /dev/null +++ b/core/dest/css/screen.min.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AA4CA,IAAK,CACJ,MAAM,CAAE,IAAI,CAEb,IAAK,CACJ,MAAM,CAAE,IAAI,CACZ,gBAAgB,CAlBP,IAAI,CAmBb,iBAAiB,CAAE,SAAS,CAC5B,mBAAmB,CAAE,MAAM,CAC3B,eAAe,CAAE,KAAK,CACtB,WAAW,CAdH,kBAAO,CAef,WAAW,CAAE,GAAG,CAChB,KAAK,CAvBI,IAAI,CAyBd,CAAE,CACD,KAAK,CA1BI,IAAI,CA2Bb,eAAe,CAAE,IAAI,CACrB,OAAQ,CACP,eAAe,CAAE,SAAS,CAE3B,OAAQ,CACP,eAAe,CAAE,SAAS,CAO5B,0IAAQ,CACJ,OAAO,CAAE,EAAE,CACX,MAAM,CAAE,GAAG,CACX,UAAU,CAAE,yEAA0F,CACtG,UAAU,CAAE,mIAAgJ,CAC5J,UAAU,CAAE,4EAA2F,CACvG,UAAU,CAAE,uEAAsF,CAClG,UAAU,CAAE,wEAAuF,CACnG,UAAU,CAAE,wEAAuF,CACnG,MAAM,CAAE,+GAA+G,CACvH,OAAO,CAAE,KAAK,CAMlB,UAAW,CACV,UAAU,CAvDD,eAAc,CAwDvB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,QAAQ,CAAE,QAAQ,CAEnB,iBAAkB,CACd,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,KAAK,CACV,IAAI,CAAE,GAAG,CACT,KAAK,CAAE,KAAK,CACZ,UAAU,CAAE,MAAM,CAClB,SAAS,CAAE,KAAK,CAChB,WAAW,CAAE,MAAM,CACnB,OAAO,CAAE,EAAE,CACX,+BAAc,CACV,UAAU,CAAE,IAA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AK,CACZ,MAAM,CAAE,MAAM,CACd,QAAQ,CAAE,QAAQ,CAClB,OAAO,CAAE,KAAK,CACd,cAAc,CAAE,KAAK,CACrB,4BAAS,CACL,aAAa,CAAE,IAAI,CAEvB,uBAAE,CACD,eAAe,CAAE,SAAS,CAInC,iBAAkB,CACjB,UAAU,CAAE,MAAM,CAClB,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,KAAK,CACb,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,IAAI,CACX,yBAAQ,CACP,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,MAAM,CACd,8BAAK,CACJ,KAAK,CAAE,GAAG,CACV,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,IAAI,CACjB,iDAAqB,CAER,aAAa,CAAE,IAAI,CAEhC,kDAAsB,CAET,aAAa,CAAE,IAAI,CAEhC,mCAAK,CACJ,OAAO,CAAE,KAAK,CACd,SAAS,CAAE,GAAG,CACd,cAAc,CAAE,IAAI,CAErB,qCAAO,CACN,cAAc,CAAE,UAAU,CAI7B,oBAAG,CACF,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,KAAK,CAChB,aAAa,CAAE,KAAK,CAGtB,MAAO,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CAhNI,IAAI,CAiNb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", +"sources": ["../../sass/screen.scss"], +"names": [], +"file": "screen.min.css" +} diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js new file mode 100644 index 0000000..d187806 --- /dev/null +++ b/core/dest/js/app.min.js @@ -0,0 +1 @@ +function output(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://www.telize.com/geoip/"+a;$.get(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country_code).addClass("fadeIn"),$("#location").attr("data-latlong",a.latitude+"+"+a.longitude),globalLocation=a.city+", "+a.region+", "+a.country_code,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})},"jsonp"),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#hours").text(a[1]).addClass("fadeIn"),$("#minutes").text(a[2]).addClass("fadeIn"),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").text()&&(d+=$("#days").text()+" days "),0!==$("#hours").text()&&(d+=$("#hours").text()+" hours "),0!==$("#minutes").text()&&(d+=$("#minutes").text()+" minutes");var e="My server has been online for "+d+". Can you beat this uptime? via",f="uptimey,devbranch";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/assets/app.handler.php",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a})}),$(window).bind("beforeunload",function(){action("clear")}); \ No newline at end of file diff --git a/script/base.js b/core/js/base.js similarity index 98% rename from script/base.js rename to core/js/base.js index c95201d..6134b6b 100644 --- a/script/base.js +++ b/core/js/base.js @@ -48,7 +48,7 @@ $(document).ready(function() { output('time'); }, 1000 * 60); - /* Click action on each button */ + /* Click action on each top button */ $(".button").each(function() { $(this).on("click", function() { var buttonAction = $(this).attr("data-action"); diff --git a/script/functions.js b/core/js/functions.js similarity index 95% rename from script/functions.js rename to core/js/functions.js index b794878..21524f7 100644 --- a/script/functions.js +++ b/core/js/functions.js @@ -25,7 +25,7 @@ SOFTWARE. */ /* Set the global vars*/ -var globalFile = 'script/ajax.php'; +var globalFile = 'core/assets/app.handler.php'; var globalLocation, globalSunrise, globalSunset; /* Output the data requested */ @@ -55,7 +55,7 @@ function output(type, setFlag) { // Get the response and set the value $.get(ip_geocode, function(response) { // Add it to the element with an animation - $('#location').text(response.city + ", " + response.region + ", " + response.country_code).addClass('fadeInDown'); + $('#location').text(response.city + ", " + response.region + ", " + response.country_code).addClass('fadeIn'); // Add latlong for maps href $('#location').attr('data-latlong', response.latitude + '+' + response.longitude); // Set the global location @@ -70,7 +70,7 @@ function output(type, setFlag) { }); }, "jsonp"); // We only animate the whole container once - $('.location-inner').addClass('fadeInDown'); + $('.location-inner').addClass('fadeIn'); }); break; case 'uptime': @@ -82,11 +82,11 @@ function output(type, setFlag) { // Split the output uptime = uptime.split(";"); // Add it to each element with an animation - $('#days').text(uptime[0]).addClass('fadeInDown'); - $('#hours').text(uptime[1]).addClass('fadeInDown'); - $('#minutes').text(uptime[2]).addClass('fadeInDown'); + $('#days').text(uptime[0]).addClass('fadeIn'); + $('#hours').text(uptime[1]).addClass('fadeIn'); + $('#minutes').text(uptime[2]).addClass('fadeIn'); // We only animate the whole container once - $('.bottom-container').addClass('fadeInDown'); + $('.bottom-container').addClass('fadeIn'); }); break; case 'time': @@ -98,9 +98,9 @@ function output(type, setFlag) { // Split the output time = time.split(";"); // Set the times - $('#current').text(time[0]).addClass('fadeInDown'); - $('#time').text(time[1]).addClass('fadeInDown'); - $('#since').text(time[2]).addClass('fadeInDown'); + $('#current').text(time[0]).addClass('fadeIn'); + $('#time').text(time[1]).addClass('fadeIn'); + $('#since').text(time[2]).addClass('fadeIn'); // Format the times setTimeout(function() { var sunrise = moment(globalSunrise, 'h:m a').format('X'); @@ -116,7 +116,7 @@ function output(type, setFlag) { } }, 3000); // We only animate the whole container once - $('.top-container').addClass('fadeInDown'); + $('.top-container').addClass('fadeIn'); }); break; } @@ -124,7 +124,7 @@ function output(type, setFlag) { // we can animate again on next iteration $(".val").each(function() { $(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { - $(this).removeClass("fadeInDown"); + $(this).removeClass("fadeIn"); }); }); } diff --git a/script/require.config.js b/core/js/require.config.js similarity index 71% rename from script/require.config.js rename to core/js/require.config.js index 611a8fb..607deda 100644 --- a/script/require.config.js +++ b/core/js/require.config.js @@ -1,20 +1,16 @@ requirejs.config({ - baseUrl: 'script/', + baseUrl: 'core/dest/js', paths: { jQuery: '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min', moment: '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min', weather: '//cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.0.2/jquery.simpleWeather.min', - functions: 'functions.min', - base: 'base.min' + app: 'app.min' }, shim: { 'moment': ['jQuery'], 'weather': ['jQuery'], - 'functions': { + 'app': { deps: ['jQuery', 'moment', 'weather'] - }, - 'base': { - deps: ['jQuery', 'functions'] } }, waitSeconds: 15 diff --git a/sass/style.scss b/core/sass/screen.scss similarity index 94% rename from sass/style.scss rename to core/sass/screen.scss index eaed2cd..93b99e1 100644 --- a/sass/style.scss +++ b/core/sass/screen.scss @@ -24,17 +24,24 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -// Colors +@charset "UTF-8"; + +// +// Main colors +// -------------------------------------------------- $color_0: #222; $color_1: #fff; $color_2: rgba(0,0,0,.6); $color_3: #ddd; -// Fonts +// +// Main fonts +// -------------------------------------------------- $font_0: Raleway, sans-serif; -@charset "UTF-8"; - +// +// Global +// -------------------------------------------------- html { height: 100%; } @@ -58,6 +65,10 @@ a { text-decoration: underline; } } + +// +// Mixins +// -------------------------------------------------- %border { content: ""; height: 1px; @@ -70,6 +81,10 @@ a { filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 ); display: block; } + +// +// Layout and UI +// -------------------------------------------------- .container { background: $color_2; height: 100%; diff --git a/css/animate.css b/css/animate.css deleted file mode 100644 index 7856ff2..0000000 --- a/css/animate.css +++ /dev/null @@ -1,3303 +0,0 @@ -@charset "UTF-8"; - -/*! -Animate.css - http://daneden.me/animate -Licensed under the MIT license - -Copyright (c) 2013 Daniel Eden - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -.animated { - -webkit-animation-duration: 1s; - animation-duration: 1s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} - -.animated.infinite { - -webkit-animation-iteration-count: infinite; - animation-iteration-count: infinite; -} - -.animated.hinge { - -webkit-animation-duration: 2s; - animation-duration: 2s; -} - -@-webkit-keyframes bounce { - 0%, 20%, 50%, 80%, 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 40% { - -webkit-transform: translateY(-30px); - transform: translateY(-30px); - } - - 60% { - -webkit-transform: translateY(-15px); - transform: translateY(-15px); - } -} - -@keyframes bounce { - 0%, 20%, 50%, 80%, 100% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 40% { - -webkit-transform: translateY(-30px); - -ms-transform: translateY(-30px); - transform: translateY(-30px); - } - - 60% { - -webkit-transform: translateY(-15px); - -ms-transform: translateY(-15px); - transform: translateY(-15px); - } -} - -.bounce { - -webkit-animation-name: bounce; - animation-name: bounce; -} - -@-webkit-keyframes flash { - 0%, 50%, 100% { - opacity: 1; - } - - 25%, 75% { - opacity: 0; - } -} - -@keyframes flash { - 0%, 50%, 100% { - opacity: 1; - } - - 25%, 75% { - opacity: 0; - } -} - -.flash { - -webkit-animation-name: flash; - animation-name: flash; -} - -/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ - -@-webkit-keyframes pulse { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } - - 50% { - -webkit-transform: scale(1.1); - transform: scale(1.1); - } - - 100% { - -webkit-transform: scale(1); - transform: scale(1); - } -} - -@keyframes pulse { - 0% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - - 50% { - -webkit-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); - } - - 100% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } -} - -.pulse { - -webkit-animation-name: pulse; - animation-name: pulse; -} - -@-webkit-keyframes rubberBand { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } - - 30% { - -webkit-transform: scaleX(1.25) scaleY(0.75); - transform: scaleX(1.25) scaleY(0.75); - } - - 40% { - -webkit-transform: scaleX(0.75) scaleY(1.25); - transform: scaleX(0.75) scaleY(1.25); - } - - 60% { - -webkit-transform: scaleX(1.15) scaleY(0.85); - transform: scaleX(1.15) scaleY(0.85); - } - - 100% { - -webkit-transform: scale(1); - transform: scale(1); - } -} - -@keyframes rubberBand { - 0% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - - 30% { - -webkit-transform: scaleX(1.25) scaleY(0.75); - -ms-transform: scaleX(1.25) scaleY(0.75); - transform: scaleX(1.25) scaleY(0.75); - } - - 40% { - -webkit-transform: scaleX(0.75) scaleY(1.25); - -ms-transform: scaleX(0.75) scaleY(1.25); - transform: scaleX(0.75) scaleY(1.25); - } - - 60% { - -webkit-transform: scaleX(1.15) scaleY(0.85); - -ms-transform: scaleX(1.15) scaleY(0.85); - transform: scaleX(1.15) scaleY(0.85); - } - - 100% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } -} - -.rubberBand { - -webkit-animation-name: rubberBand; - animation-name: rubberBand; -} - -@-webkit-keyframes shake { - 0%, 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translateX(-10px); - transform: translateX(-10px); - } - - 20%, 40%, 60%, 80% { - -webkit-transform: translateX(10px); - transform: translateX(10px); - } -} - -@keyframes shake { - 0%, 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translateX(-10px); - -ms-transform: translateX(-10px); - transform: translateX(-10px); - } - - 20%, 40%, 60%, 80% { - -webkit-transform: translateX(10px); - -ms-transform: translateX(10px); - transform: translateX(10px); - } -} - -.shake { - -webkit-animation-name: shake; - animation-name: shake; -} - -@-webkit-keyframes swing { - 20% { - -webkit-transform: rotate(15deg); - transform: rotate(15deg); - } - - 40% { - -webkit-transform: rotate(-10deg); - transform: rotate(-10deg); - } - - 60% { - -webkit-transform: rotate(5deg); - transform: rotate(5deg); - } - - 80% { - -webkit-transform: rotate(-5deg); - transform: rotate(-5deg); - } - - 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } -} - -@keyframes swing { - 20% { - -webkit-transform: rotate(15deg); - -ms-transform: rotate(15deg); - transform: rotate(15deg); - } - - 40% { - -webkit-transform: rotate(-10deg); - -ms-transform: rotate(-10deg); - transform: rotate(-10deg); - } - - 60% { - -webkit-transform: rotate(5deg); - -ms-transform: rotate(5deg); - transform: rotate(5deg); - } - - 80% { - -webkit-transform: rotate(-5deg); - -ms-transform: rotate(-5deg); - transform: rotate(-5deg); - } - - 100% { - -webkit-transform: rotate(0deg); - -ms-transform: rotate(0deg); - transform: rotate(0deg); - } -} - -.swing { - -webkit-transform-origin: top center; - -ms-transform-origin: top center; - transform-origin: top center; - -webkit-animation-name: swing; - animation-name: swing; -} - -@-webkit-keyframes tada { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } - - 10%, 20% { - -webkit-transform: scale(0.9) rotate(-3deg); - transform: scale(0.9) rotate(-3deg); - } - - 30%, 50%, 70%, 90% { - -webkit-transform: scale(1.1) rotate(3deg); - transform: scale(1.1) rotate(3deg); - } - - 40%, 60%, 80% { - -webkit-transform: scale(1.1) rotate(-3deg); - transform: scale(1.1) rotate(-3deg); - } - - 100% { - -webkit-transform: scale(1) rotate(0); - transform: scale(1) rotate(0); - } -} - -@keyframes tada { - 0% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - - 10%, 20% { - -webkit-transform: scale(0.9) rotate(-3deg); - -ms-transform: scale(0.9) rotate(-3deg); - transform: scale(0.9) rotate(-3deg); - } - - 30%, 50%, 70%, 90% { - -webkit-transform: scale(1.1) rotate(3deg); - -ms-transform: scale(1.1) rotate(3deg); - transform: scale(1.1) rotate(3deg); - } - - 40%, 60%, 80% { - -webkit-transform: scale(1.1) rotate(-3deg); - -ms-transform: scale(1.1) rotate(-3deg); - transform: scale(1.1) rotate(-3deg); - } - - 100% { - -webkit-transform: scale(1) rotate(0); - -ms-transform: scale(1) rotate(0); - transform: scale(1) rotate(0); - } -} - -.tada { - -webkit-animation-name: tada; - animation-name: tada; -} - -/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ - -@-webkit-keyframes wobble { - 0% { - -webkit-transform: translateX(0%); - transform: translateX(0%); - } - - 15% { - -webkit-transform: translateX(-25%) rotate(-5deg); - transform: translateX(-25%) rotate(-5deg); - } - - 30% { - -webkit-transform: translateX(20%) rotate(3deg); - transform: translateX(20%) rotate(3deg); - } - - 45% { - -webkit-transform: translateX(-15%) rotate(-3deg); - transform: translateX(-15%) rotate(-3deg); - } - - 60% { - -webkit-transform: translateX(10%) rotate(2deg); - transform: translateX(10%) rotate(2deg); - } - - 75% { - -webkit-transform: translateX(-5%) rotate(-1deg); - transform: translateX(-5%) rotate(-1deg); - } - - 100% { - -webkit-transform: translateX(0%); - transform: translateX(0%); - } -} - -@keyframes wobble { - 0% { - -webkit-transform: translateX(0%); - -ms-transform: translateX(0%); - transform: translateX(0%); - } - - 15% { - -webkit-transform: translateX(-25%) rotate(-5deg); - -ms-transform: translateX(-25%) rotate(-5deg); - transform: translateX(-25%) rotate(-5deg); - } - - 30% { - -webkit-transform: translateX(20%) rotate(3deg); - -ms-transform: translateX(20%) rotate(3deg); - transform: translateX(20%) rotate(3deg); - } - - 45% { - -webkit-transform: translateX(-15%) rotate(-3deg); - -ms-transform: translateX(-15%) rotate(-3deg); - transform: translateX(-15%) rotate(-3deg); - } - - 60% { - -webkit-transform: translateX(10%) rotate(2deg); - -ms-transform: translateX(10%) rotate(2deg); - transform: translateX(10%) rotate(2deg); - } - - 75% { - -webkit-transform: translateX(-5%) rotate(-1deg); - -ms-transform: translateX(-5%) rotate(-1deg); - transform: translateX(-5%) rotate(-1deg); - } - - 100% { - -webkit-transform: translateX(0%); - -ms-transform: translateX(0%); - transform: translateX(0%); - } -} - -.wobble { - -webkit-animation-name: wobble; - animation-name: wobble; -} - -@-webkit-keyframes bounceIn { - 0% { - opacity: 0; - -webkit-transform: scale(.3); - transform: scale(.3); - } - - 50% { - opacity: 1; - -webkit-transform: scale(1.05); - transform: scale(1.05); - } - - 70% { - -webkit-transform: scale(.9); - transform: scale(.9); - } - - 100% { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); - } -} - -@keyframes bounceIn { - 0% { - opacity: 0; - -webkit-transform: scale(.3); - -ms-transform: scale(.3); - transform: scale(.3); - } - - 50% { - opacity: 1; - -webkit-transform: scale(1.05); - -ms-transform: scale(1.05); - transform: scale(1.05); - } - - 70% { - -webkit-transform: scale(.9); - -ms-transform: scale(.9); - transform: scale(.9); - } - - 100% { - opacity: 1; - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } -} - -.bounceIn { - -webkit-animation-name: bounceIn; - animation-name: bounceIn; -} - -@-webkit-keyframes bounceInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateY(30px); - transform: translateY(30px); - } - - 80% { - -webkit-transform: translateY(-10px); - transform: translateY(-10px); - } - - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } -} - -@keyframes bounceInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateY(30px); - -ms-transform: translateY(30px); - transform: translateY(30px); - } - - 80% { - -webkit-transform: translateY(-10px); - -ms-transform: translateY(-10px); - transform: translateY(-10px); - } - - 100% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} - -.bounceInDown { - -webkit-animation-name: bounceInDown; - animation-name: bounceInDown; -} - -@-webkit-keyframes bounceInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateX(30px); - transform: translateX(30px); - } - - 80% { - -webkit-transform: translateX(-10px); - transform: translateX(-10px); - } - - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -@keyframes bounceInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateX(30px); - -ms-transform: translateX(30px); - transform: translateX(30px); - } - - 80% { - -webkit-transform: translateX(-10px); - -ms-transform: translateX(-10px); - transform: translateX(-10px); - } - - 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} - -.bounceInLeft { - -webkit-animation-name: bounceInLeft; - animation-name: bounceInLeft; -} - -@-webkit-keyframes bounceInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateX(-30px); - transform: translateX(-30px); - } - - 80% { - -webkit-transform: translateX(10px); - transform: translateX(10px); - } - - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -@keyframes bounceInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateX(-30px); - -ms-transform: translateX(-30px); - transform: translateX(-30px); - } - - 80% { - -webkit-transform: translateX(10px); - -ms-transform: translateX(10px); - transform: translateX(10px); - } - - 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} - -.bounceInRight { - -webkit-animation-name: bounceInRight; - animation-name: bounceInRight; -} - -@-webkit-keyframes bounceInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateY(-30px); - transform: translateY(-30px); - } - - 80% { - -webkit-transform: translateY(10px); - transform: translateY(10px); - } - - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } -} - -@keyframes bounceInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateY(-30px); - -ms-transform: translateY(-30px); - transform: translateY(-30px); - } - - 80% { - -webkit-transform: translateY(10px); - -ms-transform: translateY(10px); - transform: translateY(10px); - } - - 100% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} - -.bounceInUp { - -webkit-animation-name: bounceInUp; - animation-name: bounceInUp; -} - -@-webkit-keyframes bounceOut { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } - - 25% { - -webkit-transform: scale(.95); - transform: scale(.95); - } - - 50% { - opacity: 1; - -webkit-transform: scale(1.1); - transform: scale(1.1); - } - - 100% { - opacity: 0; - -webkit-transform: scale(.3); - transform: scale(.3); - } -} - -@keyframes bounceOut { - 0% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - - 25% { - -webkit-transform: scale(.95); - -ms-transform: scale(.95); - transform: scale(.95); - } - - 50% { - opacity: 1; - -webkit-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); - } - - 100% { - opacity: 0; - -webkit-transform: scale(.3); - -ms-transform: scale(.3); - transform: scale(.3); - } -} - -.bounceOut { - -webkit-animation-name: bounceOut; - animation-name: bounceOut; -} - -@-webkit-keyframes bounceOutDown { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateY(-20px); - transform: translateY(-20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } -} - -@keyframes bounceOutDown { - 0% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateY(-20px); - -ms-transform: translateY(-20px); - transform: translateY(-20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } -} - -.bounceOutDown { - -webkit-animation-name: bounceOutDown; - animation-name: bounceOutDown; -} - -@-webkit-keyframes bounceOutLeft { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateX(20px); - transform: translateX(20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } -} - -@keyframes bounceOutLeft { - 0% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateX(20px); - -ms-transform: translateX(20px); - transform: translateX(20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } -} - -.bounceOutLeft { - -webkit-animation-name: bounceOutLeft; - animation-name: bounceOutLeft; -} - -@-webkit-keyframes bounceOutRight { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateX(-20px); - transform: translateX(-20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } -} - -@keyframes bounceOutRight { - 0% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateX(-20px); - -ms-transform: translateX(-20px); - transform: translateX(-20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } -} - -.bounceOutRight { - -webkit-animation-name: bounceOutRight; - animation-name: bounceOutRight; -} - -@-webkit-keyframes bounceOutUp { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateY(20px); - transform: translateY(20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } -} - -@keyframes bounceOutUp { - 0% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } -} - -.bounceOutUp { - -webkit-animation-name: bounceOutUp; - animation-name: bounceOutUp; -} - -@-webkit-keyframes fadeIn { - 0% { - opacity: 0; - } - - 100% { - opacity: 1; - } -} - -@keyframes fadeIn { - 0% { - opacity: 0; - } - - 100% { - opacity: 1; - } -} - -.fadeIn { - -webkit-animation-name: fadeIn; - animation-name: fadeIn; -} - -@-webkit-keyframes fadeInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-20px); - transform: translateY(-20px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } -} - -@keyframes fadeInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-20px); - -ms-transform: translateY(-20px); - transform: translateY(-20px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} - -.fadeInDown { - -webkit-animation-name: fadeInDown; - animation-name: fadeInDown; -} - -@-webkit-keyframes fadeInDownBig { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } -} - -@keyframes fadeInDownBig { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} - -.fadeInDownBig { - -webkit-animation-name: fadeInDownBig; - animation-name: fadeInDownBig; -} - -@-webkit-keyframes fadeInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-20px); - transform: translateX(-20px); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -@keyframes fadeInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-20px); - -ms-transform: translateX(-20px); - transform: translateX(-20px); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} - -.fadeInLeft { - -webkit-animation-name: fadeInLeft; - animation-name: fadeInLeft; -} - -@-webkit-keyframes fadeInLeftBig { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -@keyframes fadeInLeftBig { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} - -.fadeInLeftBig { - -webkit-animation-name: fadeInLeftBig; - animation-name: fadeInLeftBig; -} - -@-webkit-keyframes fadeInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(20px); - transform: translateX(20px); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -@keyframes fadeInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(20px); - -ms-transform: translateX(20px); - transform: translateX(20px); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} - -.fadeInRight { - -webkit-animation-name: fadeInRight; - animation-name: fadeInRight; -} - -@-webkit-keyframes fadeInRightBig { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -@keyframes fadeInRightBig { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} - -.fadeInRightBig { - -webkit-animation-name: fadeInRightBig; - animation-name: fadeInRightBig; -} - -@-webkit-keyframes fadeInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(20px); - transform: translateY(20px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } -} - -@keyframes fadeInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} - -.fadeInUp { - -webkit-animation-name: fadeInUp; - animation-name: fadeInUp; -} - -@-webkit-keyframes fadeInUpBig { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } -} - -@keyframes fadeInUpBig { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} - -.fadeInUpBig { - -webkit-animation-name: fadeInUpBig; - animation-name: fadeInUpBig; -} - -@-webkit-keyframes fadeOut { - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -} - -@keyframes fadeOut { - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -} - -.fadeOut { - -webkit-animation-name: fadeOut; - animation-name: fadeOut; -} - -@-webkit-keyframes fadeOutDown { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(20px); - transform: translateY(20px); - } -} - -@keyframes fadeOutDown { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } -} - -.fadeOutDown { - -webkit-animation-name: fadeOutDown; - animation-name: fadeOutDown; -} - -@-webkit-keyframes fadeOutDownBig { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } -} - -@keyframes fadeOutDownBig { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } -} - -.fadeOutDownBig { - -webkit-animation-name: fadeOutDownBig; - animation-name: fadeOutDownBig; -} - -@-webkit-keyframes fadeOutLeft { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(-20px); - transform: translateX(-20px); - } -} - -@keyframes fadeOutLeft { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(-20px); - -ms-transform: translateX(-20px); - transform: translateX(-20px); - } -} - -.fadeOutLeft { - -webkit-animation-name: fadeOutLeft; - animation-name: fadeOutLeft; -} - -@-webkit-keyframes fadeOutLeftBig { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } -} - -@keyframes fadeOutLeftBig { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } -} - -.fadeOutLeftBig { - -webkit-animation-name: fadeOutLeftBig; - animation-name: fadeOutLeftBig; -} - -@-webkit-keyframes fadeOutRight { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(20px); - transform: translateX(20px); - } -} - -@keyframes fadeOutRight { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(20px); - -ms-transform: translateX(20px); - transform: translateX(20px); - } -} - -.fadeOutRight { - -webkit-animation-name: fadeOutRight; - animation-name: fadeOutRight; -} - -@-webkit-keyframes fadeOutRightBig { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } -} - -@keyframes fadeOutRightBig { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } -} - -.fadeOutRightBig { - -webkit-animation-name: fadeOutRightBig; - animation-name: fadeOutRightBig; -} - -@-webkit-keyframes fadeOutUp { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(-20px); - transform: translateY(-20px); - } -} - -@keyframes fadeOutUp { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(-20px); - -ms-transform: translateY(-20px); - transform: translateY(-20px); - } -} - -.fadeOutUp { - -webkit-animation-name: fadeOutUp; - animation-name: fadeOutUp; -} - -@-webkit-keyframes fadeOutUpBig { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } -} - -@keyframes fadeOutUpBig { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } -} - -.fadeOutUpBig { - -webkit-animation-name: fadeOutUpBig; - animation-name: fadeOutUpBig; -} - -@-webkit-keyframes flip { - 0% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(-360deg) scale(1); - transform: perspective(400px) translateZ(0) rotateY(-360deg) scale(1); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 40% { - -webkit-transform: perspective(400px) translateZ(150px) rotateY(-190deg) scale(1); - transform: perspective(400px) translateZ(150px) rotateY(-190deg) scale(1); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 50% { - -webkit-transform: perspective(400px) translateZ(150px) rotateY(-170deg) scale(1); - transform: perspective(400px) translateZ(150px) rotateY(-170deg) scale(1); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 80% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(0deg) scale(.95); - transform: perspective(400px) translateZ(0) rotateY(0deg) scale(.95); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 100% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(0deg) scale(1); - transform: perspective(400px) translateZ(0) rotateY(0deg) scale(1); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } -} - -@keyframes flip { - 0% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(-360deg) scale(1); - -ms-transform: perspective(400px) translateZ(0) rotateY(-360deg) scale(1); - transform: perspective(400px) translateZ(0) rotateY(-360deg) scale(1); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 40% { - -webkit-transform: perspective(400px) translateZ(150px) rotateY(-190deg) scale(1); - -ms-transform: perspective(400px) translateZ(150px) rotateY(-190deg) scale(1); - transform: perspective(400px) translateZ(150px) rotateY(-190deg) scale(1); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 50% { - -webkit-transform: perspective(400px) translateZ(150px) rotateY(-170deg) scale(1); - -ms-transform: perspective(400px) translateZ(150px) rotateY(-170deg) scale(1); - transform: perspective(400px) translateZ(150px) rotateY(-170deg) scale(1); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 80% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(0deg) scale(.95); - -ms-transform: perspective(400px) translateZ(0) rotateY(0deg) scale(.95); - transform: perspective(400px) translateZ(0) rotateY(0deg) scale(.95); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 100% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(0deg) scale(1); - -ms-transform: perspective(400px) translateZ(0) rotateY(0deg) scale(1); - transform: perspective(400px) translateZ(0) rotateY(0deg) scale(1); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } -} - -.animated.flip { - -webkit-backface-visibility: visible; - -ms-backface-visibility: visible; - backface-visibility: visible; - -webkit-animation-name: flip; - animation-name: flip; -} - -@-webkit-keyframes flipInX { - 0% { - -webkit-transform: perspective(400px) rotateX(90deg); - transform: perspective(400px) rotateX(90deg); - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotateX(-10deg); - transform: perspective(400px) rotateX(-10deg); - } - - 70% { - -webkit-transform: perspective(400px) rotateX(10deg); - transform: perspective(400px) rotateX(10deg); - } - - 100% { - -webkit-transform: perspective(400px) rotateX(0deg); - transform: perspective(400px) rotateX(0deg); - opacity: 1; - } -} - -@keyframes flipInX { - 0% { - -webkit-transform: perspective(400px) rotateX(90deg); - -ms-transform: perspective(400px) rotateX(90deg); - transform: perspective(400px) rotateX(90deg); - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotateX(-10deg); - -ms-transform: perspective(400px) rotateX(-10deg); - transform: perspective(400px) rotateX(-10deg); - } - - 70% { - -webkit-transform: perspective(400px) rotateX(10deg); - -ms-transform: perspective(400px) rotateX(10deg); - transform: perspective(400px) rotateX(10deg); - } - - 100% { - -webkit-transform: perspective(400px) rotateX(0deg); - -ms-transform: perspective(400px) rotateX(0deg); - transform: perspective(400px) rotateX(0deg); - opacity: 1; - } -} - -.flipInX { - -webkit-backface-visibility: visible !important; - -ms-backface-visibility: visible !important; - backface-visibility: visible !important; - -webkit-animation-name: flipInX; - animation-name: flipInX; -} - -@-webkit-keyframes flipInY { - 0% { - -webkit-transform: perspective(400px) rotateY(90deg); - transform: perspective(400px) rotateY(90deg); - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotateY(-10deg); - transform: perspective(400px) rotateY(-10deg); - } - - 70% { - -webkit-transform: perspective(400px) rotateY(10deg); - transform: perspective(400px) rotateY(10deg); - } - - 100% { - -webkit-transform: perspective(400px) rotateY(0deg); - transform: perspective(400px) rotateY(0deg); - opacity: 1; - } -} - -@keyframes flipInY { - 0% { - -webkit-transform: perspective(400px) rotateY(90deg); - -ms-transform: perspective(400px) rotateY(90deg); - transform: perspective(400px) rotateY(90deg); - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotateY(-10deg); - -ms-transform: perspective(400px) rotateY(-10deg); - transform: perspective(400px) rotateY(-10deg); - } - - 70% { - -webkit-transform: perspective(400px) rotateY(10deg); - -ms-transform: perspective(400px) rotateY(10deg); - transform: perspective(400px) rotateY(10deg); - } - - 100% { - -webkit-transform: perspective(400px) rotateY(0deg); - -ms-transform: perspective(400px) rotateY(0deg); - transform: perspective(400px) rotateY(0deg); - opacity: 1; - } -} - -.flipInY { - -webkit-backface-visibility: visible !important; - -ms-backface-visibility: visible !important; - backface-visibility: visible !important; - -webkit-animation-name: flipInY; - animation-name: flipInY; -} - -@-webkit-keyframes flipOutX { - 0% { - -webkit-transform: perspective(400px) rotateX(0deg); - transform: perspective(400px) rotateX(0deg); - opacity: 1; - } - - 100% { - -webkit-transform: perspective(400px) rotateX(90deg); - transform: perspective(400px) rotateX(90deg); - opacity: 0; - } -} - -@keyframes flipOutX { - 0% { - -webkit-transform: perspective(400px) rotateX(0deg); - -ms-transform: perspective(400px) rotateX(0deg); - transform: perspective(400px) rotateX(0deg); - opacity: 1; - } - - 100% { - -webkit-transform: perspective(400px) rotateX(90deg); - -ms-transform: perspective(400px) rotateX(90deg); - transform: perspective(400px) rotateX(90deg); - opacity: 0; - } -} - -.flipOutX { - -webkit-animation-name: flipOutX; - animation-name: flipOutX; - -webkit-backface-visibility: visible !important; - -ms-backface-visibility: visible !important; - backface-visibility: visible !important; -} - -@-webkit-keyframes flipOutY { - 0% { - -webkit-transform: perspective(400px) rotateY(0deg); - transform: perspective(400px) rotateY(0deg); - opacity: 1; - } - - 100% { - -webkit-transform: perspective(400px) rotateY(90deg); - transform: perspective(400px) rotateY(90deg); - opacity: 0; - } -} - -@keyframes flipOutY { - 0% { - -webkit-transform: perspective(400px) rotateY(0deg); - -ms-transform: perspective(400px) rotateY(0deg); - transform: perspective(400px) rotateY(0deg); - opacity: 1; - } - - 100% { - -webkit-transform: perspective(400px) rotateY(90deg); - -ms-transform: perspective(400px) rotateY(90deg); - transform: perspective(400px) rotateY(90deg); - opacity: 0; - } -} - -.flipOutY { - -webkit-backface-visibility: visible !important; - -ms-backface-visibility: visible !important; - backface-visibility: visible !important; - -webkit-animation-name: flipOutY; - animation-name: flipOutY; -} - -@-webkit-keyframes lightSpeedIn { - 0% { - -webkit-transform: translateX(100%) skewX(-30deg); - transform: translateX(100%) skewX(-30deg); - opacity: 0; - } - - 60% { - -webkit-transform: translateX(-20%) skewX(30deg); - transform: translateX(-20%) skewX(30deg); - opacity: 1; - } - - 80% { - -webkit-transform: translateX(0%) skewX(-15deg); - transform: translateX(0%) skewX(-15deg); - opacity: 1; - } - - 100% { - -webkit-transform: translateX(0%) skewX(0deg); - transform: translateX(0%) skewX(0deg); - opacity: 1; - } -} - -@keyframes lightSpeedIn { - 0% { - -webkit-transform: translateX(100%) skewX(-30deg); - -ms-transform: translateX(100%) skewX(-30deg); - transform: translateX(100%) skewX(-30deg); - opacity: 0; - } - - 60% { - -webkit-transform: translateX(-20%) skewX(30deg); - -ms-transform: translateX(-20%) skewX(30deg); - transform: translateX(-20%) skewX(30deg); - opacity: 1; - } - - 80% { - -webkit-transform: translateX(0%) skewX(-15deg); - -ms-transform: translateX(0%) skewX(-15deg); - transform: translateX(0%) skewX(-15deg); - opacity: 1; - } - - 100% { - -webkit-transform: translateX(0%) skewX(0deg); - -ms-transform: translateX(0%) skewX(0deg); - transform: translateX(0%) skewX(0deg); - opacity: 1; - } -} - -.lightSpeedIn { - -webkit-animation-name: lightSpeedIn; - animation-name: lightSpeedIn; - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; -} - -@-webkit-keyframes lightSpeedOut { - 0% { - -webkit-transform: translateX(0%) skewX(0deg); - transform: translateX(0%) skewX(0deg); - opacity: 1; - } - - 100% { - -webkit-transform: translateX(100%) skewX(-30deg); - transform: translateX(100%) skewX(-30deg); - opacity: 0; - } -} - -@keyframes lightSpeedOut { - 0% { - -webkit-transform: translateX(0%) skewX(0deg); - -ms-transform: translateX(0%) skewX(0deg); - transform: translateX(0%) skewX(0deg); - opacity: 1; - } - - 100% { - -webkit-transform: translateX(100%) skewX(-30deg); - -ms-transform: translateX(100%) skewX(-30deg); - transform: translateX(100%) skewX(-30deg); - opacity: 0; - } -} - -.lightSpeedOut { - -webkit-animation-name: lightSpeedOut; - animation-name: lightSpeedOut; - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; -} - -@-webkit-keyframes rotateIn { - 0% { - -webkit-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(-200deg); - transform: rotate(-200deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -@keyframes rotateIn { - 0% { - -webkit-transform-origin: center center; - -ms-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(-200deg); - -ms-transform: rotate(-200deg); - transform: rotate(-200deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: center center; - -ms-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -.rotateIn { - -webkit-animation-name: rotateIn; - animation-name: rotateIn; -} - -@-webkit-keyframes rotateInDownLeft { - 0% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -@keyframes rotateInDownLeft { - 0% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -.rotateInDownLeft { - -webkit-animation-name: rotateInDownLeft; - animation-name: rotateInDownLeft; -} - -@-webkit-keyframes rotateInDownRight { - 0% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -@keyframes rotateInDownRight { - 0% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -.rotateInDownRight { - -webkit-animation-name: rotateInDownRight; - animation-name: rotateInDownRight; -} - -@-webkit-keyframes rotateInUpLeft { - 0% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -@keyframes rotateInUpLeft { - 0% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -.rotateInUpLeft { - -webkit-animation-name: rotateInUpLeft; - animation-name: rotateInUpLeft; -} - -@-webkit-keyframes rotateInUpRight { - 0% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -@keyframes rotateInUpRight { - 0% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } -} - -.rotateInUpRight { - -webkit-animation-name: rotateInUpRight; - animation-name: rotateInUpRight; -} - -@-webkit-keyframes rotateOut { - 0% { - -webkit-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(200deg); - transform: rotate(200deg); - opacity: 0; - } -} - -@keyframes rotateOut { - 0% { - -webkit-transform-origin: center center; - -ms-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: center center; - -ms-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(200deg); - -ms-transform: rotate(200deg); - transform: rotate(200deg); - opacity: 0; - } -} - -.rotateOut { - -webkit-animation-name: rotateOut; - animation-name: rotateOut; -} - -@-webkit-keyframes rotateOutDownLeft { - 0% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } -} - -@keyframes rotateOutDownLeft { - 0% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } -} - -.rotateOutDownLeft { - -webkit-animation-name: rotateOutDownLeft; - animation-name: rotateOutDownLeft; -} - -@-webkit-keyframes rotateOutDownRight { - 0% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } -} - -@keyframes rotateOutDownRight { - 0% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } -} - -.rotateOutDownRight { - -webkit-animation-name: rotateOutDownRight; - animation-name: rotateOutDownRight; -} - -@-webkit-keyframes rotateOutUpLeft { - 0% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } -} - -@keyframes rotateOutUpLeft { - 0% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } -} - -.rotateOutUpLeft { - -webkit-animation-name: rotateOutUpLeft; - animation-name: rotateOutUpLeft; -} - -@-webkit-keyframes rotateOutUpRight { - 0% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } -} - -@keyframes rotateOutUpRight { - 0% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } -} - -.rotateOutUpRight { - -webkit-animation-name: rotateOutUpRight; - animation-name: rotateOutUpRight; -} - -@-webkit-keyframes slideInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } - - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } -} - -@keyframes slideInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } - - 100% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} - -.slideInDown { - -webkit-animation-name: slideInDown; - animation-name: slideInDown; -} - -@-webkit-keyframes slideInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } - - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -@keyframes slideInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } - - 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} - -.slideInLeft { - -webkit-animation-name: slideInLeft; - animation-name: slideInLeft; -} - -@-webkit-keyframes slideInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } - - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} - -@keyframes slideInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } - - 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} - -.slideInRight { - -webkit-animation-name: slideInRight; - animation-name: slideInRight; -} - -@-webkit-keyframes slideOutLeft { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } -} - -@keyframes slideOutLeft { - 0% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } -} - -.slideOutLeft { - -webkit-animation-name: slideOutLeft; - animation-name: slideOutLeft; -} - -@-webkit-keyframes slideOutRight { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } -} - -@keyframes slideOutRight { - 0% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } -} - -.slideOutRight { - -webkit-animation-name: slideOutRight; - animation-name: slideOutRight; -} - -@-webkit-keyframes slideOutUp { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } -} - -@keyframes slideOutUp { - 0% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } -} - -.slideOutUp { - -webkit-animation-name: slideOutUp; - animation-name: slideOutUp; -} - -@-webkit-keyframes slideInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } -} - -@keyframes slideInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } - - 100% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} - -.slideInUp { - -webkit-animation-name: slideInUp; - animation-name: slideInUp; -} - -@-webkit-keyframes slideOutDown { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } -} - -@keyframes slideOutDown { - 0% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } -} - -.slideOutDown { - -webkit-animation-name: slideOutDown; - animation-name: slideOutDown; -} - -@-webkit-keyframes hinge { - 0% { - -webkit-transform: rotate(0); - transform: rotate(0); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 20%, 60% { - -webkit-transform: rotate(80deg); - transform: rotate(80deg); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 40% { - -webkit-transform: rotate(60deg); - transform: rotate(60deg); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 80% { - -webkit-transform: rotate(60deg) translateY(0); - transform: rotate(60deg) translateY(0); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - opacity: 1; - } - - 100% { - -webkit-transform: translateY(700px); - transform: translateY(700px); - opacity: 0; - } -} - -@keyframes hinge { - 0% { - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 20%, 60% { - -webkit-transform: rotate(80deg); - -ms-transform: rotate(80deg); - transform: rotate(80deg); - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 40% { - -webkit-transform: rotate(60deg); - -ms-transform: rotate(60deg); - transform: rotate(60deg); - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 80% { - -webkit-transform: rotate(60deg) translateY(0); - -ms-transform: rotate(60deg) translateY(0); - transform: rotate(60deg) translateY(0); - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - opacity: 1; - } - - 100% { - -webkit-transform: translateY(700px); - -ms-transform: translateY(700px); - transform: translateY(700px); - opacity: 0; - } -} - -.hinge { - -webkit-animation-name: hinge; - animation-name: hinge; -} - -/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ - -@-webkit-keyframes rollIn { - 0% { - opacity: 0; - -webkit-transform: translateX(-100%) rotate(-120deg); - transform: translateX(-100%) rotate(-120deg); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0px) rotate(0deg); - transform: translateX(0px) rotate(0deg); - } -} - -@keyframes rollIn { - 0% { - opacity: 0; - -webkit-transform: translateX(-100%) rotate(-120deg); - -ms-transform: translateX(-100%) rotate(-120deg); - transform: translateX(-100%) rotate(-120deg); - } - - 100% { - opacity: 1; - -webkit-transform: translateX(0px) rotate(0deg); - -ms-transform: translateX(0px) rotate(0deg); - transform: translateX(0px) rotate(0deg); - } -} - -.rollIn { - -webkit-animation-name: rollIn; - animation-name: rollIn; -} - -/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ - -@-webkit-keyframes rollOut { - 0% { - opacity: 1; - -webkit-transform: translateX(0px) rotate(0deg); - transform: translateX(0px) rotate(0deg); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(100%) rotate(120deg); - transform: translateX(100%) rotate(120deg); - } -} - -@keyframes rollOut { - 0% { - opacity: 1; - -webkit-transform: translateX(0px) rotate(0deg); - -ms-transform: translateX(0px) rotate(0deg); - transform: translateX(0px) rotate(0deg); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(100%) rotate(120deg); - -ms-transform: translateX(100%) rotate(120deg); - transform: translateX(100%) rotate(120deg); - } -} - -.rollOut { - -webkit-animation-name: rollOut; - animation-name: rollOut; -} - -@-webkit-keyframes zoomIn { - 0% { - opacity: 0; - -webkit-transform: scale(.3); - transform: scale(.3); - } - - 50% { - opacity: 1; - } -} - -@keyframes zoomIn { - 0% { - opacity: 0; - -webkit-transform: scale(.3); - -ms-transform: scale(.3); - transform: scale(.3); - } - - 50% { - opacity: 1; - } -} - -.zoomIn { - -webkit-animation-name: zoomIn; - animation-name: zoomIn; -} - -@-webkit-keyframes zoomInDown { - 0% { - opacity: 0; - -webkit-transform: scale(.1) translateY(-2000px); - transform: scale(.1) translateY(-2000px); - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 60% { - opacity: 1; - -webkit-transform: scale(.475) translateY(60px); - transform: scale(.475) translateY(60px); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } -} - -@keyframes zoomInDown { - 0% { - opacity: 0; - -webkit-transform: scale(.1) translateY(-2000px); - -ms-transform: scale(.1) translateY(-2000px); - transform: scale(.1) translateY(-2000px); - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 60% { - opacity: 1; - -webkit-transform: scale(.475) translateY(60px); - -ms-transform: scale(.475) translateY(60px); - transform: scale(.475) translateY(60px); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } -} - -.zoomInDown { - -webkit-animation-name: zoomInDown; - animation-name: zoomInDown; -} - -@-webkit-keyframes zoomInLeft { - 0% { - opacity: 0; - -webkit-transform: scale(.1) translateX(-2000px); - transform: scale(.1) translateX(-2000px); - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 60% { - opacity: 1; - -webkit-transform: scale(.475) translateX(48px); - transform: scale(.475) translateX(48px); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } -} - -@keyframes zoomInLeft { - 0% { - opacity: 0; - -webkit-transform: scale(.1) translateX(-2000px); - -ms-transform: scale(.1) translateX(-2000px); - transform: scale(.1) translateX(-2000px); - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 60% { - opacity: 1; - -webkit-transform: scale(.475) translateX(48px); - -ms-transform: scale(.475) translateX(48px); - transform: scale(.475) translateX(48px); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } -} - -.zoomInLeft { - -webkit-animation-name: zoomInLeft; - animation-name: zoomInLeft; -} - -@-webkit-keyframes zoomInRight { - 0% { - opacity: 0; - -webkit-transform: scale(.1) translateX(2000px); - transform: scale(.1) translateX(2000px); - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 60% { - opacity: 1; - -webkit-transform: scale(.475) translateX(-48px); - transform: scale(.475) translateX(-48px); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } -} - -@keyframes zoomInRight { - 0% { - opacity: 0; - -webkit-transform: scale(.1) translateX(2000px); - -ms-transform: scale(.1) translateX(2000px); - transform: scale(.1) translateX(2000px); - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 60% { - opacity: 1; - -webkit-transform: scale(.475) translateX(-48px); - -ms-transform: scale(.475) translateX(-48px); - transform: scale(.475) translateX(-48px); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } -} - -.zoomInRight { - -webkit-animation-name: zoomInRight; - animation-name: zoomInRight; -} - -@-webkit-keyframes zoomInUp { - 0% { - opacity: 0; - -webkit-transform: scale(.1) translateY(2000px); - transform: scale(.1) translateY(2000px); - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 60% { - opacity: 1; - -webkit-transform: scale(.475) translateY(-60px); - transform: scale(.475) translateY(-60px); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } -} - -@keyframes zoomInUp { - 0% { - opacity: 0; - -webkit-transform: scale(.1) translateY(2000px); - -ms-transform: scale(.1) translateY(2000px); - transform: scale(.1) translateY(2000px); - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 60% { - opacity: 1; - -webkit-transform: scale(.475) translateY(-60px); - -ms-transform: scale(.475) translateY(-60px); - transform: scale(.475) translateY(-60px); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } -} - -.zoomInUp { - -webkit-animation-name: zoomInUp; - animation-name: zoomInUp; -} - -@-webkit-keyframes zoomOut { - 0% { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); - } - - 50% { - opacity: 0; - -webkit-transform: scale(.3); - transform: scale(.3); - } - - 100% { - opacity: 0; - } -} - -@keyframes zoomOut { - 0% { - opacity: 1; - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - - 50% { - opacity: 0; - -webkit-transform: scale(.3); - -ms-transform: scale(.3); - transform: scale(.3); - } - - 100% { - opacity: 0; - } -} - -.zoomOut { - -webkit-animation-name: zoomOut; - animation-name: zoomOut; -} - -@-webkit-keyframes zoomOutDown { - 40% { - opacity: 1; - -webkit-transform: scale(.475) translateY(-60px); - transform: scale(.475) translateY(-60px); - -webkit-animation-timing-function: linear; - animation-timing-function: linear; - } - - 100% { - opacity: 0; - -webkit-transform: scale(.1) translateY(2000px); - transform: scale(.1) translateY(2000px); - -webkit-transform-origin: center bottom; - transform-origin: center bottom; - } -} - -@keyframes zoomOutDown { - 40% { - opacity: 1; - -webkit-transform: scale(.475) translateY(-60px); - -ms-transform: scale(.475) translateY(-60px); - transform: scale(.475) translateY(-60px); - -webkit-animation-timing-function: linear; - animation-timing-function: linear; - } - - 100% { - opacity: 0; - -webkit-transform: scale(.1) translateY(2000px); - -ms-transform: scale(.1) translateY(2000px); - transform: scale(.1) translateY(2000px); - -webkit-transform-origin: center bottom; - -ms-transform-origin: center bottom; - transform-origin: center bottom; - } -} - -.zoomOutDown { - -webkit-animation-name: zoomOutDown; - animation-name: zoomOutDown; -} - -@-webkit-keyframes zoomOutLeft { - 40% { - opacity: 1; - -webkit-transform: scale(.475) translateX(42px); - transform: scale(.475) translateX(42px); - -webkit-animation-timing-function: linear; - animation-timing-function: linear; - } - - 100% { - opacity: 0; - -webkit-transform: scale(.1) translateX(-2000px); - transform: scale(.1) translateX(-2000px); - -webkit-transform-origin: left center; - transform-origin: left center; - } -} - -@keyframes zoomOutLeft { - 40% { - opacity: 1; - -webkit-transform: scale(.475) translateX(42px); - -ms-transform: scale(.475) translateX(42px); - transform: scale(.475) translateX(42px); - -webkit-animation-timing-function: linear; - animation-timing-function: linear; - } - - 100% { - opacity: 0; - -webkit-transform: scale(.1) translateX(-2000px); - -ms-transform: scale(.1) translateX(-2000px); - transform: scale(.1) translateX(-2000px); - -webkit-transform-origin: left center; - -ms-transform-origin: left center; - transform-origin: left center; - } -} - -.zoomOutLeft { - -webkit-animation-name: zoomOutLeft; - animation-name: zoomOutLeft; -} - -@-webkit-keyframes zoomOutRight { - 40% { - opacity: 1; - -webkit-transform: scale(.475) translateX(-42px); - transform: scale(.475) translateX(-42px); - -webkit-animation-timing-function: linear; - animation-timing-function: linear; - } - - 100% { - opacity: 0; - -webkit-transform: scale(.1) translateX(2000px); - transform: scale(.1) translateX(2000px); - -webkit-transform-origin: right center; - transform-origin: right center; - } -} - -@keyframes zoomOutRight { - 40% { - opacity: 1; - -webkit-transform: scale(.475) translateX(-42px); - -ms-transform: scale(.475) translateX(-42px); - transform: scale(.475) translateX(-42px); - -webkit-animation-timing-function: linear; - animation-timing-function: linear; - } - - 100% { - opacity: 0; - -webkit-transform: scale(.1) translateX(2000px); - -ms-transform: scale(.1) translateX(2000px); - transform: scale(.1) translateX(2000px); - -webkit-transform-origin: right center; - -ms-transform-origin: right center; - transform-origin: right center; - } -} - -.zoomOutRight { - -webkit-animation-name: zoomOutRight; - animation-name: zoomOutRight; -} - -@-webkit-keyframes zoomOutUp { - 40% { - opacity: 1; - -webkit-transform: scale(.475) translateY(60px); - transform: scale(.475) translateY(60px); - -webkit-animation-timing-function: linear; - animation-timing-function: linear; - } - - 100% { - opacity: 0; - -webkit-transform: scale(.1) translateY(-2000px); - transform: scale(.1) translateY(-2000px); - -webkit-transform-origin: center top; - transform-origin: center top; - } -} - -@keyframes zoomOutUp { - 40% { - opacity: 1; - -webkit-transform: scale(.475) translateY(60px); - -ms-transform: scale(.475) translateY(60px); - transform: scale(.475) translateY(60px); - -webkit-animation-timing-function: linear; - animation-timing-function: linear; - } - - 100% { - opacity: 0; - -webkit-transform: scale(.1) translateY(-2000px); - -ms-transform: scale(.1) translateY(-2000px); - transform: scale(.1) translateY(-2000px); - -webkit-transform-origin: center top; - -ms-transform-origin: center top; - transform-origin: center top; - } -} - -.zoomOutUp { - -webkit-animation-name: zoomOutUp; - animation-name: zoomOutUp; -} \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index e1c522c..ea07eb0 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -6,30 +6,32 @@ module.exports = function(grunt) { options: { style: 'compressed' }, - files: [{ - expand: true, - cwd: 'sass', - src: ['*.scss'], - dest: 'css', - ext: '.min.css' - }] + files: { + 'core/dest/css/screen.min.css': 'core/sass/screen.scss' + } } }, + concat: { + dist: { + src: ['core/js/functions.js', 'core/js/base.js'], + dest: 'core/dest/js/app.min.js', + }, + }, uglify: { js: { files: { - 'script/base.min.js': ['script/base.js'], - 'script/functions.min.js': ['script/functions.js'] + 'core/dest/js/app.min.js': ['core/dest/js/app.min.js'] } } }, watch: { - files: ['sass/*', 'script/*'], - tasks: ['sass', 'uglify'] + files: ['core/sass/*', 'core/js/*'], + tasks: ['sass', 'concat', 'uglify'] } }); grunt.loadNpmTasks('grunt-contrib-sass'); + grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.registerTask('default', ['sass', 'uglify:js']); + grunt.registerTask('default', ['sass', 'concat', 'uglify']); }; \ No newline at end of file diff --git a/index.html b/index.html index 05c6ab9..4b58c6e 100644 --- a/index.html +++ b/index.html @@ -29,12 +29,12 @@ Uptimey | Beautiful Server Uptime Monitor - + - - - + + + @@ -98,8 +98,8 @@

Your server's uptime until now...

diff --git a/package.json b/package.json index 0474aa9..2284905 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { - "name": "Uptimey", - "title": "uptimey", - "version": "1.0.0", - "devDependencies": { - "grunt": "0.4.5", - "grunt-contrib-sass": "0.7.3", - "grunt-contrib-uglify": "0.5.0", - "grunt-contrib-watch": "0.6.1" - } -} \ No newline at end of file + "name": "Uptimey", + "title": "uptimey", + "version": "1.0.0", + "devDependencies": { + "grunt": "0.4.5", + "grunt-contrib-sass": "0.7.3", + "grunt-contrib-uglify": "0.5.0", + "grunt-contrib-watch": "0.6.1", + "grunt-contrib-concat": "^0.5.0" + } +} diff --git a/script/base.min.js b/script/base.min.js deleted file mode 100644 index 27ccf63..0000000 --- a/script/base.min.js +++ /dev/null @@ -1 +0,0 @@ -$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a})}),$(window).bind("beforeunload",function(){action("clear")}); \ No newline at end of file diff --git a/script/functions.min.js b/script/functions.min.js deleted file mode 100644 index a09c38d..0000000 --- a/script/functions.min.js +++ /dev/null @@ -1 +0,0 @@ -function output(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://www.telize.com/geoip/"+a;$.get(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country_code).addClass("fadeInDown"),$("#location").attr("data-latlong",a.latitude+"+"+a.longitude),globalLocation=a.city+", "+a.region+", "+a.country_code,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})},"jsonp"),$(".location-inner").addClass("fadeInDown")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeInDown"),$("#hours").text(a[1]).addClass("fadeInDown"),$("#minutes").text(a[2]).addClass("fadeInDown"),$(".bottom-container").addClass("fadeInDown")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeInDown"),$("#time").text(a[1]).addClass("fadeInDown"),$("#since").text(a[2]).addClass("fadeInDown"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeInDown")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeInDown")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").text()&&(d+=$("#days").text()+" days "),0!==$("#hours").text()&&(d+=$("#hours").text()+" hours "),0!==$("#minutes").text()&&(d+=$("#minutes").text()+" minutes");var e="My server has been online for "+d+". Can you beat this uptime? via",f="uptimey,devbranch";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="script/ajax.php",globalLocation,globalSunrise,globalSunset; \ No newline at end of file From 21001d123c7a1fcc4c209ce8dfb49f80d125576e Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Thu, 13 Nov 2014 09:52:39 +0000 Subject: [PATCH 05/68] Min version for normalize.css --- core/assets/app.handler.php | 2 +- core/dest/css/_normalize.css | 425 ------------------------------- core/dest/css/_normalize.min.css | 1 + index.html | 2 +- 4 files changed, 3 insertions(+), 427 deletions(-) delete mode 100644 core/dest/css/_normalize.css create mode 100644 core/dest/css/_normalize.min.css diff --git a/core/assets/app.handler.php b/core/assets/app.handler.php index 529b8d0..b9e49b4 100644 --- a/core/assets/app.handler.php +++ b/core/assets/app.handler.php @@ -117,7 +117,7 @@ $formatUptime .= $min . ";"; else $formatUptime .= "0;"; - // Return the formated tim + // Return the formated time echo $formatUptime; // Set last response $_SESSION['uptime'] = $formatUptime; diff --git a/core/dest/css/_normalize.css b/core/dest/css/_normalize.css deleted file mode 100644 index 08f8950..0000000 --- a/core/dest/css/_normalize.css +++ /dev/null @@ -1,425 +0,0 @@ -/*! normalize.css v3.0.1 | MIT License | git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} diff --git a/core/dest/css/_normalize.min.css b/core/dest/css/_normalize.min.css new file mode 100644 index 0000000..d3c7f4d --- /dev/null +++ b/core/dest/css/_normalize.min.css @@ -0,0 +1 @@ +/*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/index.html b/index.html index 4b58c6e..7d05440 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,7 @@ - + + + + + Uptimey | Beautiful Server Uptime Monitor + + + + + + + + + + +
+
+
+ refresh + advanced + + screenshot +
+ +
+
+
+
+
+ Current date on server + +
+
+ Server is active since + +
+
+ + +
+
+
+
+ + +
+
+
+
+

Your server's uptime until now...

+
+
+ + days +
+
+ + hours +
+
+ + minutes +
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index 100373f..71fc879 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -1,6 +1,17 @@ module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), + htmlmin: { + dist: { + options: { + collapseWhitespace: true, + minifyJS: true + }, + files: { + 'index.html': 'core/template/main.html' + } + } + }, sass: { dist: { options: { @@ -25,13 +36,14 @@ module.exports = function(grunt) { } }, watch: { - files: ['core/sass/*', 'core/js/*'], - tasks: ['sass', 'concat', 'uglify'] + files: ['core/template/*', 'core/sass/*', 'core/js/*'], + tasks: ['htmlmin', 'sass', 'concat', 'uglify'] } }); + grunt.loadNpmTasks('grunt-contrib-htmlmin'); grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.registerTask('default', ['sass', 'concat', 'uglify']); + grunt.registerTask('default', ['htmlmin', 'sass', 'concat', 'uglify']); }; \ No newline at end of file diff --git a/index.html b/index.html index c5ad497..f4efb0f 100644 --- a/index.html +++ b/index.html @@ -22,86 +22,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---> - - - - Uptimey | Beautiful Server Uptime Monitor - - - - - - - - - - - -
-
-
- refresh - advanced - - screenshot -
- -
-
-
-
-
- Current date on server - -
-
- Server is active since - -
-
- - -
-
-
-
- - -
-
-
-
-

Your server's uptime until now...

-
-
- - days -
-
- - hours -
-
- - minutes -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file +-->Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file diff --git a/package.json b/package.json index 84715bf..cc2c98e 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ ], "devDependencies": { "grunt": "0.4.5", + "grunt-contrib-htmlmin": "^0.4.0", "grunt-contrib-sass": "^0.9.2", "grunt-contrib-uglify": "0.5.0", "grunt-contrib-watch": "0.6.1", From ce1c9cede7ac1e03183282f18a8d0162d2a9a33b Mon Sep 17 00:00:00 2001 From: stefanbc Date: Sat, 21 Feb 2015 22:58:08 +0200 Subject: [PATCH 20/68] Fixed fonts. Started implementing the advanced section. --- core/dest/css/screen.min.css | 3 +-- core/handlers/app.handler.php | 12 +++++++++--- core/sass/screen.scss | 18 +++++++++++------- core/template/main.html | 5 ++++- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/core/dest/css/screen.min.css b/core/dest/css/screen.min.css index f67070e..67749b3 100644 --- a/core/dest/css/screen.min.css +++ b/core/dest/css/screen.min.css @@ -1,2 +1 @@ -html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover{text-decoration:underline}a:focus{text-decoration:underline}.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;width:100px;color:#fff;background:rgba(0,0,0,0.6);height:30px;line-height:30px;text-align:center;visibility:hidden;border-radius:6px;font-size:0.5em}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button{color:#55acee}.button-container .screenshot-button{text-decoration:none;color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;padding-bottom:100px}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} -/*# sourceMappingURL=screen.min.css.map */ +html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover{text-decoration:underline}a:focus{text-decoration:underline}.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(0,0,0,0)), color-stop(50%, #939393), color-stop(100%, rgba(0,0,0,0)));background:-webkit-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:-o-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:-ms-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:linear-gradient(to right, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button{color:#55acee}.button-container .screenshot-button{text-decoration:none;color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} diff --git a/core/handlers/app.handler.php b/core/handlers/app.handler.php index 902bd26..7da0e18 100644 --- a/core/handlers/app.handler.php +++ b/core/handlers/app.handler.php @@ -64,7 +64,7 @@ // Set the header to properly return the json header('Content-Type: application/json'); // From third party - $getIP = shell_exec('curl http://ipinfo.io/json'); + $getIP = shell_exec('wget -qO- curlmyip.com'); } else { // Using PHP var $getIP = gethostbyname($_SERVER['SERVER_NAME']); @@ -98,7 +98,7 @@ default: $totalSeconds = 0; } - + $totalMin = $totalSeconds / 60; $totalHours = $totalMin / 60; // Calculate the proper times @@ -143,9 +143,15 @@ if (empty($flag)) { $_SESSION['last'] = time(); } - break; + break; case 'advanced': // Set a notification for in dev section + echo ""; + echo "Hostname: " . shell_exec('/bin/hostname') . "
"; + echo "OS: " . shell_exec('/usr/bin/lsb_release -ds;/bin/uname -r') . "
"; + echo "External IP: " . shell_exec('wget -qO- curlmyip.com') . "
"; + echo "
"; + echo "
"; echo "This section is in development. Checkout the dev branch for more info."; break; case 'clear': diff --git a/core/sass/screen.scss b/core/sass/screen.scss index 3563594..7031853 100644 --- a/core/sass/screen.scss +++ b/core/sass/screen.scss @@ -104,7 +104,7 @@ a { margin-top: 25px; &:after { @extend %border; - margin-top: 25px; + margin-top: 25px; } } .button { @@ -113,15 +113,17 @@ a { position: relative; span { position: absolute; - width: 100px; + visibility: hidden; color: $color_1; - background: $color_2; - height: 30px; + font-family: $font_0; + font-weight: 200; + font-size: 0.5em; line-height: 30px; text-align: center; - visibility: hidden; + background: $color_2; + width: 100px; + height: 30px; border-radius: 6px; - font-size: 0.5em; &:after { content: ''; position: absolute; @@ -226,7 +228,9 @@ a { margin: 0 auto; position: relative; display: block; - padding-bottom: 100px; + // padding-bottom: 100px; + font-family: FontAwesome, $font_0; + font-weight: 200; &:before { padding-right: 10px; } diff --git a/core/template/main.html b/core/template/main.html index 09d1659..00acfa1 100644 --- a/core/template/main.html +++ b/core/template/main.html @@ -89,7 +89,10 @@

Your server's uptime until now...

-
+
+ + +
From ed1514e65fe580ff35a2235a3ea0c8b9d3308af4 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Mon, 23 Feb 2015 19:11:38 +0000 Subject: [PATCH 21/68] Minor changes --- core/dest/css/screen.min.css | 3 ++- core/dest/css/screen.min.css.map | 2 +- core/template/main.html | 2 +- index.html | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/dest/css/screen.min.css b/core/dest/css/screen.min.css index 67749b3..1032079 100644 --- a/core/dest/css/screen.min.css +++ b/core/dest/css/screen.min.css @@ -1 +1,2 @@ -html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover{text-decoration:underline}a:focus{text-decoration:underline}.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(0,0,0,0)), color-stop(50%, #939393), color-stop(100%, rgba(0,0,0,0)));background:-webkit-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:-o-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:-ms-linear-gradient(left, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);background:linear-gradient(to right, rgba(0,0,0,0) 0%, #939393 50%, rgba(0,0,0,0) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button{color:#55acee}.button-container .screenshot-button{text-decoration:none;color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} +html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover{text-decoration:underline}a:focus{text-decoration:underline}.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button{color:#55acee}.button-container .screenshot-button{text-decoration:none;color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} +/*# sourceMappingURL=screen.min.css.map */ diff --git a/core/dest/css/screen.min.css.map b/core/dest/css/screen.min.css.map index e29733a..99f1419 100644 --- a/core/dest/css/screen.min.css.map +++ b/core/dest/css/screen.min.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AA4CA,IAAK,CACJ,MAAM,CAAE,IAAI,CAEb,IAAK,CACJ,MAAM,CAAE,IAAI,CACZ,gBAAgB,CAlBP,IAAI,CAmBb,iBAAiB,CAAE,SAAS,CAC5B,mBAAmB,CAAE,MAAM,CAC3B,eAAe,CAAE,KAAK,CACtB,WAAW,CAdH,kBAAO,CAef,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KAAK,CACd,SAAS,CAAE,GAAG,CACd,cAAc,CAAE,IAAI,CAErB,qCAAO,CACN,cAAc,CAAE,UAAU,CAI7B,oBAAG,CACF,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,KAAK,CAChB,aAAa,CAAE,KAAK,CAGtB,MAAO,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CAxPI,IAAI,CAyPb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", "sources": ["../../sass/screen.scss"], "names": [], "file": "screen.min.css" diff --git a/core/template/main.html b/core/template/main.html index 00acfa1..de1f0c8 100644 --- a/core/template/main.html +++ b/core/template/main.html @@ -100,7 +100,7 @@

Your server's uptime until now...

diff --git a/index.html b/index.html index f4efb0f..1042810 100644 --- a/index.html +++ b/index.html @@ -22,4 +22,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --->Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file +-->Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file From b60bd8a30b96e29e11503e2accd59ff65ebf5d4d Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Tue, 24 Feb 2015 07:56:17 +0000 Subject: [PATCH 22/68] Added config file for customization --- config.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 config.json diff --git a/config.json b/config.json new file mode 100644 index 0000000..3426091 --- /dev/null +++ b/config.json @@ -0,0 +1,20 @@ +{ + "font" : "", + "font_color" : "", + "background_image" : "", + "background_color" : "", + "default_view" : "uptime", + "show_menu_alwasys" : false, + "remove_menu" : false, + "buttons" : + [ + { + "refresh" : true, + "advanced" : true, + "twitter" : true, + "google" : false, + "facebook" : false, + "screenshot": true + } + ] +} \ No newline at end of file From 758f816a484a366b625566699015bff8e45dfb20 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Tue, 24 Feb 2015 07:57:16 +0000 Subject: [PATCH 23/68] Fixed config file --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 3426091..2224b34 100644 --- a/config.json +++ b/config.json @@ -4,7 +4,7 @@ "background_image" : "", "background_color" : "", "default_view" : "uptime", - "show_menu_alwasys" : false, + "show_menu_always": false, "remove_menu" : false, "buttons" : [ From c4673c311bb719d900690b15762140d6a8a164ab Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Fri, 27 Feb 2015 22:25:36 +0000 Subject: [PATCH 24/68] Fixed get config value --- config.json | 20 -------------------- core/dest/js/app.min.js | 2 +- core/handlers/app.handler.php | 2 +- core/js/functions.js | 22 +++++++++++++++++++--- core/template/main.html | 1 + gruntfile.js | 3 ++- index.html | 2 +- 7 files changed, 25 insertions(+), 27 deletions(-) delete mode 100644 config.json diff --git a/config.json b/config.json deleted file mode 100644 index 2224b34..0000000 --- a/config.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "font" : "", - "font_color" : "", - "background_image" : "", - "background_color" : "", - "default_view" : "uptime", - "show_menu_always": false, - "remove_menu" : false, - "buttons" : - [ - { - "refresh" : true, - "advanced" : true, - "twitter" : true, - "google" : false, - "facebook" : false, - "screenshot": true - } - ] -} \ No newline at end of file diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index 821cbf2..eb7883c 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1 @@ -function output(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://ipinfo.io/"+a.ip+"/json";$.get(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn");var b=a.loc.split(",");$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})},"jsonp"),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").attr("data-value")&&(d+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(d+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(d+=$("#minutes").attr("data-value")+" minutes");var e=d+" server uptime. Can you beat this? via",f="uptimey,devops";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":var g=$(".screenshot-button");g.addClass("pulse"),g.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g.hasClass("fa-camera")?(g.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b=a.toDataURL("image/png").replace("image/png","image/octet-stream");g.attr("href",b),fileName=moment().format("DDMMYYYYHHmmss"),g.attr("download","Screenshot_"+fileName+".png")}})):setTimeout(function(){g.removeClass("fa-download").addClass("fa-camera"),g.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/handlers/app.handler.php",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}); \ No newline at end of file +function config(a,b){$.getJSON(globalConfig,function(c){var d=c[a];b(d)})}function output(a,b){switch(a){case"image":config("background_image",function(a){console.log(a)}),$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://ipinfo.io/"+a.ip+"/json";$.getJSON(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn");var b=a.loc.split(",");$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").attr("data-value")&&(d+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(d+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(d+=$("#minutes").attr("data-value")+" minutes");var e=d+" server uptime. Can you beat this? via",f="uptimey,devops";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":var g=$(".screenshot-button");g.addClass("pulse"),g.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g.hasClass("fa-camera")?(g.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b=a.toDataURL("image/png").replace("image/png","image/octet-stream");g.attr("href",b),fileName=moment().format("DDMMYYYYHHmmss"),g.attr("download","Screenshot_"+fileName+".png")}})):setTimeout(function(){g.removeClass("fa-download").addClass("fa-camera"),g.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/handlers/app.handler.php",globalConfig="core/config.json",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}); \ No newline at end of file diff --git a/core/handlers/app.handler.php b/core/handlers/app.handler.php index 7da0e18..77f6cc7 100644 --- a/core/handlers/app.handler.php +++ b/core/handlers/app.handler.php @@ -46,7 +46,7 @@ echo $_SESSION['uptime']; elseif ($action == 'time') echo $_SESSION['time']; - die("early"); + die(); } switch($action){ diff --git a/core/js/functions.js b/core/js/functions.js index 97b3b08..94b2605 100644 --- a/core/js/functions.js +++ b/core/js/functions.js @@ -24,14 +24,30 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* Set the global files */ +var globalFile = 'core/handlers/app.handler.php'; +var globalConfig = 'core/config.json'; /* Set the global vars*/ -var globalFile = 'core/handlers/app.handler.php'; var globalLocation, globalSunrise, globalSunset; +/* Get config key value */ +function config(option, callback){ + $.getJSON(globalConfig, function(data) { + // console.log(data[option]); + var config = data[option]; + callback(config); + }); +} + /* Output the data requested */ function output(type, setFlag) { switch (type) { case 'image': + + config("background_image", function(data){ + console.log(data); + }); + $.get(globalFile, { action: type }) @@ -52,7 +68,7 @@ function output(type, setFlag) { // Set up the URL for location call using ipinfo.io var ip_geocode = "http://ipinfo.io/" + location.ip + "/json"; // Get the response and set the value - $.get(ip_geocode, function(response) { + $.getJSON(ip_geocode, function(response) { // Add it to the element with an animation $('#location').text(response.city + ", " + response.region + ", " + response.country).addClass('fadeIn'); // Add latlong for maps href @@ -68,7 +84,7 @@ function output(type, setFlag) { globalSunset = weather.sunset; } }); - }, "jsonp"); + }); // We only animate the whole container once $('.location-inner').addClass('fadeIn'); }); diff --git a/core/template/main.html b/core/template/main.html index de1f0c8..edffbfb 100644 --- a/core/template/main.html +++ b/core/template/main.html @@ -28,6 +28,7 @@ Uptimey | Beautiful Server Uptime Monitor + diff --git a/gruntfile.js b/gruntfile.js index 71fc879..2d143a4 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -5,7 +5,8 @@ module.exports = function(grunt) { dist: { options: { collapseWhitespace: true, - minifyJS: true + minifyJS: true, + // removeComments: true }, files: { 'index.html': 'core/template/main.html' diff --git a/index.html b/index.html index 1042810..ac7504f 100644 --- a/index.html +++ b/index.html @@ -22,4 +22,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --->Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file +-->Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file From f8ab27f619ab83abaf7798cde227c9c22747c9e4 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Fri, 27 Feb 2015 22:25:53 +0000 Subject: [PATCH 25/68] Fixed get config value --- core/config.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 core/config.json diff --git a/core/config.json b/core/config.json new file mode 100644 index 0000000..f8c6398 --- /dev/null +++ b/core/config.json @@ -0,0 +1,19 @@ +{ + "font": "", + "font_color": "", + "background_image": "", + "background_color": "", + "default_view": "uptime", + "show_menu_always": false, + "remove_menu": false, + "buttons": [ + { + "refresh": true, + "advanced": true, + "twitter": true, + "google": false, + "facebook": false, + "screenshot": true + } + ] +} \ No newline at end of file From 27f1471dbc1330435f5fa97a2ae9b117d67e9523 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Fri, 27 Feb 2015 22:48:21 +0000 Subject: [PATCH 26/68] Added some checks --- core/dest/js/app.min.js | 2 +- core/js/functions.js | 41 ++++++++++++++++++++++++----------------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index eb7883c..7833735 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1 @@ -function config(a,b){$.getJSON(globalConfig,function(c){var d=c[a];b(d)})}function output(a,b){switch(a){case"image":config("background_image",function(a){console.log(a)}),$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://ipinfo.io/"+a.ip+"/json";$.getJSON(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn");var b=a.loc.split(",");$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").attr("data-value")&&(d+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(d+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(d+=$("#minutes").attr("data-value")+" minutes");var e=d+" server uptime. Can you beat this? via",f="uptimey,devops";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":var g=$(".screenshot-button");g.addClass("pulse"),g.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g.hasClass("fa-camera")?(g.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b=a.toDataURL("image/png").replace("image/png","image/octet-stream");g.attr("href",b),fileName=moment().format("DDMMYYYYHHmmss"),g.attr("download","Screenshot_"+fileName+".png")}})):setTimeout(function(){g.removeClass("fa-download").addClass("fa-camera"),g.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/handlers/app.handler.php",globalConfig="core/config.json",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}); \ No newline at end of file +function config(a,b){$.getJSON(globalConfig,function(c){if(0===c.length)b("empty");else{var d=c[a];b(d)}})}function output(a,b){switch(a){case"image":config("background_image",function(b){"empty"===b?($("body").css("backgroundImage","url("+b+")"),$("#copy").html("Powered by Uptimey. Fork on Github")):$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])})});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://ipinfo.io/"+a.ip+"/json";$.getJSON(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn");var b=a.loc.split(",");$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").attr("data-value")&&(d+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(d+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(d+=$("#minutes").attr("data-value")+" minutes");var e=d+" server uptime. Can you beat this? via",f="uptimey,devops";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":var g=$(".screenshot-button");g.addClass("pulse"),g.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g.hasClass("fa-camera")?(g.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b=a.toDataURL("image/png").replace("image/png","image/octet-stream");g.attr("href",b),fileName=moment().format("DDMMYYYYHHmmss"),g.attr("download","Screenshot_"+fileName+".png")}})):setTimeout(function(){g.removeClass("fa-download").addClass("fa-camera"),g.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/handlers/app.handler.php",globalConfig="core/config.json",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}); \ No newline at end of file diff --git a/core/js/functions.js b/core/js/functions.js index 94b2605..3795d0e 100644 --- a/core/js/functions.js +++ b/core/js/functions.js @@ -33,9 +33,12 @@ var globalLocation, globalSunrise, globalSunset; /* Get config key value */ function config(option, callback){ $.getJSON(globalConfig, function(data) { - // console.log(data[option]); - var config = data[option]; - callback(config); + if (data.length === 0) { + callback("empty"); + } else { + var config = data[option]; + callback(config); + } }); } @@ -43,22 +46,26 @@ function config(option, callback){ function output(type, setFlag) { switch (type) { case 'image': - - config("background_image", function(data){ - console.log(data); - }); - - $.get(globalFile, { - action: type - }) - .done(function(image) { - // Split the output - image = image.split(";"); + // Check the config value + config("background_image", function(configVal){ + if(configVal === "empty"){ // Add the image as background-image on body - $('body').css('backgroundImage', 'url(' + image[0] + ')'); + $('body').css('backgroundImage', 'url(' + configVal + ')'); // Set the copyright - $('#copy').html("Powered by Uptimey. Fork on Github
Image - " + image[1]); - }); + $('#copy').html("Powered by Uptimey. Fork on Github"); + } else { + $.get(globalFile, { + action: type + }).done(function(image) { + // Split the output + image = image.split(";"); + // Add the image as background-image on body + $('body').css('backgroundImage', 'url(' + image[0] + ')'); + // Set the copyright + $('#copy').html("Powered by Uptimey. Fork on Github
Image - " + image[1]); + }); + } + }); break; case 'location': $.get(globalFile, { From 33565c05ea7f8834a25913352563008ab785eed3 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Tue, 24 Mar 2015 07:54:32 +0000 Subject: [PATCH 27/68] Refactoring the config feature --- core/config.json | 3 ++- core/dest/js/app.min.js | 2 +- core/handlers/app.handler.php | 10 ++++---- core/js/functions.js | 43 ++++++++--------------------------- 4 files changed, 17 insertions(+), 41 deletions(-) diff --git a/core/config.json b/core/config.json index f8c6398..96d2f2e 100644 --- a/core/config.json +++ b/core/config.json @@ -15,5 +15,6 @@ "facebook": false, "screenshot": true } - ] + ], + "display_timezone": "" } \ No newline at end of file diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index 7833735..1151c75 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1 @@ -function config(a,b){$.getJSON(globalConfig,function(c){if(0===c.length)b("empty");else{var d=c[a];b(d)}})}function output(a,b){switch(a){case"image":config("background_image",function(b){"empty"===b?($("body").css("backgroundImage","url("+b+")"),$("#copy").html("Powered by Uptimey. Fork on Github")):$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])})});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://ipinfo.io/"+a.ip+"/json";$.getJSON(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn");var b=a.loc.split(",");$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").attr("data-value")&&(d+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(d+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(d+=$("#minutes").attr("data-value")+" minutes");var e=d+" server uptime. Can you beat this? via",f="uptimey,devops";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":var g=$(".screenshot-button");g.addClass("pulse"),g.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g.hasClass("fa-camera")?(g.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b=a.toDataURL("image/png").replace("image/png","image/octet-stream");g.attr("href",b),fileName=moment().format("DDMMYYYYHHmmss"),g.attr("download","Screenshot_"+fileName+".png")}})):setTimeout(function(){g.removeClass("fa-download").addClass("fa-camera"),g.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/handlers/app.handler.php",globalConfig="core/config.json",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}); \ No newline at end of file +function output(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://ipinfo.io/"+a+"/json";$.getJSON(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn");var b=a.loc.split(",");$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").attr("data-value")&&(d+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(d+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(d+=$("#minutes").attr("data-value")+" minutes");var e=d+" server uptime. Can you beat this? via",f="uptimey,devops";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":var g=$(".screenshot-button");g.addClass("pulse"),g.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g.hasClass("fa-camera")?(g.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b=a.toDataURL("image/png").replace("image/png","image/octet-stream");g.attr("href",b),fileName=moment().format("DDMMYYYYHHmmss"),g.attr("download","Screenshot_"+fileName+".png")}})):setTimeout(function(){g.removeClass("fa-download").addClass("fa-camera"),g.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/handlers/app.handler.php",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}); \ No newline at end of file diff --git a/core/handlers/app.handler.php b/core/handlers/app.handler.php index 77f6cc7..b936342 100644 --- a/core/handlers/app.handler.php +++ b/core/handlers/app.handler.php @@ -60,12 +60,10 @@ break; case 'location': // Get the IP - if(function_exists('curl_version')) { - // Set the header to properly return the json - header('Content-Type: application/json'); - // From third party - $getIP = shell_exec('wget -qO- curlmyip.com'); - } else { + // From third party + $getIP = shell_exec('wget -qO- curlmyip.com'); + // Backup + if (empty($getIP)) { // Using PHP var $getIP = gethostbyname($_SERVER['SERVER_NAME']); } diff --git a/core/js/functions.js b/core/js/functions.js index 3795d0e..31bed4c 100644 --- a/core/js/functions.js +++ b/core/js/functions.js @@ -25,47 +25,24 @@ SOFTWARE. */ /* Set the global files */ -var globalFile = 'core/handlers/app.handler.php'; -var globalConfig = 'core/config.json'; +var globalFile = 'core/handlers/app.handler.php'; /* Set the global vars*/ var globalLocation, globalSunrise, globalSunset; -/* Get config key value */ -function config(option, callback){ - $.getJSON(globalConfig, function(data) { - if (data.length === 0) { - callback("empty"); - } else { - var config = data[option]; - callback(config); - } - }); -} - /* Output the data requested */ function output(type, setFlag) { switch (type) { case 'image': - // Check the config value - config("background_image", function(configVal){ - if(configVal === "empty"){ + $.get(globalFile, { + action: type + }).done(function(image) { + // Split the output + image = image.split(";"); // Add the image as background-image on body - $('body').css('backgroundImage', 'url(' + configVal + ')'); + $('body').css('backgroundImage', 'url(' + image[0] + ')'); // Set the copyright - $('#copy').html("Powered by Uptimey. Fork on Github"); - } else { - $.get(globalFile, { - action: type - }).done(function(image) { - // Split the output - image = image.split(";"); - // Add the image as background-image on body - $('body').css('backgroundImage', 'url(' + image[0] + ')'); - // Set the copyright - $('#copy').html("Powered by Uptimey. Fork on Github
Image - " + image[1]); - }); - } - }); + $('#copy').html("Powered by Uptimey. Fork on Github
Image - " + image[1]); + }); break; case 'location': $.get(globalFile, { @@ -73,7 +50,7 @@ function output(type, setFlag) { }) .done(function(location) { // Set up the URL for location call using ipinfo.io - var ip_geocode = "http://ipinfo.io/" + location.ip + "/json"; + var ip_geocode = "http://ipinfo.io/" + location + "/json"; // Get the response and set the value $.getJSON(ip_geocode, function(response) { // Add it to the element with an animation From d1a67336341b6ab66798127cfb3b28380f795d5f Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Thu, 26 Mar 2015 08:25:51 +0000 Subject: [PATCH 28/68] Minor UI changes --- core/dest/css/screen.min.css | 2 +- core/dest/css/screen.min.css.map | 2 +- core/sass/screen.scss | 57 ++++++++++++++++++++------------ core/template/main.html | 9 ++--- gruntfile.js | 2 +- index.html | 26 +-------------- 6 files changed, 42 insertions(+), 56 deletions(-) diff --git a/core/dest/css/screen.min.css b/core/dest/css/screen.min.css index 1032079..836dfd6 100644 --- a/core/dest/css/screen.min.css +++ b/core/dest/css/screen.min.css @@ -1,2 +1,2 @@ -html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover{text-decoration:underline}a:focus{text-decoration:underline}.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button{color:#55acee}.button-container .screenshot-button{text-decoration:none;color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} +.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}a,.button-container .button{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover,a:focus{text-decoration:underline}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button:hover{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button:hover{color:#55acee}.button-container .screenshot-button{text-decoration:none}.button-container .screenshot-button:hover{color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} /*# sourceMappingURL=screen.min.css.map */ diff --git a/core/dest/css/screen.min.css.map b/core/dest/css/screen.min.css.map index 99f1419..9d00731 100644 --- a/core/dest/css/screen.min.css.map +++ b/core/dest/css/screen.min.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings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AE,CACD,eAAe,CAAE,SAAS,CAInC,iBAAkB,CACjB,UAAU,CAAE,MAAM,CAClB,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,KAAK,CACb,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,IAAI,CACX,yBAAQ,CACP,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,MAAM,CACd,8BAAK,CACJ,KAAK,CAAE,GAAG,CACV,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,IAAI,CACjB,iDAAqB,CAER,aAAa,CAAE,IAAI,CAEhC,kDAAsB,CAET,aAAa,CAAE,IAAI,CAEhC,mCAAK,CACJ,OAAO,CAAE,KAAK,CACd,SAAS,CAAE,GAAG,CACd,cAAc,CAAE,IAAI,CAErB,qCAAO,CACN,cAAc,CAAE,UAAU,CAI7B,oBAAG,CACF,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,KAAK,CAChB,aAAa,CAAE,KAAK,CAGtB,MAAO,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CArQI,IAAI,CAsQb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", "sources": ["../../sass/screen.scss"], "names": [], "file": "screen.min.css" diff --git a/core/sass/screen.scss b/core/sass/screen.scss index 7031853..3cf02e9 100644 --- a/core/sass/screen.scss +++ b/core/sass/screen.scss @@ -39,6 +39,29 @@ $color_3: #ddd; // -------------------------------------------------- $font_0: Raleway, sans-serif; +// +// Mixins +// -------------------------------------------------- +%border { + content: ""; + height: 1px; + background: -moz-linear-gradient(left, rgba(0,0,0,0) 0%, rgba(147,147,147,1) 50%, rgba(0,0,0,0) 100%); + background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(0,0,0,0)), color-stop(50%,rgba(147,147,147,1)), color-stop(100%,rgba(0,0,0,0))); + background: -webkit-linear-gradient(left, rgba(0,0,0,0) 0%,rgba(147,147,147,1) 50%,rgba(0,0,0,0) 100%); + background: -o-linear-gradient(left, rgba(0,0,0,0) 0%,rgba(147,147,147,1) 50%,rgba(0,0,0,0) 100%); + background: -ms-linear-gradient(left, rgba(0,0,0,0) 0%,rgba(147,147,147,1) 50%,rgba(0,0,0,0) 100%); + background: linear-gradient(to right, rgba(0,0,0,0) 0%,rgba(147,147,147,1) 50%,rgba(0,0,0,0) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 ); + display: block; +} +%transition { + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + -ms-transition: all 0.5s ease; + transition: all 0.5s ease; +} + // // Global // -------------------------------------------------- @@ -58,30 +81,13 @@ body { a { color: $color_1; text-decoration: none; - &:hover { - text-decoration: underline; - } + @extend %transition; + &:hover, &:focus { text-decoration: underline; } } -// -// Mixins -// -------------------------------------------------- -%border { - content: ""; - height: 1px; - background: -moz-linear-gradient(left, rgba(0,0,0,0) 0%, rgba(147,147,147,1) 50%, rgba(0,0,0,0) 100%); - background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(0,0,0,0)), color-stop(50%,rgba(147,147,147,1)), color-stop(100%,rgba(0,0,0,0))); - background: -webkit-linear-gradient(left, rgba(0,0,0,0) 0%,rgba(147,147,147,1) 50%,rgba(0,0,0,0) 100%); - background: -o-linear-gradient(left, rgba(0,0,0,0) 0%,rgba(147,147,147,1) 50%,rgba(0,0,0,0) 100%); - background: -ms-linear-gradient(left, rgba(0,0,0,0) 0%,rgba(147,147,147,1) 50%,rgba(0,0,0,0) 100%); - background: linear-gradient(to right, rgba(0,0,0,0) 0%,rgba(147,147,147,1) 50%,rgba(0,0,0,0) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 ); - display: block; -} - // // Layout and UI // -------------------------------------------------- @@ -111,6 +117,7 @@ a { cursor: pointer; margin: 0 30px; position: relative; + @extend %transition; span { position: absolute; visibility: hidden; @@ -146,7 +153,9 @@ a { } } .refresh-button { - color: #00ac8a; + &:hover { + color: #00ac8a; + } } .adv-button { &.active { @@ -154,11 +163,15 @@ a { } } .twitter-button { - color: #55acee; + &:hover { + color: #55acee; + } } .screenshot-button { text-decoration: none; - color: #f7d61c; + &:hover { + color: #f7d61c; + } } } .advanced-panel { diff --git a/core/template/main.html b/core/template/main.html index edffbfb..7b43031 100644 --- a/core/template/main.html +++ b/core/template/main.html @@ -23,12 +23,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> - + Uptimey | Beautiful Server Uptime Monitor + - @@ -90,10 +90,7 @@

Your server's uptime until now...

-
- - -
+
diff --git a/gruntfile.js b/gruntfile.js index 2d143a4..47e1929 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -6,7 +6,7 @@ module.exports = function(grunt) { options: { collapseWhitespace: true, minifyJS: true, - // removeComments: true + removeComments: true }, files: { 'index.html': 'core/template/main.html' diff --git a/index.html b/index.html index ac7504f..cc2ff23 100644 --- a/index.html +++ b/index.html @@ -1,25 +1 @@ -Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file +Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file From b8a00f7cde06ccc94904dc31991b7a4543bb98f8 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Fri, 3 Apr 2015 07:28:16 +0000 Subject: [PATCH 29/68] Switched JS to CoffeScript --- core/dest/js/app.min.js | 2 +- gruntfile.js | 22 +++++++++++++--------- package.json | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index 1151c75..3d6e2dc 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1 @@ -function output(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://ipinfo.io/"+a+"/json";$.getJSON(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn");var b=a.loc.split(",");$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").attr("data-value")&&(d+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(d+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(d+=$("#minutes").attr("data-value")+" minutes");var e=d+" server uptime. Can you beat this? via",f="uptimey,devops";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":var g=$(".screenshot-button");g.addClass("pulse"),g.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g.hasClass("fa-camera")?(g.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b=a.toDataURL("image/png").replace("image/png","image/octet-stream");g.attr("href",b),fileName=moment().format("DDMMYYYYHHmmss"),g.attr("download","Screenshot_"+fileName+".png")}})):setTimeout(function(){g.removeClass("fa-download").addClass("fa-camera"),g.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/handlers/app.handler.php",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}); \ No newline at end of file +var action,globalFile,globalLocation,globalSunrise,globalSunset,output;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a;a=$(this).attr("data-action"),action(a)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}),globalFile="core/handlers/app.handler.php",globalLocation="",globalSunrise="",globalSunset="",output=function(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b;b="http://ipinfo.io/"+a+"/json",$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,d;b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X"),d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},action=function(a){var b,c,d,e,f,g;switch(d="",a){case"toggle":d=$(".toggle-button").attr("data-status"),"closed"===d?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===d&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d=$(".adv-button").attr("data-status"),"default"===d?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"===d&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g="https://github.com/stefanbc/uptimey",f="",0!==$("#days").attr("data-value")&&(f+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(f+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(f+=$("#minutes").attr("data-value")+" minutes"),e=f+" server uptime. Can you beat this? via",b="uptimey,devops",window.open("http://twitter.com/share?url="+g+"&text="+e+"&hashtags="+b+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":c=$(".screenshot-button"),c.addClass("pulse"),c.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),c.hasClass("fa-camera")?(c.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,d;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),c.attr("href",b),d=moment().format("DDMMYYYYHHmmss"),c.attr("download","Screenshot_"+d+".png")}})):setTimeout(function(){c.removeClass("fa-download").addClass("fa-camera"),c.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}; \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index 47e1929..2076aac 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -23,11 +23,15 @@ module.exports = function(grunt) { } } }, - concat: { - dist: { - src: ['core/js/functions.js', 'core/js/base.js'], - dest: 'core/dest/js/app.min.js', - }, + coffee: { + compileJoined: { + options: { + join: true + }, + files: { + 'core/dest/js/app.min.js': ['core/coffee/*.coffee'] + } + } }, uglify: { js: { @@ -37,14 +41,14 @@ module.exports = function(grunt) { } }, watch: { - files: ['core/template/*', 'core/sass/*', 'core/js/*'], - tasks: ['htmlmin', 'sass', 'concat', 'uglify'] + files: ['core/template/*', 'core/sass/*', 'core/coffee/*'], + tasks: ['htmlmin', 'sass', 'coffee', 'uglify'] } }); grunt.loadNpmTasks('grunt-contrib-htmlmin'); grunt.loadNpmTasks('grunt-contrib-sass'); - grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-coffee'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.registerTask('default', ['htmlmin', 'sass', 'concat', 'uglify']); + grunt.registerTask('default', ['htmlmin', 'sass', 'coffee', 'uglify']); }; \ No newline at end of file diff --git a/package.json b/package.json index cc2c98e..be30929 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,6 @@ "grunt-contrib-sass": "^0.9.2", "grunt-contrib-uglify": "0.5.0", "grunt-contrib-watch": "0.6.1", - "grunt-contrib-concat": "^0.5.0" + "grunt-contrib-coffee": "^0.13.0" } } From e7d33623e4551dce250f22aa649361d4f28c88a5 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Fri, 3 Apr 2015 07:28:24 +0000 Subject: [PATCH 30/68] Switched JS to CoffeScript --- core/coffee/_init.coffee | 77 ++++++++++++ core/coffee/actions.coffee | 245 +++++++++++++++++++++++++++++++++++++ 2 files changed, 322 insertions(+) create mode 100644 core/coffee/_init.coffee create mode 100644 core/coffee/actions.coffee diff --git a/core/coffee/_init.coffee b/core/coffee/_init.coffee new file mode 100644 index 0000000..6e43b83 --- /dev/null +++ b/core/coffee/_init.coffee @@ -0,0 +1,77 @@ +### +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +### + +# When the page finishes loading +$(document).ready -> + + ### Start initial load ### + + # Add the animation base class + $('.top-container').addClass 'animated' + $('.bottom-container').addClass 'animated' + $('.val').addClass 'animated' + $('.button').addClass 'animated' + # Get the image + output 'image' + # Get the location + output 'location' + # Get the uptime + output 'uptime' + # Get the time (let uptime be the first request so that the session updates needed values for time) + output 'time' + + ### End initial load ### + + ### At an interval of 1 min we refresh the uptime and time ### + + setInterval (-> + output 'uptime' + output 'time' + return + ), 1000 * 60 + + ### Click action on each top button ### + + $('.button').each -> + $(this).on 'click', -> + buttonAction = $(this).attr('data-action') + action buttonAction + return + return + + ### Click action for location ### + + $('#location').on 'click', -> + latlong = $(this).attr('data-latlong') + window.location.href = 'https://www.google.com/maps/place/' + latlong + return + + ### Clear everything on refresh of close ### + + $(window).bind 'beforeunload', -> + action 'clear' + return + return \ No newline at end of file diff --git a/core/coffee/actions.coffee b/core/coffee/actions.coffee new file mode 100644 index 0000000..3ad8428 --- /dev/null +++ b/core/coffee/actions.coffee @@ -0,0 +1,245 @@ +### +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +### + +### Set the global files ### + +globalFile = 'core/handlers/app.handler.php' + +### Set the global vars ### + +globalLocation = '' +globalSunrise = '' +globalSunset = '' + +### Output the data requested ### + +output = (type, setFlag) -> + switch type + when 'image' + $.get(globalFile, action: type).done (image) -> + # Split the output + image = image.split(';') + # Add the image as background-image on body + $('body').css 'backgroundImage', 'url(' + image[0] + ')' + # Set the copyright + $('#copy').html 'Powered by Uptimey. Fork on Github
Image - ' + image[1] + return + when 'location' + $.get(globalFile, action: type).done (location) -> + # Set up the URL for location call using ipinfo.io + ip_geocode = 'http://ipinfo.io/' + location + '/json' + # Get the response and set the value + $.getJSON ip_geocode, (response) -> + # Add it to the element with an animation + $('#location').text(response.city + ', ' + response.region + ', ' + response.country).addClass 'fadeIn' + # Add latlong for maps href + latlong = response.loc.split(',') + $('#location').attr 'data-latlong', latlong[0] + '+' + latlong[1] + # Set the global location + globalLocation = response.city + ', ' + response.region + ', ' + response.country + # Set the sunrise/sunset times + $.simpleWeather + location: globalLocation + success: (weather) -> + globalSunrise = weather.sunrise + globalSunset = weather.sunset + return + return + # We only animate the whole container once + $('.location-inner').addClass 'fadeIn' + return + when 'uptime' + $.get(globalFile, + action: type + flag: setFlag).done (uptime) -> + # Split the output + uptime = uptime.split(';') + # Add it to each element with an animation + $('#days').text(uptime[0]).addClass 'fadeIn' + $('#days').attr 'data-value', uptime[0] + $('#hours').text(uptime[1]).addClass 'fadeIn' + $('#hours').attr 'data-value', uptime[1] + $('#minutes').text(uptime[2]).addClass 'fadeIn' + $('#minutes').attr 'data-value', uptime[2] + # We only animate the whole container once + $('.bottom-container').addClass 'fadeIn' + return + when 'time' + $.get(globalFile, + action: type + flag: setFlag).done (time) -> + # Split the output + time = time.split(';') + # Set the times + $('#current').text(time[0]).addClass 'fadeIn' + $('#time').text(time[1]).addClass 'fadeIn' + $('#since').text(time[2]).addClass 'fadeIn' + # Format the times + setTimeout (-> + sunrise = moment(globalSunrise, 'h:m a').format('X') + sunset = moment(globalSunset, 'h:m a').format('X') + ttime = moment(time[1], 'h:m a').format('X') + # Check if the current time is between sunset, sunrise and set the icon + if ttime >= sunrise and ttime <= sunset + $('.time .fa').removeClass 'fa-moon-o fa-circle-o' + $('.time .fa').addClass 'fa-sun-o' + else + $('.time .fa').removeClass 'fa-sun-o fa-circle-o' + $('.time .fa').addClass 'fa-moon-o' + return + ), 3000 + # We only animate the whole container once + $('.top-container').addClass 'fadeIn' + return + # After the animation is done remove the class so + # we can animate again on next iteration + $('.val').each -> + $(this).on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $(this).removeClass 'fadeIn' + return + return + return + +### Button action ### + +action = (type) -> + status = '' + switch type + when 'toggle' + # Get the status of the button + status = $('.toggle-button').attr('data-status') + # Check the status + if status == 'closed' + # Animate the container (bring it down) + $('.button-container').animate top: 0 + # Change the button status + $('.toggle-button').attr 'data-status', 'open' + # Change the icon + $('.toggle-button').removeClass 'fa-angle-double-down' + $('.toggle-button').addClass 'fa-angle-double-up' + else if status == 'open' + # Animate the container (bring it up) + $('.button-container').animate top: '-80px' + # Change the button status + $('.toggle-button').attr 'data-status', 'closed' + # Change the icon + $('.toggle-button').removeClass 'fa-angle-double-up' + $('.toggle-button').addClass 'fa-angle-double-down' + when 'adv' + # Animated it + $('.adv-button').addClass 'pulse' + $('.adv-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $(this).removeClass 'pulse' + return + # Get the status of the button + status = $('.adv-button').attr('data-status') + # Check the state + if status == 'default' + # Show the correct panel and set the button state + $('.adv-button').attr 'data-status', 'advanced' + $('.adv-button').addClass 'active' + $('.default-panel').fadeOut 500 + $('.advanced-panel').fadeIn 500 + # Get the data for this panel + $.get(globalFile, + action: 'advanced' + flag: 'advanced').done (notice) -> + # Set the data from ajax + $('.advanced-panel .top-container').html notice + return + else if status == 'advanced' + # Show the correct panel and set the button state + $('.adv-button').attr 'data-status', 'default' + $('.adv-button').removeClass 'active' + $('.advanced-panel').fadeOut 500 + $('.default-panel').fadeIn 500 + when 'refresh' + # Animated it + $('.refresh-button').addClass 'fa-spin' + # Refresh the values + output 'uptime', 'refresh' + output 'time', 'refresh' + # Stop animation after 1s + setTimeout (-> + $('.refresh-button').removeClass 'fa-spin' + return + ), 1000 + when 'twitter' + # Animated it + $('.twitter-button').addClass 'pulse' + $('.twitter-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $(this).removeClass 'pulse' + return + # The action + # Set the URL + url = 'https://github.com/stefanbc/uptimey' + # Get the current uptime + uptime = '' + if $('#days').attr('data-value') != 0 + uptime += $('#days').attr('data-value') + ' days ' + if $('#hours').attr('data-value') != 0 + uptime += $('#hours').attr('data-value') + ' hours ' + if $('#minutes').attr('data-value') != 0 + uptime += $('#minutes').attr('data-value') + ' minutes' + # Set the tweet + text = uptime + ' server uptime. Can you beat this? via' + # Set the hashtag + hashtag = 'uptimey,devops' + # Open the Twitter share window + window.open 'http://twitter.com/share?url=' + url + '&text=' + text + '&hashtags=' + hashtag + '&', 'twitterwindow', 'height=450, width=550, top=' + $(window).height() / 2 - 225 + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0' + when 'screenshot' + screenshotButton = $('.screenshot-button') + # Animated it + screenshotButton.addClass 'pulse' + screenshotButton.on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $(this).removeClass 'pulse' + return + # Check the button status + if screenshotButton.hasClass('fa-camera') + # Change the button icon + screenshotButton.removeClass('fa-camera').addClass 'fa-download' + # Create an image from canvas + html2canvas document.body, onrendered: (canvas) -> + # Save the canvas to a data URL + dataURL = canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream') + # Set the data url on the screenshot button + screenshotButton.attr 'href', dataURL + # Get the current date for the filename + fileName = moment().format('DDMMYYYYHHmmss') + # Set the filename on the screenshot button + screenshotButton.attr 'download', 'Screenshot_' + fileName + '.png' + return + else + setTimeout (-> + # Change the button icon + screenshotButton.removeClass('fa-download').addClass 'fa-camera' + screenshotButton.removeAttr('href').removeAttr 'download' + return + ), 3000 + when 'clear' + # Clear the session + $.get globalFile, action: 'clear' + return \ No newline at end of file From dec950ea07093d824a3eed9f5ddc3b40f74adc2e Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Wed, 18 Nov 2015 22:55:05 +0200 Subject: [PATCH 31/68] Updated license year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index aafdb1c..436f2b7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Stefan Cosma +Copyright (c) 2015 Stefan Cosma Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From f7c92e7cfaae1d7508a325921c35672b96ae7070 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Tue, 15 Dec 2015 10:57:28 +0000 Subject: [PATCH 32/68] Initial fix to convert to CoffeeScript --- core/coffee/_init.coffee | 85 +++++++++++++++++++------------------- core/coffee/actions.coffee | 4 +- core/dest/js/app.min.js | 2 +- 3 files changed, 45 insertions(+), 46 deletions(-) diff --git a/core/coffee/_init.coffee b/core/coffee/_init.coffee index 6e43b83..19879a6 100644 --- a/core/coffee/_init.coffee +++ b/core/coffee/_init.coffee @@ -24,54 +24,53 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ### -# When the page finishes loading -$(document).ready -> - - ### Start initial load ### - - # Add the animation base class - $('.top-container').addClass 'animated' - $('.bottom-container').addClass 'animated' - $('.val').addClass 'animated' - $('.button').addClass 'animated' - # Get the image - output 'image' - # Get the location - output 'location' - # Get the uptime +output = require 'actions.coffee' +action = require 'action.coffee' + +### Start initial load ### + +# Add the animation base class +$('.top-container').addClass 'animated' +$('.bottom-container').addClass 'animated' +$('.val').addClass 'animated' +$('.button').addClass 'animated' +# Get the image +output 'image' +# Get the location +output 'location' +# Get the uptime +output 'uptime' +# Get the time (let uptime be the first request so that the session updates needed values for time) +output 'time' + +### End initial load ### + +### At an interval of 1 min we refresh the uptime and time ### + +setInterval (-> output 'uptime' - # Get the time (let uptime be the first request so that the session updates needed values for time) output 'time' + return +), 1000 * 60 - ### End initial load ### +### Click action on each top button ### - ### At an interval of 1 min we refresh the uptime and time ### +$('.button').each -> + $(this).on 'click', -> + buttonAction = $(this).attr('data-action') + action buttonAction + return +return - setInterval (-> - output 'uptime' - output 'time' - return - ), 1000 * 60 +### Click action for location ### - ### Click action on each top button ### +$('#location').on 'click', -> + latlong = $(this).attr('data-latlong') + window.location.href = 'https://www.google.com/maps/place/' + latlong +return - $('.button').each -> - $(this).on 'click', -> - buttonAction = $(this).attr('data-action') - action buttonAction - return - return +### Clear everything on refresh of close ### - ### Click action for location ### - - $('#location').on 'click', -> - latlong = $(this).attr('data-latlong') - window.location.href = 'https://www.google.com/maps/place/' + latlong - return - - ### Clear everything on refresh of close ### - - $(window).bind 'beforeunload', -> - action 'clear' - return - return \ No newline at end of file +$(window).bind 'beforeunload', -> + action 'clear' +return \ No newline at end of file diff --git a/core/coffee/actions.coffee b/core/coffee/actions.coffee index 3ad8428..90ad1ee 100644 --- a/core/coffee/actions.coffee +++ b/core/coffee/actions.coffee @@ -36,7 +36,7 @@ globalSunset = '' ### Output the data requested ### -output = (type, setFlag) -> +module.exports.output = (type, setFlag) -> switch type when 'image' $.get(globalFile, action: type).done (image) -> @@ -125,7 +125,7 @@ output = (type, setFlag) -> ### Button action ### -action = (type) -> +module.exports.action = (type) -> status = '' switch type when 'toggle' diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index 3d6e2dc..1a56c7d 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1 @@ -var action,globalFile,globalLocation,globalSunrise,globalSunset,output;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a;a=$(this).attr("data-action"),action(a)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}),globalFile="core/handlers/app.handler.php",globalLocation="",globalSunrise="",globalSunset="",output=function(a,b){switch(a){case"image":$.get(globalFile,{action:a}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),$("#copy").html("Powered by Uptimey. Fork on Github
Image - "+a[1])});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b;b="http://ipinfo.io/"+a+"/json",$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,d;b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X"),d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},action=function(a){var b,c,d,e,f,g;switch(d="",a){case"toggle":d=$(".toggle-button").attr("data-status"),"closed"===d?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===d&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d=$(".adv-button").attr("data-status"),"default"===d?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"===d&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g="https://github.com/stefanbc/uptimey",f="",0!==$("#days").attr("data-value")&&(f+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(f+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(f+=$("#minutes").attr("data-value")+" minutes"),e=f+" server uptime. Can you beat this? via",b="uptimey,devops",window.open("http://twitter.com/share?url="+g+"&text="+e+"&hashtags="+b+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":c=$(".screenshot-button"),c.addClass("pulse"),c.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),c.hasClass("fa-camera")?(c.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,d;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),c.attr("href",b),d=moment().format("DDMMYYYYHHmmss"),c.attr("download","Screenshot_"+d+".png")}})):setTimeout(function(){c.removeClass("fa-download").addClass("fa-camera"),c.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}; \ No newline at end of file +(function(){var a,b;b=require("actions.coffee"),a=require("action.coffee"),$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),b("image"),b("location"),b("uptime"),b("time"),setInterval(function(){b("uptime"),b("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;return b=$(this).attr("data-action"),a(b)})})}).call(this); \ No newline at end of file From 0d71762072860f2878f5a173e1f0e3f1a51b047a Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Mon, 4 Apr 2016 19:34:24 +0300 Subject: [PATCH 33/68] Ranamed files / folder for readability --- core/{coffee => client}/_init.coffee | 0 core/{coffee => client}/actions.coffee | 2 +- core/client/index.coffee | 25 +++++++++++++++++++ .../maincontroller.php} | 12 ++++----- core/dest/css/screen.min.css.map | 2 +- core/{sass => style}/screen.scss | 0 gruntfile.js | 6 ++--- 7 files changed, 36 insertions(+), 11 deletions(-) rename core/{coffee => client}/_init.coffee (100%) rename core/{coffee => client}/actions.coffee (99%) create mode 100644 core/client/index.coffee rename core/{handlers/app.handler.php => controllers/maincontroller.php} (92%) rename core/{sass => style}/screen.scss (100%) diff --git a/core/coffee/_init.coffee b/core/client/_init.coffee similarity index 100% rename from core/coffee/_init.coffee rename to core/client/_init.coffee diff --git a/core/coffee/actions.coffee b/core/client/actions.coffee similarity index 99% rename from core/coffee/actions.coffee rename to core/client/actions.coffee index 90ad1ee..38b02b0 100644 --- a/core/coffee/actions.coffee +++ b/core/client/actions.coffee @@ -26,7 +26,7 @@ SOFTWARE. ### Set the global files ### -globalFile = 'core/handlers/app.handler.php' +globalFile = 'core/controllers/maincontroller.php' ### Set the global vars ### diff --git a/core/client/index.coffee b/core/client/index.coffee new file mode 100644 index 0000000..795e134 --- /dev/null +++ b/core/client/index.coffee @@ -0,0 +1,25 @@ +### +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +### \ No newline at end of file diff --git a/core/handlers/app.handler.php b/core/controllers/maincontroller.php similarity index 92% rename from core/handlers/app.handler.php rename to core/controllers/maincontroller.php index b936342..282a1f3 100644 --- a/core/handlers/app.handler.php +++ b/core/controllers/maincontroller.php @@ -51,12 +51,12 @@ switch($action){ case 'image': - // Load the XML file from Bing - $bingImage = simplexml_load_file('http://www.bing.com/HPImageArchive.aspx?format=xml&idx=0&n=1&mkt=en-US'); - // Return the image and copyright - echo 'http://www.bing.com' . $bingImage->image->urlBase. '_1366x768.jpg;' . $bingImage->image->copyright; - // Set session - $_SESSION['image'] = 'http://www.bing.com' . $bingImage->image->urlBase. '_1366x768.jpg;' . $bingImage->image->copyright . ';session;'; + // Load random image from Unsplash + $getImage = 'https://source.unsplash.com/random/1366x768'; + // Return the image + echo $getImage; + // Set the session image + $_SESSION['image'] = $getImage . ';session;'; break; case 'location': // Get the IP diff --git a/core/dest/css/screen.min.css.map b/core/dest/css/screen.min.css.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CAAE,KAAK,CAEd,qBAAO,CACH,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,MAAM,CACd,QAAQ,CAAE,QAAQ,CAClB,OAAO,CAAE,KAAK,CAEd,WAAW,CAAE,8BAAoB,CACjC,WAAW,CAAE,GAAG,CAChB,4BAAS,CACL,aAAa,CAAE,IAAI,CAEvB,uBAAE,CACD,eAAe,CAAE,SAAS,CAInC,iBAAkB,CACjB,UAAU,CAAE,MAAM,CAClB,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,KAAK,CACb,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,IAAI,CACX,yBAAQ,CACP,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,MAAM,CACd,8BAAK,CACJ,KAAK,CAAE,GAAG,CACV,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,IAAI,CACjB,iDAAqB,CAER,aAAa,CAAE,IAAI,CAEhC,kDAAsB,CAET,aAAa,CAAE,IAAI,CAEhC,mCAAK,CACJ,OAAO,CAAE,KAAK,CACd,SAAS,CAAE,GAAG,CACd,cAAc,CAAE,IAAI,CAErB,qCAAO,CACN,cAAc,CAAE,UAAU,CAI7B,oBAAG,CACF,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,KAAK,CAChB,aAAa,CAAE,KAAK,CAGtB,MAAO,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CArQI,IAAI,CAsQb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", "sources": ["../../sass/screen.scss"], "names": [], "file": "screen.min.css" diff --git a/core/sass/screen.scss b/core/style/screen.scss similarity index 100% rename from core/sass/screen.scss rename to core/style/screen.scss diff --git a/gruntfile.js b/gruntfile.js index 2076aac..a3482cf 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -19,7 +19,7 @@ module.exports = function(grunt) { style: 'compressed' }, files: { - 'core/dest/css/screen.min.css' : 'core/sass/screen.scss' + 'core/dest/css/screen.min.css' : 'core/style/screen.scss' } } }, @@ -29,7 +29,7 @@ module.exports = function(grunt) { join: true }, files: { - 'core/dest/js/app.min.js': ['core/coffee/*.coffee'] + 'core/dest/js/app.min.js': ['core/client/*.coffee'] } } }, @@ -41,7 +41,7 @@ module.exports = function(grunt) { } }, watch: { - files: ['core/template/*', 'core/sass/*', 'core/coffee/*'], + files: ['core/template/*', 'core/style/*', 'core/client/*'], tasks: ['htmlmin', 'sass', 'coffee', 'uglify'] } }); From 5f82a25fbb17dd29e74e9d46c39eb0daac32b403 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Mon, 4 Apr 2016 19:39:37 +0300 Subject: [PATCH 34/68] Moved variables inside module --- core/client/actions.coffee | 18 +++++++++--------- core/dest/css/screen.min.css.map | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/client/actions.coffee b/core/client/actions.coffee index 38b02b0..7af749b 100644 --- a/core/client/actions.coffee +++ b/core/client/actions.coffee @@ -24,19 +24,19 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ### -### Set the global files ### +### Output the data requested ### +module.exports.output = (type, setFlag) -> + + ### Set the global files ### -globalFile = 'core/controllers/maincontroller.php' + globalFile = 'core/controllers/maincontroller.php' -### Set the global vars ### + ### Set the global vars ### -globalLocation = '' -globalSunrise = '' -globalSunset = '' + globalLocation = '' + globalSunrise = '' + globalSunset = '' -### Output the data requested ### - -module.exports.output = (type, setFlag) -> switch type when 'image' $.get(globalFile, action: type).done (image) -> diff --git a/core/dest/css/screen.min.css.map b/core/dest/css/screen.min.css.map index 04e3242..f08941b 100644 --- a/core/dest/css/screen.min.css.map +++ b/core/dest/css/screen.min.css.map @@ -1,7 +1,7 @@ { "version": 3, "mappings": "AA4CA,0IAAQ,CACJ,OAAO,CAAE,EAAE,CACX,MAAM,CAAE,GAAG,CACX,UAA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O,CAAE,KAAK,CACd,SAAS,CAAE,GAAG,CACd,cAAc,CAAE,IAAI,CAErB,qCAAO,CACN,cAAc,CAAE,UAAU,CAI7B,oBAAG,CACF,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,KAAK,CAChB,aAAa,CAAE,KAAK,CAGtB,MAAO,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CArQI,IAAI,CAsQb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", -"sources": ["../../sass/screen.scss"], +"sources": ["../../style/screen.scss"], "names": [], "file": "screen.min.css" } From a57116f3bab38dd88a5d57501973c66934ad63f3 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Wed, 6 Apr 2016 15:47:07 +0300 Subject: [PATCH 35/68] Removed coffee and renamed files and restructured folders --- .gitignore | 3 +- core/client/_init.coffee | 76 ------ core/client/actions.coffee | 245 ------------------ core/{ => client}/config.json | 0 core/client/index.coffee | 25 -- .../lib}/controllers/maincontroller.php | 0 .../lib/js/actioncontroller.js} | 168 ++++++------ .../lib/js/initcontroller.js} | 0 core/{ => client/lib}/js/require.config.js | 6 +- .../lib/style/global.scss} | 0 .../lib/template/mainview.html} | 2 +- core/dest/css/global.min.css | 2 + core/dest/css/global.min.css.map | 7 + core/dest/css/screen.min.css.map | 2 +- core/dest/js/app.min.js | 2 +- gruntfile.js | 26 +- index.html | 2 +- package.json | 14 +- 18 files changed, 119 insertions(+), 461 deletions(-) delete mode 100644 core/client/_init.coffee delete mode 100644 core/client/actions.coffee rename core/{ => client}/config.json (100%) delete mode 100644 core/client/index.coffee rename core/{ => client/lib}/controllers/maincontroller.php (100%) rename core/{js/functions.js => client/lib/js/actioncontroller.js} (66%) rename core/{js/base.js => client/lib/js/initcontroller.js} (100%) rename core/{ => client/lib}/js/require.config.js (77%) rename core/{style/screen.scss => client/lib/style/global.scss} (100%) rename core/{template/main.html => client/lib/template/mainview.html} (98%) create mode 100644 core/dest/css/global.min.css create mode 100644 core/dest/css/global.min.css.map diff --git a/.gitignore b/.gitignore index bfec715..ecc8824 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .sass-cache .vagrant -node_modules \ No newline at end of file +node_modules +npm-debug.log \ No newline at end of file diff --git a/core/client/_init.coffee b/core/client/_init.coffee deleted file mode 100644 index 19879a6..0000000 --- a/core/client/_init.coffee +++ /dev/null @@ -1,76 +0,0 @@ -### -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -### - -output = require 'actions.coffee' -action = require 'action.coffee' - -### Start initial load ### - -# Add the animation base class -$('.top-container').addClass 'animated' -$('.bottom-container').addClass 'animated' -$('.val').addClass 'animated' -$('.button').addClass 'animated' -# Get the image -output 'image' -# Get the location -output 'location' -# Get the uptime -output 'uptime' -# Get the time (let uptime be the first request so that the session updates needed values for time) -output 'time' - -### End initial load ### - -### At an interval of 1 min we refresh the uptime and time ### - -setInterval (-> - output 'uptime' - output 'time' - return -), 1000 * 60 - -### Click action on each top button ### - -$('.button').each -> - $(this).on 'click', -> - buttonAction = $(this).attr('data-action') - action buttonAction - return -return - -### Click action for location ### - -$('#location').on 'click', -> - latlong = $(this).attr('data-latlong') - window.location.href = 'https://www.google.com/maps/place/' + latlong -return - -### Clear everything on refresh of close ### - -$(window).bind 'beforeunload', -> - action 'clear' -return \ No newline at end of file diff --git a/core/client/actions.coffee b/core/client/actions.coffee deleted file mode 100644 index 7af749b..0000000 --- a/core/client/actions.coffee +++ /dev/null @@ -1,245 +0,0 @@ -### -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -### - -### Output the data requested ### -module.exports.output = (type, setFlag) -> - - ### Set the global files ### - - globalFile = 'core/controllers/maincontroller.php' - - ### Set the global vars ### - - globalLocation = '' - globalSunrise = '' - globalSunset = '' - - switch type - when 'image' - $.get(globalFile, action: type).done (image) -> - # Split the output - image = image.split(';') - # Add the image as background-image on body - $('body').css 'backgroundImage', 'url(' + image[0] + ')' - # Set the copyright - $('#copy').html 'Powered by Uptimey. Fork on Github
Image - ' + image[1] - return - when 'location' - $.get(globalFile, action: type).done (location) -> - # Set up the URL for location call using ipinfo.io - ip_geocode = 'http://ipinfo.io/' + location + '/json' - # Get the response and set the value - $.getJSON ip_geocode, (response) -> - # Add it to the element with an animation - $('#location').text(response.city + ', ' + response.region + ', ' + response.country).addClass 'fadeIn' - # Add latlong for maps href - latlong = response.loc.split(',') - $('#location').attr 'data-latlong', latlong[0] + '+' + latlong[1] - # Set the global location - globalLocation = response.city + ', ' + response.region + ', ' + response.country - # Set the sunrise/sunset times - $.simpleWeather - location: globalLocation - success: (weather) -> - globalSunrise = weather.sunrise - globalSunset = weather.sunset - return - return - # We only animate the whole container once - $('.location-inner').addClass 'fadeIn' - return - when 'uptime' - $.get(globalFile, - action: type - flag: setFlag).done (uptime) -> - # Split the output - uptime = uptime.split(';') - # Add it to each element with an animation - $('#days').text(uptime[0]).addClass 'fadeIn' - $('#days').attr 'data-value', uptime[0] - $('#hours').text(uptime[1]).addClass 'fadeIn' - $('#hours').attr 'data-value', uptime[1] - $('#minutes').text(uptime[2]).addClass 'fadeIn' - $('#minutes').attr 'data-value', uptime[2] - # We only animate the whole container once - $('.bottom-container').addClass 'fadeIn' - return - when 'time' - $.get(globalFile, - action: type - flag: setFlag).done (time) -> - # Split the output - time = time.split(';') - # Set the times - $('#current').text(time[0]).addClass 'fadeIn' - $('#time').text(time[1]).addClass 'fadeIn' - $('#since').text(time[2]).addClass 'fadeIn' - # Format the times - setTimeout (-> - sunrise = moment(globalSunrise, 'h:m a').format('X') - sunset = moment(globalSunset, 'h:m a').format('X') - ttime = moment(time[1], 'h:m a').format('X') - # Check if the current time is between sunset, sunrise and set the icon - if ttime >= sunrise and ttime <= sunset - $('.time .fa').removeClass 'fa-moon-o fa-circle-o' - $('.time .fa').addClass 'fa-sun-o' - else - $('.time .fa').removeClass 'fa-sun-o fa-circle-o' - $('.time .fa').addClass 'fa-moon-o' - return - ), 3000 - # We only animate the whole container once - $('.top-container').addClass 'fadeIn' - return - # After the animation is done remove the class so - # we can animate again on next iteration - $('.val').each -> - $(this).on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> - $(this).removeClass 'fadeIn' - return - return - return - -### Button action ### - -module.exports.action = (type) -> - status = '' - switch type - when 'toggle' - # Get the status of the button - status = $('.toggle-button').attr('data-status') - # Check the status - if status == 'closed' - # Animate the container (bring it down) - $('.button-container').animate top: 0 - # Change the button status - $('.toggle-button').attr 'data-status', 'open' - # Change the icon - $('.toggle-button').removeClass 'fa-angle-double-down' - $('.toggle-button').addClass 'fa-angle-double-up' - else if status == 'open' - # Animate the container (bring it up) - $('.button-container').animate top: '-80px' - # Change the button status - $('.toggle-button').attr 'data-status', 'closed' - # Change the icon - $('.toggle-button').removeClass 'fa-angle-double-up' - $('.toggle-button').addClass 'fa-angle-double-down' - when 'adv' - # Animated it - $('.adv-button').addClass 'pulse' - $('.adv-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> - $(this).removeClass 'pulse' - return - # Get the status of the button - status = $('.adv-button').attr('data-status') - # Check the state - if status == 'default' - # Show the correct panel and set the button state - $('.adv-button').attr 'data-status', 'advanced' - $('.adv-button').addClass 'active' - $('.default-panel').fadeOut 500 - $('.advanced-panel').fadeIn 500 - # Get the data for this panel - $.get(globalFile, - action: 'advanced' - flag: 'advanced').done (notice) -> - # Set the data from ajax - $('.advanced-panel .top-container').html notice - return - else if status == 'advanced' - # Show the correct panel and set the button state - $('.adv-button').attr 'data-status', 'default' - $('.adv-button').removeClass 'active' - $('.advanced-panel').fadeOut 500 - $('.default-panel').fadeIn 500 - when 'refresh' - # Animated it - $('.refresh-button').addClass 'fa-spin' - # Refresh the values - output 'uptime', 'refresh' - output 'time', 'refresh' - # Stop animation after 1s - setTimeout (-> - $('.refresh-button').removeClass 'fa-spin' - return - ), 1000 - when 'twitter' - # Animated it - $('.twitter-button').addClass 'pulse' - $('.twitter-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> - $(this).removeClass 'pulse' - return - # The action - # Set the URL - url = 'https://github.com/stefanbc/uptimey' - # Get the current uptime - uptime = '' - if $('#days').attr('data-value') != 0 - uptime += $('#days').attr('data-value') + ' days ' - if $('#hours').attr('data-value') != 0 - uptime += $('#hours').attr('data-value') + ' hours ' - if $('#minutes').attr('data-value') != 0 - uptime += $('#minutes').attr('data-value') + ' minutes' - # Set the tweet - text = uptime + ' server uptime. Can you beat this? via' - # Set the hashtag - hashtag = 'uptimey,devops' - # Open the Twitter share window - window.open 'http://twitter.com/share?url=' + url + '&text=' + text + '&hashtags=' + hashtag + '&', 'twitterwindow', 'height=450, width=550, top=' + $(window).height() / 2 - 225 + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0' - when 'screenshot' - screenshotButton = $('.screenshot-button') - # Animated it - screenshotButton.addClass 'pulse' - screenshotButton.on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> - $(this).removeClass 'pulse' - return - # Check the button status - if screenshotButton.hasClass('fa-camera') - # Change the button icon - screenshotButton.removeClass('fa-camera').addClass 'fa-download' - # Create an image from canvas - html2canvas document.body, onrendered: (canvas) -> - # Save the canvas to a data URL - dataURL = canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream') - # Set the data url on the screenshot button - screenshotButton.attr 'href', dataURL - # Get the current date for the filename - fileName = moment().format('DDMMYYYYHHmmss') - # Set the filename on the screenshot button - screenshotButton.attr 'download', 'Screenshot_' + fileName + '.png' - return - else - setTimeout (-> - # Change the button icon - screenshotButton.removeClass('fa-download').addClass 'fa-camera' - screenshotButton.removeAttr('href').removeAttr 'download' - return - ), 3000 - when 'clear' - # Clear the session - $.get globalFile, action: 'clear' - return \ No newline at end of file diff --git a/core/config.json b/core/client/config.json similarity index 100% rename from core/config.json rename to core/client/config.json diff --git a/core/client/index.coffee b/core/client/index.coffee deleted file mode 100644 index 795e134..0000000 --- a/core/client/index.coffee +++ /dev/null @@ -1,25 +0,0 @@ -### -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -### \ No newline at end of file diff --git a/core/controllers/maincontroller.php b/core/client/lib/controllers/maincontroller.php similarity index 100% rename from core/controllers/maincontroller.php rename to core/client/lib/controllers/maincontroller.php diff --git a/core/js/functions.js b/core/client/lib/js/actioncontroller.js similarity index 66% rename from core/js/functions.js rename to core/client/lib/js/actioncontroller.js index 31bed4c..bf3ba16 100644 --- a/core/js/functions.js +++ b/core/client/lib/js/actioncontroller.js @@ -25,7 +25,7 @@ SOFTWARE. */ /* Set the global files */ -var globalFile = 'core/handlers/app.handler.php'; +var globalFile = 'core/client/lib/controllers/maincontroller.php'; /* Set the global vars*/ var globalLocation, globalSunrise, globalSunset; @@ -33,97 +33,97 @@ var globalLocation, globalSunrise, globalSunset; function output(type, setFlag) { switch (type) { case 'image': - $.get(globalFile, { - action: type + $.ajax({ + method: "GET", + url: globalFile, + data: { action: type } }).done(function(image) { // Split the output image = image.split(";"); // Add the image as background-image on body $('body').css('backgroundImage', 'url(' + image[0] + ')'); // Set the copyright - $('#copy').html("Powered by Uptimey. Fork on Github
Image - " + image[1]); + var copyrightText = "Powered by Uptimey. Fork on Github. Image by Unsplash"; + $('#copy').html(copyrightText); }); - break; + break; case 'location': $.get(globalFile, { action: type - }) - .done(function(location) { - // Set up the URL for location call using ipinfo.io - var ip_geocode = "http://ipinfo.io/" + location + "/json"; - // Get the response and set the value - $.getJSON(ip_geocode, function(response) { - // Add it to the element with an animation - $('#location').text(response.city + ", " + response.region + ", " + response.country).addClass('fadeIn'); - // Add latlong for maps href - var latlong = response.loc.split(","); - $('#location').attr('data-latlong', latlong[0] + '+' + latlong[1]); - // Set the global location - globalLocation = response.city + ", " + response.region + ", " + response.country; - // Set the sunrise/sunset times - $.simpleWeather({ - location: globalLocation, - success: function(weather) { - globalSunrise = weather.sunrise; - globalSunset = weather.sunset; - } - }); + }).done(function(location) { + // Set up the URL for location call using ipinfo.io + var ip_geocode = "http://ipinfo.io/" + location; + // Get the response and set the value + $.getJSON(ip_geocode, function(response) { + // Add it to the element with an animation + $('#location').text(response.city + ", " + response.region + ", " + response.country).addClass('fadeIn'); + // Add latlong for maps href + var latlong = response.loc.split(","); + $('#location').attr('data-latlong', latlong[0] + '+' + latlong[1]); + // Set the global location + globalLocation = response.city + ", " + response.region + ", " + response.country; + // Set the sunrise/sunset times + $.simpleWeather({ + location: globalLocation, + success: function(weather) { + globalSunrise = weather.sunrise; + globalSunset = weather.sunset; + } }); - // We only animate the whole container once - $('.location-inner').addClass('fadeIn'); }); - break; + // We only animate the whole container once + $('.location-inner').addClass('fadeIn'); + }); + break; case 'uptime': $.get(globalFile, { action: type, flag: setFlag - }) - .done(function(uptime) { - // Split the output - uptime = uptime.split(";"); - // Add it to each element with an animation - $('#days').text(uptime[0]).addClass('fadeIn'); - $('#days').attr('data-value', uptime[0]); - - $('#hours').text(uptime[1]).addClass('fadeIn'); - $('#hours').attr('data-value', uptime[1]); + }).done(function(uptime) { + // Split the output + uptime = uptime.split(";"); + // Add it to each element with an animation + $('#days').text(uptime[0]).addClass('fadeIn'); + $('#days').attr('data-value', uptime[0]); + + $('#hours').text(uptime[1]).addClass('fadeIn'); + $('#hours').attr('data-value', uptime[1]); - $('#minutes').text(uptime[2]).addClass('fadeIn'); - $('#minutes').attr('data-value', uptime[2]); - // We only animate the whole container once - $('.bottom-container').addClass('fadeIn'); - }); - break; + $('#minutes').text(uptime[2]).addClass('fadeIn'); + $('#minutes').attr('data-value', uptime[2]); + // We only animate the whole container once + $('.bottom-container').addClass('fadeIn'); + }); + break; case 'time': $.get(globalFile, { action: type, flag: setFlag - }) - .done(function(time) { - // Split the output - time = time.split(";"); - // Set the times - $('#current').text(time[0]).addClass('fadeIn'); - $('#time').text(time[1]).addClass('fadeIn'); - $('#since').text(time[2]).addClass('fadeIn'); - // Format the times - setTimeout(function() { - var sunrise = moment(globalSunrise, 'h:m a').format('X'); - var sunset = moment(globalSunset, 'h:m a').format('X'); - var ttime = moment(time[1], 'h:m a').format('X'); - // Check if the current time is between sunset, sunrise and set the icon - if (ttime >= sunrise && ttime <= sunset) { - $(".time .fa").removeClass("fa-moon-o fa-circle-o"); - $(".time .fa").addClass("fa-sun-o"); - } else { - $(".time .fa").removeClass("fa-sun-o fa-circle-o"); - $(".time .fa").addClass("fa-moon-o"); - } - }, 3000); - // We only animate the whole container once - $('.top-container').addClass('fadeIn'); - }); - break; + }).done(function(time) { + // Split the output + time = time.split(";"); + // Set the times + $('#current').text(time[0]).addClass('fadeIn'); + $('#time').text(time[1]).addClass('fadeIn'); + $('#since').text(time[2]).addClass('fadeIn'); + // Format the times + setTimeout(function() { + var sunrise = moment(globalSunrise, 'h:m a').format('X'); + var sunset = moment(globalSunset, 'h:m a').format('X'); + var ttime = moment(time[1], 'h:m a').format('X'); + // Check if the current time is between sunset, sunrise and set the icon + if (ttime >= sunrise && ttime <= sunset) { + $(".time .fa").removeClass("fa-moon-o fa-circle-o"); + $(".time .fa").addClass("fa-sun-o"); + } else { + $(".time .fa").removeClass("fa-sun-o fa-circle-o"); + $(".time .fa").addClass("fa-moon-o"); + } + }, 3000); + // We only animate the whole container once + $('.top-container').addClass('fadeIn'); + }); + break; } // After the animation is done remove the class so // we can animate again on next iteration @@ -133,6 +133,7 @@ function output(type, setFlag) { }); }); } + /* Button action */ function action(type) { var status; @@ -162,7 +163,7 @@ function action(type) { $(".toggle-button").removeClass("fa-angle-double-up"); $(".toggle-button").addClass("fa-angle-double-down"); } - break; + break; case 'adv': // Animated it $(".adv-button").addClass('pulse'); @@ -182,11 +183,10 @@ function action(type) { $.get(globalFile, { action: "advanced", flag: "advanced" - }) - .done(function(notice) { - // Set the data from ajax - $(".advanced-panel .top-container").html(notice); - }); + }).done(function(notice) { + // Set the data from ajax + $(".advanced-panel .top-container").html(notice); + }); } else if (status == "advanced") { // Show the correct panel and set the button state $(".adv-button").attr("data-status", "default"); @@ -194,7 +194,7 @@ function action(type) { $(".advanced-panel").fadeOut(500); $(".default-panel").fadeIn(500); } - break; + break; case 'refresh': // Animated it $(".refresh-button").addClass('fa-spin'); @@ -205,7 +205,7 @@ function action(type) { setTimeout(function() { $(".refresh-button").removeClass("fa-spin"); }, 1000); - break; + break; case 'twitter': // Animated it $(".twitter-button").addClass('pulse'); @@ -226,7 +226,7 @@ function action(type) { var hashtag = "uptimey,devops"; // Open the Twitter share window window.open('http://twitter.com/share?url=' + url + '&text=' + text + '&hashtags=' + hashtag + '&', 'twitterwindow', 'height=450, width=550, top=' + ($(window).height() / 2 - 225) + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0'); - break; + break; case 'screenshot': var screenshotButton = $('.screenshot-button'); // Animated it @@ -258,12 +258,10 @@ function action(type) { screenshotButton.removeAttr("href").removeAttr("download"); }, 3000); } - break; + break; case 'clear': // Clear the session - $.get(globalFile, { - action: "clear" - }); - break; + $.get(globalFile, { action: "clear" }); + break; } } \ No newline at end of file diff --git a/core/js/base.js b/core/client/lib/js/initcontroller.js similarity index 100% rename from core/js/base.js rename to core/client/lib/js/initcontroller.js diff --git a/core/js/require.config.js b/core/client/lib/js/require.config.js similarity index 77% rename from core/js/require.config.js rename to core/client/lib/js/require.config.js index 87d121f..e0888a0 100644 --- a/core/js/require.config.js +++ b/core/client/lib/js/require.config.js @@ -1,9 +1,9 @@ requirejs.config({ baseUrl: 'core/dest/js', paths: { - jQuery : '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min', - moment : '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min', - weather : '//cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.0.2/jquery.simpleWeather.min', + jQuery : '//ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min', + moment : '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment.min', + weather : '//cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.1.0/jquery.simpleWeather.min', html2canvas : '//cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min', app : 'app.min' }, diff --git a/core/style/screen.scss b/core/client/lib/style/global.scss similarity index 100% rename from core/style/screen.scss rename to core/client/lib/style/global.scss diff --git a/core/template/main.html b/core/client/lib/template/mainview.html similarity index 98% rename from core/template/main.html rename to core/client/lib/template/mainview.html index 7b43031..fd44dfc 100644 --- a/core/template/main.html +++ b/core/client/lib/template/mainview.html @@ -97,7 +97,7 @@

Your server's uptime until now...

diff --git a/core/dest/css/global.min.css b/core/dest/css/global.min.css new file mode 100644 index 0000000..b0b6a90 --- /dev/null +++ b/core/dest/css/global.min.css @@ -0,0 +1,2 @@ +.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}a,.button-container .button{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover,a:focus{text-decoration:underline}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button:hover{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button:hover{color:#55acee}.button-container .screenshot-button{text-decoration:none}.button-container .screenshot-button:hover{color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} +/*# sourceMappingURL=global.min.css.map */ diff --git a/core/dest/css/global.min.css.map b/core/dest/css/global.min.css.map new file mode 100644 index 0000000..86b3e29 --- /dev/null +++ b/core/dest/css/global.min.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AA4CA,0IAAQ,CACJ,OAAO,CAAE,EAAE,CACX,MAAM,CAAE,GAAG,CACX,UAAU,CAAE,yEAA0F,CACtG,UAAU,CAAE,mIAAgJ,CAC5J,UAAU,CAAE,4EAA2F,CACvG,UAAU,CAAE,uEAAsF,CAClG,UAAU,CAAE,wEAAuF,CACnG,UAAU,CAAE,wEAAuF,CACnG,MAAM,CAAE,+GAA+G,CACvH,OAAO,CAAE,K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N,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CArQI,IAAI,CAsQb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", +"sources": ["../../client/lib/style/global.scss"], +"names": [], +"file": "global.min.css" +} diff --git a/core/dest/css/screen.min.css.map b/core/dest/css/screen.min.css.map index f08941b..4827db5 100644 --- a/core/dest/css/screen.min.css.map +++ b/core/dest/css/screen.min.css.map @@ -1,7 +1,7 @@ { "version": 3, "mappings": "AA4CA,0IAAQ,CACJ,OAAO,CAAE,EAAE,CACX,MAAM,CAAE,GAAG,CACX,UAAU,CAAE,yEAA0F,CACtG,UAAU,CAAE,mIAAgJ,CAC5J,UAAU,CAAE,4EAA2F,CACvG,UAAU,CAAE,uEAAsF,CAClG,UAAU,CAAE,wEAAuF,CACnG,UAAU,CAAE,wEAAuF,CACnG,MAAM,CAAE,+GAA+G,CACvH,OAAO,CAAE,KAAK,CAElB,2BAAY,CACR,kBAAkB,CAAE,aAAa,CACjC,eAAe,CAAE,aAAa,CAC9B,aAAa,CAAE,aAAa,CAC5B,cAAc,CAAE,aAAa,CAC7B,UAAU,CAAE,aAAa,CAM7B,IAAK,CACJ,MAAM,CAAE,IAAI,CAEb,IAAK,CACJ,MAAM,CAAE,IAAI,CACZ,gBAAgB,CAzCP,IAAI,CA0Cb,iBAAiB,CAAE,SAAS,CAC5B,mBAAmB,CAAE,MAAM,CAC3B,eAAe,CAAE,KAAK,CACtB,WAAW,CArCH,kBAAmB,CAsC3B,WAAW,CAAE,GAAG,CAChB,KAAK,CA9CI,IAAI,CAgDd,CAAE,CACD,KAAK,CAjDI,IAAI,CAkDb,eAAe,CAAE,IAAI,CAErB,eACQ,CACP,eAAe,CAAE,SAAS,CAO5B,UAAW,CACV,UAAU,CA7DD,eAAc,CA8DvB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CAC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AAS,CACL,aAAa,CAAE,IAAI,CAEvB,uBAAE,CACD,eAAe,CAAE,SAAS,CAInC,iBAAkB,CACjB,UAAU,CAAE,MAAM,CAClB,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,KAAK,CACb,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,IAAI,CACX,yBAAQ,CACP,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,MAAM,CACd,8BAAK,CACJ,KAAK,CAAE,GAAG,CACV,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,IAAI,CACjB,iDAAqB,CAER,aAAa,CAAE,IAAI,CAEhC,kDAAsB,CAET,aAAa,CAAE,IAAI,CAEhC,mCAAK,CACJ,OAAO,CAAE,KAAK,CACd,SAAS,CAAE,GAAG,CACd,cAAc,CAAE,IAAI,CAErB,qCAAO,CACN,cAAc,CAAE,UAAU,CAI7B,oBAAG,CACF,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,KAAK,CAChB,aAAa,CAAE,KAAK,CAGtB,MAAO,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CArQI,IAAI,CAsQb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", -"sources": ["../../style/screen.scss"], +"sources": ["../../client/lib/style/screen.scss"], "names": [], "file": "screen.min.css" } diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index 1a56c7d..1a95408 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1 @@ -(function(){var a,b;b=require("actions.coffee"),a=require("action.coffee"),$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),b("image"),b("location"),b("uptime"),b("time"),setInterval(function(){b("uptime"),b("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;return b=$(this).attr("data-action"),a(b)})})}).call(this); \ No newline at end of file +function output(a,b){switch(a){case"image":$.ajax({method:"GET",url:globalFile,data:{action:a}}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")");var b="Powered by Uptimey. Fork on Github. Image by Unsplash";$("#copy").html(b)});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://ipinfo.io/"+a;$.getJSON(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn");var b=a.loc.split(",");$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").attr("data-value")&&(d+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(d+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(d+=$("#minutes").attr("data-value")+" minutes");var e=d+" server uptime. Can you beat this? via",f="uptimey,devops";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":var g=$(".screenshot-button");g.addClass("pulse"),g.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g.hasClass("fa-camera")?(g.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b=a.toDataURL("image/png").replace("image/png","image/octet-stream");g.attr("href",b),fileName=moment().format("DDMMYYYYHHmmss"),g.attr("download","Screenshot_"+fileName+".png")}})):setTimeout(function(){g.removeClass("fa-download").addClass("fa-camera"),g.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/client/lib/controllers/maincontroller.php",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}); \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index a3482cf..936e2c2 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -9,7 +9,7 @@ module.exports = function(grunt) { removeComments: true }, files: { - 'index.html': 'core/template/main.html' + 'index.html': 'core/client/lib/template/mainview.html' } } }, @@ -19,19 +19,15 @@ module.exports = function(grunt) { style: 'compressed' }, files: { - 'core/dest/css/screen.min.css' : 'core/style/screen.scss' + 'core/dest/css/global.min.css' : 'core/client/lib/style/global.scss' } } }, - coffee: { - compileJoined: { - options: { - join: true - }, - files: { - 'core/dest/js/app.min.js': ['core/client/*.coffee'] - } - } + concat: { + dist: { + src : ['core/client/lib/js/actioncontroller.js', 'core/client/lib/js/initcontroller.js'], + dest : 'core/dest/js/app.min.js' + } }, uglify: { js: { @@ -41,14 +37,14 @@ module.exports = function(grunt) { } }, watch: { - files: ['core/template/*', 'core/style/*', 'core/client/*'], - tasks: ['htmlmin', 'sass', 'coffee', 'uglify'] + files: ['core/client/lib/template/*.html', 'core/client/lib/style/*.scss', 'core/client/lib/js/*.js'], + tasks: ['htmlmin', 'sass', 'concat', 'uglify'] } }); grunt.loadNpmTasks('grunt-contrib-htmlmin'); grunt.loadNpmTasks('grunt-contrib-sass'); - grunt.loadNpmTasks('grunt-contrib-coffee'); + grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.registerTask('default', ['htmlmin', 'sass', 'coffee', 'uglify']); + grunt.registerTask('default', ['htmlmin', 'sass', 'concat', 'uglify']); }; \ No newline at end of file diff --git a/index.html b/index.html index cc2ff23..ed8e676 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file +Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file diff --git a/package.json b/package.json index be30929..6ed842d 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "title": "uptimey", "description": "Beautiful Server Uptime Monitor", "version": "0.9.5", - "author": "\"stefanbc\" Stefan Cosma (http://stefancosma.eu/)", + "author": "\"stefanbc\" Stefan Cosma (http://stefancosma.xyz/)", "repository": "stefanbc/uptimey", "licenses": [ { @@ -18,11 +18,11 @@ "beautiful" ], "devDependencies": { - "grunt": "0.4.5", - "grunt-contrib-htmlmin": "^0.4.0", - "grunt-contrib-sass": "^0.9.2", - "grunt-contrib-uglify": "0.5.0", - "grunt-contrib-watch": "0.6.1", - "grunt-contrib-coffee": "^0.13.0" + "grunt": "1.0.1", + "grunt-contrib-coffee": "1.0.0", + "grunt-contrib-htmlmin": "1.2.0", + "grunt-contrib-sass": "1.0.0", + "grunt-contrib-uglify": "1.0.1", + "grunt-contrib-watch": "1.0.0" } } From 748157909c012eaeef1f79a243f9648acb925872 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Sat, 9 Apr 2016 19:15:36 +0300 Subject: [PATCH 36/68] Converted to coffeescript and made it work --- core/client/lib/_globals.coffee | 34 ++ core/client/lib/actioncontroller.coffee | 153 +++++++ .../client/lib/controllers/maincontroller.php | 2 +- core/client/lib/datacontroller.coffee | 129 ++++++ core/client/lib/initcontroller.coffee | 72 ++++ .../lib/{template => view}/mainview.html | 0 core/dest/js/app.min.js | 377 +++++++++++++++++- gruntfile.js | 35 +- 8 files changed, 785 insertions(+), 17 deletions(-) create mode 100644 core/client/lib/_globals.coffee create mode 100644 core/client/lib/actioncontroller.coffee create mode 100644 core/client/lib/datacontroller.coffee create mode 100644 core/client/lib/initcontroller.coffee rename core/client/lib/{template => view}/mainview.html (100%) diff --git a/core/client/lib/_globals.coffee b/core/client/lib/_globals.coffee new file mode 100644 index 0000000..13a5743 --- /dev/null +++ b/core/client/lib/_globals.coffee @@ -0,0 +1,34 @@ +### +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +### + +### Project details ### +projectLink = 'https://github.com/stefanbc/uptimey' + +### Set the global vars### +{ globalLocation, globalSunrise, globalSunset } = '' + +### Set the global files ### +globalFile = './core/client/lib/controllers/maincontroller.php' \ No newline at end of file diff --git a/core/client/lib/actioncontroller.coffee b/core/client/lib/actioncontroller.coffee new file mode 100644 index 0000000..fc8d4c4 --- /dev/null +++ b/core/client/lib/actioncontroller.coffee @@ -0,0 +1,153 @@ +### +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +### + +### Button action ### +action = (type) -> + status = '' + switch type + when 'toggle' + # Get the status of the button + status = $('.toggle-button').attr('data-status') + # Check the status + if status is 'closed' + # Animate the container (bring it down) + $('.button-container').animate top: 0 + # Change the button status + $('.toggle-button').attr 'data-status', 'open' + # Change the icon + $('.toggle-button').removeClass 'fa-angle-double-down' + $('.toggle-button').addClass 'fa-angle-double-up' + else if status is 'open' + # Animate the container (bring it up) + $('.button-container').animate top: '-80px' + # Change the button status + $('.toggle-button').attr 'data-status', 'closed' + # Change the icon + $('.toggle-button').removeClass 'fa-angle-double-up' + $('.toggle-button').addClass 'fa-angle-double-down' + return + when 'adv' + # Animated it + $('.adv-button').addClass 'pulse' + $('.adv-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $(this).removeClass 'pulse' + return + # Get the status of the button + status = $('.adv-button').attr('data-status') + # Check the state + if status is 'default' + # Show the correct panel and set the button state + $('.adv-button').attr 'data-status', 'advanced' + $('.adv-button').addClass 'active' + $('.default-panel').fadeOut 500 + $('.advanced-panel').fadeIn 500 + # Get the data for this panel + $.ajax globalFile, + method : 'GET' + data : + action : 'advanced', + flag : 'advanced' + success: (notice) -> + # Set the data from ajax + $('.advanced-panel .top-container').html notice + return + else if status is 'advanced' + # Show the correct panel and set the button state + $('.adv-button').attr 'data-status', 'default' + $('.adv-button').removeClass 'active' + $('.advanced-panel').fadeOut 500 + $('.default-panel').fadeIn 500 + return + when 'refresh' + # Animated it + $('.refresh-button').addClass 'fa-spin' + # Refresh the values + output 'uptime', 'refresh' + output 'time', 'refresh' + # Stop animation after 1s + setTimeout (-> + $('.refresh-button').removeClass 'fa-spin' + return + ), 1000 + return + when 'twitter' + # Animated it + $('.twitter-button').addClass 'pulse' + $('.twitter-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $(this).removeClass 'pulse' + return + # The action + # Get the current uptime + uptime = '' + if $('#days').attr('data-value') != 0 + uptime += $('#days').attr('data-value') + ' days ' + if $('#hours').attr('data-value') != 0 + uptime += $('#hours').attr('data-value') + ' hours ' + if $('#minutes').attr('data-value') != 0 + uptime += $('#minutes').attr('data-value') + ' minutes' + # Set the tweet + text = uptime + ' server uptime. Can you beat this? via' + # Set the hashtag + hashtag = 'uptimey,devops' + # Open the Twitter share window + window.open "http://twitter.com/share?url=#{projectLink}&text=#{text}&hashtags=#{hashtag}&", 'twitterwindow', 'height=450, width=550, top=' + $(window).height() / 2 - 225 + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0' + return + when 'screenshot' + screenshotButton = $('.screenshot-button') + # Animated it + screenshotButton.addClass 'pulse' + screenshotButton.on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $(this).removeClass 'pulse' + return + # Check the button status + if screenshotButton.hasClass('fa-camera') + # Change the button icon + screenshotButton.removeClass('fa-camera').addClass 'fa-download' + # Create an image from canvas + html2canvas document.body, onrendered: (canvas) -> + # Save the canvas to a data URL + dataURL = canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream') + # Set the data url on the screenshot button + screenshotButton.attr 'href', dataURL + # Get the current date for the filename + fileName = moment().format('DDMMYYYYHHmmss') + # Set the filename on the screenshot button + screenshotButton.attr 'download', 'Screenshot_' + fileName + '.png' + return + else + setTimeout (-> + # Change the button icon + screenshotButton.removeClass('fa-download').addClass 'fa-camera' + screenshotButton.removeAttr('href').removeAttr 'download' + ), 3000 + return + when 'clear' + # Clear the session + $.ajax globalFile, + method : 'GET' + data : + action : 'clear' + return diff --git a/core/client/lib/controllers/maincontroller.php b/core/client/lib/controllers/maincontroller.php index 282a1f3..e593230 100644 --- a/core/client/lib/controllers/maincontroller.php +++ b/core/client/lib/controllers/maincontroller.php @@ -52,7 +52,7 @@ switch($action){ case 'image': // Load random image from Unsplash - $getImage = 'https://source.unsplash.com/random/1366x768'; + $getImage = 'https://source.unsplash.com/category/nature/1366x768'; // Return the image echo $getImage; // Set the session image diff --git a/core/client/lib/datacontroller.coffee b/core/client/lib/datacontroller.coffee new file mode 100644 index 0000000..23f5427 --- /dev/null +++ b/core/client/lib/datacontroller.coffee @@ -0,0 +1,129 @@ +### +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +### + +### Output the data requested ### +output = (type, setFlag) -> + switch type + when 'image' + $.ajax globalFile, + method : 'GET' + data : + action : type + success: (image) -> + # Split the output + image = image.split(';') + # Add the image as background-image on body + $('body').css 'backgroundImage', "url(#{image[0]})" + # Set the copyright + copyrightText = "Built using Uptimey. Fork on Github. Image by Unsplash." + $('#copy').html copyrightText + return + when 'location' + $.ajax globalFile, + method : 'GET' + data : + action : type + success: (location) -> + # Set up the URL for location call using ipinfo.io + ip_geocode = "http://ipinfo.io/#{location}" + # Get the response and set the value + $.getJSON ip_geocode, (response) -> + # Add it to the element with an animation + $('#location').text("#{response.city}, #{response.region}, #{response.country}").addClass 'fadeIn' + # Add latlong for maps href + latlong = response.loc.split(',') + $('#location').attr 'data-latlong', "#{latlong[0]}+#{latlong[1]}" + # Set the global location + globalLocation = "#{response.city}, #{response.region}, #{response.country}" + # Set the sunrise/sunset times + $.simpleWeather + location: globalLocation + success: (weather) -> + globalSunrise = weather.sunrise + globalSunset = weather.sunset + return + return + # We only animate the whole container once + $('.location-inner').addClass 'fadeIn' + return + when 'uptime' + $.ajax globalFile, + method : 'GET' + data : + action : type, + flag : setFlag + success: (uptime) -> + # Split the output + uptime = uptime.split(';') + # Add it to each element with an animation + $('#days').text(uptime[0]).addClass 'fadeIn' + $('#days').attr 'data-value', uptime[0] + $('#hours').text(uptime[1]).addClass 'fadeIn' + $('#hours').attr 'data-value', uptime[1] + $('#minutes').text(uptime[2]).addClass 'fadeIn' + $('#minutes').attr 'data-value', uptime[2] + # We only animate the whole container once + $('.bottom-container').addClass 'fadeIn' + return + when 'time' + $.ajax globalFile, + method : 'GET' + data : + action : type, + flag : setFlag + success: (time) -> + # Split the output + time = time.split(';') + # Set the times + $('#current').text(time[0]).addClass 'fadeIn' + $('#time').text(time[1]).addClass 'fadeIn' + $('#since').text(time[2]).addClass 'fadeIn' + # Format the times + setTimeout (-> + sunrise = moment(globalSunrise, 'h:m a').format('X') + sunset = moment(globalSunset, 'h:m a').format('X') + ttime = moment(time[1], 'h:m a').format('X') + # Check if the current time is between sunset, sunrise and set the icon + if ttime >= sunrise and ttime <= sunset + $('.time .fa').removeClass 'fa-moon-o fa-circle-o' + $('.time .fa').addClass 'fa-sun-o' + else + $('.time .fa').removeClass 'fa-sun-o fa-circle-o' + $('.time .fa').addClass 'fa-moon-o' + return + ), 3000 + # We only animate the whole container once + $('.top-container').addClass 'fadeIn' + return + break + # After the animation is done remove the class so + # we can animate again on next iteration + $('.val').each -> + $(this).on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $(this).removeClass 'fadeIn' + return + return + return \ No newline at end of file diff --git a/core/client/lib/initcontroller.coffee b/core/client/lib/initcontroller.coffee new file mode 100644 index 0000000..296b8a4 --- /dev/null +++ b/core/client/lib/initcontroller.coffee @@ -0,0 +1,72 @@ +### +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +### + +# When the page finishes loading +$(document).ready -> + + ### Start initial load ### + # Add the animation base class + $('.top-container').addClass 'animated' + $('.bottom-container').addClass 'animated' + $('.val').addClass 'animated' + $('.button').addClass 'animated' + # Get the image + output 'image' + # Get the location + output 'location' + # Get the uptime + output 'uptime' + # Get the time (let uptime be the first request so that the session updates needed values for time) + output 'time' + ### End initial load ### + + ### At an interval of 1 min we refresh the uptime and time ### + setInterval (-> + output 'uptime' + output 'time' + return + ), 1000 * 60 + + ### Click action on each top button ### + $('.button').each -> + $(this).on 'click', -> + buttonAction = $(this).attr('data-action') + action buttonAction + return + return + + ### Click action for location ### + $('#location').on 'click', -> + latlong = $(this).attr('data-latlong') + window.location.href = "https://www.google.com/maps/place/#{latlong}" + return + return + +# ### Clear everything on refresh of close ### +# $(window).bind 'beforeunload', -> +# action 'clear' +# return +# return diff --git a/core/client/lib/template/mainview.html b/core/client/lib/view/mainview.html similarity index 100% rename from core/client/lib/template/mainview.html rename to core/client/lib/view/mainview.html diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index 1a95408..a911102 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1,376 @@ -function output(a,b){switch(a){case"image":$.ajax({method:"GET",url:globalFile,data:{action:a}}).done(function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")");var b="Powered by Uptimey. Fork on Github. Image by Unsplash";$("#copy").html(b)});break;case"location":$.get(globalFile,{action:a}).done(function(a){var b="http://ipinfo.io/"+a;$.getJSON(b,function(a){$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn");var b=a.loc.split(",");$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")});break;case"uptime":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")});break;case"time":$.get(globalFile,{action:a,flag:b}).done(function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X");d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})}function action(a){var b;switch(a){case"toggle":b=$(".toggle-button").attr("data-status"),"closed"==b?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"==b&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),b=$(".adv-button").attr("data-status"),"default"==b?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.get(globalFile,{action:"advanced",flag:"advanced"}).done(function(a){$(".advanced-panel .top-container").html(a)})):"advanced"==b&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")});var c="https://github.com/stefanbc/uptimey",d="";0!==$("#days").attr("data-value")&&(d+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(d+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(d+=$("#minutes").attr("data-value")+" minutes");var e=d+" server uptime. Can you beat this? via",f="uptimey,devops";window.open("http://twitter.com/share?url="+c+"&text="+e+"&hashtags="+f+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":var g=$(".screenshot-button");g.addClass("pulse"),g.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g.hasClass("fa-camera")?(g.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b=a.toDataURL("image/png").replace("image/png","image/octet-stream");g.attr("href",b),fileName=moment().format("DDMMYYYYHHmmss"),g.attr("download","Screenshot_"+fileName+".png")}})):setTimeout(function(){g.removeClass("fa-download").addClass("fa-camera"),g.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.get(globalFile,{action:"clear"})}}var globalFile="core/client/lib/controllers/maincontroller.php",globalLocation,globalSunrise,globalSunset;$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a=$(this).attr("data-action");action(a)})}),$("#location").on("click",function(){var a=$(this).attr("data-latlong");window.location.href="https://www.google.com/maps/place/"+a}),$(window).bind("beforeunload",function(){action("clear")})}); \ No newline at end of file + +/* +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + */ + +/* Project details */ +var action, globalFile, globalLocation, globalSunrise, globalSunset, output, projectLink, ref; + +projectLink = 'https://github.com/stefanbc/uptimey'; + + +/* Set the global vars */ + +ref = '', globalLocation = ref.globalLocation, globalSunrise = ref.globalSunrise, globalSunset = ref.globalSunset; + + +/* Set the global files */ + +globalFile = './core/client/lib/controllers/maincontroller.php'; + + +/* +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + */ + + +/* Button action */ + +action = function(type) { + var hashtag, screenshotButton, status, text, uptime; + status = ''; + switch (type) { + case 'toggle': + status = $('.toggle-button').attr('data-status'); + if (status === 'closed') { + $('.button-container').animate({ + top: 0 + }); + $('.toggle-button').attr('data-status', 'open'); + $('.toggle-button').removeClass('fa-angle-double-down'); + $('.toggle-button').addClass('fa-angle-double-up'); + } else if (status === 'open') { + $('.button-container').animate({ + top: '-80px' + }); + $('.toggle-button').attr('data-status', 'closed'); + $('.toggle-button').removeClass('fa-angle-double-up'); + $('.toggle-button').addClass('fa-angle-double-down'); + } + break; + case 'adv': + $('.adv-button').addClass('pulse'); + $('.adv-button').on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).removeClass('pulse'); + }); + status = $('.adv-button').attr('data-status'); + if (status === 'default') { + $('.adv-button').attr('data-status', 'advanced'); + $('.adv-button').addClass('active'); + $('.default-panel').fadeOut(500); + $('.advanced-panel').fadeIn(500); + $.ajax(globalFile, { + method: 'GET', + data: { + action: 'advanced', + flag: 'advanced' + }, + success: function(notice) { + $('.advanced-panel .top-container').html(notice); + } + }); + } else if (status === 'advanced') { + $('.adv-button').attr('data-status', 'default'); + $('.adv-button').removeClass('active'); + $('.advanced-panel').fadeOut(500); + $('.default-panel').fadeIn(500); + } + break; + case 'refresh': + $('.refresh-button').addClass('fa-spin'); + output('uptime', 'refresh'); + output('time', 'refresh'); + setTimeout((function() { + $('.refresh-button').removeClass('fa-spin'); + }), 1000); + break; + case 'twitter': + $('.twitter-button').addClass('pulse'); + $('.twitter-button').on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).removeClass('pulse'); + }); + uptime = ''; + if ($('#days').attr('data-value') !== 0) { + uptime += $('#days').attr('data-value') + ' days '; + } + if ($('#hours').attr('data-value') !== 0) { + uptime += $('#hours').attr('data-value') + ' hours '; + } + if ($('#minutes').attr('data-value') !== 0) { + uptime += $('#minutes').attr('data-value') + ' minutes'; + } + text = uptime + ' server uptime. Can you beat this? via'; + hashtag = 'uptimey,devops'; + window.open("http://twitter.com/share?url=" + projectLink + "&text=" + text + "&hashtags=" + hashtag + "&", 'twitterwindow', 'height=450, width=550, top=' + $(window).height() / 2 - 225 + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0'); + break; + case 'screenshot': + screenshotButton = $('.screenshot-button'); + screenshotButton.addClass('pulse'); + screenshotButton.on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).removeClass('pulse'); + }); + if (screenshotButton.hasClass('fa-camera')) { + screenshotButton.removeClass('fa-camera').addClass('fa-download'); + html2canvas(document.body, { + onrendered: function(canvas) { + var dataURL, fileName; + dataURL = canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream'); + screenshotButton.attr('href', dataURL); + fileName = moment().format('DDMMYYYYHHmmss'); + screenshotButton.attr('download', 'Screenshot_' + fileName + '.png'); + } + }); + } else { + setTimeout((function() { + screenshotButton.removeClass('fa-download').addClass('fa-camera'); + return screenshotButton.removeAttr('href').removeAttr('download'); + }), 3000); + } + break; + case 'clear': + $.ajax(globalFile, { + method: 'GET', + data: { + action: 'clear' + } + }); + } +}; + + +/* +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + */ + + +/* Output the data requested */ + +output = function(type, setFlag) { + switch (type) { + case 'image': + $.ajax(globalFile, { + method: 'GET', + data: { + action: type + }, + success: function(image) { + var copyrightText; + image = image.split(';'); + $('body').css('backgroundImage', "url(" + image[0] + ")"); + copyrightText = "Built using Uptimey. Fork on Github. Image by Unsplash."; + $('#copy').html(copyrightText); + } + }); + break; + case 'location': + $.ajax(globalFile, { + method: 'GET', + data: { + action: type + }, + success: function(location) { + var ip_geocode; + ip_geocode = "http://ipinfo.io/" + location; + $.getJSON(ip_geocode, function(response) { + var latlong; + $('#location').text(response.city + ", " + response.region + ", " + response.country).addClass('fadeIn'); + latlong = response.loc.split(','); + $('#location').attr('data-latlong', latlong[0] + "+" + latlong[1]); + globalLocation = response.city + ", " + response.region + ", " + response.country; + $.simpleWeather({ + location: globalLocation, + success: function(weather) { + globalSunrise = weather.sunrise; + globalSunset = weather.sunset; + } + }); + }); + $('.location-inner').addClass('fadeIn'); + } + }); + break; + case 'uptime': + $.ajax(globalFile, { + method: 'GET', + data: { + action: type, + flag: setFlag + }, + success: function(uptime) { + uptime = uptime.split(';'); + $('#days').text(uptime[0]).addClass('fadeIn'); + $('#days').attr('data-value', uptime[0]); + $('#hours').text(uptime[1]).addClass('fadeIn'); + $('#hours').attr('data-value', uptime[1]); + $('#minutes').text(uptime[2]).addClass('fadeIn'); + $('#minutes').attr('data-value', uptime[2]); + $('.bottom-container').addClass('fadeIn'); + } + }); + break; + case 'time': + $.ajax(globalFile, { + method: 'GET', + data: { + action: type, + flag: setFlag + }, + success: function(time) { + time = time.split(';'); + $('#current').text(time[0]).addClass('fadeIn'); + $('#time').text(time[1]).addClass('fadeIn'); + $('#since').text(time[2]).addClass('fadeIn'); + setTimeout((function() { + var sunrise, sunset, ttime; + sunrise = moment(globalSunrise, 'h:m a').format('X'); + sunset = moment(globalSunset, 'h:m a').format('X'); + ttime = moment(time[1], 'h:m a').format('X'); + if (ttime >= sunrise && ttime <= sunset) { + $('.time .fa').removeClass('fa-moon-o fa-circle-o'); + $('.time .fa').addClass('fa-sun-o'); + } else { + $('.time .fa').removeClass('fa-sun-o fa-circle-o'); + $('.time .fa').addClass('fa-moon-o'); + } + }), 3000); + $('.top-container').addClass('fadeIn'); + } + }); + break; + } + $('.val').each(function() { + $(this).on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).removeClass('fadeIn'); + }); + }); +}; + + +/* +Uptimey - https://github.com/stefanbc/uptimey + +Licensed under the MIT license + +Copyright (c) 2014 Stefan Cosma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + */ + +$(document).ready(function() { + + /* Start initial load */ + $('.top-container').addClass('animated'); + $('.bottom-container').addClass('animated'); + $('.val').addClass('animated'); + $('.button').addClass('animated'); + output('image'); + output('location'); + output('uptime'); + output('time'); + + /* End initial load */ + + /* At an interval of 1 min we refresh the uptime and time */ + setInterval((function() { + output('uptime'); + output('time'); + }), 1000 * 60); + + /* Click action on each top button */ + $('.button').each(function() { + $(this).on('click', function() { + var buttonAction; + buttonAction = $(this).attr('data-action'); + action(buttonAction); + }); + }); + + /* Click action for location */ + $('#location').on('click', function() { + var latlong; + latlong = $(this).attr('data-latlong'); + window.location.href = "https://www.google.com/maps/place/" + latlong; + }); +}); diff --git a/gruntfile.js b/gruntfile.js index 936e2c2..0a43150 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -9,7 +9,7 @@ module.exports = function(grunt) { removeComments: true }, files: { - 'index.html': 'core/client/lib/template/mainview.html' + 'index.html': 'core/client/lib/view/mainview.html' } } }, @@ -23,28 +23,33 @@ module.exports = function(grunt) { } } }, - concat: { - dist: { - src : ['core/client/lib/js/actioncontroller.js', 'core/client/lib/js/initcontroller.js'], - dest : 'core/dest/js/app.min.js' - } - }, - uglify: { - js: { + coffee: { + compileJoined: { + options: { + bare : true, + join : true + }, files: { - 'core/dest/js/app.min.js': ['core/dest/js/app.min.js'] + 'core/dest/js/app.min.js': ['core/client/lib/*.coffee'] } - } + } }, + // uglify: { + // js: { + // files: { + // 'core/dest/js/app.min.js': ['core/dest/js/app.min.js'] + // } + // } + // }, watch: { - files: ['core/client/lib/template/*.html', 'core/client/lib/style/*.scss', 'core/client/lib/js/*.js'], - tasks: ['htmlmin', 'sass', 'concat', 'uglify'] + files: ['core/client/lib/view/*.html', 'core/client/lib/style/*.scss', 'core/client/lib/*.coffee'], + tasks: ['htmlmin', 'sass', 'coffee'] } }); grunt.loadNpmTasks('grunt-contrib-htmlmin'); grunt.loadNpmTasks('grunt-contrib-sass'); - grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-coffee'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.registerTask('default', ['htmlmin', 'sass', 'concat', 'uglify']); + grunt.registerTask('default', ['htmlmin', 'sass', 'coffee']); }; \ No newline at end of file From c2b4c5eeb117c2070e22ce3079f00132455c6526 Mon Sep 17 00:00:00 2001 From: Stefan Cosma Date: Sat, 9 Apr 2016 19:18:33 +0300 Subject: [PATCH 37/68] Re-enabled uglify --- core/dest/js/app.min.js | 377 +--------------------------------------- gruntfile.js | 18 +- 2 files changed, 10 insertions(+), 385 deletions(-) diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index a911102..aacbaef 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1,376 +1 @@ - -/* -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - */ - -/* Project details */ -var action, globalFile, globalLocation, globalSunrise, globalSunset, output, projectLink, ref; - -projectLink = 'https://github.com/stefanbc/uptimey'; - - -/* Set the global vars */ - -ref = '', globalLocation = ref.globalLocation, globalSunrise = ref.globalSunrise, globalSunset = ref.globalSunset; - - -/* Set the global files */ - -globalFile = './core/client/lib/controllers/maincontroller.php'; - - -/* -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - */ - - -/* Button action */ - -action = function(type) { - var hashtag, screenshotButton, status, text, uptime; - status = ''; - switch (type) { - case 'toggle': - status = $('.toggle-button').attr('data-status'); - if (status === 'closed') { - $('.button-container').animate({ - top: 0 - }); - $('.toggle-button').attr('data-status', 'open'); - $('.toggle-button').removeClass('fa-angle-double-down'); - $('.toggle-button').addClass('fa-angle-double-up'); - } else if (status === 'open') { - $('.button-container').animate({ - top: '-80px' - }); - $('.toggle-button').attr('data-status', 'closed'); - $('.toggle-button').removeClass('fa-angle-double-up'); - $('.toggle-button').addClass('fa-angle-double-down'); - } - break; - case 'adv': - $('.adv-button').addClass('pulse'); - $('.adv-button').on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { - $(this).removeClass('pulse'); - }); - status = $('.adv-button').attr('data-status'); - if (status === 'default') { - $('.adv-button').attr('data-status', 'advanced'); - $('.adv-button').addClass('active'); - $('.default-panel').fadeOut(500); - $('.advanced-panel').fadeIn(500); - $.ajax(globalFile, { - method: 'GET', - data: { - action: 'advanced', - flag: 'advanced' - }, - success: function(notice) { - $('.advanced-panel .top-container').html(notice); - } - }); - } else if (status === 'advanced') { - $('.adv-button').attr('data-status', 'default'); - $('.adv-button').removeClass('active'); - $('.advanced-panel').fadeOut(500); - $('.default-panel').fadeIn(500); - } - break; - case 'refresh': - $('.refresh-button').addClass('fa-spin'); - output('uptime', 'refresh'); - output('time', 'refresh'); - setTimeout((function() { - $('.refresh-button').removeClass('fa-spin'); - }), 1000); - break; - case 'twitter': - $('.twitter-button').addClass('pulse'); - $('.twitter-button').on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { - $(this).removeClass('pulse'); - }); - uptime = ''; - if ($('#days').attr('data-value') !== 0) { - uptime += $('#days').attr('data-value') + ' days '; - } - if ($('#hours').attr('data-value') !== 0) { - uptime += $('#hours').attr('data-value') + ' hours '; - } - if ($('#minutes').attr('data-value') !== 0) { - uptime += $('#minutes').attr('data-value') + ' minutes'; - } - text = uptime + ' server uptime. Can you beat this? via'; - hashtag = 'uptimey,devops'; - window.open("http://twitter.com/share?url=" + projectLink + "&text=" + text + "&hashtags=" + hashtag + "&", 'twitterwindow', 'height=450, width=550, top=' + $(window).height() / 2 - 225 + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0'); - break; - case 'screenshot': - screenshotButton = $('.screenshot-button'); - screenshotButton.addClass('pulse'); - screenshotButton.on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { - $(this).removeClass('pulse'); - }); - if (screenshotButton.hasClass('fa-camera')) { - screenshotButton.removeClass('fa-camera').addClass('fa-download'); - html2canvas(document.body, { - onrendered: function(canvas) { - var dataURL, fileName; - dataURL = canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream'); - screenshotButton.attr('href', dataURL); - fileName = moment().format('DDMMYYYYHHmmss'); - screenshotButton.attr('download', 'Screenshot_' + fileName + '.png'); - } - }); - } else { - setTimeout((function() { - screenshotButton.removeClass('fa-download').addClass('fa-camera'); - return screenshotButton.removeAttr('href').removeAttr('download'); - }), 3000); - } - break; - case 'clear': - $.ajax(globalFile, { - method: 'GET', - data: { - action: 'clear' - } - }); - } -}; - - -/* -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - */ - - -/* Output the data requested */ - -output = function(type, setFlag) { - switch (type) { - case 'image': - $.ajax(globalFile, { - method: 'GET', - data: { - action: type - }, - success: function(image) { - var copyrightText; - image = image.split(';'); - $('body').css('backgroundImage', "url(" + image[0] + ")"); - copyrightText = "Built using Uptimey. Fork on Github. Image by Unsplash."; - $('#copy').html(copyrightText); - } - }); - break; - case 'location': - $.ajax(globalFile, { - method: 'GET', - data: { - action: type - }, - success: function(location) { - var ip_geocode; - ip_geocode = "http://ipinfo.io/" + location; - $.getJSON(ip_geocode, function(response) { - var latlong; - $('#location').text(response.city + ", " + response.region + ", " + response.country).addClass('fadeIn'); - latlong = response.loc.split(','); - $('#location').attr('data-latlong', latlong[0] + "+" + latlong[1]); - globalLocation = response.city + ", " + response.region + ", " + response.country; - $.simpleWeather({ - location: globalLocation, - success: function(weather) { - globalSunrise = weather.sunrise; - globalSunset = weather.sunset; - } - }); - }); - $('.location-inner').addClass('fadeIn'); - } - }); - break; - case 'uptime': - $.ajax(globalFile, { - method: 'GET', - data: { - action: type, - flag: setFlag - }, - success: function(uptime) { - uptime = uptime.split(';'); - $('#days').text(uptime[0]).addClass('fadeIn'); - $('#days').attr('data-value', uptime[0]); - $('#hours').text(uptime[1]).addClass('fadeIn'); - $('#hours').attr('data-value', uptime[1]); - $('#minutes').text(uptime[2]).addClass('fadeIn'); - $('#minutes').attr('data-value', uptime[2]); - $('.bottom-container').addClass('fadeIn'); - } - }); - break; - case 'time': - $.ajax(globalFile, { - method: 'GET', - data: { - action: type, - flag: setFlag - }, - success: function(time) { - time = time.split(';'); - $('#current').text(time[0]).addClass('fadeIn'); - $('#time').text(time[1]).addClass('fadeIn'); - $('#since').text(time[2]).addClass('fadeIn'); - setTimeout((function() { - var sunrise, sunset, ttime; - sunrise = moment(globalSunrise, 'h:m a').format('X'); - sunset = moment(globalSunset, 'h:m a').format('X'); - ttime = moment(time[1], 'h:m a').format('X'); - if (ttime >= sunrise && ttime <= sunset) { - $('.time .fa').removeClass('fa-moon-o fa-circle-o'); - $('.time .fa').addClass('fa-sun-o'); - } else { - $('.time .fa').removeClass('fa-sun-o fa-circle-o'); - $('.time .fa').addClass('fa-moon-o'); - } - }), 3000); - $('.top-container').addClass('fadeIn'); - } - }); - break; - } - $('.val').each(function() { - $(this).on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { - $(this).removeClass('fadeIn'); - }); - }); -}; - - -/* -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - */ - -$(document).ready(function() { - - /* Start initial load */ - $('.top-container').addClass('animated'); - $('.bottom-container').addClass('animated'); - $('.val').addClass('animated'); - $('.button').addClass('animated'); - output('image'); - output('location'); - output('uptime'); - output('time'); - - /* End initial load */ - - /* At an interval of 1 min we refresh the uptime and time */ - setInterval((function() { - output('uptime'); - output('time'); - }), 1000 * 60); - - /* Click action on each top button */ - $('.button').each(function() { - $(this).on('click', function() { - var buttonAction; - buttonAction = $(this).attr('data-action'); - action(buttonAction); - }); - }); - - /* Click action for location */ - $('#location').on('click', function() { - var latlong; - latlong = $(this).attr('data-latlong'); - window.location.href = "https://www.google.com/maps/place/" + latlong; - }); -}); +var action,globalFile,globalLocation,globalSunrise,globalSunset,output,projectLink,ref;projectLink="https://github.com/stefanbc/uptimey",ref="",globalLocation=ref.globalLocation,globalSunrise=ref.globalSunrise,globalSunset=ref.globalSunset,globalFile="./core/client/lib/controllers/maincontroller.php",action=function(a){var b,c,d,e,f;switch(d="",a){case"toggle":d=$(".toggle-button").attr("data-status"),"closed"===d?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===d&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d=$(".adv-button").attr("data-status"),"default"===d?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(globalFile,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===d&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),output("uptime","refresh"),output("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),f="",0!==$("#days").attr("data-value")&&(f+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(f+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(f+=$("#minutes").attr("data-value")+" minutes"),e=f+" server uptime. Can you beat this? via",b="uptimey,devops",window.open("http://twitter.com/share?url="+projectLink+"&text="+e+"&hashtags="+b+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":c=$(".screenshot-button"),c.addClass("pulse"),c.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),c.hasClass("fa-camera")?(c.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,d;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),c.attr("href",b),d=moment().format("DDMMYYYYHHmmss"),c.attr("download","Screenshot_"+d+".png")}})):setTimeout(function(){return c.removeClass("fa-download").addClass("fa-camera"),c.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(globalFile,{method:"GET",data:{action:"clear"}})}},output=function(a,b){switch(a){case"image":$.ajax(globalFile,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Built using Uptimey. Fork on Github. Image by Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(globalFile,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),globalLocation=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:globalLocation,success:function(a){globalSunrise=a.sunrise,globalSunset=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(globalFile,{method:"GET",data:{action:a,flag:b},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(globalFile,{method:"GET",data:{action:a,flag:b},success:function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,d;b=moment(globalSunrise,"h:m a").format("X"),c=moment(globalSunset,"h:m a").format("X"),d=moment(a[1],"h:m a").format("X"),d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},$(document).ready(function(){$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),output("image"),output("location"),output("uptime"),output("time"),setInterval(function(){output("uptime"),output("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var a;a=$(this).attr("data-action"),action(a)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})}); \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index 0a43150..a66a3f7 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -34,16 +34,16 @@ module.exports = function(grunt) { } } }, - // uglify: { - // js: { - // files: { - // 'core/dest/js/app.min.js': ['core/dest/js/app.min.js'] - // } - // } - // }, + uglify: { + js: { + files: { + 'core/dest/js/app.min.js': ['core/dest/js/app.min.js'] + } + } + }, watch: { files: ['core/client/lib/view/*.html', 'core/client/lib/style/*.scss', 'core/client/lib/*.coffee'], - tasks: ['htmlmin', 'sass', 'coffee'] + tasks: ['htmlmin', 'sass', 'coffee', 'uglify'] } }); grunt.loadNpmTasks('grunt-contrib-htmlmin'); @@ -51,5 +51,5 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-coffee'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.registerTask('default', ['htmlmin', 'sass', 'coffee']); + grunt.registerTask('default', ['htmlmin', 'sass', 'coffee', 'uglify']); }; \ No newline at end of file From 39f97530e1ed68f7a2caf3ee834a841033b2e858 Mon Sep 17 00:00:00 2001 From: stefanbc Date: Sat, 9 Apr 2016 20:34:11 +0300 Subject: [PATCH 38/68] Fined tuned the requires and improved the init call --- core/client/lib/_globals.coffee | 3 ++- core/client/lib/controllers/maincontroller.php | 2 +- core/client/lib/datacontroller.coffee | 4 ++-- core/client/lib/initcontroller.coffee | 11 +++++++---- core/client/lib/js/require.config.js | 4 ++-- core/client/lib/view/mainview.html | 4 ++-- core/dest/css/screen.min.css | 2 -- core/dest/css/screen.min.css.map | 7 ------- core/dest/js/app.min.js | 2 +- gruntfile.js | 1 - index.html | 2 +- 11 files changed, 18 insertions(+), 24 deletions(-) delete mode 100644 core/dest/css/screen.min.css delete mode 100644 core/dest/css/screen.min.css.map diff --git a/core/client/lib/_globals.coffee b/core/client/lib/_globals.coffee index 13a5743..702ce6d 100644 --- a/core/client/lib/_globals.coffee +++ b/core/client/lib/_globals.coffee @@ -29,6 +29,7 @@ projectLink = 'https://github.com/stefanbc/uptimey' ### Set the global vars### { globalLocation, globalSunrise, globalSunset } = '' +moment = require('moment'); ### Set the global files ### -globalFile = './core/client/lib/controllers/maincontroller.php' \ No newline at end of file +globalFile = './core/client/lib/controllers/maincontroller.php' \ No newline at end of file diff --git a/core/client/lib/controllers/maincontroller.php b/core/client/lib/controllers/maincontroller.php index e593230..2f8aed8 100644 --- a/core/client/lib/controllers/maincontroller.php +++ b/core/client/lib/controllers/maincontroller.php @@ -61,7 +61,7 @@ case 'location': // Get the IP // From third party - $getIP = shell_exec('wget -qO- curlmyip.com'); + $getIP = shell_exec('wget -qO- ifconfig.co'); // Backup if (empty($getIP)) { // Using PHP var diff --git a/core/client/lib/datacontroller.coffee b/core/client/lib/datacontroller.coffee index 23f5427..f67c4a0 100644 --- a/core/client/lib/datacontroller.coffee +++ b/core/client/lib/datacontroller.coffee @@ -104,8 +104,8 @@ output = (type, setFlag) -> # Format the times setTimeout (-> sunrise = moment(globalSunrise, 'h:m a').format('X') - sunset = moment(globalSunset, 'h:m a').format('X') - ttime = moment(time[1], 'h:m a').format('X') + sunset = moment(globalSunset, 'h:m a').format('X') + ttime = moment(time[1], 'h:m a').format('X') # Check if the current time is between sunset, sunrise and set the icon if ttime >= sunrise and ttime <= sunset $('.time .fa').removeClass 'fa-moon-o fa-circle-o' diff --git a/core/client/lib/initcontroller.coffee b/core/client/lib/initcontroller.coffee index 296b8a4..91410c0 100644 --- a/core/client/lib/initcontroller.coffee +++ b/core/client/lib/initcontroller.coffee @@ -24,10 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ### -# When the page finishes loading -$(document).ready -> - - ### Start initial load ### +init = -> # Add the animation base class $('.top-container').addClass 'animated' $('.bottom-container').addClass 'animated' @@ -41,6 +38,12 @@ $(document).ready -> output 'uptime' # Get the time (let uptime be the first request so that the session updates needed values for time) output 'time' + +# When the page finishes loading +$ -> + + ### Start initial load ### + init() ### End initial load ### ### At an interval of 1 min we refresh the uptime and time ### diff --git a/core/client/lib/js/require.config.js b/core/client/lib/js/require.config.js index e0888a0..650a1dc 100644 --- a/core/client/lib/js/require.config.js +++ b/core/client/lib/js/require.config.js @@ -10,9 +10,9 @@ requirejs.config({ shim: { 'moment' : ['jQuery'], 'weather' : ['jQuery'], - 'app': { + 'app' : { deps : ['jQuery', 'moment', 'weather', 'html2canvas'] } }, - waitSeconds: 15 + waitSeconds: 5 }); \ No newline at end of file diff --git a/core/client/lib/view/mainview.html b/core/client/lib/view/mainview.html index fd44dfc..c2a759b 100644 --- a/core/client/lib/view/mainview.html +++ b/core/client/lib/view/mainview.html @@ -35,7 +35,7 @@ - +
@@ -95,7 +95,7 @@

Your server's uptime until now...

- + \ No newline at end of file +Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file From dbf5d32a0ee1c4e318ee7a8a661df2ebfe510ad9 Mon Sep 17 00:00:00 2001 From: stefanbc Date: Sun, 10 Apr 2016 11:23:28 +0300 Subject: [PATCH 39/68] Modified copyright text and updated advanced section --- core/client/lib/controllers/maincontroller.php | 2 +- core/client/lib/datacontroller.coffee | 3 ++- core/dest/js/app.min.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/client/lib/controllers/maincontroller.php b/core/client/lib/controllers/maincontroller.php index 2f8aed8..565ba15 100644 --- a/core/client/lib/controllers/maincontroller.php +++ b/core/client/lib/controllers/maincontroller.php @@ -147,7 +147,7 @@ echo ""; echo "Hostname: " . shell_exec('/bin/hostname') . "
"; echo "OS: " . shell_exec('/usr/bin/lsb_release -ds;/bin/uname -r') . "
"; - echo "External IP: " . shell_exec('wget -qO- curlmyip.com') . "
"; + echo "External IP: " . shell_exec('wget -qO- ifconfig.co') . "
"; echo "
"; echo "
"; echo "This section is in development. Checkout the dev branch for more info."; diff --git a/core/client/lib/datacontroller.coffee b/core/client/lib/datacontroller.coffee index f67c4a0..3c451b7 100644 --- a/core/client/lib/datacontroller.coffee +++ b/core/client/lib/datacontroller.coffee @@ -38,7 +38,8 @@ output = (type, setFlag) -> # Add the image as background-image on body $('body').css 'backgroundImage', "url(#{image[0]})" # Set the copyright - copyrightText = "Built using Uptimey. Fork on Github. Image by Unsplash." + copyrightText = "Made with Uptimey." + copyrightText += "Image from Unsplash." $('#copy').html copyrightText return when 'location' diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index 0666974..3030fd6 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1 @@ -(function(){var a,b,c,d,e,f,g,h,i,j;i="https://github.com/stefanbc/uptimey",j="",c=j.globalLocation,d=j.globalSunrise,e=j.globalSunset,g=require("moment"),b="./core/client/lib/controllers/maincontroller.php",a=function(a){var c,d,e,f,j;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".adv-button").attr("data-status"),"default"===e?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(b,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),h("uptime","refresh"),h("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),j="",0!==$("#days").attr("data-value")&&(j+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(j+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(j+=$("#minutes").attr("data-value")+" minutes"),f=j+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+i+"&text="+f+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=g().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(b,{method:"GET",data:{action:"clear"}})}},h=function(a,f){switch(a){case"image":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Built using Uptimey. Fork on Github. Image by Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),c=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:c,success:function(a){d=a.sunrise,e=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,f;b=g(d,"h:m a").format("X"),c=g(e,"h:m a").format("X"),f=g(a[1],"h:m a").format("X"),f>=b&&c>=f?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},f=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),h("image"),h("location"),h("uptime"),h("time")},$(function(){f(),setInterval(function(){h("uptime"),h("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file +(function(){var a,b,c,d,e,f,g,h,i,j;i="https://github.com/stefanbc/uptimey",j="",c=j.globalLocation,d=j.globalSunrise,e=j.globalSunset,g=require("moment"),b="./core/client/lib/controllers/maincontroller.php",a=function(a){var c,d,e,f,j;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".adv-button").attr("data-status"),"default"===e?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(b,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),h("uptime","refresh"),h("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),j="",0!==$("#days").attr("data-value")&&(j+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(j+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(j+=$("#minutes").attr("data-value")+" minutes"),f=j+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+i+"&text="+f+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=g().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(b,{method:"GET",data:{action:"clear"}})}},h=function(a,f){switch(a){case"image":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey.",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),c=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:c,success:function(a){d=a.sunrise,e=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,f;b=g(d,"h:m a").format("X"),c=g(e,"h:m a").format("X"),f=g(a[1],"h:m a").format("X"),f>=b&&c>=f?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},f=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),h("image"),h("location"),h("uptime"),h("time")},$(function(){f(),setInterval(function(){h("uptime"),h("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file From 798f3190c53acbb3c9a71c7aabfaa027a8afe739 Mon Sep 17 00:00:00 2001 From: stefanbc Date: Mon, 11 Apr 2016 00:48:03 +0300 Subject: [PATCH 40/68] Minor improvements to the UI and started implementing the online feature --- core/client/lib/_globals.coffee | 8 ++--- core/client/lib/actioncontroller.coffee | 7 ++-- .../client/lib/controllers/maincontroller.php | 5 +++ core/client/lib/datacontroller.coffee | 18 ++++++++-- core/client/lib/initcontroller.coffee | 3 ++ core/client/lib/style/global.scss | 34 +++++++++++++++++-- core/dest/css/global.min.css | 2 +- core/dest/css/global.min.css.map | 2 +- core/dest/js/app.min.js | 2 +- 9 files changed, 67 insertions(+), 14 deletions(-) diff --git a/core/client/lib/_globals.coffee b/core/client/lib/_globals.coffee index 702ce6d..c2bd2da 100644 --- a/core/client/lib/_globals.coffee +++ b/core/client/lib/_globals.coffee @@ -27,9 +27,9 @@ SOFTWARE. ### Project details ### projectLink = 'https://github.com/stefanbc/uptimey' +### Set the global files ### +globalFile = './core/client/lib/controllers/maincontroller.php' + ### Set the global vars### -{ globalLocation, globalSunrise, globalSunset } = '' moment = require('moment'); - -### Set the global files ### -globalFile = './core/client/lib/controllers/maincontroller.php' \ No newline at end of file +{ globalLocation, globalSunrise, globalSunset } = '' \ No newline at end of file diff --git a/core/client/lib/actioncontroller.coffee b/core/client/lib/actioncontroller.coffee index fc8d4c4..f1e11ae 100644 --- a/core/client/lib/actioncontroller.coffee +++ b/core/client/lib/actioncontroller.coffee @@ -87,6 +87,7 @@ action = (type) -> # Refresh the values output 'uptime', 'refresh' output 'time', 'refresh' + output 'ping' # Stop animation after 1s setTimeout (-> $('.refresh-button').removeClass 'fa-spin' @@ -102,11 +103,11 @@ action = (type) -> # The action # Get the current uptime uptime = '' - if $('#days').attr('data-value') != 0 + if $('#days').attr('data-value') isnt 0 uptime += $('#days').attr('data-value') + ' days ' - if $('#hours').attr('data-value') != 0 + if $('#hours').attr('data-value') isnt 0 uptime += $('#hours').attr('data-value') + ' hours ' - if $('#minutes').attr('data-value') != 0 + if $('#minutes').attr('data-value') isnt 0 uptime += $('#minutes').attr('data-value') + ' minutes' # Set the tweet text = uptime + ' server uptime. Can you beat this? via' diff --git a/core/client/lib/controllers/maincontroller.php b/core/client/lib/controllers/maincontroller.php index 565ba15..b62e942 100644 --- a/core/client/lib/controllers/maincontroller.php +++ b/core/client/lib/controllers/maincontroller.php @@ -159,5 +159,10 @@ session_unset(); session_destroy(); break; + case 'ping': + $host = 'www.google.com'; + exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval); + echo $rval === 0; + break; } ?> \ No newline at end of file diff --git a/core/client/lib/datacontroller.coffee b/core/client/lib/datacontroller.coffee index 3c451b7..9d565a5 100644 --- a/core/client/lib/datacontroller.coffee +++ b/core/client/lib/datacontroller.coffee @@ -38,7 +38,7 @@ output = (type, setFlag) -> # Add the image as background-image on body $('body').css 'backgroundImage', "url(#{image[0]})" # Set the copyright - copyrightText = "Made with Uptimey." + copyrightText = "Made with Uptimey. " copyrightText += "Image from Unsplash." $('#copy').html copyrightText return @@ -100,7 +100,9 @@ output = (type, setFlag) -> time = time.split(';') # Set the times $('#current').text(time[0]).addClass 'fadeIn' - $('#time').text(time[1]).addClass 'fadeIn' + # Set blinking time + outputTime = time[1].split(':'); + $('#time').html("#{outputTime[0]}:#{outputTime[1]}").addClass 'fadeIn' $('#since').text(time[2]).addClass 'fadeIn' # Format the times setTimeout (-> @@ -119,6 +121,18 @@ output = (type, setFlag) -> # We only animate the whole container once $('.top-container').addClass 'fadeIn' return + when 'ping' + $.ajax globalFile, + method : 'GET' + data : + action : type + success: (ping) -> + console.log ping + if ping is true + console.log "Online" + else + console.log "Offline" + return break # After the animation is done remove the class so # we can animate again on next iteration diff --git a/core/client/lib/initcontroller.coffee b/core/client/lib/initcontroller.coffee index 91410c0..0c1d9c9 100644 --- a/core/client/lib/initcontroller.coffee +++ b/core/client/lib/initcontroller.coffee @@ -38,6 +38,8 @@ init = -> output 'uptime' # Get the time (let uptime be the first request so that the session updates needed values for time) output 'time' + # Check if server is online + output 'ping' # When the page finishes loading $ -> @@ -50,6 +52,7 @@ $ -> setInterval (-> output 'uptime' output 'time' + output 'ping' return ), 1000 * 60 diff --git a/core/client/lib/style/global.scss b/core/client/lib/style/global.scss index 3cf02e9..0c11bc8 100644 --- a/core/client/lib/style/global.scss +++ b/core/client/lib/style/global.scss @@ -61,6 +61,35 @@ $font_0: Raleway, sans-serif; -ms-transition: all 0.5s ease; transition: all 0.5s ease; } +@mixin keyframes($animation-name) { + @-webkit-keyframes #{$animation-name} { + @content; + } + @-moz-keyframes #{$animation-name} { + @content; + } + @-ms-keyframes #{$animation-name} { + @content; + } + @-o-keyframes #{$animation-name} { + @content; + } + @keyframes #{$animation-name} { + @content; + } +} +@mixin animation($str) { + -webkit-animation: #{$str}; + -moz-animation: #{$str}; + -ms-animation: #{$str}; + -o-animation: #{$str}; + animation: #{$str}; +} +@include keyframes(blink) { + 0% { opacity: 0; } + 50% { opacity: 1; } + 100% { opacity: 0; } +} // // Global @@ -87,6 +116,9 @@ a { text-decoration: underline; } } +.blink { + @include animation('blink 2s infinite'); +} // // Layout and UI @@ -206,8 +238,6 @@ a { .fa { font-size: 3em; margin-right: 15px; - margin-top: 15px; - vertical-align: top; } .fa-sun-o { color: #ffd900; diff --git a/core/dest/css/global.min.css b/core/dest/css/global.min.css index b0b6a90..2fc165a 100644 --- a/core/dest/css/global.min.css +++ b/core/dest/css/global.min.css @@ -1,2 +1,2 @@ -.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}a,.button-container .button{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover,a:focus{text-decoration:underline}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button:hover{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button:hover{color:#55acee}.button-container .screenshot-button{text-decoration:none}.button-container .screenshot-button:hover{color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px;margin-top:15px;vertical-align:top}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} +.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}a,.button-container .button{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}@-webkit-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-moz-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-ms-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-o-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover,a:focus{text-decoration:underline}.blink{-webkit-animation:blink 2s infinite;-moz-animation:blink 2s infinite;-ms-animation:blink 2s infinite;-o-animation:blink 2s infinite;animation:blink 2s infinite}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button:hover{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button:hover{color:#55acee}.button-container .screenshot-button{text-decoration:none}.button-container .screenshot-button:hover{color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} /*# sourceMappingURL=global.min.css.map */ diff --git a/core/dest/css/global.min.css.map b/core/dest/css/global.min.css.map index 86b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,CACjB,iDAAqB,CAER,aAAa,CAAE,IAAI,CAEhC,kDAAsB,CAET,aAAa,CAAE,IAAI,CAEhC,mCAAK,CACJ,OAAO,CAAE,KAAK,CACd,SAAS,CAAE,GAAG,CACd,cAAc,CAAE,IAAI,CAErB,qCAAO,CACN,cAAc,CAAE,UAAU,CAI7B,oBAAG,CACF,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,KAAK,CAChB,aAAa,CAAE,KAAK,CAGtB,MAAO,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CAnSI,IAAI,CAoSb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", "sources": ["../../client/lib/style/global.scss"], "names": [], "file": "global.min.css" diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index 3030fd6..5402622 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1 @@ -(function(){var a,b,c,d,e,f,g,h,i,j;i="https://github.com/stefanbc/uptimey",j="",c=j.globalLocation,d=j.globalSunrise,e=j.globalSunset,g=require("moment"),b="./core/client/lib/controllers/maincontroller.php",a=function(a){var c,d,e,f,j;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".adv-button").attr("data-status"),"default"===e?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(b,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),h("uptime","refresh"),h("time","refresh"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),j="",0!==$("#days").attr("data-value")&&(j+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(j+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(j+=$("#minutes").attr("data-value")+" minutes"),f=j+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+i+"&text="+f+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=g().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(b,{method:"GET",data:{action:"clear"}})}},h=function(a,f){switch(a){case"image":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey.",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),c=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:c,success:function(a){d=a.sunrise,e=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),$("#time").text(a[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,f;b=g(d,"h:m a").format("X"),c=g(e,"h:m a").format("X"),f=g(a[1],"h:m a").format("X"),f>=b&&c>=f?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},f=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),h("image"),h("location"),h("uptime"),h("time")},$(function(){f(),setInterval(function(){h("uptime"),h("time")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file +(function(){var a,b,c,d,e,f,g,h,i,j;i="https://github.com/stefanbc/uptimey",b="./core/client/lib/controllers/maincontroller.php",g=require("moment"),j="",c=j.globalLocation,d=j.globalSunrise,e=j.globalSunset,a=function(a){var c,d,e,f,j;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".adv-button").attr("data-status"),"default"===e?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(b,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),h("uptime","refresh"),h("time","refresh"),h("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),j="",0!==$("#days").attr("data-value")&&(j+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(j+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(j+=$("#minutes").attr("data-value")+" minutes"),f=j+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+i+"&text="+f+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=g().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(b,{method:"GET",data:{action:"clear"}})}},h=function(a,f){switch(a){case"image":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey. ",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),c=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:c,success:function(a){d=a.sunrise,e=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,f;b=g(d,"h:m a").format("X"),c=g(e,"h:m a").format("X"),f=g(a[1],"h:m a").format("X"),f>=b&&c>=f?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(b,{method:"GET",data:{action:a},success:function(a){console.log(a),a===!0?console.log("Online"):console.log("Offline")}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},f=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),h("image"),h("location"),h("uptime"),h("time"),h("ping")},$(function(){f(),setInterval(function(){h("uptime"),h("time"),h("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file From cfdabb63cf178fd1c6d0cb22deda1768074eff41 Mon Sep 17 00:00:00 2001 From: stefanbc Date: Mon, 11 Apr 2016 19:18:20 +0300 Subject: [PATCH 41/68] Modified check if available feature and added notice function --- core/client/lib/controllers/maincontroller.php | 17 ++++++++++++++--- core/client/lib/datacontroller.coffee | 13 +++++++------ core/client/lib/style/global.scss | 12 ++++++++++++ core/dest/css/global.min.css | 2 +- core/dest/css/global.min.css.map | 2 +- core/dest/js/app.min.js | 2 +- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/core/client/lib/controllers/maincontroller.php b/core/client/lib/controllers/maincontroller.php index b62e942..9c4bb41 100644 --- a/core/client/lib/controllers/maincontroller.php +++ b/core/client/lib/controllers/maincontroller.php @@ -160,9 +160,20 @@ session_destroy(); break; case 'ping': - $host = 'www.google.com'; - exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval); - echo $rval === 0; + $server = 'localhost'; + $port = '80'; + $status = 'unavailable'; + $fp = @fsockopen($server, $port, $errno, $errstr,5); + if ($fp) { + $status = 'alive, but not responding'; + fwrite($fp, "HEAD / HTTP/1.0\r\n"); + fwrite($fp, "Host: $server:$port\r\n\r\n"); + if (strlen(@fread($fp, 1024)) > 0) { + $status = 'alive and kicking'; + } + fclose($fp); + } + echo "The server is $status."; break; } ?> \ No newline at end of file diff --git a/core/client/lib/datacontroller.coffee b/core/client/lib/datacontroller.coffee index 9d565a5..6fc00ff 100644 --- a/core/client/lib/datacontroller.coffee +++ b/core/client/lib/datacontroller.coffee @@ -24,6 +24,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ### +notice = (text) -> + $('.notice').remove() + $('body').append "
#{text}
" + ### Output the data requested ### output = (type, setFlag) -> switch type @@ -126,13 +130,10 @@ output = (type, setFlag) -> method : 'GET' data : action : type + error : (jqXHR, status) -> + notice status success: (ping) -> - console.log ping - if ping is true - console.log "Online" - else - console.log "Offline" - return + notice ping break # After the animation is done remove the class so # we can animate again on next iteration diff --git a/core/client/lib/style/global.scss b/core/client/lib/style/global.scss index 0c11bc8..18059ba 100644 --- a/core/client/lib/style/global.scss +++ b/core/client/lib/style/global.scss @@ -119,6 +119,18 @@ a { .blink { @include animation('blink 2s infinite'); } +.notice { + position: absolute; + bottom: 0; + left: 50%; + -webkit-transform: translateX(-50%); + -moz-transform: translateX(-50%); + -o-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + background: rgba(0,0,0,.7); + padding: 35px; +} // // Layout and UI diff --git a/core/dest/css/global.min.css b/core/dest/css/global.min.css index 2fc165a..a15d5cc 100644 --- a/core/dest/css/global.min.css +++ b/core/dest/css/global.min.css @@ -1,2 +1,2 @@ -.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}a,.button-container .button{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}@-webkit-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-moz-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-ms-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-o-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover,a:focus{text-decoration:underline}.blink{-webkit-animation:blink 2s infinite;-moz-animation:blink 2s infinite;-ms-animation:blink 2s infinite;-o-animation:blink 2s infinite;animation:blink 2s infinite}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button:hover{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button:hover{color:#55acee}.button-container .screenshot-button{text-decoration:none}.button-container .screenshot-button:hover{color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} +.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}a,.button-container .button{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}@-webkit-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-moz-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-ms-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-o-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover,a:focus{text-decoration:underline}.blink{-webkit-animation:blink 2s infinite;-moz-animation:blink 2s infinite;-ms-animation:blink 2s infinite;-o-animation:blink 2s infinite;animation:blink 2s infinite}.notice{position:absolute;bottom:0;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-o-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);background:rgba(0,0,0,0.7);padding:35px}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button:hover{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button:hover{color:#55acee}.button-container .screenshot-button{text-decoration:none}.button-container .screenshot-button:hover{color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} /*# sourceMappingURL=global.min.css.map */ diff --git a/core/dest/css/global.min.css.map b/core/dest/css/global.min.css.map index 5a53207..aeca384 100644 --- a/core/dest/css/global.min.css.map +++ b/core/dest/css/global.min.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AA4CA,0IAAQ,CACJ,OAAO,CAAE,EAAE,CACX,MAAM,CAAE,GAAG,CACX,UAAU,CAAE,yEAA0F,CACtG,UAAU,CAAE,mIAAgJ,CAC5J,UAAU,CAAE,4EAA2F,CACvG,UAAU,CAAE,uEAAsF,CAClG,UAAU,CAAE,wEAAuF,CACnG,UAAU,CAAE,wEAAuF,CACnG,MAAM,CAAE,+GAA+G,CACvH,OAAO,CAAE,KAAK,CAElB,2BAAY,CACR,kBAAkB,CAAE,aAAa,CACjC,eAAe,CAAE,aAAa,CAC9B,aAAa,CAAE,aAAa,CAC5B,cAAc,CAAE,aAAa,CAC7B,UAAU,CAAE,aAAa,CAGzB,wBAEC,CAsBD,EAAG,CAAE,OAAO,CAAE,CAAC,CACf,GAAI,CAAE,OAAO,CAAE,CAAC,CAChB,IAAK,CAAE,OAAO,CAAE,CAAC,EAvBjB,qBAEC,CAmBD,EAAG,CAAE,OAAO,CAAE,CAAC,CACf,GAAI,CAAE,OAAO,CAAE,CAAC,CAChB,IAAK,CAAE,OAAO,CAAE,CAAC,EApBjB,oBAEC,CAgBD,EAAG,CAAE,OAAO,CAAE,CAAC,CACf,GAAI,CAAE,OAAO,CAAE,CAAC,CAChB,IAAK,CAAE,OAAO,CAAE,CAAC,EAjBjB,mBAEC,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M,CAAE,MAAM,CACd,8BAAK,CACJ,KAAK,CAAE,GAAG,CACV,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,IAAI,CACjB,iDAAqB,CAER,aAAa,CAAE,IAAI,CAEhC,kDAAsB,CAET,aAAa,CAAE,IAAI,CAEhC,mCAAK,CACJ,OAAO,CAAE,KAAK,CACd,SAAS,CAAE,GAAG,CACd,cAAc,CAAE,IAAI,CAErB,qCAAO,CACN,cAAc,CAAE,UAAU,CAI7B,oBAAG,CACF,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,KAAK,CAChB,aAAa,CAAE,KAAK,CAGtB,MAAO,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CA/SI,IAAI,CAgTb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", "sources": ["../../client/lib/style/global.scss"], "names": [], "file": "global.min.css" diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js index 5402622..ecd2f68 100644 --- a/core/dest/js/app.min.js +++ b/core/dest/js/app.min.js @@ -1 +1 @@ -(function(){var a,b,c,d,e,f,g,h,i,j;i="https://github.com/stefanbc/uptimey",b="./core/client/lib/controllers/maincontroller.php",g=require("moment"),j="",c=j.globalLocation,d=j.globalSunrise,e=j.globalSunset,a=function(a){var c,d,e,f,j;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".adv-button").attr("data-status"),"default"===e?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(b,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),h("uptime","refresh"),h("time","refresh"),h("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),j="",0!==$("#days").attr("data-value")&&(j+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(j+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(j+=$("#minutes").attr("data-value")+" minutes"),f=j+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+i+"&text="+f+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=g().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(b,{method:"GET",data:{action:"clear"}})}},h=function(a,f){switch(a){case"image":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey. ",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),c=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:c,success:function(a){d=a.sunrise,e=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,f;b=g(d,"h:m a").format("X"),c=g(e,"h:m a").format("X"),f=g(a[1],"h:m a").format("X"),f>=b&&c>=f?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(b,{method:"GET",data:{action:a},success:function(a){console.log(a),a===!0?console.log("Online"):console.log("Offline")}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},f=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),h("image"),h("location"),h("uptime"),h("time"),h("ping")},$(function(){f(),setInterval(function(){h("uptime"),h("time"),h("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file +(function(){var a,b,c,d,e,f,g,h,i,j,k;j="https://github.com/stefanbc/uptimey",b="./core/client/lib/controllers/maincontroller.php",g=require("moment"),k="",c=k.globalLocation,d=k.globalSunrise,e=k.globalSunset,a=function(a){var c,d,e,f,h;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".adv-button").attr("data-status"),"default"===e?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(b,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),i("uptime","refresh"),i("time","refresh"),i("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),h="",0!==$("#days").attr("data-value")&&(h+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(h+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(h+=$("#minutes").attr("data-value")+" minutes"),f=h+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+j+"&text="+f+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=g().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(b,{method:"GET",data:{action:"clear"}})}},h=function(a){return $(".notice").remove(),$("body").append("
"+a+"
")},i=function(a,f){switch(a){case"image":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey. ",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),c=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:c,success:function(a){d=a.sunrise,e=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,f;b=g(d,"h:m a").format("X"),c=g(e,"h:m a").format("X"),f=g(a[1],"h:m a").format("X"),f>=b&&c>=f?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(b,{method:"GET",data:{action:a},error:function(a,b){return h(b)},success:function(a){return h(a)}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},f=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),i("image"),i("location"),i("uptime"),i("time"),i("ping")},$(function(){f(),setInterval(function(){i("uptime"),i("time"),i("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file From 37819e5249eb291f6195aeddb311772fd7fbcdc9 Mon Sep 17 00:00:00 2001 From: stefanbc Date: Mon, 11 Apr 2016 19:54:20 +0300 Subject: [PATCH 42/68] Restructured the files and folders for readability --- core/build/app.min.js | 1 + core/{dest => build}/css/global.min.css | 0 core/{dest => build}/css/global.min.css.map | 0 .../actions.coffee} | 0 .../data.coffee} | 1 + .../main.coffee} | 0 .../globals.coffee} | 2 +- core/client/lib/js/actioncontroller.js | 267 ------------------ core/client/lib/js/initcontroller.js | 67 ----- .../maincontroller.php => models/data.php} | 0 .../{view/mainview.html => views/index.html} | 12 +- core/dest/css/_animate.min.css | 7 - core/dest/css/_normalize.min.css | 1 - core/dest/js/app.min.js | 1 - core/{assets => public}/img/favicon.ico | Bin .../lib/js => public/libs}/require.config.js | 2 +- gruntfile.js | 19 +- index.html | 2 +- 18 files changed, 25 insertions(+), 357 deletions(-) create mode 100644 core/build/app.min.js rename core/{dest => build}/css/global.min.css (100%) rename core/{dest => build}/css/global.min.css.map (100%) rename core/client/lib/{actioncontroller.coffee => controllers/actions.coffee} (100%) rename core/client/lib/{datacontroller.coffee => controllers/data.coffee} (99%) rename core/client/lib/{initcontroller.coffee => controllers/main.coffee} (100%) rename core/client/lib/{_globals.coffee => helpers/globals.coffee} (95%) delete mode 100644 core/client/lib/js/actioncontroller.js delete mode 100644 core/client/lib/js/initcontroller.js rename core/client/lib/{controllers/maincontroller.php => models/data.php} (100%) rename core/client/lib/{view/mainview.html => views/index.html} (89%) delete mode 100644 core/dest/css/_animate.min.css delete mode 100644 core/dest/css/_normalize.min.css delete mode 100644 core/dest/js/app.min.js rename core/{assets => public}/img/favicon.ico (100%) rename core/{client/lib/js => public/libs}/require.config.js (95%) diff --git a/core/build/app.min.js b/core/build/app.min.js new file mode 100644 index 0000000..4039d41 --- /dev/null +++ b/core/build/app.min.js @@ -0,0 +1 @@ +(function(){var a,b,c,d,e,f,g,h,i,j,k;j="https://github.com/stefanbc/uptimey",b="./core/client/lib/models/data.php",g=require("moment"),k="",c=k.globalLocation,d=k.globalSunrise,e=k.globalSunset,a=function(a){var c,d,e,f,h;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".adv-button").attr("data-status"),"default"===e?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(b,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),i("uptime","refresh"),i("time","refresh"),i("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),h="",0!==$("#days").attr("data-value")&&(h+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(h+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(h+=$("#minutes").attr("data-value")+" minutes"),f=h+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+j+"&text="+f+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=g().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(b,{method:"GET",data:{action:"clear"}})}},h=function(a){return $(".notice").remove(),$("body").append("
"+a+"
")},i=function(a,f){switch(a){case"image":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey. ",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),c=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:c,success:function(a){d=a.sunrise,e=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,f;b=g(d,"h:m a").format("X"),c=g(e,"h:m a").format("X"),f=g(a[1],"h:m a").format("X"),f>=b&&c>=f?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(b,{method:"GET",data:{action:a},error:function(a,b){return h(b)},success:function(a){return h(a)}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},f=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),i("image"),i("location"),i("uptime"),i("time"),i("ping")},$(function(){f(),setInterval(function(){i("uptime"),i("time"),i("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file diff --git a/core/dest/css/global.min.css b/core/build/css/global.min.css similarity index 100% rename from core/dest/css/global.min.css rename to core/build/css/global.min.css diff --git a/core/dest/css/global.min.css.map b/core/build/css/global.min.css.map similarity index 100% rename from core/dest/css/global.min.css.map rename to core/build/css/global.min.css.map diff --git a/core/client/lib/actioncontroller.coffee b/core/client/lib/controllers/actions.coffee similarity index 100% rename from core/client/lib/actioncontroller.coffee rename to core/client/lib/controllers/actions.coffee diff --git a/core/client/lib/datacontroller.coffee b/core/client/lib/controllers/data.coffee similarity index 99% rename from core/client/lib/datacontroller.coffee rename to core/client/lib/controllers/data.coffee index 6fc00ff..0ae8b4a 100644 --- a/core/client/lib/datacontroller.coffee +++ b/core/client/lib/controllers/data.coffee @@ -24,6 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ### +### Show a notice upon request ### notice = (text) -> $('.notice').remove() $('body').append "
#{text}
" diff --git a/core/client/lib/initcontroller.coffee b/core/client/lib/controllers/main.coffee similarity index 100% rename from core/client/lib/initcontroller.coffee rename to core/client/lib/controllers/main.coffee diff --git a/core/client/lib/_globals.coffee b/core/client/lib/helpers/globals.coffee similarity index 95% rename from core/client/lib/_globals.coffee rename to core/client/lib/helpers/globals.coffee index c2bd2da..9a5c896 100644 --- a/core/client/lib/_globals.coffee +++ b/core/client/lib/helpers/globals.coffee @@ -28,7 +28,7 @@ SOFTWARE. projectLink = 'https://github.com/stefanbc/uptimey' ### Set the global files ### -globalFile = './core/client/lib/controllers/maincontroller.php' +globalFile = './core/client/lib/models/data.php' ### Set the global vars### moment = require('moment'); diff --git a/core/client/lib/js/actioncontroller.js b/core/client/lib/js/actioncontroller.js deleted file mode 100644 index bf3ba16..0000000 --- a/core/client/lib/js/actioncontroller.js +++ /dev/null @@ -1,267 +0,0 @@ -/* -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -/* Set the global files */ -var globalFile = 'core/client/lib/controllers/maincontroller.php'; -/* Set the global vars*/ -var globalLocation, globalSunrise, globalSunset; - -/* Output the data requested */ -function output(type, setFlag) { - switch (type) { - case 'image': - $.ajax({ - method: "GET", - url: globalFile, - data: { action: type } - }).done(function(image) { - // Split the output - image = image.split(";"); - // Add the image as background-image on body - $('body').css('backgroundImage', 'url(' + image[0] + ')'); - // Set the copyright - var copyrightText = "Powered by Uptimey. Fork on Github. Image by Unsplash"; - $('#copy').html(copyrightText); - }); - break; - case 'location': - $.get(globalFile, { - action: type - }).done(function(location) { - // Set up the URL for location call using ipinfo.io - var ip_geocode = "http://ipinfo.io/" + location; - // Get the response and set the value - $.getJSON(ip_geocode, function(response) { - // Add it to the element with an animation - $('#location').text(response.city + ", " + response.region + ", " + response.country).addClass('fadeIn'); - // Add latlong for maps href - var latlong = response.loc.split(","); - $('#location').attr('data-latlong', latlong[0] + '+' + latlong[1]); - // Set the global location - globalLocation = response.city + ", " + response.region + ", " + response.country; - // Set the sunrise/sunset times - $.simpleWeather({ - location: globalLocation, - success: function(weather) { - globalSunrise = weather.sunrise; - globalSunset = weather.sunset; - } - }); - }); - // We only animate the whole container once - $('.location-inner').addClass('fadeIn'); - }); - break; - case 'uptime': - $.get(globalFile, { - action: type, - flag: setFlag - }).done(function(uptime) { - // Split the output - uptime = uptime.split(";"); - // Add it to each element with an animation - $('#days').text(uptime[0]).addClass('fadeIn'); - $('#days').attr('data-value', uptime[0]); - - $('#hours').text(uptime[1]).addClass('fadeIn'); - $('#hours').attr('data-value', uptime[1]); - - $('#minutes').text(uptime[2]).addClass('fadeIn'); - $('#minutes').attr('data-value', uptime[2]); - // We only animate the whole container once - $('.bottom-container').addClass('fadeIn'); - }); - break; - case 'time': - $.get(globalFile, { - action: type, - flag: setFlag - }).done(function(time) { - // Split the output - time = time.split(";"); - // Set the times - $('#current').text(time[0]).addClass('fadeIn'); - $('#time').text(time[1]).addClass('fadeIn'); - $('#since').text(time[2]).addClass('fadeIn'); - // Format the times - setTimeout(function() { - var sunrise = moment(globalSunrise, 'h:m a').format('X'); - var sunset = moment(globalSunset, 'h:m a').format('X'); - var ttime = moment(time[1], 'h:m a').format('X'); - // Check if the current time is between sunset, sunrise and set the icon - if (ttime >= sunrise && ttime <= sunset) { - $(".time .fa").removeClass("fa-moon-o fa-circle-o"); - $(".time .fa").addClass("fa-sun-o"); - } else { - $(".time .fa").removeClass("fa-sun-o fa-circle-o"); - $(".time .fa").addClass("fa-moon-o"); - } - }, 3000); - // We only animate the whole container once - $('.top-container').addClass('fadeIn'); - }); - break; - } - // After the animation is done remove the class so - // we can animate again on next iteration - $(".val").each(function() { - $(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { - $(this).removeClass("fadeIn"); - }); - }); -} - -/* Button action */ -function action(type) { - var status; - switch (type) { - case 'toggle': - // Get the status of the button - status = $(".toggle-button").attr("data-status"); - // Check the status - if (status == "closed") { - // Animate the container (bring it down) - $(".button-container").animate({ - top: 0 - }); - // Change the button status - $(".toggle-button").attr("data-status", "open"); - // Change the icon - $(".toggle-button").removeClass("fa-angle-double-down"); - $(".toggle-button").addClass("fa-angle-double-up"); - } else if (status == "open") { - // Animate the container (bring it up) - $(".button-container").animate({ - top: "-80px" - }); - // Change the button status - $(".toggle-button").attr("data-status", "closed"); - // Change the icon - $(".toggle-button").removeClass("fa-angle-double-up"); - $(".toggle-button").addClass("fa-angle-double-down"); - } - break; - case 'adv': - // Animated it - $(".adv-button").addClass('pulse'); - $(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { - $(this).removeClass("pulse"); - }); - // Get the status of the button - status = $(".adv-button").attr("data-status"); - // Check the state - if (status == "default") { - // Show the correct panel and set the button state - $(".adv-button").attr("data-status", "advanced"); - $(".adv-button").addClass('active'); - $(".default-panel").fadeOut(500); - $(".advanced-panel").fadeIn(500); - // Get the data for this panel - $.get(globalFile, { - action: "advanced", - flag: "advanced" - }).done(function(notice) { - // Set the data from ajax - $(".advanced-panel .top-container").html(notice); - }); - } else if (status == "advanced") { - // Show the correct panel and set the button state - $(".adv-button").attr("data-status", "default"); - $(".adv-button").removeClass('active'); - $(".advanced-panel").fadeOut(500); - $(".default-panel").fadeIn(500); - } - break; - case 'refresh': - // Animated it - $(".refresh-button").addClass('fa-spin'); - // Refresh the values - output('uptime', 'refresh'); - output('time', 'refresh'); - // Stop animation after 1s - setTimeout(function() { - $(".refresh-button").removeClass("fa-spin"); - }, 1000); - break; - case 'twitter': - // Animated it - $(".twitter-button").addClass('pulse'); - $(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { - $(this).removeClass("pulse"); - }); - // The action - // Set the URL - var url = "https://github.com/stefanbc/uptimey"; - // Get the current uptime - var uptime = ""; - if ($("#days").attr('data-value') !== 0) uptime += $("#days").attr('data-value') + " days "; - if ($("#hours").attr('data-value') !== 0) uptime += $("#hours").attr('data-value') + " hours "; - if ($("#minutes").attr('data-value') !== 0) uptime += $("#minutes").attr('data-value') + " minutes"; - // Set the tweet - var text = uptime + " server uptime. Can you beat this? via"; - // Set the hashtag - var hashtag = "uptimey,devops"; - // Open the Twitter share window - window.open('http://twitter.com/share?url=' + url + '&text=' + text + '&hashtags=' + hashtag + '&', 'twitterwindow', 'height=450, width=550, top=' + ($(window).height() / 2 - 225) + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0'); - break; - case 'screenshot': - var screenshotButton = $('.screenshot-button'); - // Animated it - screenshotButton.addClass('pulse'); - screenshotButton.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { - $(this).removeClass("pulse"); - }); - // Check the button status - if (screenshotButton.hasClass('fa-camera')) { - // Change the button icon - screenshotButton.removeClass('fa-camera').addClass('fa-download'); - // Create an image from canvas - html2canvas(document.body, { - onrendered: function(canvas) { - // Save the canvas to a data URL - var dataURL = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); - // Set the data url on the screenshot button - screenshotButton.attr('href', dataURL); - // Get the current date for the filename - fileName = moment().format('DDMMYYYYHHmmss'); - // Set the filename on the screenshot button - screenshotButton.attr('download', 'Screenshot_' + fileName + '.png'); - } - }); - } else { - setTimeout(function(){ - // Change the button icon - screenshotButton.removeClass('fa-download').addClass('fa-camera'); - screenshotButton.removeAttr("href").removeAttr("download"); - }, 3000); - } - break; - case 'clear': - // Clear the session - $.get(globalFile, { action: "clear" }); - break; - } -} \ No newline at end of file diff --git a/core/client/lib/js/initcontroller.js b/core/client/lib/js/initcontroller.js deleted file mode 100644 index 9a2acd4..0000000 --- a/core/client/lib/js/initcontroller.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -// When the page finishes loading -$(document).ready(function() { - /* Start initial load */ - // Add the animation base class - $('.top-container').addClass('animated'); - $('.bottom-container').addClass('animated'); - $('.val').addClass('animated'); - $('.button').addClass('animated'); - // Get the image - output('image'); - // Get the location - output('location'); - // Get the uptime - output('uptime'); - // Get the time (let uptime be the first request so that the session updates needed values for time) - output('time'); - /* End initial load */ - - /* At an interval of 1 min we refresh the uptime and time */ - setInterval(function() { - output('uptime'); - output('time'); - }, 1000 * 60); - - /* Click action on each top button */ - $(".button").each(function() { - $(this).on("click", function() { - var buttonAction = $(this).attr("data-action"); - action(buttonAction); - }); - }); - /* Click action for location */ - $('#location').on("click", function() { - var latlong = $(this).attr("data-latlong"); - window.location.href = "https://www.google.com/maps/place/" + latlong; - }); - /* Clear everything on refresh of close */ - $(window).bind('beforeunload', function() { - action('clear'); - }); -}); \ No newline at end of file diff --git a/core/client/lib/controllers/maincontroller.php b/core/client/lib/models/data.php similarity index 100% rename from core/client/lib/controllers/maincontroller.php rename to core/client/lib/models/data.php diff --git a/core/client/lib/view/mainview.html b/core/client/lib/views/index.html similarity index 89% rename from core/client/lib/view/mainview.html rename to core/client/lib/views/index.html index c2a759b..ee39635 100644 --- a/core/client/lib/view/mainview.html +++ b/core/client/lib/views/index.html @@ -30,12 +30,12 @@ - + - - - - + + + +
@@ -97,7 +97,7 @@

Your server's uptime until now...

diff --git a/core/dest/css/_animate.min.css b/core/dest/css/_animate.min.css deleted file mode 100644 index 9195e57..0000000 --- a/core/dest/css/_animate.min.css +++ /dev/null @@ -1,7 +0,0 @@ - -@charset "UTF-8";/*! -Animate.css - http://daneden.me/animate -Licensed under the MIT license - http://opensource.org/licenses/MIT - -Copyright (c) 2014 Daniel Eden -*/.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}@-webkit-keyframes bounce{0%,100%,20%,53%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{0%,100%,20%,53%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-transition-timing-function:cubic-bezier(0.755,.050,.855,.060);transition-timing-function:cubic-bezier(0.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;-ms-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,100%,50%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(0.75,1.25,1);transform:scale3d(0.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(0.75,1.25,1);transform:scale3d(0.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{0%,100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}100%{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}100%{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;-ms-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}100%{-webkit-transform:none;transform:none}}@keyframes wobble{0%{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}100%{-webkit-transform:none;transform:none}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes bounceIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{0%,100%,20%,40%,60%,80%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}100%{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn;-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounceInDown{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;transform:none}}@keyframes bounceInDown{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}100%{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}100%{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;transform:none}}@keyframes bounceInRight{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}100%{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{0%,100%,60%,75%,90%{-webkit-transition-timing-function:cubic-bezier(0.215,.61,.355,1);transition-timing-function:cubic-bezier(0.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}100%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut;-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}100%{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}100%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY;-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}100%{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}100%{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{opacity:1}100%{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{0%{opacity:1}100%{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{0%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{0%{-webkit-transform-origin:center;transform-origin:center;opacity:1}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{0%{-webkit-transform-origin:center;transform-origin:center;opacity:1}100%{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}100%{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}100%{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}100%{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{0%{opacity:1}100%{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}100%{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}100%{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}100%{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(0.55,.055,.675,.19);animation-timing-function:cubic-bezier(0.55,.055,.675,.19)}100%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(0.175,.885,.32,1);animation-timing-function:cubic-bezier(0.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%);visibility:visible}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slideInDown{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%);visibility:visible}100%{-webkit-transform:translateY(0);transform:translateY(0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slideInLeft{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translateX(100%);transform:translateX(100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slideInRight{0%{-webkit-transform:translateX(100%);transform:translateX(100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translateY(100%);transform:translateY(100%);visibility:visible}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slideInUp{0%{-webkit-transform:translateY(100%);transform:translateY(100%);visibility:visible}100%{-webkit-transform:translateY(0);transform:translateY(0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{visibility:hidden;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes slideOutDown{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{visibility:hidden;-webkit-transform:translateY(100%);transform:translateY(100%)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{visibility:hidden;-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes slideOutLeft{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{visibility:hidden;-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes slideOutRight{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{visibility:hidden;-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes slideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{visibility:hidden;-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp} \ No newline at end of file diff --git a/core/dest/css/_normalize.min.css b/core/dest/css/_normalize.min.css deleted file mode 100644 index d3c7f4d..0000000 --- a/core/dest/css/_normalize.min.css +++ /dev/null @@ -1 +0,0 @@ -/*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/core/dest/js/app.min.js b/core/dest/js/app.min.js deleted file mode 100644 index ecd2f68..0000000 --- a/core/dest/js/app.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var a,b,c,d,e,f,g,h,i,j,k;j="https://github.com/stefanbc/uptimey",b="./core/client/lib/controllers/maincontroller.php",g=require("moment"),k="",c=k.globalLocation,d=k.globalSunrise,e=k.globalSunset,a=function(a){var c,d,e,f,h;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".adv-button").attr("data-status"),"default"===e?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(b,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),i("uptime","refresh"),i("time","refresh"),i("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),h="",0!==$("#days").attr("data-value")&&(h+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(h+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(h+=$("#minutes").attr("data-value")+" minutes"),f=h+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+j+"&text="+f+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=g().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(b,{method:"GET",data:{action:"clear"}})}},h=function(a){return $(".notice").remove(),$("body").append("
"+a+"
")},i=function(a,f){switch(a){case"image":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey. ",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),c=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:c,success:function(a){d=a.sunrise,e=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,f;b=g(d,"h:m a").format("X"),c=g(e,"h:m a").format("X"),f=g(a[1],"h:m a").format("X"),f>=b&&c>=f?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(b,{method:"GET",data:{action:a},error:function(a,b){return h(b)},success:function(a){return h(a)}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},f=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),i("image"),i("location"),i("uptime"),i("time"),i("ping")},$(function(){f(),setInterval(function(){i("uptime"),i("time"),i("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file diff --git a/core/assets/img/favicon.ico b/core/public/img/favicon.ico similarity index 100% rename from core/assets/img/favicon.ico rename to core/public/img/favicon.ico diff --git a/core/client/lib/js/require.config.js b/core/public/libs/require.config.js similarity index 95% rename from core/client/lib/js/require.config.js rename to core/public/libs/require.config.js index 650a1dc..d4f2dff 100644 --- a/core/client/lib/js/require.config.js +++ b/core/public/libs/require.config.js @@ -1,5 +1,5 @@ requirejs.config({ - baseUrl: 'core/dest/js', + baseUrl: 'core/build', paths: { jQuery : '//ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min', moment : '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment.min', diff --git a/gruntfile.js b/gruntfile.js index 9720806..c554cdc 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -9,7 +9,7 @@ module.exports = function(grunt) { removeComments: true }, files: { - 'index.html': 'core/client/lib/view/mainview.html' + 'index.html': 'core/client/lib/views/index.html' } } }, @@ -19,7 +19,7 @@ module.exports = function(grunt) { style: 'compressed' }, files: { - 'core/dest/css/global.min.css' : 'core/client/lib/style/global.scss' + 'core/build/css/global.min.css' : 'core/client/lib/style/global.scss' } } }, @@ -29,19 +29,28 @@ module.exports = function(grunt) { join : true }, files: { - 'core/dest/js/app.min.js': ['core/client/lib/*.coffee'] + 'core/build/app.min.js': + [ + 'core/client/lib/helpers/*.coffee', + 'core/client/lib/controllers/*.coffee' + ] } } }, uglify: { js: { files: { - 'core/dest/js/app.min.js': ['core/dest/js/app.min.js'] + 'core/build/app.min.js': ['core/build/app.min.js'] } } }, watch: { - files: ['core/client/lib/view/*.html', 'core/client/lib/style/*.scss', 'core/client/lib/*.coffee'], + files: [ + 'core/client/lib/controllers/*.coffee', + 'core/client/lib/helpers/*coffee', + 'core/client/lib/style/*.scss', + 'core/client/lib/views/*.html' + ], tasks: ['htmlmin', 'sass', 'coffee', 'uglify'] } }); diff --git a/index.html b/index.html index da2fad3..11ba39d 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file +Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file From 075c91f532e79ece50f646f62e5fbb8257bd25e7 Mon Sep 17 00:00:00 2001 From: stefanbc Date: Mon, 11 Apr 2016 20:24:35 +0300 Subject: [PATCH 43/68] Moved to Jade templating engine --- core/client/lib/views/index.html | 105 ------------------------------- core/client/lib/views/index.jade | 63 +++++++++++++++++++ gruntfile.js | 19 +++--- index.html | 4 +- 4 files changed, 73 insertions(+), 118 deletions(-) delete mode 100644 core/client/lib/views/index.html create mode 100644 core/client/lib/views/index.jade diff --git a/core/client/lib/views/index.html b/core/client/lib/views/index.html deleted file mode 100644 index ee39635..0000000 --- a/core/client/lib/views/index.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - Uptimey | Beautiful Server Uptime Monitor - - - - - - - - - - - -
-
-
- refresh - advanced - - screenshot -
- -
-
-
-
-
- Current date on server - -
-
- Server is active since - -
-
- - -
-
-
-
- - -
-
-
-
-

Your server's uptime until now...

-
-
- - days -
-
- - hours -
-
- - minutes -
-
-
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/core/client/lib/views/index.jade b/core/client/lib/views/index.jade new file mode 100644 index 0000000..9080cbd --- /dev/null +++ b/core/client/lib/views/index.jade @@ -0,0 +1,63 @@ +doctype html +html(lang='en') + head + title Uptimey | Beautiful Server Uptime Monitor + meta(http-equiv='content-type', content='text/html;charset=utf-8') + meta(name='viewport', content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no') + meta(name='description', content='Showcase your server uptime with Uptimey!') + link(rel='shortcut icon', href='core/public/img/favicon.ico?v=0.1', type='image/x-icon') + link(href='//fonts.googleapis.com/css?family=Raleway:400,300', rel='stylesheet', type='text/css') + link(href='//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css', rel='stylesheet', type='text/css') + link(href='//cdnjs.cloudflare.com/ajax/libs/normalize/4.0.0/normalize.min.css', rel='stylesheet', type='text/css') + link(href='//cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css', rel='stylesheet', type='text/css') + link(href='core/build/css/global.min.css', rel='stylesheet', type='text/css') + body + .container + .button-container + .button-block + span.button.refresh-button.fa.fa-refresh(data-action='refresh') + span refresh + span.button.adv-button.fa.fa-dashboard(data-status='default', data-action='adv') + span advanced + span.button.twitter-button.fa.fa-twitter(data-action='twitter') + span twitter + a.button.screenshot-button.fa.fa-camera(data-action='screenshot') + span screenshot + span.button.toggle-button.fa.fa-angle-double-down(data-status='closed', data-action='toggle') + section.default-panel + .top-container + section.time-inner + .row + span.label Current date on server + span#current.val + .row + span.label Server is active since + span#since.val + .block-right.time + span.fa.fa-circle-o + span#time.val + section.location-inner + .block-right.location + span.fa.fa-map-marker + span#location.val + .bottom-container + h2 Your server's uptime until now... + section.uptime-inner + .col + span#days.val + span.label days + .col + span#hours.val + span.label hours + .col + span#minutes.val + span.label minutes + section.advanced-panel + .top-container + footer#copy + // Load all scripts + script(src='//cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js', type='text/javascript') + script(type='text/javascript'). + require(['core/public/libs/require.config'], function() { + require(['jQuery', 'moment', 'weather', 'html2canvas', 'app']); + }); \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index c554cdc..b48bb0f 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -1,15 +1,10 @@ module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), - htmlmin: { - dist: { - options: { - collapseWhitespace: true, - minifyJS: true, - removeComments: true - }, + jade: { + compile: { files: { - 'index.html': 'core/client/lib/views/index.html' + 'index.html': 'core/client/lib/views/index.jade' } } }, @@ -49,15 +44,15 @@ module.exports = function(grunt) { 'core/client/lib/controllers/*.coffee', 'core/client/lib/helpers/*coffee', 'core/client/lib/style/*.scss', - 'core/client/lib/views/*.html' + 'core/client/lib/views/*.jade' ], - tasks: ['htmlmin', 'sass', 'coffee', 'uglify'] + tasks: ['jade', 'sass', 'coffee', 'uglify'] } }); - grunt.loadNpmTasks('grunt-contrib-htmlmin'); + grunt.loadNpmTasks('grunt-contrib-jade'); grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-coffee'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.registerTask('default', ['htmlmin', 'sass', 'coffee', 'uglify']); + grunt.registerTask('default', ['jade', 'sass', 'coffee', 'uglify']); }; \ No newline at end of file diff --git a/index.html b/index.html index 11ba39d..8c68cc9 100644 --- a/index.html +++ b/index.html @@ -1 +1,3 @@ -Uptimey | Beautiful Server Uptime Monitor
refresh advanced screenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file +Uptimey | Beautiful Server Uptime Monitor
refreshadvancedscreenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file From ac73337302596bacc83e5d7acc5114896d93db32 Mon Sep 17 00:00:00 2001 From: stefanbc Date: Mon, 11 Apr 2016 21:04:27 +0300 Subject: [PATCH 44/68] Removed the license from all files and updated the main license --- LICENSE | 2 +- core/build/css/global.min.css.map | 2 +- core/client/lib/controllers/actions.coffee | 26 ------------------- core/client/lib/controllers/data.coffee | 26 ------------------- core/client/lib/controllers/main.coffee | 29 ++-------------------- core/client/lib/helpers/globals.coffee | 26 ------------------- core/client/lib/models/data.php | 27 -------------------- core/client/lib/style/global.scss | 26 ------------------- 8 files changed, 4 insertions(+), 160 deletions(-) diff --git a/LICENSE b/LICENSE index 436f2b7..387f7e7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Stefan Cosma +Copyright (c) 2016 Stefan Cosma Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/core/build/css/global.min.css.map b/core/build/css/global.min.css.map index aeca384..25d4e75 100644 --- a/core/build/css/global.min.css.map +++ b/core/build/css/global.min.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AA4CA,0IAAQ,CACJ,OAAO,CAAE,EAAE,CACX,MAAM,CAAE,GAAG,CACX,UAAU,CAAE,yEAA0F,CACtG,UAAU,CAAE,mIAAgJ,CAC5J,UAAU,CAAE,4EAA2F,CACvG,UAAU,CAAE,uEAAsF,CAClG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,SAAS,CAAE,KAAK,CAChB,aAAa,CAAE,KAAK,CAGtB,MAAO,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CA/SI,IAAI,CAgTb,SAAS,CAAE,KAAK,CAChB,UAAU,CAAE,KAAK,CACjB,QAAE,CACE,eAAe,CAAE,SAAS", "sources": ["../../client/lib/style/global.scss"], "names": [], "file": "global.min.css" diff --git a/core/client/lib/controllers/actions.coffee b/core/client/lib/controllers/actions.coffee index f1e11ae..ffea79d 100644 --- a/core/client/lib/controllers/actions.coffee +++ b/core/client/lib/controllers/actions.coffee @@ -1,29 +1,3 @@ -### -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -### - ### Button action ### action = (type) -> status = '' diff --git a/core/client/lib/controllers/data.coffee b/core/client/lib/controllers/data.coffee index 0ae8b4a..6ac762d 100644 --- a/core/client/lib/controllers/data.coffee +++ b/core/client/lib/controllers/data.coffee @@ -1,29 +1,3 @@ -### -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -### - ### Show a notice upon request ### notice = (text) -> $('.notice').remove() diff --git a/core/client/lib/controllers/main.coffee b/core/client/lib/controllers/main.coffee index 0c1d9c9..d702a5b 100644 --- a/core/client/lib/controllers/main.coffee +++ b/core/client/lib/controllers/main.coffee @@ -1,29 +1,4 @@ -### -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -### - +### Init main function ### init = -> # Add the animation base class $('.top-container').addClass 'animated' @@ -41,7 +16,7 @@ init = -> # Check if server is online output 'ping' -# When the page finishes loading +### When the page finishes loading ### $ -> ### Start initial load ### diff --git a/core/client/lib/helpers/globals.coffee b/core/client/lib/helpers/globals.coffee index 9a5c896..f5ef1c1 100644 --- a/core/client/lib/helpers/globals.coffee +++ b/core/client/lib/helpers/globals.coffee @@ -1,29 +1,3 @@ -### -Uptimey - https://github.com/stefanbc/uptimey - -Licensed under the MIT license - -Copyright (c) 2014 Stefan Cosma - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -### - ### Project details ### projectLink = 'https://github.com/stefanbc/uptimey' diff --git a/core/client/lib/models/data.php b/core/client/lib/models/data.php index 9c4bb41..26a31a4 100644 --- a/core/client/lib/models/data.php +++ b/core/client/lib/models/data.php @@ -1,31 +1,4 @@ Date: Tue, 12 Apr 2016 13:02:49 +0300 Subject: [PATCH 45/68] Renamed folders and started working on config implementation --- client/bin/app.min.js | 1 + client/bin/config.json | 21 +++++++++++++ client/bin/css/global.min.css | 1 + .../lib/controllers/actions.coffee | 16 +++++----- .../lib/controllers/data.coffee | 7 ++--- .../lib/controllers/main.coffee | 1 + .../lib/helpers/globals.coffee | 3 +- client/lib/helpers/utils.coffee | 10 ++++++ {core/client => client}/lib/models/data.php | 0 {core/client => client}/lib/style/global.scss | 29 +++++++++--------- {core/client => client}/lib/views/index.jade | 12 +++----- {core/public => client/src}/img/favicon.ico | Bin .../libs => client/src/js}/require.config.js | 2 +- core/build/app.min.js | 1 - core/build/css/global.min.css | 2 -- core/build/css/global.min.css.map | 7 ----- core/client/config.json | 20 ------------ gruntfile.js | 23 +++++++------- index.html | 2 +- 19 files changed, 79 insertions(+), 79 deletions(-) create mode 100644 client/bin/app.min.js create mode 100644 client/bin/config.json create mode 100644 client/bin/css/global.min.css rename {core/client => client}/lib/controllers/actions.coffee (91%) rename {core/client => client}/lib/controllers/data.coffee (96%) rename {core/client => client}/lib/controllers/main.coffee (99%) rename {core/client => client}/lib/helpers/globals.coffee (71%) create mode 100644 client/lib/helpers/utils.coffee rename {core/client => client}/lib/models/data.php (100%) rename {core/client => client}/lib/style/global.scss (92%) rename {core/client => client}/lib/views/index.jade (85%) rename {core/public => client/src}/img/favicon.ico (100%) rename {core/public/libs => client/src/js}/require.config.js (96%) delete mode 100644 core/build/app.min.js delete mode 100644 core/build/css/global.min.css delete mode 100644 core/build/css/global.min.css.map delete mode 100644 core/client/config.json diff --git a/client/bin/app.min.js b/client/bin/app.min.js new file mode 100644 index 0000000..9e5161e --- /dev/null +++ b/client/bin/app.min.js @@ -0,0 +1 @@ +(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;k="https://github.com/stefanbc/uptimey",c="./client/lib/models/data.php",b="./client/bin/config.json",h=require("moment"),m="",d=m.globalLocation,e=m.globalSunrise,f=m.globalSunset,l=function(a){return $.getJSON(b+"?ver="+h().format("X"),function(b){return console.log(b[a]),b[a]})},i=function(a){return $(".notice").remove(),$("body").append("
"+a+"
")},a=function(a){var b,d,e,f,g;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"advanced":$(".advanced-button").addClass("pulse"),$(".advanced-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".advanced-button").attr("data-status"),"default"===e?($(".advanced-button").attr("data-status","advanced"),$(".advanced-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(c,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".advanced-button").attr("data-status","default"),$(".advanced-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),j("uptime","refresh"),j("time","refresh"),j("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g="",0!==$("#days").attr("data-value")&&(g+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(g+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(g+=$("#minutes").attr("data-value")+" minutes"),f=g+" server uptime. Can you beat this? via",b="uptimey,devops",window.open("http://twitter.com/share?url="+k+"&text="+f+"&hashtags="+b+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=h().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(c,{method:"GET",data:{action:"clear"}})}},j=function(a,b){switch(a){case"image":$.ajax(c,{method:"GET",data:{action:a},success:function(a){var b;l("background_image"),a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey. ",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(c,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),d=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:d,success:function(a){e=a.sunrise,f=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(c,{method:"GET",data:{action:a,flag:b},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(c,{method:"GET",data:{action:a,flag:b},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,d;b=h(e,"h:m a").format("X"),c=h(f,"h:m a").format("X"),d=h(a[1],"h:m a").format("X"),d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(c,{method:"GET",data:{action:a},error:function(a,b){return i(b)},success:function(a){return i(a)}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},g=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),j("image"),j("location"),j("uptime"),j("time"),j("ping")},$(function(){g(),setInterval(function(){j("uptime"),j("time"),j("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file diff --git a/client/bin/config.json b/client/bin/config.json new file mode 100644 index 0000000..1cd1a91 --- /dev/null +++ b/client/bin/config.json @@ -0,0 +1,21 @@ +{ + "font" : "", + "font_color" : "", + "background_image" : "http://i.imgur.com/sKV54PO.jpg", + "background_color" : "", + "debug_mode" : false, + "default_view" : "uptime", + "show_menu_always" : false, + "remove_menu" : false, + "buttons": [ + { + "refresh" : true, + "advanced" : true, + "twitter" : true, + "google" : false, + "facebook" : false, + "screenshot" : true + } + ], + "display_timezone" : "" +} \ No newline at end of file diff --git a/client/bin/css/global.min.css b/client/bin/css/global.min.css new file mode 100644 index 0000000..296c0f1 --- /dev/null +++ b/client/bin/css/global.min.css @@ -0,0 +1 @@ +.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}a,.button-container .button{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}@-webkit-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-moz-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-ms-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-o-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover,a:focus{text-decoration:underline}.blink{-webkit-animation:blink 2s infinite;-moz-animation:blink 2s infinite;-ms-animation:blink 2s infinite;-o-animation:blink 2s infinite;animation:blink 2s infinite}.notice{position:absolute;bottom:0;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-o-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);background:rgba(0,0,0,0.7);padding:35px}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button:after{content:attr(data-action);position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button:hover:after{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button:hover{color:#00ac8a}.button-container .advanced-button.active{color:#e74b3b}.button-container .twitter-button:hover{color:#55acee}.button-container .screenshot-button{text-decoration:none}.button-container .screenshot-button:hover{color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} diff --git a/core/client/lib/controllers/actions.coffee b/client/lib/controllers/actions.coffee similarity index 91% rename from core/client/lib/controllers/actions.coffee rename to client/lib/controllers/actions.coffee index ffea79d..0150a74 100644 --- a/core/client/lib/controllers/actions.coffee +++ b/client/lib/controllers/actions.coffee @@ -23,19 +23,19 @@ action = (type) -> $('.toggle-button').removeClass 'fa-angle-double-up' $('.toggle-button').addClass 'fa-angle-double-down' return - when 'adv' + when 'advanced' # Animated it - $('.adv-button').addClass 'pulse' - $('.adv-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $('.advanced-button').addClass 'pulse' + $('.advanced-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> $(this).removeClass 'pulse' return # Get the status of the button - status = $('.adv-button').attr('data-status') + status = $('.advanced-button').attr('data-status') # Check the state if status is 'default' # Show the correct panel and set the button state - $('.adv-button').attr 'data-status', 'advanced' - $('.adv-button').addClass 'active' + $('.advanced-button').attr 'data-status', 'advanced' + $('.advanced-button').addClass 'active' $('.default-panel').fadeOut 500 $('.advanced-panel').fadeIn 500 # Get the data for this panel @@ -50,8 +50,8 @@ action = (type) -> return else if status is 'advanced' # Show the correct panel and set the button state - $('.adv-button').attr 'data-status', 'default' - $('.adv-button').removeClass 'active' + $('.advanced-button').attr 'data-status', 'default' + $('.advanced-button').removeClass 'active' $('.advanced-panel').fadeOut 500 $('.default-panel').fadeIn 500 return diff --git a/core/client/lib/controllers/data.coffee b/client/lib/controllers/data.coffee similarity index 96% rename from core/client/lib/controllers/data.coffee rename to client/lib/controllers/data.coffee index 6ac762d..297df0d 100644 --- a/core/client/lib/controllers/data.coffee +++ b/client/lib/controllers/data.coffee @@ -1,8 +1,3 @@ -### Show a notice upon request ### -notice = (text) -> - $('.notice').remove() - $('body').append "
#{text}
" - ### Output the data requested ### output = (type, setFlag) -> switch type @@ -12,6 +7,8 @@ output = (type, setFlag) -> data : action : type success: (image) -> + # Get image from config + readConfig 'background_image' # Split the output image = image.split(';') # Add the image as background-image on body diff --git a/core/client/lib/controllers/main.coffee b/client/lib/controllers/main.coffee similarity index 99% rename from core/client/lib/controllers/main.coffee rename to client/lib/controllers/main.coffee index d702a5b..9059450 100644 --- a/core/client/lib/controllers/main.coffee +++ b/client/lib/controllers/main.coffee @@ -1,5 +1,6 @@ ### Init main function ### init = -> + # Add the animation base class $('.top-container').addClass 'animated' $('.bottom-container').addClass 'animated' diff --git a/core/client/lib/helpers/globals.coffee b/client/lib/helpers/globals.coffee similarity index 71% rename from core/client/lib/helpers/globals.coffee rename to client/lib/helpers/globals.coffee index f5ef1c1..7457c78 100644 --- a/core/client/lib/helpers/globals.coffee +++ b/client/lib/helpers/globals.coffee @@ -2,7 +2,8 @@ projectLink = 'https://github.com/stefanbc/uptimey' ### Set the global files ### -globalFile = './core/client/lib/models/data.php' +globalFile = './client/lib/models/data.php' +configFile = './client/bin/config.json' ### Set the global vars### moment = require('moment'); diff --git a/client/lib/helpers/utils.coffee b/client/lib/helpers/utils.coffee new file mode 100644 index 0000000..b62dbde --- /dev/null +++ b/client/lib/helpers/utils.coffee @@ -0,0 +1,10 @@ +### Get a value from the config file ### +readConfig = (property) -> + $.getJSON "#{configFile}?ver=#{moment().format('X')}", (configObject) -> + console.log configObject[property] + return configObject[property] + +### Show a notice upon request ### +notice = (text) -> + $('.notice').remove() + $('body').append "
#{text}
" \ No newline at end of file diff --git a/core/client/lib/models/data.php b/client/lib/models/data.php similarity index 100% rename from core/client/lib/models/data.php rename to client/lib/models/data.php diff --git a/core/client/lib/style/global.scss b/client/lib/style/global.scss similarity index 92% rename from core/client/lib/style/global.scss rename to client/lib/style/global.scss index 98fce1a..27e4015 100644 --- a/core/client/lib/style/global.scss +++ b/client/lib/style/global.scss @@ -136,7 +136,8 @@ a { margin: 0 30px; position: relative; @extend %transition; - span { + &:after { + content: attr(data-action); position: absolute; visibility: hidden; color: $color_1; @@ -149,19 +150,19 @@ a { width: 100px; height: 30px; border-radius: 6px; - &:after { - content: ''; - position: absolute; - bottom: 100%; - left: 50%; - margin-left: -8px; - width: 0; height: 0; - border-bottom: 8px solid #000000; - border-right: 8px solid transparent; - border-left: 8px solid transparent; - } + // &:after { + // content: ''; + // position: absolute; + // bottom: 100%; + // left: 50%; + // margin-left: -8px; + // width: 0; height: 0; + // border-bottom: 8px solid #000000; + // border-right: 8px solid transparent; + // border-left: 8px solid transparent; + // } } - &:hover span { + &:hover:after { visibility: visible; opacity: 1; top: 35px; @@ -175,7 +176,7 @@ a { color: #00ac8a; } } - .adv-button { + .advanced-button { &.active { color: #e74b3b; } diff --git a/core/client/lib/views/index.jade b/client/lib/views/index.jade similarity index 85% rename from core/client/lib/views/index.jade rename to client/lib/views/index.jade index 9080cbd..ae57e85 100644 --- a/core/client/lib/views/index.jade +++ b/client/lib/views/index.jade @@ -5,24 +5,20 @@ html(lang='en') meta(http-equiv='content-type', content='text/html;charset=utf-8') meta(name='viewport', content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no') meta(name='description', content='Showcase your server uptime with Uptimey!') - link(rel='shortcut icon', href='core/public/img/favicon.ico?v=0.1', type='image/x-icon') + link(rel='shortcut icon', href='client/src/img/favicon.ico?v=0.9', type='image/x-icon') link(href='//fonts.googleapis.com/css?family=Raleway:400,300', rel='stylesheet', type='text/css') link(href='//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css', rel='stylesheet', type='text/css') link(href='//cdnjs.cloudflare.com/ajax/libs/normalize/4.0.0/normalize.min.css', rel='stylesheet', type='text/css') link(href='//cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css', rel='stylesheet', type='text/css') - link(href='core/build/css/global.min.css', rel='stylesheet', type='text/css') + link(href='client/bin/css/global.min.css', rel='stylesheet', type='text/css') body .container .button-container .button-block span.button.refresh-button.fa.fa-refresh(data-action='refresh') - span refresh - span.button.adv-button.fa.fa-dashboard(data-status='default', data-action='adv') - span advanced + span.button.advanced-button.fa.fa-dashboard(data-status='default', data-action='advanced') span.button.twitter-button.fa.fa-twitter(data-action='twitter') - span twitter a.button.screenshot-button.fa.fa-camera(data-action='screenshot') - span screenshot span.button.toggle-button.fa.fa-angle-double-down(data-status='closed', data-action='toggle') section.default-panel .top-container @@ -58,6 +54,6 @@ html(lang='en') // Load all scripts script(src='//cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js', type='text/javascript') script(type='text/javascript'). - require(['core/public/libs/require.config'], function() { + require(['client/src/js/require.config'], function() { require(['jQuery', 'moment', 'weather', 'html2canvas', 'app']); }); \ No newline at end of file diff --git a/core/public/img/favicon.ico b/client/src/img/favicon.ico similarity index 100% rename from core/public/img/favicon.ico rename to client/src/img/favicon.ico diff --git a/core/public/libs/require.config.js b/client/src/js/require.config.js similarity index 96% rename from core/public/libs/require.config.js rename to client/src/js/require.config.js index d4f2dff..482ab0e 100644 --- a/core/public/libs/require.config.js +++ b/client/src/js/require.config.js @@ -1,5 +1,5 @@ requirejs.config({ - baseUrl: 'core/build', + baseUrl: 'client/bin', paths: { jQuery : '//ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min', moment : '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment.min', diff --git a/core/build/app.min.js b/core/build/app.min.js deleted file mode 100644 index 4039d41..0000000 --- a/core/build/app.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var a,b,c,d,e,f,g,h,i,j,k;j="https://github.com/stefanbc/uptimey",b="./core/client/lib/models/data.php",g=require("moment"),k="",c=k.globalLocation,d=k.globalSunrise,e=k.globalSunset,a=function(a){var c,d,e,f,h;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"adv":$(".adv-button").addClass("pulse"),$(".adv-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".adv-button").attr("data-status"),"default"===e?($(".adv-button").attr("data-status","advanced"),$(".adv-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(b,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".adv-button").attr("data-status","default"),$(".adv-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),i("uptime","refresh"),i("time","refresh"),i("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),h="",0!==$("#days").attr("data-value")&&(h+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(h+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(h+=$("#minutes").attr("data-value")+" minutes"),f=h+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+j+"&text="+f+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=g().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(b,{method:"GET",data:{action:"clear"}})}},h=function(a){return $(".notice").remove(),$("body").append("
"+a+"
")},i=function(a,f){switch(a){case"image":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey. ",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(b,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),c=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:c,success:function(a){d=a.sunrise,e=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(b,{method:"GET",data:{action:a,flag:f},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,f;b=g(d,"h:m a").format("X"),c=g(e,"h:m a").format("X"),f=g(a[1],"h:m a").format("X"),f>=b&&c>=f?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(b,{method:"GET",data:{action:a},error:function(a,b){return h(b)},success:function(a){return h(a)}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},f=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),i("image"),i("location"),i("uptime"),i("time"),i("ping")},$(function(){f(),setInterval(function(){i("uptime"),i("time"),i("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file diff --git a/core/build/css/global.min.css b/core/build/css/global.min.css deleted file mode 100644 index a15d5cc..0000000 --- a/core/build/css/global.min.css +++ /dev/null @@ -1,2 +0,0 @@ -.button-container .button-block:after,.bottom-container section .col:first-child:before,.bottom-container section .col:nth-child(3):before{content:"";height:1px;background:-moz-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-webkit-gradient(linear, left top, right top, color-stop(0%, transparent), color-stop(50%, #939393), color-stop(100%, transparent));background:-webkit-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-o-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:-ms-linear-gradient(left, transparent 0%, #939393 50%, transparent 100%);background:linear-gradient(to right, transparent 0%, #939393 50%, transparent 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 );display:block}a,.button-container .button{-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}@-webkit-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-moz-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-ms-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@-o-keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes blink{0%{opacity:0}50%{opacity:1}100%{opacity:0}}html{height:100%}body{height:100%;background-color:#222;background-repeat:no-repeat;background-position:center;background-size:cover;font-family:Raleway,sans-serif;font-weight:200;color:#fff}a{color:#fff;text-decoration:none}a:hover,a:focus{text-decoration:underline}.blink{-webkit-animation:blink 2s infinite;-moz-animation:blink 2s infinite;-ms-animation:blink 2s infinite;-o-animation:blink 2s infinite;animation:blink 2s infinite}.notice{position:absolute;bottom:0;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-o-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);background:rgba(0,0,0,0.7);padding:35px}.container{background:rgba(0,0,0,0.6);height:100%;width:100%;position:relative}.button-container{position:absolute;top:-80px;left:50%;width:400px;text-align:center;font-size:1.5em;margin-left:-200px;z-index:10}.button-container .button-block{margin-top:25px}.button-container .button-block:after{margin-top:25px}.button-container .button{cursor:pointer;margin:0 30px;position:relative}.button-container .button span{position:absolute;visibility:hidden;color:#fff;font-family:Raleway,sans-serif;font-weight:200;font-size:0.5em;line-height:30px;text-align:center;background:rgba(0,0,0,0.6);width:100px;height:30px;border-radius:6px}.button-container .button span:after{content:'';position:absolute;bottom:100%;left:50%;margin-left:-8px;width:0;height:0;border-bottom:8px solid #000000;border-right:8px solid transparent;border-left:8px solid transparent}.button-container .button:hover span{visibility:visible;opacity:1;top:35px;left:50%;margin-left:-50px;z-index:999}.button-container .refresh-button:hover{color:#00ac8a}.button-container .adv-button.active{color:#e74b3b}.button-container .twitter-button:hover{color:#55acee}.button-container .screenshot-button{text-decoration:none}.button-container .screenshot-button:hover{color:#f7d61c}.advanced-panel{display:none}.top-container{margin:0 auto;position:absolute;bottom:400px;left:0;width:100%}.top-container section{width:960px;margin:0 auto;position:relative}.top-container section .row{display:block;margin-bottom:20px}.top-container section .row .val{display:block;font-size:2.5em;padding-bottom:10px}.top-container section .block-right{position:absolute;top:0;right:30px}.top-container section .time{padding:20px 0}.top-container section .time .fa{font-size:3em;margin-right:15px}.top-container section .time .fa-sun-o{color:#ffd900}.top-container section .time .fa-moon-o{color:#3498db}.top-container section .time .val{font-size:4em}.top-container section .location{top:-80px;font-size:1.5em;cursor:pointer}.top-container section .location:hover{text-decoration:underline}.top-container section .location .fa{margin-right:15px}.top-container h2{margin:0;font-weight:lighter;font-size:1.1em}.top-container .notif{width:960px;margin:0 auto;position:relative;display:block;font-family:FontAwesome,Raleway,sans-serif;font-weight:200}.top-container .notif:before{padding-right:10px}.top-container .notif a{text-decoration:underline}.bottom-container{text-align:center;position:absolute;bottom:150px;left:0;width:100%}.bottom-container section{width:960px;margin:0 auto}.bottom-container section .col{width:33%;display:inline-block;padding-top:15px}.bottom-container section .col:first-child:before{margin-bottom:25px}.bottom-container section .col:nth-child(3):before{margin-bottom:25px}.bottom-container section .col .val{display:block;font-size:6em;padding-bottom:10px}.bottom-container section .col .label{text-transform:capitalize}.bottom-container h2{font-weight:lighter;font-size:1.1em;margin-bottom:-25px}footer{position:absolute;bottom:10px;right:20px;color:#ddd;font-size:0.7em;text-align:right}footer a{text-decoration:underline} -/*# sourceMappingURL=global.min.css.map */ diff --git a/core/build/css/global.min.css.map b/core/build/css/global.min.css.map deleted file mode 100644 index 25d4e75..0000000 --- a/core/build/css/global.min.css.map +++ /dev/null @@ -1,7 +0,0 @@ -{ -"version": 3, -"mappings": "AAkBA,0IAAQ,CACJ,OAAO,CAAE,EAAE,CACX,MAAM,CAAE,GAAG,CACX,UAAU,CAAE,yEAA0F,CACtG,UAAU,CAAE,mIAAgJ,CAC5J,UAAU,CAAE,4EAA2F,CACvG,UAAU,CAAE,uEAAsF,CAClG,UAAU,CAAE,wEAAuF,CAC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AS", -"sources": ["../../client/lib/style/global.scss"], -"names": [], -"file": "global.min.css" -} diff --git a/core/client/config.json b/core/client/config.json deleted file mode 100644 index 96d2f2e..0000000 --- a/core/client/config.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "font": "", - "font_color": "", - "background_image": "", - "background_color": "", - "default_view": "uptime", - "show_menu_always": false, - "remove_menu": false, - "buttons": [ - { - "refresh": true, - "advanced": true, - "twitter": true, - "google": false, - "facebook": false, - "screenshot": true - } - ], - "display_timezone": "" -} \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index b48bb0f..be41c6c 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -4,17 +4,18 @@ module.exports = function(grunt) { jade: { compile: { files: { - 'index.html': 'core/client/lib/views/index.jade' + 'index.html': 'client/lib/views/index.jade' } } }, sass: { dist: { options: { - style: 'compressed' + style : 'compressed', + sourcemap : 'none' }, files: { - 'core/build/css/global.min.css' : 'core/client/lib/style/global.scss' + 'client/bin/css/global.min.css' : 'client/lib/style/global.scss' } } }, @@ -24,10 +25,10 @@ module.exports = function(grunt) { join : true }, files: { - 'core/build/app.min.js': + 'client/bin/app.min.js': [ - 'core/client/lib/helpers/*.coffee', - 'core/client/lib/controllers/*.coffee' + 'client/lib/helpers/*.coffee', + 'client/lib/controllers/*.coffee' ] } } @@ -35,16 +36,16 @@ module.exports = function(grunt) { uglify: { js: { files: { - 'core/build/app.min.js': ['core/build/app.min.js'] + 'client/bin/app.min.js': ['client/bin/app.min.js'] } } }, watch: { files: [ - 'core/client/lib/controllers/*.coffee', - 'core/client/lib/helpers/*coffee', - 'core/client/lib/style/*.scss', - 'core/client/lib/views/*.jade' + 'client/lib/controllers/*.coffee', + 'client/lib/helpers/*coffee', + 'client/lib/style/*.scss', + 'client/lib/views/*.jade' ], tasks: ['jade', 'sass', 'coffee', 'uglify'] } diff --git a/index.html b/index.html index 8c68cc9..a014af2 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,3 @@ -Uptimey | Beautiful Server Uptime Monitor
refreshadvancedscreenshot
Current date on server
Server is active since

Your server's uptime until now...

days
hours
minutes
\ No newline at end of file From d868c78c0494e6ff1c01dfa7799ee33ea3b6a29e Mon Sep 17 00:00:00 2001 From: stefanbc Date: Thu, 14 Apr 2016 17:24:54 +0300 Subject: [PATCH 46/68] Added new utils --- client/bin/app.min.js | 2 +- client/bin/config.json | 10 ++--- client/lib/controllers/actions.coffee | 17 ++------- client/lib/controllers/config.coffee | 1 + client/lib/controllers/data.coffee | 12 +++--- .../controllers/{main.coffee => index.coffee} | 1 + client/lib/helpers/utils.coffee | 38 ++++++++++++++++--- 7 files changed, 50 insertions(+), 31 deletions(-) create mode 100644 client/lib/controllers/config.coffee rename client/lib/controllers/{main.coffee => index.coffee} (99%) diff --git a/client/bin/app.min.js b/client/bin/app.min.js index 9e5161e..b77f377 100644 --- a/client/bin/app.min.js +++ b/client/bin/app.min.js @@ -1 +1 @@ -(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;k="https://github.com/stefanbc/uptimey",c="./client/lib/models/data.php",b="./client/bin/config.json",h=require("moment"),m="",d=m.globalLocation,e=m.globalSunrise,f=m.globalSunset,l=function(a){return $.getJSON(b+"?ver="+h().format("X"),function(b){return console.log(b[a]),b[a]})},i=function(a){return $(".notice").remove(),$("body").append("
"+a+"
")},a=function(a){var b,d,e,f,g;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"advanced":$(".advanced-button").addClass("pulse"),$(".advanced-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),e=$(".advanced-button").attr("data-status"),"default"===e?($(".advanced-button").attr("data-status","advanced"),$(".advanced-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(c,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".advanced-button").attr("data-status","default"),$(".advanced-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),j("uptime","refresh"),j("time","refresh"),j("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":$(".twitter-button").addClass("pulse"),$(".twitter-button").on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),g="",0!==$("#days").attr("data-value")&&(g+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(g+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(g+=$("#minutes").attr("data-value")+" minutes"),f=g+" server uptime. Can you beat this? via",b="uptimey,devops",window.open("http://twitter.com/share?url="+k+"&text="+f+"&hashtags="+b+"&","twitterwindow","height=450, width=550, top="+$(window).height()/2-225+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),d.addClass("pulse"),d.on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")}),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=h().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(c,{method:"GET",data:{action:"clear"}})}},j=function(a,b){switch(a){case"image":$.ajax(c,{method:"GET",data:{action:a},success:function(a){var b;l("background_image"),a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")"),b="Made with Uptimey. ",b+="Image from Unsplash.",$("#copy").html(b)}});break;case"location":$.ajax(c,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),d=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:d,success:function(a){e=a.sunrise,f=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(c,{method:"GET",data:{action:a,flag:b},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(c,{method:"GET",data:{action:a,flag:b},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,d;b=h(e,"h:m a").format("X"),c=h(f,"h:m a").format("X"),d=h(a[1],"h:m a").format("X"),d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(c,{method:"GET",data:{action:a},error:function(a,b){return i(b)},success:function(a){return i(a)}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},g=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),j("image"),j("location"),j("uptime"),j("time"),j("ping")},$(function(){g(),setInterval(function(){j("uptime"),j("time"),j("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file +(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;o="https://github.com/stefanbc/uptimey",f="./client/lib/models/data.php",d="./client/bin/config.json",l=require("moment"),q="",g=q.globalLocation,h=q.globalSunrise,i=q.globalSunset,p=function(a){var b;b=$.getJSON(d+"?v="+l().format("X"),function(b){"function"==typeof a&&a(b)})},m=function(a){return $(".notice").remove(),$("body").append("
"+a+"
")},b=function(a){return $(a).addClass("pulse"),$(a).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")})},k=function(a){return!isNaN(parseFloat(a))},e=function(a){var b,c;if("number"==typeof a||"boolean"==typeof a)return!1;if("undefined"==typeof a||null===a)return!0;if("undefined"!=typeof a.length)return 0===a.length;b=0;for(c in a)a.hasOwnProperty(c)&&b++;return 0===b},a=function(a){var c,d,e,g,h;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"advanced":b(".advanced-button"),e=$(".advanced-button").attr("data-status"),"default"===e?($(".advanced-button").attr("data-status","advanced"),$(".advanced-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(f,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".advanced-button").attr("data-status","default"),$(".advanced-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),n("uptime","refresh"),n("time","refresh"),n("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":b(".twitter-button"),h="",0!==$("#days").attr("data-value")&&(h+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(h+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(h+=$("#minutes").attr("data-value")+" minutes"),g=h+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+o+"&text="+g+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),b(d),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=l().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(f,{method:"GET",data:{action:"clear"}})}},c=function(a){},n=function(a,b,c){var d;switch(a){case"image":$.ajax(f,{method:"GET",data:{action:a},success:function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")")}}),d="Made with Uptimey. ",d+="Image from Unsplash.",$("#copy").html(d);break;case"location":$.ajax(f,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),g=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:g,success:function(a){h=a.sunrise,i=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(f,{method:"GET",data:{action:a,flag:c},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(f,{method:"GET",data:{action:a,flag:c},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,d;b=l(h,"h:m a").format("X"),c=l(i,"h:m a").format("X"),d=l(a[1],"h:m a").format("X"),d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(f,{method:"GET",data:{action:a},error:function(a,b){return m(b)},success:function(a){return m(a)}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},j=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),n("image"),n("location"),n("uptime"),n("time"),n("ping")},$(function(){j(),setInterval(function(){n("uptime"),n("time"),n("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file diff --git a/client/bin/config.json b/client/bin/config.json index 1cd1a91..c4bfd68 100644 --- a/client/bin/config.json +++ b/client/bin/config.json @@ -1,12 +1,12 @@ { - "font" : "", + "font_family" : "", "font_color" : "", "background_image" : "http://i.imgur.com/sKV54PO.jpg", - "background_color" : "", + "background_color" : "#000000", "debug_mode" : false, - "default_view" : "uptime", - "show_menu_always" : false, - "remove_menu" : false, + "default_view" : "uptime", // Possible choices: uptime, advanced + "show_menu_always" : false, // Turn off the toggle + "remove_menu" : false, // Don't show the menu at all "buttons": [ { "refresh" : true, diff --git a/client/lib/controllers/actions.coffee b/client/lib/controllers/actions.coffee index 0150a74..68d61f7 100644 --- a/client/lib/controllers/actions.coffee +++ b/client/lib/controllers/actions.coffee @@ -25,10 +25,7 @@ action = (type) -> return when 'advanced' # Animated it - $('.advanced-button').addClass 'pulse' - $('.advanced-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> - $(this).removeClass 'pulse' - return + animateElement '.advanced-button' # Get the status of the button status = $('.advanced-button').attr('data-status') # Check the state @@ -70,10 +67,7 @@ action = (type) -> return when 'twitter' # Animated it - $('.twitter-button').addClass 'pulse' - $('.twitter-button').on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> - $(this).removeClass 'pulse' - return + animateElement '.twitter-button' # The action # Get the current uptime uptime = '' @@ -88,15 +82,12 @@ action = (type) -> # Set the hashtag hashtag = 'uptimey,devops' # Open the Twitter share window - window.open "http://twitter.com/share?url=#{projectLink}&text=#{text}&hashtags=#{hashtag}&", 'twitterwindow', 'height=450, width=550, top=' + $(window).height() / 2 - 225 + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0' + window.open "http://twitter.com/share?url=#{projectLink}&text=#{text}&hashtags=#{hashtag}&", 'twitterwindow', "height=450, width=550, top=#{$(window).height() / 2 - 225}, left=#{$(window).width() / 2}, toolbar=0, location=0, menubar=0, directories=0, scrollbars=0" return when 'screenshot' screenshotButton = $('.screenshot-button') # Animated it - screenshotButton.addClass 'pulse' - screenshotButton.on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> - $(this).removeClass 'pulse' - return + animateElement screenshotButton # Check the button status if screenshotButton.hasClass('fa-camera') # Change the button icon diff --git a/client/lib/controllers/config.coffee b/client/lib/controllers/config.coffee new file mode 100644 index 0000000..d7d0b88 --- /dev/null +++ b/client/lib/controllers/config.coffee @@ -0,0 +1 @@ +config = (configObject) -> \ No newline at end of file diff --git a/client/lib/controllers/data.coffee b/client/lib/controllers/data.coffee index 297df0d..88b9adf 100644 --- a/client/lib/controllers/data.coffee +++ b/client/lib/controllers/data.coffee @@ -1,5 +1,5 @@ ### Output the data requested ### -output = (type, setFlag) -> +output = (type, configProperty, setFlag) -> switch type when 'image' $.ajax globalFile, @@ -7,17 +7,15 @@ output = (type, setFlag) -> data : action : type success: (image) -> - # Get image from config - readConfig 'background_image' # Split the output image = image.split(';') # Add the image as background-image on body $('body').css 'backgroundImage', "url(#{image[0]})" - # Set the copyright - copyrightText = "Made with Uptimey. " - copyrightText += "Image from Unsplash." - $('#copy').html copyrightText return + # Set the copyright + copyrightText = "Made with Uptimey. " + copyrightText += "Image from Unsplash." + $('#copy').html copyrightText when 'location' $.ajax globalFile, method : 'GET' diff --git a/client/lib/controllers/main.coffee b/client/lib/controllers/index.coffee similarity index 99% rename from client/lib/controllers/main.coffee rename to client/lib/controllers/index.coffee index 9059450..4119c4b 100644 --- a/client/lib/controllers/main.coffee +++ b/client/lib/controllers/index.coffee @@ -6,6 +6,7 @@ init = -> $('.bottom-container').addClass 'animated' $('.val').addClass 'animated' $('.button').addClass 'animated' + # Get the image output 'image' # Get the location diff --git a/client/lib/helpers/utils.coffee b/client/lib/helpers/utils.coffee index b62dbde..d26e1e2 100644 --- a/client/lib/helpers/utils.coffee +++ b/client/lib/helpers/utils.coffee @@ -1,10 +1,38 @@ ### Get a value from the config file ### -readConfig = (property) -> - $.getJSON "#{configFile}?ver=#{moment().format('X')}", (configObject) -> - console.log configObject[property] - return configObject[property] +readConfig = (callback) -> + requestedProperty = $.getJSON "#{configFile}?v=#{moment().format('X')}", (configObject) -> + # Make sure the callback is a function​ + if typeof callback == 'function' + callback configObject + return + return ### Show a notice upon request ### notice = (text) -> $('.notice').remove() - $('body').append "
#{text}
" \ No newline at end of file + $('body').append "
#{text}
" + +### Animate element ### +animateElement = (element) -> + $(element).addClass 'pulse' + $(element).on 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> + $(this).removeClass 'pulse' + return + +### Check if variable is number ### +isNumber = (obj) -> + !isNaN(parseFloat(obj)) + +### Check if variable is empty ### +empty = (data) -> + if typeof data is 'number' or typeof data is 'boolean' + return false + if typeof data is 'undefined' or data is null + return true + if typeof data.length isnt 'undefined' + return data.length == 0 + count = 0 + for i of data + if data.hasOwnProperty(i) + count++ + count == 0 \ No newline at end of file From b3e0ee2fe6a1c7e5f1c83311f0b23cb929b3637f Mon Sep 17 00:00:00 2001 From: stefanbc Date: Thu, 14 Apr 2016 21:38:59 +0300 Subject: [PATCH 47/68] Added read custom config file --- client/bin/app.min.js | 2 +- client/bin/config.json | 12 +++---- client/lib/controllers/config.coffee | 50 +++++++++++++++++++++++++++- client/lib/controllers/data.coffee | 2 +- client/lib/controllers/index.coffee | 2 ++ client/lib/helpers/utils.coffee | 9 ----- client/lib/models/data.php | 30 +++++++++++++++-- 7 files changed, 86 insertions(+), 21 deletions(-) diff --git a/client/bin/app.min.js b/client/bin/app.min.js index b77f377..b526876 100644 --- a/client/bin/app.min.js +++ b/client/bin/app.min.js @@ -1 +1 @@ -(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;o="https://github.com/stefanbc/uptimey",f="./client/lib/models/data.php",d="./client/bin/config.json",l=require("moment"),q="",g=q.globalLocation,h=q.globalSunrise,i=q.globalSunset,p=function(a){var b;b=$.getJSON(d+"?v="+l().format("X"),function(b){"function"==typeof a&&a(b)})},m=function(a){return $(".notice").remove(),$("body").append("
"+a+"
")},b=function(a){return $(a).addClass("pulse"),$(a).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")})},k=function(a){return!isNaN(parseFloat(a))},e=function(a){var b,c;if("number"==typeof a||"boolean"==typeof a)return!1;if("undefined"==typeof a||null===a)return!0;if("undefined"!=typeof a.length)return 0===a.length;b=0;for(c in a)a.hasOwnProperty(c)&&b++;return 0===b},a=function(a){var c,d,e,g,h;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"advanced":b(".advanced-button"),e=$(".advanced-button").attr("data-status"),"default"===e?($(".advanced-button").attr("data-status","advanced"),$(".advanced-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(f,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".advanced-button").attr("data-status","default"),$(".advanced-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),n("uptime","refresh"),n("time","refresh"),n("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":b(".twitter-button"),h="",0!==$("#days").attr("data-value")&&(h+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(h+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(h+=$("#minutes").attr("data-value")+" minutes"),g=h+" server uptime. Can you beat this? via",c="uptimey,devops",window.open("http://twitter.com/share?url="+o+"&text="+g+"&hashtags="+c+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),b(d),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=l().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(f,{method:"GET",data:{action:"clear"}})}},c=function(a){},n=function(a,b,c){var d;switch(a){case"image":$.ajax(f,{method:"GET",data:{action:a},success:function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")")}}),d="Made with Uptimey. ",d+="Image from Unsplash.",$("#copy").html(d);break;case"location":$.ajax(f,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),g=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:g,success:function(a){h=a.sunrise,i=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(f,{method:"GET",data:{action:a,flag:c},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(f,{method:"GET",data:{action:a,flag:c},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,d;b=l(h,"h:m a").format("X"),c=l(i,"h:m a").format("X"),d=l(a[1],"h:m a").format("X"),d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(f,{method:"GET",data:{action:a},error:function(a,b){return m(b)},success:function(a){return m(a)}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},j=function(){return $(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),n("image"),n("location"),n("uptime"),n("time"),n("ping")},$(function(){j(),setInterval(function(){n("uptime"),n("time"),n("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file +(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;p="https://github.com/stefanbc/uptimey",g="./client/lib/models/data.php",e="./client/bin/config.json",m=require("moment"),q="",h=q.globalLocation,i=q.globalSunrise,j=q.globalSunset,n=function(a){return $(".notice").remove(),$("body").append("
"+a+"
")},c=function(a){return $(a).addClass("pulse"),$(a).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("pulse")})},l=function(a){return!isNaN(parseFloat(a))},f=function(a){var b,c;if("number"==typeof a||"boolean"==typeof a)return!1;if("undefined"==typeof a||null===a)return!0;if("undefined"!=typeof a.length)return 0===a.length;b=0;for(c in a)a.hasOwnProperty(c)&&b++;return 0===b},a=function(a){var b,d,e,f,h;switch(e="",a){case"toggle":e=$(".toggle-button").attr("data-status"),"closed"===e?($(".button-container").animate({top:0}),$(".toggle-button").attr("data-status","open"),$(".toggle-button").removeClass("fa-angle-double-down"),$(".toggle-button").addClass("fa-angle-double-up")):"open"===e&&($(".button-container").animate({top:"-80px"}),$(".toggle-button").attr("data-status","closed"),$(".toggle-button").removeClass("fa-angle-double-up"),$(".toggle-button").addClass("fa-angle-double-down"));break;case"advanced":c(".advanced-button"),e=$(".advanced-button").attr("data-status"),"default"===e?($(".advanced-button").attr("data-status","advanced"),$(".advanced-button").addClass("active"),$(".default-panel").fadeOut(500),$(".advanced-panel").fadeIn(500),$.ajax(g,{method:"GET",data:{action:"advanced",flag:"advanced"},success:function(a){$(".advanced-panel .top-container").html(a)}})):"advanced"===e&&($(".advanced-button").attr("data-status","default"),$(".advanced-button").removeClass("active"),$(".advanced-panel").fadeOut(500),$(".default-panel").fadeIn(500));break;case"refresh":$(".refresh-button").addClass("fa-spin"),o("uptime","refresh"),o("time","refresh"),o("ping"),setTimeout(function(){$(".refresh-button").removeClass("fa-spin")},1e3);break;case"twitter":c(".twitter-button"),h="",0!==$("#days").attr("data-value")&&(h+=$("#days").attr("data-value")+" days "),0!==$("#hours").attr("data-value")&&(h+=$("#hours").attr("data-value")+" hours "),0!==$("#minutes").attr("data-value")&&(h+=$("#minutes").attr("data-value")+" minutes"),f=h+" server uptime. Can you beat this? via",b="uptimey,devops",window.open("http://twitter.com/share?url="+p+"&text="+f+"&hashtags="+b+"&","twitterwindow","height=450, width=550, top="+($(window).height()/2-225)+", left="+$(window).width()/2+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0");break;case"screenshot":d=$(".screenshot-button"),c(d),d.hasClass("fa-camera")?(d.removeClass("fa-camera").addClass("fa-download"),html2canvas(document.body,{onrendered:function(a){var b,c;b=a.toDataURL("image/png").replace("image/png","image/octet-stream"),d.attr("href",b),c=m().format("DDMMYYYYHHmmss"),d.attr("download","Screenshot_"+c+".png")}})):setTimeout(function(){return d.removeClass("fa-download").addClass("fa-camera"),d.removeAttr("href").removeAttr("download")},3e3);break;case"clear":$.ajax(g,{method:"GET",data:{action:"clear"}})}},r=function(){var a;return a=document.createElement("style"),a.appendChild(document.createTextNode("")),document.head.appendChild(a),a.sheet}(),b=function(a,b,c,d){"insertRule"in a?a.insertRule(b+"{"+c+"}",d):"addRule"in a&&a.addRule(b,c,d)},d=function(){$.ajax(g,{method:"GET",data:{action:"override",flag:"override"},error:function(a){return console.log(a)},success:function(c){var e,g;d=$.parseJSON(c),f(d.background_color)||(e="background-color: "+d.background_color+";"),f(d.font_family)||(e+="font-family: "+d.font_family+";"),f(d.font_color)||(e+="color: "+d.font_color+";"),b(r,"body",e,0),d.remove_menu===!0&&(g="display: none",b(r,".button-container",g,0)),"advanced"===d.default_view&&a("advanced"),d.show_menu_always===!0&&a("toggle")}})},o=function(a,b){var c;switch(a){case"image":$.ajax(g,{method:"GET",data:{action:a},success:function(a){a=a.split(";"),$("body").css("backgroundImage","url("+a[0]+")")}}),c="Made with Uptimey. ",c+="Image from Unsplash.",$("#copy").html(c);break;case"location":$.ajax(g,{method:"GET",data:{action:a},success:function(a){var b;b="http://ipinfo.io/"+a,$.getJSON(b,function(a){var b;$("#location").text(a.city+", "+a.region+", "+a.country).addClass("fadeIn"),b=a.loc.split(","),$("#location").attr("data-latlong",b[0]+"+"+b[1]),h=a.city+", "+a.region+", "+a.country,$.simpleWeather({location:h,success:function(a){i=a.sunrise,j=a.sunset}})}),$(".location-inner").addClass("fadeIn")}});break;case"uptime":$.ajax(g,{method:"GET",data:{action:a,flag:b},success:function(a){a=a.split(";"),$("#days").text(a[0]).addClass("fadeIn"),$("#days").attr("data-value",a[0]),$("#hours").text(a[1]).addClass("fadeIn"),$("#hours").attr("data-value",a[1]),$("#minutes").text(a[2]).addClass("fadeIn"),$("#minutes").attr("data-value",a[2]),$(".bottom-container").addClass("fadeIn")}});break;case"time":$.ajax(g,{method:"GET",data:{action:a,flag:b},success:function(a){var b;a=a.split(";"),$("#current").text(a[0]).addClass("fadeIn"),b=a[1].split(":"),$("#time").html(b[0]+":"+b[1]).addClass("fadeIn"),$("#since").text(a[2]).addClass("fadeIn"),setTimeout(function(){var b,c,d;b=m(i,"h:m a").format("X"),c=m(j,"h:m a").format("X"),d=m(a[1],"h:m a").format("X"),d>=b&&c>=d?($(".time .fa").removeClass("fa-moon-o fa-circle-o"),$(".time .fa").addClass("fa-sun-o")):($(".time .fa").removeClass("fa-sun-o fa-circle-o"),$(".time .fa").addClass("fa-moon-o"))},3e3),$(".top-container").addClass("fadeIn")}});break;case"ping":$.ajax(g,{method:"GET",data:{action:a},error:function(a,b){return n(b)},success:function(a){return n(a)}})}$(".val").each(function(){$(this).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("fadeIn")})})},k=function(){return d(),$(".top-container").addClass("animated"),$(".bottom-container").addClass("animated"),$(".val").addClass("animated"),$(".button").addClass("animated"),o("image"),o("location"),o("uptime"),o("time"),o("ping")},$(function(){k(),setInterval(function(){o("uptime"),o("time"),o("ping")},6e4),$(".button").each(function(){$(this).on("click",function(){var b;b=$(this).attr("data-action"),a(b)})}),$("#location").on("click",function(){var a;a=$(this).attr("data-latlong"),window.location.href="https://www.google.com/maps/place/"+a})})}).call(this); \ No newline at end of file diff --git a/client/bin/config.json b/client/bin/config.json index c4bfd68..3238013 100644 --- a/client/bin/config.json +++ b/client/bin/config.json @@ -1,12 +1,12 @@ { "font_family" : "", "font_color" : "", - "background_image" : "http://i.imgur.com/sKV54PO.jpg", - "background_color" : "#000000", + "background_image" : "", + "background_color" : "", "debug_mode" : false, - "default_view" : "uptime", // Possible choices: uptime, advanced - "show_menu_always" : false, // Turn off the toggle - "remove_menu" : false, // Don't show the menu at all + "default_view" : "uptime", + "show_menu_always" : false, + "remove_menu" : false, "buttons": [ { "refresh" : true, @@ -17,5 +17,5 @@ "screenshot" : true } ], - "display_timezone" : "" + "display_timezone" : false } \ No newline at end of file diff --git a/client/lib/controllers/config.coffee b/client/lib/controllers/config.coffee index d7d0b88..86213ce 100644 --- a/client/lib/controllers/config.coffee +++ b/client/lib/controllers/config.coffee @@ -1 +1,49 @@ -config = (configObject) -> \ No newline at end of file +sheet = do -> + # Create the