mirror of
https://gitlab.com/2-chainz/2-chainz-rest-site.git
synced 2025-07-30 01:51:25 +00:00
complete rewrite
This commit is contained in:
217
index.html
217
index.html
@@ -3,15 +3,12 @@
|
||||
<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" />
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>2.chainz.rest</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="A free REST API for random 2 Chainz quotes"
|
||||
/>
|
||||
<link rel="stylesheet" href="https://andybrewer.github.io/mvp/mvp.css" />
|
||||
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="My description" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta property="og:title" content="api.chainz.rest" />
|
||||
<meta property="og:site_name" content="api.chainz.rest" />
|
||||
<meta property="og:url" content="https://api.chainz.rest" />
|
||||
@@ -33,103 +30,137 @@
|
||||
name="twitter:image"
|
||||
content="https://api.chainz.rest/static/apple-icon.png"
|
||||
/>
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
href="css/index.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
href="css/chota.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
media="screen"
|
||||
href="css/carbon.css"
|
||||
/>
|
||||
<style>
|
||||
@media screen and (max-width: 700px) {
|
||||
ion-icon {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<title>2.chainz.rest</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<nav class="nav">
|
||||
<div class="nav-left">
|
||||
<a class="brand" href="../">⛓ api.chainz.rest</a>
|
||||
</div>
|
||||
<header style="height: 50vh;">
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://2.chainz.rest">2.chainz.rest</a> - A REST API for 2
|
||||
Chainz Quotes
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="inner">
|
||||
<p>A free REST API for random 2 Chainz quotes</p>
|
||||
<h3 class="title">API Usage</h3>
|
||||
<div class="section">
|
||||
<div class="row">
|
||||
<div class="col is-full is-marginless">
|
||||
<p class="demo is-center">
|
||||
GET <a href="https://api.chainz.rest" target="_blank"
|
||||
>https://api.chainz.rest</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col is-full is-marginless is-center">
|
||||
<a class="button clear no-top noselect" id="tweet" target="_blank"
|
||||
>📢 Tweet</a
|
||||
>
|
||||
<a class="button clear no-top noselect" onclick="getQuote()"
|
||||
>🔄 Refresh</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<section>
|
||||
<blockquote>
|
||||
<span id="quote">Quote</span>
|
||||
<footer><i>- 2 Chainz</i></footer>
|
||||
</blockquote>
|
||||
</section>
|
||||
<p>
|
||||
<a onclick="getQuote()" href="#"><b>New Quote 🔃</b></a>
|
||||
<a id="tweet" href="#"><b>Tweet Quote 🐦</b></a>
|
||||
</p>
|
||||
</header>
|
||||
<header style="height: 30vh;">
|
||||
<a href="#scroll"
|
||||
><ion-icon size="large" name="arrow-down-sharp"></ion-icon
|
||||
></a>
|
||||
</header>
|
||||
<main>
|
||||
<hr style="padding-top: 0;" />
|
||||
<header id="scroll">
|
||||
<h2>Usage</h2>
|
||||
<p>
|
||||
The API currently only has one endpoint:
|
||||
<code
|
||||
>{
|
||||
<div class="tab">"quote": "<span id="quote"></span>"</div>
|
||||
}</code
|
||||
><a href="https://api.chainz.rest/quote"
|
||||
>https://api.chainz.rest/quote</a
|
||||
></code
|
||||
>
|
||||
<br />
|
||||
<!-- <p class="extra">
|
||||
Extra:
|
||||
<a href="https://api.chainz.rest?format=text" target="_blank"
|
||||
>https://api.chainz.rest?format=text</a
|
||||
>
|
||||
</p> -->
|
||||
</div>
|
||||
|
||||
<h3 class="title">FAQ</h3>
|
||||
<div class="section">
|
||||
<b>Can I use this in my project?</b>
|
||||
which returns a JSON object containing a quote.
|
||||
</p>
|
||||
</header>
|
||||
<hr />
|
||||
<section>
|
||||
<header>
|
||||
<h2>Frequently Asked Questions</h2>
|
||||
</header>
|
||||
<aside>
|
||||
<h3>Can I use this?</h3>
|
||||
<p>
|
||||
Yes. Do what ever you want with it!
|
||||
<a href="https://twitter.com/Anson_3D" target="_blank"
|
||||
>Let me know what you make!</a
|
||||
Please do! This project uses a
|
||||
<a href="https://tldrlegal.com/license/mit-license#summary"
|
||||
>MIT License</a
|
||||
>
|
||||
which means your welcome to do whatever you want.
|
||||
</p>
|
||||
<p>
|
||||
<small
|
||||
><a href="https://twitter.com/Anson_3D"
|
||||
>Please let me know if you use it though!</a
|
||||
></small
|
||||
>
|
||||
</p>
|
||||
<b>Is the API rate limited?</b>
|
||||
<p>No, but be generous.</p>
|
||||
<b>Is it open source? Can I contribute?</b>
|
||||
</aside>
|
||||
<aside>
|
||||
<h3>Do I need an API key or is this API rate limited?</h3>
|
||||
<p>
|
||||
Yes! Checkout the code on
|
||||
<a href="https://gitlab.com/2-chainz" target="_blank">Gitlab</a>
|
||||
No, the API is totally free and unlimited. However, its being hosted
|
||||
by a college student so be nice.
|
||||
</p>
|
||||
</div>
|
||||
</aside>
|
||||
<aside>
|
||||
<h3>Is this project open source? Can I contribute?</h3>
|
||||
<p>
|
||||
Yes and Yes! Check out the
|
||||
<a href="https://gitlab.com/2-chainz">Project on GitLab</a>
|
||||
</p>
|
||||
</aside>
|
||||
<aside>
|
||||
<h3>Does 2 Chainz know about this?</h3>
|
||||
<p>
|
||||
Probably not.
|
||||
</p>
|
||||
</aside>
|
||||
<aside>
|
||||
<h3>Why?</h3>
|
||||
<p>
|
||||
Because 2 Chainz has some of the best lines in the rap game.
|
||||
</p>
|
||||
</aside>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
<hr />
|
||||
<p>
|
||||
Made by <a href="https://gitlab.com/MisterBiggs">Anson Biggs</a>,
|
||||
<a href="https://twitter.com/Anson_3D">@Anson_3D</a>
|
||||
</p>
|
||||
<p>
|
||||
Inspired By <a href="https://kanye.rest/">kanye.rest</a> which was
|
||||
created by:
|
||||
<a href="https://ajzbc.com" target="_blank">Andrew Jazbec</a>,
|
||||
<a href="https://twitter.com/ajzbc" target="_blank">@ajzbc</a>
|
||||
</p>
|
||||
<p><small>Truuuuuuuu</small></p>
|
||||
</footer>
|
||||
<script>
|
||||
getQuote();
|
||||
|
||||
<footer>
|
||||
<p>
|
||||
Made by
|
||||
<a href="https://Anson_3D.com" target="_blank">Anson Biggs</a>
|
||||
<a href="https://twitter.com/Anson_3D" target="_blank">@Anson_3D</a>
|
||||
</p>
|
||||
function getQuote() {
|
||||
fetch("https://api.chainz.rest/quote", { method: "GET" })
|
||||
.then((resp) => resp.json())
|
||||
.then(function (data) {
|
||||
document.getElementById("quote").innerHTML = data.quote;
|
||||
|
||||
<p>
|
||||
Inspired By
|
||||
<a href="https://ajzbc.com" target="_blank">Andrew Jazbec</a>
|
||||
<a href="https://twitter.com/ajzbc" target="_blank">@ajzbc</a>
|
||||
</p>
|
||||
<i class="wavy">Truuuuuuuu</i>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
<script src="js/index.js"></script>
|
||||
const tweet = encodeURIComponent(
|
||||
`"${data.quote}" -@2chainz via https://2.chainz.rest`
|
||||
);
|
||||
document.getElementById(
|
||||
"tweet"
|
||||
).href = `https://twitter.com/intent/tweet?text=${tweet}`;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user