Permalink
Browse files

Enhanced startup gallery.

  • Loading branch information...
1 parent 40aca11 commit d901bd55e042d3d7ca1ecf6e1337a10a5304c8c9 @fredwu committed Jul 18, 2011
Showing with 418 additions and 10 deletions.
  1. +3 −1 app/assets/javascripts/concerns/gallery.js.coffee
  2. +46 −0 app/assets/javascripts/libs/jquery/jquery.fancybox.pack.js
  3. +3 −3 app/assets/javascripts/libs/jquery/jquery.slideshow.lite.js
  4. +1 −0 app/assets/stylesheets/application.css.scss
  5. +3 −3 app/uploaders/startup_photo_uploader.rb
  6. +1 −1 app/views/startups/_photos.html.slim
  7. +1 −1 app/views/startups/upload_photos.html.slim
  8. BIN public/stylesheets/fancybox/blank.gif
  9. BIN public/stylesheets/fancybox/fancy_close.png
  10. BIN public/stylesheets/fancybox/fancy_loading.png
  11. BIN public/stylesheets/fancybox/fancy_nav_left.png
  12. BIN public/stylesheets/fancybox/fancy_nav_right.png
  13. BIN public/stylesheets/fancybox/fancy_shadow_e.png
  14. BIN public/stylesheets/fancybox/fancy_shadow_n.png
  15. BIN public/stylesheets/fancybox/fancy_shadow_ne.png
  16. BIN public/stylesheets/fancybox/fancy_shadow_nw.png
  17. BIN public/stylesheets/fancybox/fancy_shadow_s.png
  18. BIN public/stylesheets/fancybox/fancy_shadow_se.png
  19. BIN public/stylesheets/fancybox/fancy_shadow_sw.png
  20. BIN public/stylesheets/fancybox/fancy_shadow_w.png
  21. BIN public/stylesheets/fancybox/fancy_title_left.png
  22. BIN public/stylesheets/fancybox/fancy_title_main.png
  23. BIN public/stylesheets/fancybox/fancy_title_over.png
  24. BIN public/stylesheets/fancybox/fancy_title_right.png
  25. BIN public/stylesheets/fancybox/fancybox-x.png
  26. BIN public/stylesheets/fancybox/fancybox-y.png
  27. BIN public/stylesheets/fancybox/fancybox.png
  28. +359 −0 public/stylesheets/fancybox/jquery.fancybox.css
  29. +1 −1 spec/models/startup_photo_spec.rb
@@ -1,9 +1,11 @@
jQuery ->
- $("#slideshow").livequery(->
+ $('#slideshow').livequery(->
$(@).slideshow(
pauseSeconds: 5
width: window.settings.group.logo.full.width
height: window.settings.group.logo.full.height
caption: false
)
+
+ $('> a', @).fancybox()
)

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -81,7 +81,7 @@
var i = 1;
$("a", target).each(function(){
- $(this).attr("rel", i++);
+ $(this).attr("data-seq", i++);
});
// ----------------------------------------
@@ -150,12 +150,12 @@
});
// pagination highlight
- paginationHighlight(currentItem.attr("rel")-1);
+ paginationHighlight(currentItem.data("seq")-1);
// show caption
if (options.caption == true)
{
- showCaption(currentItem.attr("rel")-1);
+ showCaption(currentItem.data("seq")-1);
}
currentItem.css("z-index", 2);
@@ -11,4 +11,5 @@
@import 'inc/960_12_10_10.css';
@import 'inc/jquery.autoSuggest.css';
@import 'inc/jquery.slideshow.lite.css';
+@import '/stylesheets/fancybox/jquery.fancybox.css';
@import 'style.css';
@@ -23,15 +23,15 @@ def store_dir
# end
# Process files as they are uploaded:
- process :resize_to_fill => [Settings.group.logo.full.width, Settings.group.logo.full.height]
+ process :resize_to_fill => [Settings.group.logo.gallery.width, Settings.group.logo.gallery.height]
# def scale(width, height)
# # do something
# end
# Create different versions of your uploaded files:
- version :gallery do
- process :resize_to_fill => [Settings.group.logo.gallery.width, Settings.group.logo.gallery.height]
+ version :slideshow do
+ process :resize_to_fill => [Settings.group.logo.full.width, Settings.group.logo.full.height]
end
# Add a white list of extensions which are allowed to be uploaded.
@@ -2,6 +2,6 @@
#slideshow
- if startup.photos.any?
- startup.photos.each do |photo|
- = image_tag(photo.photo.url)
+ = link_to image_tag(photo.photo.slideshow), photo.photo.url, :rel => 'startup_slideshow'
- else
= image_tag(startup.logo_full)
@@ -10,6 +10,6 @@
= p.input :photo_cache, :as => :hidden
.input
= label_tag ''
- = image_tag(photo.photo.url)
+ = image_tag(photo.photo.slideshow)
= f.button :submit
.clear
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit d901bd5

Please sign in to comment.