Skip to content

Instantly share code, notes, and snippets.

@ehhthing
Created November 9, 2015 17:25
Show Gist options
  • Save ehhthing/c3c5b0b8ebc755d4c502 to your computer and use it in GitHub Desktop.
Save ehhthing/c3c5b0b8ebc755d4c502 to your computer and use it in GitHub Desktop.
PPymNO
<body>
<div id="content">
<h1 id="h1">Github Is Online</h1>
</div>
<script>
function apiStatus(data) {
console.log(data.status);
var s = data.status
if (s == "good") {
document.body.style.backgroundColor = "#2ecc71";
document.getElementById("h1").innerHTML = "Github is Online";
} else {
document.body.style.backgroundColor = "#e74c3c";
document.getElementById("h1").innerHTML = "Github is Offline";
}
}
</script>
<script src="https://status.github.com/api/status.json?callback=apiStatus"></script>
</body>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
@import url(https://fonts.googleapis.com/css?family=Roboto:100);
html,
body {
font-family: "Roboto", sans-serif;
font-weight: 100;
font-size: 100px;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
display: table;
}
h1 {
font-family: "Roboto", 'Helvetica Neue', 'Helveica', 'Arial', sans-serif;
font-weight: 100;
}
#content {
display: table-cell;
text-align: center;
vertical-align: middle
}
body {
-webkit-font-smoothing: antialiased;
-webkit-transform: translateZ(0px);
-webkit-transition: background 800ms linear;
-moz-transition: background 800ms linear;
-ms-transition: background 800ms linear;
-o-transition: background 800ms linear;
transition: background 800ms linear;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment