Skip to content

Commit

Permalink
📝 Update companion website
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Jul 5, 2022
1 parent 21f3089 commit d6bb842
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 14 deletions.
6 changes: 6 additions & 0 deletions docs/assets/ts-logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/assets/wretch.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 25 additions & 2 deletions docs/index.css
Expand Up @@ -78,6 +78,7 @@ div.front-head {
text-align: center;
}
div.front-links {
display: flex;
margin-top: 10px;
}
div.front-install {
Expand Down Expand Up @@ -125,6 +126,7 @@ div.logo img {
}
div.shortdesc {
text-align: center;
font-weight: 600;
margin: 20px 0px;
}
div.tags {
Expand All @@ -135,7 +137,7 @@ div.tags > * {
margin: 10px 10px;
color: black;
padding: 3px 10px;
font-size: 0.7em;
font-size: 0.9em;
font-weight: bold;
border-radius: 15px;
border: 3px solid;
Expand All @@ -145,6 +147,7 @@ div.tags > * {
div.tags-boxes > * {
display: none;
font-family: 'Josefin Sans', sans-serif;
font-size: 1.1em;
padding: 10px 0px;
line-height: 1.5em;
/* border-bottom: 2px solid; */
Expand Down Expand Up @@ -218,16 +221,36 @@ a.github {
padding: 0px 10px 5px 10px;
border-bottom: 2px solid #e78c45;
transition: all 0.25s;
margin-right: 5px;
}
a.github:hover {
color: #e78c45;
}
a.api-doc-link {
display: flex;
align-items: center;
font-size: 1.2em;
line-height: 1.5em;
padding: 0px 10px 5px 10px;
border-bottom: 2px solid #3178c6;
transition: all 0.25s;
}
a.api-doc-link > img {
height: 1em;
width: 1em;
margin-right: 5px;
}
a.api-doc-link:hover {
color: #3178c6;
}
pre.npm {
font-size: 1.3em;
display: inline-block;
padding-bottom: 5px;
border-bottom: 2px solid #d54e53;
}
pre.unpkg {
font-size: 1.3em;
display: inline-block;
padding-bottom: 5px;
border-bottom: 2px solid #b9ca4a;
Expand Down Expand Up @@ -267,4 +290,4 @@ div.helper-tag > .icon {
padding: 5px 10px;
background: #e7c547;
color: black;
}
}
31 changes: 19 additions & 12 deletions docs/index.html
Expand Up @@ -6,7 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Wretch - The fetch wrapper</title>
<link href="https://fonts.googleapis.com/css?family=Raleway|Josefin+Sans" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;600&family=Raleway:wght@400;600"
rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/tomorrow-night-bright.min.css"
rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
Expand All @@ -19,7 +20,7 @@
<section class="front-section" data-scroll id="front">
<div class="front-head">
<div class="logo">
<img src="https://cdn.rawgit.com/elbywan/wretch/08831345/wretch.svg" alt="wretch-logo">
<img src="./assets/wretch.svg" alt="wretch-logo">
</div>
<h1 class="logo-name">Wretch</h1>
<div class="tags">
Expand Down Expand Up @@ -56,8 +57,14 @@ <h1 class="logo-name">Wretch</h1>
</div>
</div>
<div class="front-links">
<a class="github" href="https://github.com/elbywan/wretch"><i class="fa fa-github" aria-hidden="true"></i>
Github</a>
<a class="github" href="https://github.com/elbywan/wretch">
<i class="fa fa-github" aria-hidden="true"></i>
Github
</a>
<a class="api-doc-link" href="https://elbywan.github.io/wretch/api">
<img src="assets/ts-logo.svg" />
API
</a>
</div>
<div class="front-install">
<a href="https://www.npmjs.com/package/wretch">
Expand All @@ -79,43 +86,43 @@ <h1 class="usage-header">Usage</h1>
<div>
<div class="helper-tag">
<div class="icon"><i class="fa fa-download" aria-hidden="true"></i></div>
<a href="https://github.com/elbywan/wretch#import">Import wretch</a>
<a href="https://github.com/elbywan/wretch#usage">Import wretch</a>
</div>
<pre><code class="javascript">import wretch from "wretch"</code></pre>

<div class="helper-tag">
<div class="icon"><i class="fa fa-phone" aria-hidden="true"></i></div>
<a href="https://github.com/elbywan/wretch#wretchurl---opts--">Call the wretch function</a>
<a href="https://elbywan.github.io/wretch/api/functions/index.default-1.html">Create a new instance</a>
</div>
<pre><code class="javascript">wretch()</code></pre>

<div class="helper-tag">
<div class="icon"><i class="fa fa-medkit" aria-hidden="true"></i></div>
<a href="https://github.com/elbywan/wretch#helper-methods">Chain helper methods</a>
<a href="https://github.com/elbywan/wretch#helper-methods-">Chain helper methods</a>
</div>
<pre><code class="javascript"> .helperMethods() //.url, .options, .headers ...</code></pre>

<div class="helper-tag">
<div class="icon"><i class="fa fa-male" aria-hidden="true"></i></div>
<a href="https://github.com/elbywan/wretch#body-types">Add a body type if you need to upload data</a>
<a href="https://github.com/elbywan/wretch#body-types-">Add a body type if you need to upload data</a>
</div>
<pre><code class="javascript"> .bodyType() // .json, .formData, .formUrl ...</code></pre>

<div class="helper-tag">
<div class="icon"><i class="fa fa-paper-plane" aria-hidden="true"></i></div>
<a href="https://github.com/elbywan/wretch#http-methods">Specify the http method</a>
<a href="https://github.com/elbywan/wretch#http-methods-">Specify the http method</a>
</div>
<pre><code class="javascript"> .httpMethod() // .get, .post, .put ...</code></pre>

<div class="helper-tag">
<div class="icon"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i></div>
<a href="https://github.com/elbywan/wretch#catchers">Chain catchers</a>
<a href="https://github.com/elbywan/wretch#catchers-">Chain catchers</a>
</div>
<pre><code class="javascript"> .errorCatchers() // .notFound, .unauthorized ...</code></pre>

<div class="helper-tag">
<div class="icon"><i class="fa fa-cogs" aria-hidden="true"></i></div>
<a href="https://github.com/elbywan/wretch#response-types">Specify the response type</a>
<a href="https://github.com/elbywan/wretch#response-types-">Specify the response type</a>
</div>
<pre><code class="javascript"> .responseType() // .json, .blob ...</code></pre>

Expand All @@ -127,7 +134,7 @@ <h1 class="usage-header">Usage</h1>
<pre><code class="javascript"> .then/catch()</code></pre>
<div class="helper-tag">
<div class="icon"><i class="fa fa-magic" aria-hidden="true"></i></div>
<a href="https://github.com/elbywan/wretch#extras">And there are some extras !</a>
<a href="https://github.com/elbywan/wretch#addons">And there are some extras!</a>
</div>
<pre><code class="javascript">// Like aborting a request <i class="fa fa-smile-o" aria-hidden="true"></i></code></pre>
</section>
Expand Down

0 comments on commit d6bb842

Please sign in to comment.