Download the PHP package sitegeist/lazybones without Composer

On this page you can find all versions of the php package sitegeist/lazybones. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lazybones

Sitegeist.Lazybones

!!! With the general availability of loading="lazy" for images in webbrowsers this package is obsolete. Please use Sitegeist.Kaleidoscope directly !!!

Responsive Images for Neos - with Atomic.Fusion & Monocle in mind

This package implements Lazy Loading for Responsive Images from the Sitegeist.Kaleidoscope package.

This is implemented by rendering the src, srcset and sizes attributes as data-src, data-srcset and data-sizes. The img- or pPicture-tag is then marked with the class lazyload to be replaced via js once the image comes into view. If you like you can render a very lowres src-attribute or leave the src attribute empty (default).

Authors & Sponsors

The development and the public-releases of this package is generously sponsored by our employer http://www.sitegeist.de.

Installation

Sitegeist.Lazybones is available via packagist run composer require sitegeist/lazybones. We use semantic-versioning so every breaking change will increase the major-version number.

Settings

The default-lazyness is controlled by the setting 'Sitegeist.Lazybones.default.lazyEnabled' and is active by default except in FLOW_CONTEXT=Development/VisualRegressionTesting.

Usage

LazyloadJS

To enable lazy loading you have to integrate a script that will detect the lazyload class and convert data-src, data-srcset and data-sizes to the correct attributes once they come into view.

This package includes the lazysizes library from https://github.com/aFarkas/lazysizes but it is probably better to include the js into your own fe-build.

To include the bundled js you can use the following snippet:

Sitegeist.Lazybones:Image

Render an img-tag with optional srcset based on sizes or resolutions.

This prototype is a drop in replacement for Sitegeist.Kaleidoscope:Image with optional props to control the lazy loading.

See: https://github.com/sitegeist/Sitegeist.Kaleidoscope#sitegeistkaleidoscopeimage

Props:

Props from Sitegeist.Kaleidoscope:Image:

Sitegeist.Lazybones:Picture

Render a picture-tag with various sources.

This prototype is a drop in replacement for Sitegeist.Kaleidoscope:Picture with optional props to control the lazy loading.

See: https://github.com/sitegeist/Sitegeist.Kaleidoscope#sitegeistkaleidoscopepicture

Props:

Props from Sitegeist.Kaleidoscope:Picture:

Sitegeist.Lazybones:Source

Render a source-tag with optional srcset based on sizes or resolutions.

This prototype is a drop in replacement for Sitegeist.Kaleidoscope:Source with optional props to control the lazy loading.

Props:

Props from Sitegeist.Kaleidoscope:Source:

Sitegeist.Lazybones:Lazy.Enabled

Boolean value prototype with default value true that defines whether lazyness is enabled or not. Override the value of this prototype globally or for specific parts of your fusion.

NOTE: The default value comes from the configuration 'Sitegeist.Lazybones.default.lazyEnabled' and is active by default except in FLOW_CONTEXT=Development/VisualRegressionTesting.

Sitegeist.Lazybones:Lazy.ClassName

String value prototype with default value lazyload to define the class that marks lazyloaded images. Override the value of this prototype globally or for specific parts of your fusion.

Sitegeist.Lazybones:Lazy.Width

Integer value prototype with default value null to define the size of lowres images that are loaded as placeholders. Override zhe value of this prototype globally or for specific parts of your fusion.

Dynamically enable/disable the lazy rendering

To optimize the intial load time lazy loading should be disabled for the first contents but be enabled for others. This can be implemented by enabeling the lazy in the ContentCase prototype depending on wether or not the curent node is the first content in the main collection.

Contribution

We will gladly accept contributions. Please send us pull requests.


All versions of lazybones with dependencies

PHP Build Version
Package Version
Requires neos/fusion-afx Version ^1.2 || ^7.0 || ^8.0 || dev-master
sitegeist/kaleidoscope Version ^6.1 || dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sitegeist/lazybones contains the following files

Loading the files please wait ....