mirror of
https://github.com/danbee/my-images
synced 2025-03-04 08:49:05 +00:00
Tidy up image display using grid
This commit is contained in:
parent
021b93aa21
commit
921788ba31
@ -5,20 +5,16 @@
|
|||||||
ul.images
|
ul.images
|
||||||
list-style: none
|
list-style: none
|
||||||
padding-left: 0
|
padding-left: 0
|
||||||
display: flex
|
display: grid
|
||||||
flex-wrap: wrap
|
grid-template-columns: repeat(6, 1fr)
|
||||||
|
grid-gap: 0.75rem
|
||||||
justify-content: space-between
|
justify-content: space-between
|
||||||
|
|
||||||
display: -webkit-flex
|
|
||||||
-webkit-flex-wrap: wrap
|
|
||||||
-webkit-justify-content: space-between
|
|
||||||
|
|
||||||
li
|
li
|
||||||
outline: 1px solid red
|
|
||||||
margin-bottom: 1em
|
margin-bottom: 1em
|
||||||
|
|
||||||
img
|
img
|
||||||
max-width: 100px
|
max-width: calc(100% - 0.5rem)
|
||||||
width: 100%
|
box-shadow: 0 0 2px rgba(0, 0, 0, 0.2)
|
||||||
border: 1px solid rgba(0, 0, 0, 0.2)
|
border-radius: 2px
|
||||||
padding: 0.25rem
|
padding: 0.25rem
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<ul class="images">
|
<ul class="images">
|
||||||
<% @images.each do |image| %>
|
<% @images.each do |image| %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to image_tag(image.image.thumb('100x100#').url), image.image.url, class: :image %><br>
|
<%= link_to image_tag(image.image.thumb('200x200#').url), image.image.url, class: :image %><br>
|
||||||
<%= link_to 'Delete', user_image_path(image), method: :delete, data: { confirm: 'Are you sure?' } %>
|
<%= link_to 'Delete', user_image_path(image), method: :delete, data: { confirm: 'Are you sure?' } %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user