mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Polishing gallery ui
This commit is contained in:
parent
ee13d748f3
commit
1cf19aea75
@ -7,7 +7,9 @@ class ImageUpload < ActiveRecord::Base
|
||||
thumb: '100x100>',
|
||||
small: '190x190#',
|
||||
square: '280x280#',
|
||||
medium: '300x300>'
|
||||
medium: '300x300>',
|
||||
large: '600x600>',
|
||||
hero: '800x800>'
|
||||
},
|
||||
filename_cleaner: -> (filename) {
|
||||
[
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
<%# todo: some smart resizing for 1-3+ images %>
|
||||
<%# todo: lightbox on click %>
|
||||
|
||||
<% content.image_uploads.each do |image| %>
|
||||
<%= link_to image.src(:original), class: 'z-depth-1 hoverable', target: '_new' do %>
|
||||
<%= image_tag image.src(:square) %>
|
||||
<div class="center">
|
||||
<% images = content.image_uploads %>
|
||||
<% images.each do |image| %>
|
||||
<%= link_to image.src(:original), class: 'z-depth-1 hoverable', target: '_new' do %>
|
||||
<%= image_tag image.src(images.count == 1 ? :hero : :medium) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user