Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhz-io/star-icon-hapi
SVG :star: Stars as a Service
https://github.com/nhz-io/star-icon-hapi
Last synced: 4 days ago
JSON representation
SVG :star: Stars as a Service
- Host: GitHub
- URL: https://github.com/nhz-io/star-icon-hapi
- Owner: nhz-io
- License: mit
- Created: 2016-03-12T00:22:40.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-15T12:32:22.000Z (over 8 years ago)
- Last Synced: 2024-05-02T02:19:36.190Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 116 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
star-icon-hapi
SVG Stars as a Service
## Install
```sh
$ npm i -S star-icon-hapi
```## Usage
```js
...
import starIconRoute from 'star-icon-hapi'
...
// Setup hapi server
...
server.route(starIconRoute({
method: 'GET',
path: '/api/star',
}))
```### Query parameter
* `layers` - number of layers in the star
* `width` - optional width (height must be present too)
* `height` - optional height (width must be present too)
* `arms` - single number / list of numbers per layer
* `fill` - single color / list of colors per layer
* `ratio` - single inner/outer ratio / list of ratios per layer (`ratio < 1`)
* `rotatio` - single rotation angle / list of angles per layer (degrees)
* `zoom` - single zoom value / list of values per layer (`zoom < 1`)## Examples
### [Header Star](http://star.nhz.io?layers=6&width=300&height=300&fill=navy,silverblue,lightblue,navy,silverblue,lightblue&ratio=0.55,0.5,0.44,0.55,0.5,0.44&rotation=0,0,0,36,36,36&zoom=1,0.95,0.9,0.5,0.45,0.4)
![Header Star](http://star.nhz.io?layers=6&width=300&height=300&fill=navy,silverblue,lightblue,navy,silverblue,lightblue&ratio=0.55,0.5,0.44,0.55,0.5,0.44&rotation=0,0,0,36,36,36&zoom=1,0.95,0.9,0.5,0.45,0.4)
* **layers**: `6`
* **width**: `300`
* **height**: `300`
* **fill**: `navy`, `silverblue`, `lightblue`, `navy`, `silverblue`, `lightblue`
* **ratio**: `0.55`, `0.5`, `0.44`, `0.55`, `0.5`, `0.44`
* **rotation**: `0`, `0`, `0`, `36`, `36`, `36`
* **zoom**: `1`, `0.95`, `0.95`, `0.5`, `0.45`, `0.4`### [Compass](http://star.nhz.io?layers=8&width=300&height=300&arms=4&fill=black,white,black,white,black,%23eee,black,%23eee&ratio=0.16,0.12,0.16,0.12,0.16,0.12,0.16,0.12&rotation=337.5,337.5,22.5,22.5,0,0,45,45&zoom=0.8,0.75,0.8,0.75,1,0.95,1,0.95)
![Compass](http://star.nhz.io?layers=8&width=300&height=300&arms=4&fill=black,white,black,white,black,%23eee,black,%23eee&ratio=0.16,0.12,0.16,0.12,0.16,0.12,0.16,0.12&rotation=337.5,337.5,22.5,22.5,0,0,45,45&zoom=0.8,0.75,0.8,0.75,1,0.95,1,0.95)
* **layers**: `8`
* **width**: `300`
* **height**: `300`
* **fill**: `black`, `white`, `black`, `white`, `black`, `#eee`, `black`, `#eee`
* **ratio**: `0.16`, `0.12`, `0.16`, `0.12`, `0.16`, `0.12`, `0.16`, `0.12`
* **rotation**: `337.5`, `337.5`, `22.5`, `22.5`, `0`, `0`, `45`, `45`
* **zoom**: `0.8`, `0.75`, `0.8`, `0.75`, `1`, `0.95`, `1`, `0.95`### [Magen David](http://star.nhz.io/?layers=4&width=300&height=300&arms=3&fill=navy,white,navy,white&ratio=0.5,0.5,0.5,0.5&rotation=0,0,180,180&zoom=1,0.9,1,0.9)
![Magen David](http://star.nhz.io/?layers=4&width=300&height=300&arms=3&fill=navy,white,navy,white&ratio=0.5,0.5,0.5,0.5&rotation=0,0,180,180&zoom=1,0.9,1,0.9)
* **layers**: `4`
* **width**: `300`
* **height**: `300`
* **fill**: `navy`, `white`, `navy`, `white`
* **ratio**: `0.5`, `0.5`, `0.5`, `0.5`
* **rotation**: `0`, `0`, `180`, `180`
* **zoom**: `1`, `0.9`, `1`, `0.9`## [ESDOC](http://nhz-io.github.io/star-icon-hapi)
## See Also
![star-icon-tag](http://star.nhz.io?layers=6&width=30&height=30&fill=brown,orange,yellow,brown,orange,yellow&ratio=0.55,0.5,0.44,0.55,0.5,0.44&rotation=0,0,0,36,36,36&zoom=1,0.95,0.9,0.5,0.45,0.4)
[https://github.com/nhz-io/star-icon-tag](https://github.com/nhz-io/star-icon-tag)## License
MIT © [Ishi Ruy](https://nhz.io/star-icon-hapi)