diff --git a/app/assets/images/no_image_128.png b/app/assets/images/no_image_128.png new file mode 100644 index 0000000..80446e2 Binary files /dev/null and b/app/assets/images/no_image_128.png differ diff --git a/app/assets/images/no_image_64.png b/app/assets/images/no_image_64.png new file mode 100644 index 0000000..d952dae Binary files /dev/null and b/app/assets/images/no_image_64.png differ diff --git a/app/assets/stylesheets/galleries.css.scss b/app/assets/stylesheets/galleries.css.scss index 5c8f202..27e63bf 100644 --- a/app/assets/stylesheets/galleries.css.scss +++ b/app/assets/stylesheets/galleries.css.scss @@ -33,4 +33,16 @@ //.fade { // opacity: 0; // transition: opacity 0.15s linear 0s; -//} \ No newline at end of file +//} + +div.gallery-block +{ + padding: 10px; + margin-bottom: 10px; +} + +a.gallery-block:hover +{ + display: block; + box-shadow: 1px 1px 2px 2px lightgray; +} \ No newline at end of file diff --git a/app/models/gallery.rb b/app/models/gallery.rb index ac5e8c9..ae4afde 100644 --- a/app/models/gallery.rb +++ b/app/models/gallery.rb @@ -11,6 +11,7 @@ # class Gallery < ActiveRecord::Base + WORD_COUNT = 20 attr_accessible :datum, :desc, :name has_many :fotos end diff --git a/app/views/galleries/index.html.erb b/app/views/galleries/index.html.erb index 657280f..fac0d89 100644 --- a/app/views/galleries/index.html.erb +++ b/app/views/galleries/index.html.erb @@ -1,26 +1,37 @@
<%= gallery.desc %> -
-+ <%= if gallery.desc.split.size > Gallery::WORD_COUNT + gallery.desc.split[0..Gallery::WORD_COUNT].join(" ") + " ..." + else + gallery.desc + end%> +
+