mirror of
https://gitlab.com/2-chainz/2-chainz-rest-site.git
synced 2025-06-15 14:46:48 +00:00
81 lines
2.4 KiB
HTML
81 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32" />
|
|
<link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16" />
|
|
<link rel="stylesheet" href="css/mvp.css" />
|
|
|
|
<meta charset="utf-8" />
|
|
<meta name="description" content="A REST API for 2 Chainz Quotes." />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta property="og:title" content="2 Chainz Rest API" />
|
|
<meta property="og:url" content="https://2.chainz.rest" />
|
|
<meta
|
|
property="og:description"
|
|
content="A free REST API for 2 Chainz quotes"
|
|
/>
|
|
<meta property="og:type" content="website" />
|
|
|
|
<meta name="twitter:card" content="summary" />
|
|
<meta name="twitter:creator" content="@Anson_3D" />
|
|
<meta name="twitter:url" content="https://2.chainz.rest" />
|
|
<meta name="twitter:title" content="2.chainz.rest" />
|
|
<meta
|
|
name="twitter:description"
|
|
content="A free REST API for 2 Chainz quotes"
|
|
/>
|
|
<meta
|
|
name="twitter:image"
|
|
content="https://api.chainz.rest/static/apple-icon.png"
|
|
/>
|
|
<style>
|
|
body {
|
|
background-color: #d9c06e;
|
|
color: #03252a;
|
|
}
|
|
|
|
:root {
|
|
--color: darkviolet;
|
|
--color-bg-secondary: black;
|
|
}
|
|
.center {
|
|
padding-top: 30vh;
|
|
}
|
|
@media screen and (max-width: 400px) {
|
|
#scroll-icon {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
<title>2.chainz.rest</title>
|
|
</head>
|
|
|
|
<body>
|
|
<blockquote class="center">
|
|
<span id="quote">Make an Asian want hibachi</span>
|
|
<footer><i id="alias">- 2 Chainz</i></footer>
|
|
</blockquote>
|
|
|
|
<script>
|
|
getQuote();
|
|
// Get new quote every 15 minutes
|
|
setInterval(getQuote, 900000);
|
|
|
|
function getQuote() {
|
|
fetch("https://chainz-rest.azurewebsites.net/quote", { method: "GET" })
|
|
.then((resp) => resp.json())
|
|
.then(function (data) {
|
|
document.getElementById("quote").innerHTML = data.quote;
|
|
});
|
|
|
|
fetch("https://chainz-rest.azurewebsites.net/alias", { method: "GET" })
|
|
.then((resp) => resp.json())
|
|
.then(function (data) {
|
|
document.getElementById("alias").innerHTML = "- " + data.alias;
|
|
});
|
|
}
|
|
</script>
|
|
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
|
|
</body>
|
|
</html>
|