All Projects → pauloamgomes → drupal-react-image-gallery

pauloamgomes / drupal-react-image-gallery

Licence: GPL-2.0 license
Drupal 8 module that provides a dynamic Image Gallery based on the react-image-gallery component.

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to drupal-react-image-gallery

apigee-api-catalog-drupal
Manage your API catalog within Drupal's content management approach
Stars: ✭ 17 (+30.77%)
Mutual labels:  drupal, drupal-8
drupal-composer-init
Initialise a Drupal composer setup
Stars: ✭ 43 (+230.77%)
Mutual labels:  drupal, drupal-8
dkan2
Deprecated: please use the 2.x branch of the dkan repo
Stars: ✭ 17 (+30.77%)
Mutual labels:  drupal, drupal-8
gatsby-drupal-kit
A Gatsby V2 starter kit designed to work with a new Drupal 8 site.
Stars: ✭ 23 (+76.92%)
Mutual labels:  drupal, drupal-8
drupal8-vagrant
Simple Drupal 8 Development Environment
Stars: ✭ 59 (+353.85%)
Mutual labels:  drupal, drupal-8
docker-drupal
Docker scaffolding for Drupal 8
Stars: ✭ 41 (+215.38%)
Mutual labels:  drupal, drupal-8
fractal-twig-drupal-adapter
Twig template adapter for Fractal with Drupal 8 directives.
Stars: ✭ 13 (+0%)
Mutual labels:  drupal, drupal-8
shila-drupal-theme
Atomic design and Pattern Lab friendly, component-based, fairly unopinionated starting point for new Drupal themes
Stars: ✭ 81 (+523.08%)
Mutual labels:  drupal, drupal-8
composer-tutorial
A walk through of various Composer tasks
Stars: ✭ 40 (+207.69%)
Mutual labels:  drupal, drupal-8
dblog-ui
No description or website provided.
Stars: ✭ 22 (+69.23%)
Mutual labels:  drupal, drupal-module
varbase
Built using Drupal 8/9, an enterprise website builder platform that combines powerful editorial features, mobile, lead-generation, SEO, social media integration, and beautiful bespoke designs. Varbase is packed with adaptive functionalities and essential modules.
Stars: ✭ 75 (+476.92%)
Mutual labels:  drupal, drupal-8
DrupalDriver
A collection of drivers for controlling Drupal.
Stars: ✭ 64 (+392.31%)
Mutual labels:  drupal, drupal-8
drupal8-employee-crud-module
No description or website provided.
Stars: ✭ 16 (+23.08%)
Mutual labels:  drupal, drupal-8
datos.gob.es
Código perteneciente al portal español de Datos Abiertos datos.gob.es.
Stars: ✭ 20 (+53.85%)
Mutual labels:  drupal, drupal-module
migrate source example
Example module for Drupal 8 that provides migrations of users, terms, files and nodes from database, JSON resources, CSV and XML files. #migrate
Stars: ✭ 39 (+200%)
Mutual labels:  drupal, drupal-8
drupal8-oop
Tutorial for object-oriented programming fundamentals in PHP
Stars: ✭ 37 (+184.62%)
Mutual labels:  drupal, drupal-8
distros.bid
A saas to create drupal websites in seconds using docker containers.
Stars: ✭ 16 (+23.08%)
Mutual labels:  drupal, drupal-8
drupal8-composer-template
Project template for Drupal 8 projects with composer | Quick installation via "composer create-project woprrr/drupal8-composer-template:8.3.0"
Stars: ✭ 27 (+107.69%)
Mutual labels:  drupal, drupal-8
drupal-jsonapi-params
A package to manage json-api params
Stars: ✭ 42 (+223.08%)
Mutual labels:  drupal, drupal-8
apigee-devportal-kickstart-drupal
A fast demo and starting point for Apigee Developer Portals for Drupal
Stars: ✭ 21 (+61.54%)
Mutual labels:  drupal, drupal-8

React Image Gallery 8.x-1.x

About this Module

This module provides a dynamic Image Gallery based on the React Image Gallery component. (https://github.com/xiaolin/react-image-gallery).

The idea of the module came during investigating ways to develop React components under Drupal.

Goals

  • A simple way to display an Image Gallery on any Drupal 8 website
  • Have few dependencies on 3rd parties
  • Flexibity for the site builders

Demo

Watch a demo of the React Image Gallery module.

Requirements

Module depends on Media (core) and Paragraphs module.

Installation

Configuration

  1. Enable the 'React Image Gallery' module and desired sub-modules in 'Extend'. (/admin/modules)

  2. Configure a content type (or a custom block) with an entity reference revisions (Paragraph)

  3. Create some gallery media items. (/media/add/gallery_image)

  4. Create or edit a content of the type configured on step 4 and add a 'Image Gallery' paragraph.

  5. Configure the paragraph with the media items you want.

  6. Save the content and confirm that the 'React Image Gallery' is loaded in the page.

Development on the react App

The react app resides in the js directory (/react_image_gallery/js), to build or make changes its required to run:

yarn install

then the app can built:

yarn build

to start the app:

yarn start

When running the app locally it's required to mock in the js/public/index.html the settings that are passed to the gallery component, those settings shall reflect the paragraph id where the gallery is present in Drupal:

var drupalSettings = {
  gallery: {
    1: {
      id: '<PARAGRAPH_ENTITY_ID>',
      element: 'react-image-gallery-block',
      settings: {
        'infinite': true,
        'lazyLoad': true,
        'showNav': true,
        'showThumbnails': true,
        'showFullscreenButton': true,
        'showPlayButton': true,
        'showBullets': false,
        'showIndex': false,
        'autoPlay': false
      }
    }
  }
};

Its also required to enable CORS settings in Drupal, add the below lines inside parameters attribute to your development.services.yml:

cors.config:
  enabled: true
  # Specify allowed headers, like 'x-allowed-header'.
  allowedHeaders: ['x-csrf-token', 'authorization', 'content-type', 'accept', 'origin', 'x-requested-with']
  # Specify allowed request methods, specify ['*'] to allow all possible ones.
  allowedMethods: ['POST', 'GET', 'OPTIONS']
  # Configure requests allowed from specific origins.
  allowedOrigins: ['*']
  # Sets the Access-Control-Expose-Headers header.
  exposedHeaders: true
  # Sets the Access-Control-Max-Age header.
  maxAge: false
  # Sets the Access-Control-Allow-Credentials header.
  supportsCredentials: false

Author/Maintainer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].