heimrichhannot/contao-parallaximage-bundle

A bundle to add parallax background images to articles.

0.3.1 2022-05-27 14:10 UTC

This package is auto-updated.

Last update: 2024-11-27 19:13:17 UTC


README

A bundle to add parallax background images to articles.

Features

  • Uses the lightweight and vanilla js library Rellax for parallax effect.
  • Webpack / Encore / Encore Bundle integration

Usage

Installation

composer require heimrichhannot/contao-parallaximage-bundle

You need to update the database after composer installation

If you don't use Webpack/Encore/Encore-bundle at all:

  • you need to add rellax library by yourself, as it don't comes with this bundle

If you don't use Foxy:

  • add rellax to your bundle package.json

If you don't use Encore bundle:

  • add ./vendor/heimrichhannot/contao-parallaximage-bundle/src/Resources/assets/js/contaoParallaxImageBundle.es6.js to your packages and require it, where you need it
  • we recommend to unset the assets entires by yourself to don't have doublicates

With encore bundle:

  • Activate ContaParallaxImageBundle entry within encore section in your page structure for the pages, where you want parallax effect or in your page root.

Add parallax image

You find the options to add an parallax background image in article settings.

Attention: If you choose to add a parallax background image, the default article template is switched to an customized article template. If you selected an custom template, it won't be overwritten, so you need to update your custom template or switch to the default one.