Skip to content

Commit

Permalink
Massive documentation improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuelie committed Jun 16, 2021
1 parent 44dd831 commit 9b303e5
Show file tree
Hide file tree
Showing 14 changed files with 2,649 additions and 2,010 deletions.
72 changes: 67 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,76 @@

Custom HTML Elements and helpers for [Shields.io](https://shields.io/) Badges.

## `shieldio-badge-dynamic` element
## Shield IO Badges

Used to show a dynamic badge.
All Shield.io badges have the following attributes:

- `label`: the left-hand-side text if overwritten; otherwise null.
- `logo`: the logo to use.
- `color`: the color of the right-hand-side background.
- `logocolor`: the color of the logo.
- `labelcolor`: the color of the left-hand-side background.
- `logowidth`: the horizontal space for the logo.
- `badgestyle`: the style of the badge. Can be:
- `plastic`
- `flat`
- `flat-square`
- `for-the-badge`
- `social`

## `shieldio-badge` element
### `shieldio-badge` element

Used to show a static badge.

## `simpleicon-badge` element
In addition to the common attributes, the static also supports:

- `message` the right-hand-side text.

```html
<shieldio-badge label="Label" message="message" color="green"></shieldio-badge>
```

![Static Example](https://img.shields.io/badge/Label-Message-green)

### `shieldio-badge-dynamic` element

Used to show a dynamic badge.

In addition to the common attributes, the dynamic also supports:

- `dataurl`: the URL of the data to base the badge on.
- `dataquery`: the query for the dynamic content.
- `prefix`: the text to prefix the dynamic content.
- `suffix`: the text to suffix the dynamic content.
- `datatype`: the type of data to process. Can be:
- `xml`
- `json`
- `yaml`

```html
<shieldio-badge-dynamic datatype="xml" dataurl="https://raw.githubusercontent.com/PH16-Productions/tv.ph16.paperplugin/main/pom.xml" label="Java Version" dataquery="//*[local-name() = 'java.version']"></shieldio-badge-dynamic>
```

![Dynamic Example](https://img.shields.io/badge/dynamic/xml?label=Java%20Version&query=%2F%2F%2A%5Blocal-name%28%29%20%3D%20%27java.version%27%5D&url=https%3A%2F%2Fraw.githubusercontent.com%2FPH16-Productions%2Ftv.ph16.paperplugin%2Fmain%2Fpom.xml)

## Other Badges

### `simpleicon-badge` element

Shows a badge for a simple icon.

Supports the following attributes:

- `logo`: the simple icon logo to display.
- `badgestyle`: the style of the badge. Can be:
- `plastic`
- `flat`
- `flat-square`
- `for-the-badge`
- `social`

```html
<simpleicon-badge logo="GitHub"></simpleicon-badge>
```

Shows a badge for a simple icon
![Simple Example](https://img.shields.io/static/v1?label=&message=GitHub&logo=GitHub&color=181717&logoColor=FFFFFF&style=flat)
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Large diffs are not rendered by default.

78 changes: 43 additions & 35 deletions docs/classes/shieldiodynamicbadge.html

Large diffs are not rendered by default.

62 changes: 35 additions & 27 deletions docs/classes/shieldiostaticbadge.html

Large diffs are not rendered by default.

440 changes: 440 additions & 0 deletions docs/classes/simpleiconbadge.html

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions docs/enums/badgestyle.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h3>Flat</h3>
<div class="tsd-signature tsd-kind-icon">Flat<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = &quot;flat&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/SamuelEnglard/shieldsio-elements/blob/38bffb6/src/BadgeStyle.ts#L12">BadgeStyle.ts:12</a></li>
<li>Defined in <a href="https://github.com/shmuelie/shieldsio-elements/blob/05afdd7/src/BadgeStyle.ts#L12">BadgeStyle.ts:12</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -110,7 +110,7 @@ <h3>Flat<wbr>Square</h3>
<div class="tsd-signature tsd-kind-icon">Flat<wbr>Square<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = &quot;flat-square&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/SamuelEnglard/shieldsio-elements/blob/38bffb6/src/BadgeStyle.ts#L16">BadgeStyle.ts:16</a></li>
<li>Defined in <a href="https://github.com/shmuelie/shieldsio-elements/blob/05afdd7/src/BadgeStyle.ts#L16">BadgeStyle.ts:16</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -125,7 +125,7 @@ <h3>For<wbr>The<wbr>Badge</h3>
<div class="tsd-signature tsd-kind-icon">For<wbr>The<wbr>Badge<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = &quot;for-the-badge&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/SamuelEnglard/shieldsio-elements/blob/38bffb6/src/BadgeStyle.ts#L20">BadgeStyle.ts:20</a></li>
<li>Defined in <a href="https://github.com/shmuelie/shieldsio-elements/blob/05afdd7/src/BadgeStyle.ts#L20">BadgeStyle.ts:20</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -140,7 +140,7 @@ <h3>Plastic</h3>
<div class="tsd-signature tsd-kind-icon">Plastic<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = &quot;plastic&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/SamuelEnglard/shieldsio-elements/blob/38bffb6/src/BadgeStyle.ts#L8">BadgeStyle.ts:8</a></li>
<li>Defined in <a href="https://github.com/shmuelie/shieldsio-elements/blob/05afdd7/src/BadgeStyle.ts#L8">BadgeStyle.ts:8</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -155,7 +155,7 @@ <h3>Social</h3>
<div class="tsd-signature tsd-kind-icon">Social<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = &quot;social&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/SamuelEnglard/shieldsio-elements/blob/38bffb6/src/BadgeStyle.ts#L24">BadgeStyle.ts:24</a></li>
<li>Defined in <a href="https://github.com/shmuelie/shieldsio-elements/blob/05afdd7/src/BadgeStyle.ts#L24">BadgeStyle.ts:24</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -212,6 +212,9 @@ <h3>Social</h3>
<li class=" tsd-kind-class">
<a href="../classes/shieldiostaticbadge.html" class="tsd-kind-icon">ShieldIOStatic<wbr>Badge</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/simpleiconbadge.html" class="tsd-kind-icon">Simple<wbr>Icon<wbr>Badge</a>
</li>
<li class=" tsd-kind-interface">
<a href="../interfaces/simpleicon.html" class="tsd-kind-icon">Simple<wbr>Icon</a>
</li>
Expand All @@ -229,6 +232,7 @@ <h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
</ul>
<ul class="tsd-legend">
Expand Down
10 changes: 7 additions & 3 deletions docs/enums/dynamicdatatype.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h3>JSON</h3>
<div class="tsd-signature tsd-kind-icon">JSON<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = &quot;json&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/SamuelEnglard/shieldsio-elements/blob/38bffb6/src/ShieldIODynamicBadge.ts#L7">ShieldIODynamicBadge.ts:7</a></li>
<li>Defined in <a href="https://github.com/shmuelie/shieldsio-elements/blob/05afdd7/src/ShieldIODynamicBadge.ts#L7">ShieldIODynamicBadge.ts:7</a></li>
</ul>
</aside>
</section>
Expand All @@ -103,7 +103,7 @@ <h3>XML</h3>
<div class="tsd-signature tsd-kind-icon">XML<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = &quot;xml&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/SamuelEnglard/shieldsio-elements/blob/38bffb6/src/ShieldIODynamicBadge.ts#L8">ShieldIODynamicBadge.ts:8</a></li>
<li>Defined in <a href="https://github.com/shmuelie/shieldsio-elements/blob/05afdd7/src/ShieldIODynamicBadge.ts#L8">ShieldIODynamicBadge.ts:8</a></li>
</ul>
</aside>
</section>
Expand All @@ -113,7 +113,7 @@ <h3>YAML</h3>
<div class="tsd-signature tsd-kind-icon">YAML<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol"> = &quot;yaml&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/SamuelEnglard/shieldsio-elements/blob/38bffb6/src/ShieldIODynamicBadge.ts#L9">ShieldIODynamicBadge.ts:9</a></li>
<li>Defined in <a href="https://github.com/shmuelie/shieldsio-elements/blob/05afdd7/src/ShieldIODynamicBadge.ts#L9">ShieldIODynamicBadge.ts:9</a></li>
</ul>
</aside>
</section>
Expand Down Expand Up @@ -159,6 +159,9 @@ <h3>YAML</h3>
<li class=" tsd-kind-class">
<a href="../classes/shieldiostaticbadge.html" class="tsd-kind-icon">ShieldIOStatic<wbr>Badge</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/simpleiconbadge.html" class="tsd-kind-icon">Simple<wbr>Icon<wbr>Badge</a>
</li>
<li class=" tsd-kind-interface">
<a href="../interfaces/simpleicon.html" class="tsd-kind-icon">Simple<wbr>Icon</a>
</li>
Expand All @@ -176,6 +179,7 @@ <h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
</ul>
<ul class="tsd-legend">
Expand Down
Loading

0 comments on commit 9b303e5

Please sign in to comment.