The Tux-Lab website is developed with Ruby on Rails on Debian laptop/workstations and deployed to Debian servers. The database backend is handled by PostgreSQL. Graphics are created or edited via Inkscape. Photos are cropped and resized with GIMP.
Jul 28, 2012
It takes a few simple steps to achieve the mouseover transition from monochromatic to full color logo with tool tip popup.
First, all the information regarding the logo was stored in the a postgresql table, ie the model in the MVC architecture. Second, the uploading and location of the tool logos are managed using Rail's Paperclip gem. The Imagemagick library was used to post process and create a monochrome version of the full color uploaded tool logo.
Finally, the alpha channel (opacity) was also adjusted to give a better contrast between the monochromatic logo and the full color logo, especially for the black and white logos.
To post process the uploaded logo image.
has_attached_file
:image, :styles => { :thumbnail => "50x50>", :thumbnail_bw => "50x50>" },
:convert_options => { :thumbnail_bw => "-colorspace gray -channel Alpha -evaluate Divide 5" },
:url => "/assets/tool/:id/:style/:basename.:extension",
:path => ":rails_root/public/assets/tool/:id/:style/:basename.:extension"
To display the mouseover effect.
<% for tool in @tools %>
<% logo = image_tag(tool.image.url(:thumbnail_bw), :mouseover => tool.image.url(:thumbnail)) %>
<% end %>
<%= link_to logo, "http://#{tool.link}", {:title => "#{tool.summary}"} %>
Tux-Lab Rails Upgrade
Apr 02, 2012
Expanded project to allow for simple documentation and tracking function. To boost performance, the default setting for the paperclip gem were changed to convert and save images in jpeg format with a 70% compression quality and stripping away the EXIF information.
Preliminary test on the HaasTec 2011 photo gallery shows a reduction from a total file size of 1.4Mb down to 0.4Mb. The paperclip option used to change the default imagemagick file conversion is,
has_attached_file
:project_image, :styles => { :thumbnail => ["100x67#", :jpg], :sm_thumbnail => ["50x34#", :jpg] },
:convert_options => { :thumbnail => "-quality 70 -strip", :sm_thumbnail => "-quality 70 -strip" },
Rails Server Upgrade
Mar 10, 2011
Upgraded to the Rails3 framework, added the paperclip gem for gallery images, and moved the server out of Bluehost and into a Xen vps running Debian. Minor change to the tcp-imp.com logo.
Rails Updated
Nov 08, 2009
Speed Test according to website speed test:
Size | Load Time | Avg Speed/KB | |
HostingRails | 1.63KB | 5.18s | 3.17s |
bluehost | 4.6KB | 1.45s | 0.32s |
Rails Scaffold
May 20, 2008