ivopetkov / image-gallery-bearframework-addon
Image gallery addon for Bear Framework
Installs: 2 243
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: 7.1.*|7.2.*|7.3.*|7.4.*|8.0.*|8.1.*|8.2.*|8.3.*
- bearframework/bearframework: 1.*
- ivopetkov/client-packages-bearframework-addon: 1.*
- ivopetkov/encryption-bearframework-addon: 1.*
- ivopetkov/html-server-components-bearframework-addon: 1.*
- ivopetkov/html5-dom-document-js-bearframework-addon: 1.*
- ivopetkov/html5-dom-document-php: 2.*
- ivopetkov/js-lightbox-bearframework-addon: 1.*
- ivopetkov/lazy-image-bearframework-addon: 2.*
- ivopetkov/responsive-attributes-bearframework-addon: 1.*
- ivopetkov/server-requests-bearframework-addon: 1.*
- ivopetkov/touch-events-js-bearframework-addon: 1.*
Requires (Dev)
- dev-master
- v2.7.0
- v2.6.0
- v2.5.0
- v2.4.1
- v2.4.0
- v2.3.0
- v2.2.1
- v2.2.0
- v2.1.0
- v2.0.0
- v1.13.0
- v1.12.0
- v1.11.0
- v1.10.0
- v1.9.0
- v1.8.2
- v1.8.1
- v1.8.0
- v1.7.1
- v1.7.0
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.1
- v1.0.1
- v1.0.0
- v0.1.17
- v0.1.16
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- v0.1.0-beta.11
- v0.1.0-beta.10
- v0.1.0-beta.9
- v0.1.0-beta.8
- v0.1.0-beta.7
- v0.1.0-beta.6
- v0.1.0-beta.5
- v0.1.0-beta.4
- v0.1.0-beta.3
- v0.1.0-beta.2
- v0.1.0-beta.1
- v0.0.13
- v0.0.12
- v0.0.11
- v0.0.10
- v0.0.9
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
This package is auto-updated.
Last update: 2024-11-08 17:47:42 UTC
README
Addon for Bear Framework
This addon enables you to easily create lazy-loaded image galleries that are SEO friendly. It's based on the popular library Responsively Lazy. Multiple versions with different sizes are created on the fly for each image and only the best ones are loaded. This saves bandwidth and loads the website faster.
Download and install
Install via Composer
composer require ivopetkov/image-gallery-bearframework-addon
Download an archive
Download the latest release from the GitHub page and include the autoload file.
include '/path/to/the/addon/autoload.php';
Enable the addon
Enable the addon for your Bear Framework application.
$app->addons->add('ivopetkov/image-gallery-bearframework-addon');
Usage
<component src="image-gallery"> <file filename="/path/to/file1.jpg"/> <file filename="/path/to/file2.jpg"/> <file filename="/path/to/file3.jpg"/> </component>
Attributes
onclick
Defines the behaviour on image click. Available values: fullscreen, url, custom, none
image-aspect-ratio
The proportional relationship between the width and the height of every image. It is useful for cropping and resizing the images. Example values: 1:1, 1:2, 1.5:1, etc.
columns-count
The number of columns that will be filled with the images
imageSize
The size of the images, if columnsCount is not specified. Available values: tiny, small, medium, large, huge
image-loading-background
The type of background shown while the image is loading. Available values: none and checkered.
spacing
The spacing between the images. Example values: 10px, 1rem, etc.
class
HTML class attribute value
Examples
3 columns of square images that will be opened in fullscreen when clicked
<component src="image-gallery" columns-count="3" image-aspect-ratio="1:1" onclick="fullscreen"> <file filename="/path/to/file1.jpg"/> <file filename="/path/to/file2.jpg"/> <file filename="/path/to/file3.jpg"/> </component>
License
Lazy image addon for Bear Framework is open-sourced software. It's free to use under the MIT license. See the license file for more information.
Author
This addon is created by Ivo Petkov. Feel free to contact me at @IvoPetkovCom or ivopetkov.com.