Skip to content

Commit

Permalink
Enhanced startup gallery.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredwu committed Jul 18, 2011
1 parent 40aca11 commit d901bd5
Show file tree
Hide file tree
Showing 29 changed files with 418 additions and 10 deletions.
4 changes: 3 additions & 1 deletion app/assets/javascripts/concerns/gallery.js.coffee
@@ -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()
)
46 changes: 46 additions & 0 deletions app/assets/javascripts/libs/jquery/jquery.fancybox.pack.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/assets/javascripts/libs/jquery/jquery.slideshow.lite.js
Expand Up @@ -81,7 +81,7 @@

var i = 1;
$("a", target).each(function(){
$(this).attr("rel", i++);
$(this).attr("data-seq", i++);
});

// ----------------------------------------
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css.scss
Expand Up @@ -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';
6 changes: 3 additions & 3 deletions app/uploaders/startup_photo_uploader.rb
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion app/views/startups/_photos.html.slim
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion app/views/startups/upload_photos.html.slim
Expand Up @@ -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
Binary file added public/stylesheets/fancybox/blank.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_close.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_loading.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_nav_left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_nav_right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_shadow_e.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_shadow_n.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_shadow_ne.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_shadow_nw.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_shadow_s.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_shadow_se.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_shadow_sw.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_shadow_w.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_title_left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_title_main.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_title_over.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancy_title_right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancybox-x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancybox-y.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/stylesheets/fancybox/fancybox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d901bd5

Please sign in to comment.