Skip to content

Commit

Permalink
Remove documentation that is not yet implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
gchtr committed Feb 21, 2022
1 parent fc94418 commit c534e1f
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions docs/picture.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,55 +45,3 @@ add_filter( 'timmy/sizes', function( $sizes ) {
### Art directed picture with fallbacks

To be implemented …

```html
<picture>
<source media="(min-width: 56.25em)" srcset="large.webp" type="image/webp">
<source media="(min-width: 56.25em)" srcset="large.jpg">

<source media="(min-width: 37.5em)" srcset="medium.webp" type="image/webp">
<source media="(min-width: 37.5em)" srcset="medium.jpg">

<source srcset="small.webp" type="image/webp">
<source srcset="small.jpg">
<img src="fallback.jpg" alt="">
</picture>
```

**Twig**

```twig
<picture>
{{ get_timber_picture_sources('webp-picture', [
{
media: '(min-width: 62em)'
srcset
}
]) }}
</picture>
```

**Timmy config**

```php
[
'webp-picture' => [
'type' => 'picture',
'towebp' => true,
// This will be used
'resize' => '',
'sources' => [
'desktop' => [

],
'default' => [

],
'fallback' => [

],
],
],
],
```

0 comments on commit c534e1f

Please sign in to comment.