Code Monkey home page Code Monkey logo

hermitage's People

Contributors

danielpuglisi avatar immaculatepine avatar lizgene avatar paulslaby 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  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hermitage's Issues

What if our attachment is not named "file"?

I'm trying to use this but my attachment is called "image" so I'm getting an undefined method error.
I looked over the docs but it doesn't look like this functionality is configureable?

Not able to display gallery

Hey!

I have installed the gem and set it up, but the gallery is not being displayed.

I am using carrierwave to store my images, and I have
specified the correct attribute names so heritage has access to both
thumbnails and full image.

In my view:

<%= render_gallery_for @images %>

where @images is an array of objects with thumbnail and full images are accessible like this: @images[i].image.thumb.url & @images[i].image.url

Hermitage configuration:

Hermitage.configure :images do
  original -> item { item.image.url }
  thumbnail -> item { item.image.thumb.url }
  title -> item { item.category.name }
  list_tag :ul
  item_tag :li
  list_class 'thumbnails'
  item_class 'span4'
  link_class 'thumbnail'
  image_class nil
  each_slice nil
end

Viewing the gallery:
screen shot 2017-12-17 at 00 13 56

Clicking an image, (not being able to click to the next image, simply goes to the image url):
screen shot 2017-12-17 at 00 16 05

What am I doing wrong?

Thanks.

Adding links to title

Is it possible to add a link into the image title? I would like to link to the source of my images.

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.