website: website up badge tweaks

This commit is contained in:
Thaddee Tyl 2016-05-18 23:57:55 +02:00
parent bf78077010
commit f69be9b2c0
2 changed files with 51 additions and 5 deletions

View File

@ -388,6 +388,10 @@ Pixel-perfect   Retina-ready   Fast   Consistent   Hackable
<td><img src='https://img.shields.io/chrome-web-store/d/nimelepbpejjlbmoobocpfnjhihnpked.svg?maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/chrome-web-store/d/nimelepbpejjlbmoobocpfnjhihnpked.svg</code></td>
</tr>
<tr><th data-keywords='website' data-doc='websiteDoc'> Website: </th>
<td><img src='https://img.shields.io/website-up-down-green-red/http/shields.io.svg?maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/website-up-down-green-red/http/shields.io.svg</code></td>
</tr>
</tbody></table>
<h3 id="version"> Version </h3>
<table class='badge'><tbody>
@ -1021,6 +1025,48 @@ is where the current server got started.
<code>https://img.shields.io/vso/build/TEAM_NAME/PROJECT_ID/BUILD_DEFINITION_ID</code>.
</p>
</div>
<div id="websiteDoc">
<p>The badge is of the form <code>https://img.shields.io/website[OPTIONS]/PROTOCOL/URLREST.svg</code>,
the simplest case being <code>https://img.shields.io/website/http/example.com.svg</code>.
More options are described below.
</p>
<p>The whole URL is obtained by concatenating the <code>PROTOCOL</code> (<code>http</code> or <code>https</code>, for example)
with the <code>URLREST</code> (separating them with <code>://</code>).
</p>
<p>
The existence of a specific path on the server can be checked by appending a path after the domain name, e.g.
<code>https://img.shields.io/website/http/www.website.com/path/to/page.html.svg</code>.
</p>
<p>The URLREST should be URLEncoded:<br>
<input type="text" id="websiteDocUrlField" placeholder="Paste your URL (without the protocol) here" /><br>
<input type="button" onclick="(function(el) { el.value = encodeURIComponent(el.value); })(document.getElementById('websiteDocUrlField'))" value="Encode" />
<input type="button" onclick="(function(el) { el.value = decodeURIComponent(el.value); })(document.getElementById('websiteDocUrlField'))" value="Decode" />
</p>
<p><code>[OPTIONS]</code> can be:
<ul>
<li>Nothing:
<code>…/website/…</code></li>
<li>Online and offline text:
<code>…/website-up-down/…</code></li>
<li>Online and offline text, then online and offline colors:
<code>…/website-up-down-green-orange/…</code></li>
</ul>
<table class=centered><tbody>
<tr><td> Dashes <code>--</code>
</td><td>
</td><td> <code>-</code> Dash
</td></tr>
<tr><td> Underscores <code>__</code>
</td><td>
</td><td> <code>_</code> Underscore <br/>
</td></tr>
<tr><td> <code>_</code> or Space <code>&nbsp;</code>
</td><td>
</td><td> <code>&nbsp;</code> Space
</td></tr>
</tbody></table>
</p>
</div>
</div>
<svg style='height:0'>

View File

@ -388,7 +388,7 @@ Pixel-perfect &nbsp; Retina-ready &nbsp; Fast &nbsp; Consistent &nbsp; Hackable
<td><code>https://img.shields.io/chrome-web-store/d/nimelepbpejjlbmoobocpfnjhihnpked.svg</code></td>
</tr>
<tr><th data-keywords='website' data-doc='websiteDoc'> Website: </th>
<td><img src='https://img.shields.io/website-up-down-green-red/http/shields.io.svg' alt=''/></td>
<td><img src='/website-up-down-green-red/http/shields.io.svg' alt=''/></td>
<td><code>https://img.shields.io/website-up-down-green-red/http/shields.io.svg</code></td>
</tr>
</tbody></table>
@ -1026,18 +1026,18 @@ is where the current server got started.
</div>
<div id="websiteDoc">
<p>The badge is of the form <code>https://img.shields.io/website[OPTIONS]/PROTOCOL/URLREST.svg</code>,
the simplest case being <code>https://img.shields.io/website/http/www.website.com.svg</code>.
the simplest case being <code>https://img.shields.io/website/http/example.com.svg</code>.
More options are described below.
</p>
<p>The whole URL is obtained by concatenating the <code>PROTOCOL</code> (<code>http</code> or <code>https</code>, for example)
with the <code>URLREST</code> (separating them with <code>://</code>).
</p>
<p>
The existance of a specific path on the server can be checked by appending a path after the domain name, e.g.
The existence of a specific path on the server can be checked by appending a path after the domain name, e.g.
<code>https://img.shields.io/website/http/www.website.com/path/to/page.html.svg</code>.
</p>
<p>The URLREST should be URLEncoded:
<input type="text" id="websiteDocUrlField" placeholder="Paste your URL (without the protocol) here" />
<p>The URLREST should be URLEncoded:<br>
<input type="text" id="websiteDocUrlField" placeholder="Paste your URL (without the protocol) here" /><br>
<input type="button" onclick="(function(el) { el.value = encodeURIComponent(el.value); })(document.getElementById('websiteDocUrlField'))" value="Encode" />
<input type="button" onclick="(function(el) { el.value = decodeURIComponent(el.value); })(document.getElementById('websiteDocUrlField'))" value="Decode" />
</p>