Skip to content

Commit

Permalink
[DOC] Plugin_Info for getkirby-plugins.com
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeyerstedt committed Jul 13, 2015
1 parent 92abecd commit 540b1f9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions PLUGIN_INFO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#### Installation
store this file in

site/plugins/

#### Usage
use it in your templates the same way as the "normal" thumb function:

ThumbExt($pic, array('width' => 200, 'srcset' => '2x, 3x'))

the attributes are the same as the standard thumb function, but I´ve added:

- srcset: string (with the pixel density descriptors, seperated by commas)
if you want 1x only, simply type `'1x'`. But 1x is always added, so you don´t have to type `'1x, 2x'`, you can leave 1x out.
- inline-size: boolean (default true)
you can turn off the inline size feature of this plugin
- srcset-only: boolean (default false)
this enables that there is only the srcset-string returned, e.g. for [picturefill](http://scottjehl.github.io/picturefill/).

The standard function of this plugin is, that this returns a full img-tag ready to use in your template or snippet.
By default 1x and 2x images are generated, which is the most often used case. But you can define any pixel ratio you want to.

## contribution
Feel free to fork this repository an make it better.
Perhaps we can implement the viewport width feature in some way.

0 comments on commit 540b1f9

Please sign in to comment.