From 8dd225295458790cf499942d5588bfd37fb575f1 Mon Sep 17 00:00:00 2001 From: Thomas Blazek Date: Tue, 27 Aug 2013 19:39:00 +0200 Subject: [PATCH 1/4] design --- app/assets/stylesheets/galleries.css.scss | 64 +++++++++++------------ app/views/galleries/index.html.erb | 35 +++++-------- app/views/galleries/show.html.erb | 2 +- 3 files changed, 45 insertions(+), 56 deletions(-) diff --git a/app/assets/stylesheets/galleries.css.scss b/app/assets/stylesheets/galleries.css.scss index 26654c0..5c8f202 100644 --- a/app/assets/stylesheets/galleries.css.scss +++ b/app/assets/stylesheets/galleries.css.scss @@ -2,35 +2,35 @@ // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ -.modal.fade { - top: -25%; - transition: opacity 0.3s linear 0s, top 0.3s ease-out 0s; -} -.modal-gallery { - max-height: none; - outline: medium none; - width: auto; -} -.modal { - color: #333333; -} -.hide { - display: none; -} -.modal { - background-clip: padding-box; - background-color: #FFFFFF; - border: 1px solid rgba(0, 0, 0, 0.3); - border-radius: 6px 6px 6px 6px; - box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); - left: 50%; - margin-left: -280px; - outline: medium none; - position: fixed; - top: 10%;; - z-index: 1050; -} -.fade { - opacity: 0; - transition: opacity 0.15s linear 0s; -} \ No newline at end of file +//.modal.fade { +// top: -25%; +// transition: opacity 0.3s linear 0s, top 0.3s ease-out 0s; +//} +//.modal-gallery { +// max-height: none; +// outline: medium none; +// width: auto; +//} +//.modal { +// color: #333333; +//} +//.hide { +// display: none; +//} +//.modal { +//background-clip: padding-box; +// background-color: #FFFFFF; +// border: 1px solid rgba(0, 0, 0, 0.3); +//border-radius: 6px 6px 6px 6px; +// box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); +// left: 50%; +// margin-left: -280px; +// outline: medium none; +// position: fixed; +// top: 10%;; +// z-index: 1050; +//} +//.fade { +// opacity: 0; +// transition: opacity 0.15s linear 0s; +//} \ No newline at end of file diff --git a/app/views/galleries/index.html.erb b/app/views/galleries/index.html.erb index 562128c..0b9c24d 100644 --- a/app/views/galleries/index.html.erb +++ b/app/views/galleries/index.html.erb @@ -1,27 +1,16 @@

Listing galleries

- - - - - - - - - - -<% @galleries.each do |gallery| %> - - - - - - - - +<% @galleries.each_slice(2) do |row| %> +
+ <% row.each do |gallery| %> +
+ <%=link_to gallery.name, gallery %> + <%= gallery.desc %> + <%= gallery.datum %> +
+ <%= link_to 'Edit', edit_gallery_path(gallery) %> | <%= link_to 'Destroy', gallery, method: :delete, data: { confirm: 'Are you sure?' } %> +
+ <% end %> +
<% end %> -
NameDescDatum
<%= gallery.name %><%= gallery.desc %><%= gallery.datum %><%= link_to 'Show', gallery %><%= link_to 'Edit', edit_gallery_path(gallery) %><%= link_to 'Destroy', gallery, method: :delete, data: { confirm: 'Are you sure?' } %>
- -
- <%= link_to 'New Gallery', new_gallery_path %> diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb index 2e56349..4048882 100644 --- a/app/views/galleries/show.html.erb +++ b/app/views/galleries/show.html.erb @@ -34,7 +34,7 @@ <% @gallery.fotos.each do |f| %> -<%=image_tag(f.datei.big_thumb.url,{:class=>"img-polaroid"}) %> +<%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid"}) %> <% end %> From f16b87fd2b18aa88dd9325fadb1e39c8c9d5166f Mon Sep 17 00:00:00 2001 From: Thomas Blazek Date: Tue, 27 Aug 2013 19:47:44 +0200 Subject: [PATCH 2/4] design --- app/views/galleries/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/galleries/index.html.erb b/app/views/galleries/index.html.erb index 0b9c24d..4e7a551 100644 --- a/app/views/galleries/index.html.erb +++ b/app/views/galleries/index.html.erb @@ -4,7 +4,7 @@
<% row.each do |gallery| %>
- <%=link_to gallery.name, gallery %> +

<%=link_to gallery.name, gallery %>

<%= gallery.desc %> <%= gallery.datum %>
From bf1574d11be9c93bc74ed33dc959aed892cdd764 Mon Sep 17 00:00:00 2001 From: Thomas Blazek Date: Tue, 27 Aug 2013 19:54:01 +0200 Subject: [PATCH 3/4] design --- app/views/galleries/index.html.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/galleries/index.html.erb b/app/views/galleries/index.html.erb index 4e7a551..7b00120 100644 --- a/app/views/galleries/index.html.erb +++ b/app/views/galleries/index.html.erb @@ -8,6 +8,9 @@ <%= gallery.desc %> <%= gallery.datum %>
+ <%for f in gallery.fotos.slice(1..[gallery.fotos.length, 4].min)%> + <%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid"}) %> + <% end %>
<%= link_to 'Edit', edit_gallery_path(gallery) %> | <%= link_to 'Destroy', gallery, method: :delete, data: { confirm: 'Are you sure?' } %>
<% end %> From 827531383661da99019381e5c98b8b0d44a39ef1 Mon Sep 17 00:00:00 2001 From: Thomas Blazek Date: Tue, 27 Aug 2013 19:54:21 +0200 Subject: [PATCH 4/4] design --- app/views/galleries/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/galleries/index.html.erb b/app/views/galleries/index.html.erb index 7b00120..1f3a65b 100644 --- a/app/views/galleries/index.html.erb +++ b/app/views/galleries/index.html.erb @@ -8,7 +8,7 @@ <%= gallery.desc %> <%= gallery.datum %>
- <%for f in gallery.fotos.slice(1..[gallery.fotos.length, 4].min)%> + <%gallery.fotos.slice(1..[gallery.fotos.length, 4].min).each do |f|%> <%=image_tag(f.datei.thumb.url,{:class=>"img-polaroid"}) %> <% end %>
<%= link_to 'Edit', edit_gallery_path(gallery) %> | <%= link_to 'Destroy', gallery, method: :delete, data: { confirm: 'Are you sure?' } %>