-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOC] Plugin_Info for getkirby-plugins.com
- Loading branch information
1 parent
92abecd
commit 540b1f9
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |