Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dgw_gallery

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dgw_gallery

  • 0.2.8
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

DgwGallery

This is a current work in progress so bear with us.) A simple gallery for ruby on rails sites that includes a layout for either a bootstrap carousel or responsive image page.

Usage

Install the gem and migrations and point your browser to /gallery on your site.

Installation

Add this line to your application's Gemfile:

gem 'dgw_gallery'

And then copy and install migrations from dgw_gallery_engine to application:

$ rails app:dgw_gallery_engine:install:migrations
$ rails db:migrate

And then execute:

$ bundle

Or install it yourself as:

$ gem install dgw_gallery

If you would like to modify the views or override the controller you can install either or both. Execute:

$ rails dgw_gallery:install:views           # Install Gallery Views
$ rails dgw_gallery:install:controller      # Install Gallery Controller
$ rails dgw_gallery:install:css             # Install Gallery CSS

If you are using turbolinks and experiencing issues with the carousel not starting on initial page load, try adding the following line at the end of your head section either for your main app or for that specific page.

<head>
    ...
    ...
    <meta name="turbolinks-visit-control" content="reload">
</head>

Usage

### in your action where you want to display gallery
### replace 'id' with the id of gallery you want
@gallery = Gallery.find(id)
<!-- Code in view.html.erb -->
<div class="row mt-2">
    <div class="card card-body border-radius-xl col-12 text-black shadow-lg" id="galleryCodeSection">
        <div class="row justify-content-center align-items-evenly">
            <div class="col-5 bg-light rounded mx-5 h-100">
                <div class="card-header mt-3 border-radius-xl bg-transparent position-relative z-index-2  blur-shadow-image dark-shadow">
                    <%= render 'gallery/carousel' %>
                </div>
            </div>
        </div>
    </div>
</div>

Customizations can be made in the app/views/gallery/_carousel.html.erb view if necessary (after installing views)

Contributing

If you wish to contribute submit a pull request and detail your changes and comment them in the code as well.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 14 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc