diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 2cd7eca..f459e88 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -3,5 +3,6 @@ class PagesController < ApplicationController render :layout => 'soon' end def home + @stylesheets = %w{reset grids layout ugallery} end end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 9a944de..743e49b 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -13,7 +13,12 @@ #container #header %img.left#badge(src='images/logo.png' alt='Air-one Logo') - %img.right#gallery(src='images/sprinter.png' alt='Gallery') + #gallery.ugallery + %a(href="images/sprinter.1.png") + %a(href="images/vans.png") + %a(href="images/sprinter.2.png") + %a(href="images/office.png") + %a(href="images/sprinter.3.png") #menu %ul#nav %li diff --git a/app/views/pages/home.html.haml b/app/views/pages/home.html.haml index 9375c50..380a4c6 100644 --- a/app/views/pages/home.html.haml +++ b/app/views/pages/home.html.haml @@ -1,5 +1,18 @@ - content_for :head do - %script(src='javascripts/jquery.color.min.js') + %script(src='javascripts/jquery.ugallery-min.js') + %script + :plain + $(document).ready(function() { + $("#gallery").ugallery({ + play_btn : "images/play.png", + stop_btn : "images/stop.png", + forward_btn : "images/right.gif", + backward_btn : "images/left.gif", + controls_vpos : 100, + fade_duration : 300, + autostart : true + }); + }); #main :customtextile diff --git a/public/images/left.gif b/public/images/left.gif new file mode 100644 index 0000000..b8158b4 Binary files /dev/null and b/public/images/left.gif differ diff --git a/public/images/office.png b/public/images/office.png new file mode 100644 index 0000000..9c38ef2 Binary files /dev/null and b/public/images/office.png differ diff --git a/public/images/play.png b/public/images/play.png new file mode 100644 index 0000000..c0d7d39 Binary files /dev/null and b/public/images/play.png differ diff --git a/public/images/right.gif b/public/images/right.gif new file mode 100644 index 0000000..d654683 Binary files /dev/null and b/public/images/right.gif differ diff --git a/public/images/sprinter.1.png b/public/images/sprinter.1.png new file mode 100644 index 0000000..dadce0b Binary files /dev/null and b/public/images/sprinter.1.png differ diff --git a/public/images/sprinter.2.png b/public/images/sprinter.2.png new file mode 100644 index 0000000..c823be1 Binary files /dev/null and b/public/images/sprinter.2.png differ diff --git a/public/images/sprinter.3.png b/public/images/sprinter.3.png new file mode 100644 index 0000000..1e2e46b Binary files /dev/null and b/public/images/sprinter.3.png differ diff --git a/public/images/sprinter.png b/public/images/sprinter.png deleted file mode 100644 index 072edfa..0000000 Binary files a/public/images/sprinter.png and /dev/null differ diff --git a/public/images/stop.png b/public/images/stop.png new file mode 100644 index 0000000..f3655e8 Binary files /dev/null and b/public/images/stop.png differ diff --git a/public/images/vans.png b/public/images/vans.png new file mode 100644 index 0000000..69098f2 Binary files /dev/null and b/public/images/vans.png differ diff --git a/public/javascripts/jquery.ugallery-min.js b/public/javascripts/jquery.ugallery-min.js new file mode 100644 index 0000000..53250e8 --- /dev/null +++ b/public/javascripts/jquery.ugallery-min.js @@ -0,0 +1 @@ +(function(c){var b=function(){if(!("id" in arguments.callee)){arguments.callee.id=0}return"ugallery_"+arguments.callee.id++};var a=function(d){if(!("cache" in arguments.callee)){arguments.callee.cache={}}if(!(d in arguments.callee.cache)){arguments.callee.cache[d]=new Image();arguments.callee.cache[d].src=d}};c.fn.ugallery=function(f){var e={fade_duration:1200,forward_btn:"right.gif",backward_btn:"left.gif",controls_vpos:150,animate_controls:true,control_fade_duration:300,controls_fade_from:0.2,controls_fade_to:0.7,player:true,play_btn:"play.png",stop_btn:"stop.png",play_vpos:-1,hide_controls:true,show_duration:5000,autostart:false,hide_playbtn_on_mout:true,desc_pos:"top",desc_bg_color:"#000",desc_bg_opacity:0.6,desc_align:"right",desc_height:20,desc_custom_class:null,desc_custom_callback:null,counter_enabled:false,counter_pos:"top",counter_align:"left",counter_custom_class:null,counter_custom_callback:null,counter_height:-1,show_thumb:false,thumb_position:"right",thumb_bg:"filmv.gif",thumb_img_width:90,thumb_img_height:60,thumb_pnl_width:130,thumb_pnl_opacity:0.6,thumb_img_opacity:0.2,thumb_img_fade_from:0.4,thumb_img_fade_to:1};var d=c.extend(e,f);return this.each(function(){var g=c(this);var h=g.find("a");var G="#"+g.attr("id");var H=b();var R=b();var l=b();var m=b();var E=b();var P=b();var B=b();var K=b();var r=b();var x=b();var v=b();var I=g.find("div.collection img");var w=b();var t,s;var y;var z=function(){c(G+" .view_pointer_0").removeClass("view_pointer_0");c(G+" .view_pointer_next").removeClass("view_pointer_next");c(G+" .view_pointer_prev").removeClass("view_pointer_prev")};var A=function(){for(var S=0;S');c(G+" div.viewport").css({width:g.css("width"),height:g.css("height"),position:"absolute",left:0,top:0});c(G+" div.viewport").prepend('\n\n\n\n\n\n
\n
\n
\n');c("#"+H+",#"+R).css({position:"absolute",top:0,left:0});c("#"+R).css("opacity",0);c("#"+m).css({position:"absolute",right:0,top:d.controls_vpos,"z-index":2,opacity:d.controls_fade_from,cursor:"pointer"});c("#"+l).css({position:"absolute",left:0,top:d.controls_vpos,"z-index":2,opacity:d.controls_fade_from,cursor:"pointer"});if(d.play_vpos==-1){d.play_vpos=d.controls_vpos-5}if(d.counter_height==-1){d.counter_height=d.desc_height}c("#"+E+",#"+P).css({position:"absolute",display:"none",left:(g.width()/2-28),top:d.play_vpos,"z-index":2,opacity:d.controls_fade_from,cursor:"pointer"});c("#"+r).css({position:"absolute",width:g.width(),height:d.desc_height,"z-index":4,"background-color":d.desc_bg_color,opacity:d.desc_bg_opacity});c("#"+B).css({position:"absolute",width:g.width(),height:d.desc_height,"z-index":5,"text-align":d.desc_align});c("#"+K).css({margin:3});switch(d.desc_pos){case"top":c("#"+B).css({left:0,top:-d.desc_height-2});c("#"+r).css("display","none");break;case"top-inside":c("#"+B+",#"+r).css({left:0,top:0});break;case"bottom":c("#"+B).css({left:0,bottom:-d.desc_height-2});c("#"+r).css("display","none");break;case"bottom-inside":c("#"+B+",#"+r).css({left:0,bottom:0});break}if(d.counter_enabled){c("#"+x).css({position:"absolute",width:g.width(),height:d.counter_height,"z-index":5,"text-align":d.counter_align});c("#"+v).css({margin:3})}switch(d.counter_pos){case"top":c("#"+x).css({left:0,top:-d.counter_height-2});break;case"top-inside":c("#"+x).css({left:0,top:0});break;case"bottom":c("#"+x).css({left:0,bottom:-d.counter_height-2});break;case"bottom-inside":c("#"+x).css({left:0,bottom:0});break}if(d.player){c("#"+E).css("display","block")}if(d.animate_controls){c("#"+m+",#"+l+",#"+E+",#"+P).hover(function(T){c(this).animate({opacity:d.controls_fade_to},d.controls_fade_duration,function(){})},function(T){c(this).animate({opacity:d.controls_fade_from},d.controls_fade_duration,function(){})})}M(0);Q();if(d.counter_enabled){C()}k();c("#"+H).attr("src",c(G+" .view_pointer_0").attr("href"));if(d.show_thumb){t=(d.thumb_pnl_width-d.thumb_img_width)/2;s=12;c(G).prepend('
');c(G+" div.thumbs").css("overflow","hidden");switch(d.thumb_position){case"right":c(G+" .thumbs").css({position:"absolute",left:g.css("width")+1,width:d.thumb_pnl_width,height:g.css("height")});break;case"left":c(G+" .thumbs").css({position:"absolute",left:0,width:d.thumb_pnl_width,height:g.css("height")});c(G+" div.viewport").css({left:d.thumb_pnl_width+1});break}c(G+" .thumbs").append('
\n');y=I.length*(d.thumb_img_height+s)+s;c("#"+w).css({"background-image":"url("+d.thumb_bg+")",height:y,opacity:d.thumb_pnl_opacity,border:d.thumb_border_style});var S=s;I.each(function(){c(this).attr("title",c(this).parent().attr("href"));c(this).css({left:t,top:S,opacity:d.thumb_img_opacity});c(this).hover(function(){c(this).css("opacity",d.thumb_img_fade_to)},function(){c(this).css("opacity",d.thumb_img_fade_from)});c("#"+w).append(this);S+=(s+d.thumb_img_height)})}}();var o=-1,n=-1;var F=function(V){if(o!=-1&&n!=-1){var T=c(G+" .thumbs").width();var S=c(G+" .thumbs").height();var U=(n*2*7)/S-7;if(U>3||U<-3){c("#"+w).css("top",function(Y,X){return parseFloat(X)-U})}var W=parseFloat(c("#"+w).css("top"));if(W>0){c("#"+w).css("top",0)}if(W<-y+S){c("#"+w).css("top",-y+S)}}};c("#"+m).click(function(){O(true)});c("#"+l).click(function(){O(false)});c("#"+E+",#"+P).click(function(){if(d.player){D()}});if(d.player&&d.autostart){i=!i;c("#"+E).css("display","none");c("#"+P).css("display","block");setTimeout(N,d.show_duration);j(false)}if(d.hide_playbtn_on_mout){c("#"+E+",#"+P).css("top","-1000px");c(G).mouseout(function(){c("#"+E+",#"+P).css("top","-1000px")});c(G).mouseover(function(){c("#"+E+",#"+P).css("top",d.play_vpos)})}var u;c(G+" .thumbs").mousemove(function(S){o=S.pageX-c(G+" .thumbs").offset().left;n=S.pageY-c(G+" .thumbs").offset().top});c(G+" .thumbs").hover(function(S){u=setInterval(function(){F(S)},20)},function(){clearInterval(u);o=-1;n=-1});c("#"+w+" img").click(function(){z();c(G+" div.collection a[href="+c(this).attr("title")+"]").addClass("view_pointer_0");M(A());p(G+" .view_pointer_0");k()})})}})(jQuery); \ No newline at end of file diff --git a/public/stylesheets/layout.css b/public/stylesheets/layout.css index 18c83ef..e3d87ac 100644 --- a/public/stylesheets/layout.css +++ b/public/stylesheets/layout.css @@ -36,9 +36,6 @@ blockquote p { #header img { display: block; } -#header > #badge { - margin-top: 0.231em; -} #header ul li { list-style: none; } @@ -98,6 +95,13 @@ blockquote p { display: none; } +#gallery { + width: 42.308em; + height: 15.385em; + float: right; + padding-right: 0.154em; +} + .caps { font-size: 123%; font-variant: small-caps; diff --git a/public/stylesheets/ugallery.css b/public/stylesheets/ugallery.css new file mode 100644 index 0000000..8585d1c --- /dev/null +++ b/public/stylesheets/ugallery.css @@ -0,0 +1,22 @@ +div.ugallery { + position: relative; +} +div.ugallery img.aniview { + z-index: 1; +} +div.ugallery div.collection { + display: none; +} +div.ugallery div.thumbs div.thumb_panel { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; +} +div.ugallery div.thumbs div.thumb_panel img { + position: absolute; + cursor: pointer; + z-index: 2; +} \ No newline at end of file