Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use the new 640px wide images when they are available.

 - switch from url() to url_z()
 - matching change in CSS to accomodate large images.
  • Loading branch information...
commit b4a86819951da7ff1547492538682247a49794d1 1 parent cc72f84
Ramanan Sivaranjan authored
Showing with 6 additions and 6 deletions.
  1. +5 −5 groupviewer.rb
  2. +1 −1  public/site.css
View
10 groupviewer.rb
@@ -2,7 +2,7 @@
require 'flickraw'
require 'haml'
-# Models and the like
+# Models and the like
class String
def is_untitled?
@@ -15,7 +15,7 @@ class Image
attr_accessor :id, :img_url, :flickr_url, :title, :photographer
def initialize(photo)
- @id, @img_url, @flickr_url = photo.id, FlickRaw::url(photo), FlickRaw::url_photopage(photo)
+ @id, @img_url, @flickr_url = photo.id, FlickRaw::url_z(photo), FlickRaw::url_photopage(photo)
@photographer = "<a href='#{FlickRaw::url_photostream(photo)}'>#{photo.ownername}</a>"
@title = photo.title.is_untitled? ? 'untitled' : photo.title
end
@@ -24,7 +24,7 @@ def initialize(photo)
# All the information about a page of images that need to be displayed
class ImageListing
attr_accessor :flickr_id, :title, :page, :pages, :sequence
-
+
def initialize(id, title, page, pages, sequence)
@flickr_id, @title, @page, @pages, @sequence = id, title, page, pages, sequence
end
@@ -54,12 +54,12 @@ def initialize(id, title, page, pages, sequence)
end
end
-helpers do
+helpers do
def set_paging(params, page)
params[:per_page] = 30 unless page == 0
params[:page] = page unless page == 0
end
-
+
# Loads 30 medium images from the flickr group
def load_group(group, page)
params = { :group_id => group, :extras => 'path_alias, owner_name' }
View
2  public/site.css
@@ -7,7 +7,7 @@ body {
}
#content {
- margin:0; padding:40px 80px; width:520px;
+ margin:0; padding:40px 80px; width:660px;
background:#FFF;
color:#000;
Please sign in to comment.
Something went wrong with that request. Please try again.