Download the PHP package blackbird/hyva-photo-swipe without Composer

On this page you can find all versions of the php package blackbird/hyva-photo-swipe. 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 hyva-photo-swipe

# hyva-photo-swipe [![Latest Stable Version](https://img.shields.io/badge/version-1.0.0-blue)](https://packagist.org/packages/blackbird/hyva-photo-swipe) [![SplideJS Version](https://img.shields.io/badge/photoswipe-5.4.1-purple)](https://github.com/dimsemenov/PhotoSwipe/releases/tag/v5.4.1) [![License: MIT](https://img.shields.io/github/license/blackbird-agency/hyva-photo-swipe.svg)](./LICENSE) An implementation of [PhotoSwipe library](https://photoswipe.com/) in [Hyvä Theme for Magento 2](https://www.hyva.io/hyva-themes-license.html) You no longer need to worry about how to implement PhotoSwipe in your Magento 2 Hyvä Theme projects.
No manipulations required, instant use after installation. PhotoSwipe allows you to create full-screen sliders, zoomable, and fully customizable. The librairy is lazily loaded and does not affect performances accoding to [Hyvä documentation](https://docs.hyva.io/hyva-themes/writing-code/patterns/loading-external-javascript.html). [How It Works](#how-it-works) • [Installation](#installation) • [Usage](#usage) • [More modules](#more-modules)

How It Works

The module simply loads PhotoSwipe on all pages that use the PhotoSwipeLightbox class in the DOM
(the class provied by PhotoSwipe).

When the library has been loaded on the page, a state stored in the Alpine.store is updated, indicating that PhotoSwipe is ready for use.

The state can also be used to force the library to be loaded at any time, here is an example using forceLoad()

Installation

Requirements

In production mode, do not forget to recompile and redeploy the static resources.

Usage

Once the module has been installed, simply add the HTML code required to create a slider, don't forget to specify for each child the data-pswp-width and data-pswp-height.

Next, create a function to listen the Alpine.store state is_loading indicating that PhotoSwipe has been loaded, and apply PhotoSwipe to the HTML elements, as described in the PhotoSwipe documentation.

Don't forget to fill in the important options :

You can specify any of the PhotoSwipe options as shown here

Finally, set up the x-data directive and do not forget to call the previous function in an x-effect, to prevent PhotoSwipe being applied until the library is loaded, and to allow it to be automatically applied when the library is loaded.

Full example

You can specify any of the PhotoSwipe options as shown here

Example : usage of forceLoad()

Imagine the following case: you do not have the script calling the PhotoSwipeLightbox class provided by the librairy in your DOM, and you want to add it when a user's action is triggered.

In this case, PhotoSwipe won't be loaded by default on the page, you will have to explicitly request that PhotoSwipe be loaded.

or

To find out exactly which one to use, please see the official Alpine documentation for $store or for Alpine.store.

This will force the library to load on the page, even if no script call the PhotoSwipeLightbox class. You can then follow the classic Usage procedure to apply PhotoSwipe.

More modules

[hyva-splide-js](https://github.com/blackbird-agency/hyva-splide-js) : An implementation of SplideJS library in Hyvä Theme for Magento 2, highly optimized and customizable sliders.

All versions of hyva-photo-swipe with dependencies

PHP Build Version
Package Version
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 blackbird/hyva-photo-swipe contains the following files

Loading the files please wait ....