Git Product home page Git Product logo

stimulus-lightbox's Introduction

Stimulus components

๐Ÿ‘‰ Introducing Stimulus components.

๐Ÿ“š Documentation

See Stimulus Components Website.

๐Ÿ‘ท Contributing

Do not hesitate to contribute to the controllers by adapting or adding features ! Bug reports or pull requests are welcome.

Don't forget to drop a ๐ŸŒŸ on GitHub to support the project.

๐Ÿ“ License

This project is released under the MIT license.

stimulus-lightbox's People

Contributors

guillaumebriday avatar michaelbaudino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stimulus-lightbox's Issues

Replace LightGallery.js with a fully-open source alternative?

LightGallery.js's license has a commercial license:

lightGallery.js is a free and open-source library, however, if you are using the library for business, commercial sites, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary.

Would be nice if stimulus-lightbox had something everyone could use instead.

Issues with esbuild and lightgallery assets

Using ESBuild with import 'lightgallery/css/lightgallery.css'

01:14:46 js.1     | โœ˜ [ERROR] No loader is configured for ".gif" files: node_modules/lightgallery/images/loading.gif
01:14:46 js.1     |
01:14:46 js.1     |     node_modules/lightgallery/css/lightgallery.css:504:18:
01:14:46 js.1     |       504 โ”‚   background: url("../images/loading.gif") no-repeat scroll cente...

Also happens with .ttf, .svg, and other assets referenced in the lightgallery css.

Loading css failed

using rails 7 with stimulus and I'm not able to load the css in the application.js with

import 'lightgallery/css/lightgallery.css' 

due to error

Uncaught TypeError: Failed to resolve module specifier "lightgallery/css/lightgallery.css". Relative references must start with either "/", "./", or "../".

as indicated in https://www.stimulus-components.com/docs/stimulus-lightbox/ under usage section

Access lightGallery instance when extending Lightbox controller

Currently the lightgallery is initialized in the connect method:

  connect() {
    lightGallery(this.element, __spreadValues(__spreadValues({}, this.defaultOptions), this.optionsValue));
  }

and as far as I can see, there isn't a possibility to call a method of this instance (e.g. openGallery triggered by a click event) when extending the Lightbox controller class.

Is there anything I don't see? Would it be possible and make sense, to get access to the lightgallery instance via a variable or getter method?

Can we load modules

hi

Can we load modules like

import lgThumbnail from 'lightgallery/plugins/thumbnail'
import lgZoom from 'lightgallery/plugins/zoom'

Loading the video plugin

I've tried to extend the stimulus component to load the needed lightgalleryjs video plugin to show YouTube videos. However, I can't get that working. Could you add an example in the documentation on how to do this? Thank you! Love your work Guillaume!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.