No commit activity in last 3 years
No release in over 3 years
A scrivito widget to add a simpple gallery.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

ScrivitoGalleryWidget

A Widget to insert an easy gallery to your page.

Installation

Add this line to your application's Gemfile:

gem 'scrivito_gallery_widget'

Add this line to your application JavaScript manifest:

//= require scrivito_gallery_widget

Add this line to your application Stylesheet manifest:

*= require scrivito_gallery_widget

Localization

The following code represents the default localization for English. Copy it to your en.yml and change it if necessary:

en:
  scrivito_gallery_widget:
    thumbnail:
      title: Gallery
      description: Insert an easy gallery to your page
    details:
      images: Images
      show_description: Show Description
      activate_on: Activate on

Customization

You can add a slider to your image selection.

E.g. using the slick slider, that is also used in the slick_slider_widget:

$('.scrivito_gallery_widget_image_list').slick();

This Gem also provides a hook to define an image description. All you have to do is to add a partial to your app at image/_image_description.html.erb. A variable named image will be send to this partial:

# in your image model
class image
  attribute :blob, :binary
  attribute :description, :html
end
<!-- in the image/_image_description.html.erb partial -->
<%= scrivito_tag :div, image, :description, class: 'image-description' %>