mirror of
https://gitlab.com/2-chainz/2-chainz-rest-site.git
synced 2025-06-15 14:46:48 +00:00
updated domain
This commit is contained in:
parent
1ad45f0ab1
commit
2fe4c176a8
35
index.html
35
index.html
@ -9,7 +9,7 @@
|
||||
<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:url" content="https://2chainz.ansonbiggs.com" />
|
||||
<meta
|
||||
property="og:description"
|
||||
content="A free REST API for 2 Chainz quotes"
|
||||
@ -18,16 +18,13 @@
|
||||
|
||||
<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:url" content="https://2chainz.ansonbiggs.com" />
|
||||
<meta name="twitter:title" content="2chainz.ansonbiggs.com" />
|
||||
<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>
|
||||
* {
|
||||
transition: all 0.2s ease-out; /* Thanks https://news.ycombinator.com/item?id=19594993 */
|
||||
@ -59,7 +56,7 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<title>2.chainz.rest</title>
|
||||
<title>2chainz.ansonbiggs.com</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -67,7 +64,7 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://2.chainz.rest">2.chainz.rest</a> - A REST API for 2
|
||||
<a href="https://2chainz.ansonbiggs.com">2chainz.ansonbiggs.com</a> - A REST API for 2
|
||||
Chainz Quotes
|
||||
</li>
|
||||
</ul>
|
||||
@ -112,8 +109,8 @@
|
||||
<p>
|
||||
send a <code>get</code> request to
|
||||
<code
|
||||
><a href="https://api.chainz.rest/quote"
|
||||
>https://api.chainz.rest/quote</a
|
||||
><a href="https://chainz-rest.azurewebsites.net/quote"
|
||||
>https://chainz-rest.azurewebsites.net/quote</a
|
||||
></code
|
||||
>
|
||||
</p>
|
||||
@ -135,8 +132,8 @@
|
||||
>
|
||||
and is subject to change. An example return from
|
||||
<code>
|
||||
<a href="https://api.chainz.rest/quote?batch=2"
|
||||
>https://api.chainz.rest/quote?batch=2</a
|
||||
<a href="https://chainz-rest.azurewebsites.net/quote?batch=2"
|
||||
>https://chainz-rest.azurewebsites.net/quote?batch=2</a
|
||||
></code
|
||||
>
|
||||
</p>
|
||||
@ -163,8 +160,8 @@
|
||||
<p>
|
||||
send a <code>get</code> request to
|
||||
<code
|
||||
><a href="https://api.chainz.rest/alias"
|
||||
>https://api.chainz.rest/alias</a
|
||||
><a href="https://chainz-rest.azurewebsites.net/alias"
|
||||
>https://chainz-rest.azurewebsites.net/alias</a
|
||||
></code
|
||||
>
|
||||
</p>
|
||||
@ -176,7 +173,7 @@
|
||||
<section>
|
||||
<header>
|
||||
<h2>
|
||||
Projects built using 2.chainz.rest (Your project could be here!)
|
||||
Projects built using 2chainz.ansonbiggs.com (Your project could be here!)
|
||||
</h2>
|
||||
</header>
|
||||
<aside>
|
||||
@ -278,20 +275,20 @@
|
||||
getQuote();
|
||||
|
||||
function getQuote() {
|
||||
fetch("https://api.chainz.rest/quote", { method: "GET" })
|
||||
fetch("https://chainz-rest.azurewebsites.net/quote", { method: "GET" })
|
||||
.then((resp) => resp.json())
|
||||
.then(function (data) {
|
||||
document.getElementById("quote").innerHTML = data.quote;
|
||||
|
||||
const tweet = encodeURIComponent(
|
||||
`"${data.quote}" -@2chainz via https://2.chainz.rest`
|
||||
`"${data.quote}" -@2chainz via https://2chainz.ansonbiggs.com`
|
||||
);
|
||||
document.getElementById(
|
||||
"tweet"
|
||||
).href = `https://twitter.com/intent/tweet?text=${tweet}`;
|
||||
});
|
||||
|
||||
fetch("https://api.chainz.rest/alias", { method: "GET" })
|
||||
fetch("https://chainz-rest.azurewebsites.net/alias", { method: "GET" })
|
||||
.then((resp) => resp.json())
|
||||
.then(function (data) {
|
||||
document.getElementById("alias").innerHTML = "- " + data.alias;
|
||||
|
Loading…
x
Reference in New Issue
Block a user