Code Monkey home page Code Monkey logo

lightbox-bootstrap-rails's Introduction

Lightbox for Bootstrap 4

This gem was built for the use of 'Lightbox for Bootstrap 4' as Rails assets pipeline and you can look for the detailed documents at http://ashleydw.github.io/lightbox/

Updated using Bootstrap 4 alpha 6 version

Gem Version

Installation

Add this line to your application's Gemfile:

gem 'lightbox-bootstrap-rails', '5.1.0.1'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lightbox-bootstrap-rails

Usage

in assets/javascripts/application.js

//= ...
//= require lightbox-bootstrap
//= ...

in assets/stylesheets/application.scss

...
@import "bootstrap";
@import "lightbox-bootstrap";
...

or in assets/stylesheets/application.css

/*...
*= require lightbox-bootstrap
*= require ...
*/

Finally, you should add assets/javascripts/lightbox_bootstraped.coffee as follows:

$(document).delegate '*[data-toggle="lightbox"]', 'click', (event) ->
  event.preventDefault()
  $(this).ekkoLightbox()
  return

Test Application

Among the gem sources, a test application is provided and there you can find how to code in the wild.

Changelog

  • v 3.3.0.0 : initially created.
  • v 3.3.0.1 : deployed to Rubygems.org
  • v 3.3.0.2 : modified @import stylesheet syntax
  • v 3.3.0.3 : fixed typos in ekko-lightbox.min.js and ekko-lightbox.js (lightbox v4.0.2 for Boostrap 3).
  • v 5.0.0.0 : updated with lightbox v5.0.0 for Boostrap 4 alpha 5
  • v 5.1.0.0 : updated with lightbox v5.1.0 for Boostrap 4 alpha 6
  • v 5.1.0.1 : fixed modal dialog alignments

Contributing

  1. Fork it ( https://github.com/[my-github-username]/lightbox-bootstrap-rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

lightbox-bootstrap-rails's People

Contributors

bmalets avatar luciuschoi avatar mikeyhogarth avatar rorlab avatar sarupbanskota avatar

Stargazers

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

Watchers

 avatar

lightbox-bootstrap-rails's Issues

Annoying error

Receiving on every page loading error in console

ActionController::RoutingError (No route matches [GET] "/assets/ekko-lightbox.min.css.map"):

actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch'
web-console (3.4.0) lib/web_console/middleware.rb:18:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.0.2) lib/rails/rack/logger.rb:24:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:11:in `block in call'
activesupport (5.0.2) lib/active_support/logger_silence.rb:20:in `silence'
activesupport (5.0.2) lib/active_support/logger.rb:63:in `block (3 levels) in broadcast'
activesupport (5.0.2) lib/active_support/logger_silence.rb:20:in `silence'
activesupport (5.0.2) lib/active_support/logger.rb:61:in `block (2 levels) in broadcast'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:11:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.1) lib/rack/method_override.rb:22:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.1) lib/rack/runtime.rb:22:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
railties (5.0.2) lib/rails/engine.rb:522:in `call'
newrelic_rpm (4.0.0.332) lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
puma (3.8.2) lib/puma/configuration.rb:224:in `call'
puma (3.8.2) lib/puma/server.rb:600:in `handle_request'
puma (3.8.2) lib/puma/server.rb:435:in `process_client'
puma (3.8.2) lib/puma/server.rb:299:in `block in run'
puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread'

Please remove map line from file or make sth else

How to remove the modal-header from the javascript?

Is there a way, so that I can remove the line in ekko-lightbox.js:

header = '<div class="modal-header"' + (this.options.title || this.options.always_show_close ? '' : ' style="display:none"') + '><button type="button" class="close" data-dismiss="modal" aria-hidden="$

Because I don't use the header, so its just a blank bar.

Full screen mode for videos (Vimeo)

Hi,

The full screen mode is not there. I found on another post that there is an error in js files. Instead of me forking the app and editing files, could you please fix the master branch?

Details:
Just look for this string allowfullscreenclass in js and min.js files. The space is missing. The final fix should look like: ...allowfullscreen class...

Much appreciated,
John

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.