Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Mar 17, 2022
1 parent cae43be commit f2701f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2021 Johann Schopplich
Copyright (c) 2020-2022 Johann Schopplich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ How it works:
## Key Features

- ✨ Avoids content jumping (keeping aspect ratio)
- 🏗 Available as [image block](./snippets/blocks/image.php)
- 🖼 Available in KirbyText with custom Kirbytag
- 🥨 Respects [custom image formats](https://getkirby.com/docs/guide/templates/resize-images-on-the-fly#image-formats) set globally
- 🏗 Use as:
- [Image block](#as-kirby-image-block)
- [Kirbytag](#as-kirbytag)
- [File method](#as-file-method)
- [🦌 Loadeer.js](https://github.com/johannschopplich/loadeer) for lazy loading in the frontend
- 🔍 SEO-friendly
- 🗃 Extends [file methods](https://getkirby.com/docs/reference/plugins/extensions/file-methods)
- ⚡️ Vanilla JavaScript lazy loading library included

## Requirements

- Kirby 3
- Kirby 3.6+
- PHP 7.4+

## Installation
Expand Down Expand Up @@ -56,10 +58,10 @@ Of course, you can just copy the block into your `site/snippets/blocks` folder o
```html
<!-- Using the `placeholderUri` for an inlined image in the `src` attribute -->
<img
src="<?= $image->placeholderUri() ?>"
data-src="<?= $image->url() ?>"
data-lazyload
alt="<?= $image->alt() ?>"
src="<?= $image->placeholderUri() ?>"
data-src="<?= $image->url() ?>"
data-lazyload
alt="<?= $image->alt() ?>"
/>
```

Expand Down Expand Up @@ -162,7 +164,7 @@ We can then apply a transition to such properties.
}
```

As we are manually blurring the `img` **element** which `src` attribute is our generated SVG (so essentially the SVG is a child of our `img` element), we *need* to have a container that hides overflowing parts. For better performance we also enforce GPU rendering by applying a `transform` declaration.
As we are manually blurring the `img` **element** which `src` attribute is our generated SVG (so essentially the SVG is a child of our `img` element), we _need_ to have a container that hides overflowing parts. For better performance we also enforce GPU rendering by applying a `transform` declaration.

```css
.img-container {
Expand Down Expand Up @@ -213,4 +215,4 @@ return [

## License

[MIT](./LICENSE) License © 2021 [Johann Schopplich](https://github.com/johannschopplich)
[MIT](./LICENSE) License © 2020-2022 [Johann Schopplich](https://github.com/johannschopplich)

0 comments on commit f2701f1

Please sign in to comment.