Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bendera/handlebars-helper-placeholder

Holder.js inspired placeholder image helper for Handlebars
https://github.com/bendera/handlebars-helper-placeholder

handlebars handlebars-helper handlebars-helpers handlebars-js

Last synced: about 1 month ago
JSON representation

Holder.js inspired placeholder image helper for Handlebars

Awesome Lists containing this project

README

        

# handlebars-helper-placeholder

Handlebars helper which generate an inline placeholder svg.

## Usage example

```
example image
```

## Options

* `width` Image width. Default: `100%`
* `height` Image height. Default: `100%`
* `bg` Background color. Default: `#dddddd`
* `fg` Foreground color. Default: `#ffffff`
* `font` Font family. Dfeault: `sans-serif`
* `size` Font size. Default: `14px`
* `weight` Font weight. Default: `bold`
* `text` Custom text. Default: `[width]x[height]`

## Installation

`npm install handlebars-helper-placeholder --save`

### Usage with [Fractal](http://fractal.build)

```
const placeholder = require('handlebars-helper-placeholder');

const hbs = require('@frctl/handlebars')({
helpers: {
placeholder: placeholder
}
});

fractal.components.engine(hbs);
fractal.docs.engine(hbs);
```

### Usage with [Assemble](http://assemble.io/)

Coming soon...