1
0
mirror of https://gitlab.com/2-chainz/2-chainz-rest-site.git synced 2025-06-16 07:06:51 +00:00

complete rewrite

This commit is contained in:
Anson 2020-04-07 04:16:47 -07:00
parent 78147cf204
commit f0c480bf28
6 changed files with 124 additions and 1524 deletions

155
404.html
View File

@ -1,155 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script
async
src="https://www.googletagmanager.com/gtag/js?id=UA-134041866-2"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "UA-134041866-2");
</script>
<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="apple-touch-icon"
sizes="57x57"
href="static/apple-icon-57x57.png"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="static/apple-icon-60x60.png"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="static/apple-icon-72x72.png"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="static/apple-icon-76x76.png"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="static/apple-icon-114x114.png"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="static/apple-icon-120x120.png"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="static/apple-icon-144x144.png"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="static/apple-icon-152x152.png"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="static/apple-icon-180x180.png"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="static/android-icon-192x192.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="static/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="static/favicon-96x96.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="static/favicon-16x16.png"
/>
<link rel="manifest" href="static/manifest.json" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-TileImage" content="static/ms-icon-144x144.png" />
<meta name="theme-color" content="#ffffff" />
<meta property="og:title" content="2.chainz.rest" />
<meta property="og:site_name" content="2.chainz.rest" />
<meta property="og:url" content="https://2.chainz.rest" />
<meta
property="og:description"
content="A free REST API for random 2 Chainz quotes"
/>
<meta property="og:type" content="website" />
<meta
property="og:image"
content="https://2.chainz.rest/static/apple-icon.png"
/>
<meta name="twitter:card" content="summary" />
<meta name="twitter:creator" content="@ajzbc" />
<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 random 2 Chainz quotes"
/>
<meta
name="twitter:image"
content="https://2.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"
/>
</head>
<body>
<div class="wrapper">
<nav class="nav">
<div class="nav-left">
<a class="brand" href="../">⛓ api.chainz.rest</a>
</div>
</nav>
<div class="notfound">
<h1 class="">I'm lost in the world</h1>
<i>
<h4 class="is-text-right">- Ye</h4>
</i>
</div>
</div>
</body>
</html>

1
CNAME
View File

@ -1 +0,0 @@
api.chainz.rest

View File

@ -1,59 +0,0 @@
#carbonads {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
#carbonads {
display: flex;
max-width: 330px;
background-color: hsl(0, 0%, 98%);
box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, .1);
}
#carbonads a {
color: inherit;
text-decoration: none;
}
#carbonads a:hover {
color: inherit;
}
#carbonads span {
position: relative;
display: block;
overflow: hidden;
}
#carbonads .carbon-wrap {
display: flex;
}
.carbon-img {
display: block;
margin: 0;
line-height: 1;
}
.carbon-img img {
display: block;
}
.carbon-text {
font-size: 13px;
padding: 10px;
line-height: 1.5;
text-align: left;
}
.carbon-poweredby {
display: block;
padding: 8px 10px;
background: repeating-linear-gradient(-45deg, transparent, transparent 5px, hsla(0, 0%, 0%, .025) 5px, hsla(0, 0%, 0%, .025) 10px) hsla(203, 11%, 95%, .4);
text-align: center;
text-transform: uppercase;
letter-spacing: .5px;
font-weight: 600;
font-size: 9px;
line-height: 1;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,121 +0,0 @@
html {
padding-left: calc(100vw - 100%);
overflow-x: hidden;
}
body {
color: var(--color-primary);
}
.wrapper {
max-width: 800px;
margin: 10px auto;
}
.nav #themeToggle {
margin-top: 0.4em;
cursor: pointer;
}
.nav a {
padding-bottom: 0px !important;
}
.inner {
padding: 1em;
}
.section {
padding: 1em;
font-size: 1.1em;
border: 2px solid var(--color-primary);
border-radius: 10px;
margin-bottom: 1em;
}
.title {
margin: 0;
margin-left: 0.3em !important;
margin-bottom: 0.2em;
}
.button {
font-size: 1.15em !important;
font-weight: 700;
}
.demo {
font-size: 1.25em;
font-weight: 700;
}
.demo a {
text-decoration: underline;
}
.extra {
font-size: 1em;
font-weight: 700;
margin: 0;
margin-top: 1.5em;
}
.extra a {
text-decoration: underline;
}
.no-top {
padding-top: 0 !important;
}
.tab {
margin-left: 2em;
}
#quote {
font-weight: 700;
}
footer {
margin-top: 2em;
margin-left: 1em;
margin-right: 1em;
font-size: 1.1em;
font-weight: 700;
text-align: center;
}
footer p {
margin: 0;
margin-bottom: 0.5em;
}
.wavy {
font-size: 0.8em;
font-weight: 500;
}
.notfound {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* https://stackoverflow.com/a/4407335 */
.noselect {
-webkit-touch-callout: none;
/* iOS Safari */
-webkit-user-select: none;
/* Safari */
-khtml-user-select: none;
/* Konqueror HTML */
-moz-user-select: none;
/* Firefox */
-ms-user-select: none;
/* Internet Explorer/Edge */
user-select: none;
/* Non-prefixed version, currently
supported by Chrome and Opera */
}

View File

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