Skip to content

Commit

Permalink
Parallax candy!
Browse files Browse the repository at this point in the history
  • Loading branch information
fredwu committed Jan 19, 2011
1 parent 8feb14a commit 6a8ff74
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 24 deletions.
45 changes: 36 additions & 9 deletions app/stylesheets/base.sass
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -71,11 +71,24 @@ body
a a
padding-left: 22px padding-left: 22px
background: url("/images/icon-browser.png") no-repeat background: url("/images/icon-browser.png") no-repeat
#crowd-header #crowd-header-viewport
position: relative
overflow: hidden
margin: 0 auto margin: 0 auto
width: 1075px width: 1070px
height: 144px height: 140px
background: url("/images/crowd-header.png") center no-repeat #crowd-header, #crowd-header2
position: absolute
#crowd-header
width: 1075px
height: 144px
background: url("/images/crowd-header.png") center no-repeat
z-index: 3
#crowd-header2
width: 1100px
height: 160px
background: url("/images/crowd-header2.png") center no-repeat
z-index: 2


#hero #hero
h2 h2
Expand Down Expand Up @@ -200,7 +213,7 @@ body


#footer #footer
text-align: center text-align: center
background: url("/images/bg-footer-gradient.jpg") top repeat-x background: url("/images/bg-footer-gradient.jpg") bottom repeat-x
#footer-logo #footer-logo
margin: 0 auto 15px auto margin: 0 auto 15px auto
width: 20px width: 20px
Expand All @@ -211,11 +224,25 @@ body
padding-bottom: 5px padding-bottom: 5px
&#copyright &#copyright
font-size: 14px font-size: 14px
#crowd-footer #crowd-footer-viewport
width: 1000px position: relative
height: 114px overflow: hidden
width: 1090px
height: 116px
margin-top: 20px margin-top: 20px
background: url("/images/crowd-footer.png") center no-repeat margin-left: -50px
#crowd-footer, #crowd-footer2
position: absolute
#crowd-footer
width: 1100px
height: 120px
background: url("/images/crowd-footer.png") center no-repeat
z-index: 3
#crowd-footer2
width: 1110px
height: 125px
background: url("/images/crowd-footer2.png") center no-repeat
z-index: 2


/*------------------------------ /*------------------------------
* portrait slider * portrait slider
Expand Down
15 changes: 9 additions & 6 deletions app/views/layouts/application.html.slim
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ html
link rel="canonical" href="http://rubycommitters.org/" link rel="canonical" href="http://rubycommitters.org/"
== favicon_tag 'favicon.png' == favicon_tag 'favicon.png'
== stylesheet_link_tag :base == stylesheet_link_tag :base
== javascript_include_tag :jquery, :'jquery.nivo.slider.pack', :application == javascript_include_tag :jquery, :'jquery.nivo.slider.pack', :'jquery.jparallax.min.js', :application


body body
#ribbon== link_to 'Fork me on GitHub', 'https://github.com/fredwu/rubycommitters.org' #ribbon== link_to 'Fork me on GitHub', 'https://github.com/fredwu/rubycommitters.org'
Expand All @@ -15,7 +15,9 @@ html
#header #header
h1#logo= @site_name h1#logo= @site_name
p#ruby-link== link_to 'Visit the official Ruby website', 'http://www.ruby-lang.org/' p#ruby-link== link_to 'Visit the official Ruby website', 'http://www.ruby-lang.org/'
#crowd-header #crowd-header-viewport
#crowd-header
#crowd-header2
#crowd-header-strip #crowd-header-strip
#hero #hero
#inner-wrapper #inner-wrapper
Expand All @@ -33,7 +35,8 @@ html
== "An initiative by #{link_to 'Aaron Patterson', 'http://tenderlovemaking.com/'}" == "An initiative by #{link_to 'Aaron Patterson', 'http://tenderlovemaking.com/'}"
== " | Website programmed and designed by #{link_to 'Fred Wu', 'http://fredwu.me/'}" == " | Website programmed and designed by #{link_to 'Fred Wu', 'http://fredwu.me/'}"
p== "Powered by #{link_to 'Padrino', 'http://www.padrinorb.com/'}, #{link_to 'Slim', 'https://github.com/stonean/slim'} and #{link_to 'Sass', 'http://sass-lang.com/'}" p== "Powered by #{link_to 'Padrino', 'http://www.padrinorb.com/'}, #{link_to 'Slim', 'https://github.com/stonean/slim'} and #{link_to 'Sass', 'http://sass-lang.com/'}"
#crowd-footer #crowd-footer-viewport
== partial 'layouts/google_analytics' if Padrino.env == :production #crowd-footer

#crowd-footer2
#crowd-footer-strip #crowd-footer-strip
== partial 'layouts/google_analytics' if Padrino.env == :production
Binary file modified public/images/crowd-footer.png
Loading
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/images/crowd-footer2.png
Loading
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/images/crowd-header2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/javascripts/application.js
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,13 @@
$(function() { $(function() {
$("#crowd-header, #crowd-header2").parallax({
mouseport: $("#crowd-header-viewport"),
decay: 0
});
$("#crowd-footer, #crowd-footer2").parallax({
mouseport: $("#crowd-footer-viewport"),
decay: 0
});

$("ul.social li a, ul.bio-langs li a").hover(function() { $("ul.social li a, ul.bio-langs li a").hover(function() {
$(this).fadeTo(100, 1); $(this).fadeTo(100, 1);
}, function() { }, function() {
Expand Down
39 changes: 39 additions & 0 deletions public/javascripts/jquery.jparallax.min.js

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

45 changes: 36 additions & 9 deletions public/stylesheets/base.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -108,11 +108,24 @@ body {
#header-wrapper #header p#ruby-link a { #header-wrapper #header p#ruby-link a {
padding-left: 22px; padding-left: 22px;
background: url("/images/icon-browser.png") no-repeat; } background: url("/images/icon-browser.png") no-repeat; }
#header-wrapper #crowd-header { #header-wrapper #crowd-header-viewport {
position: relative;
overflow: hidden;
margin: 0 auto; margin: 0 auto;
width: 1075px; width: 1070px;
height: 144px; height: 140px; }
background: url("/images/crowd-header.png") center no-repeat; } #header-wrapper #crowd-header-viewport #crowd-header, #header-wrapper #crowd-header-viewport #crowd-header2 {
position: absolute; }
#header-wrapper #crowd-header-viewport #crowd-header {
width: 1075px;
height: 144px;
background: url("/images/crowd-header.png") center no-repeat;
z-index: 3; }
#header-wrapper #crowd-header-viewport #crowd-header2 {
width: 1100px;
height: 160px;
background: url("/images/crowd-header2.png") center no-repeat;
z-index: 2; }


#hero { #hero {
background: #392a2a; } background: #392a2a; }
Expand Down Expand Up @@ -232,7 +245,7 @@ body {


#footer { #footer {
text-align: center; text-align: center;
background: url("/images/bg-footer-gradient.jpg") top repeat-x; } background: url("/images/bg-footer-gradient.jpg") bottom repeat-x; }
#footer #footer-logo { #footer #footer-logo {
margin: 0 auto 15px auto; margin: 0 auto 15px auto;
width: 20px; width: 20px;
Expand All @@ -243,11 +256,25 @@ body {
padding-bottom: 5px; } padding-bottom: 5px; }
#footer p#copyright { #footer p#copyright {
font-size: 14px; } font-size: 14px; }
#footer #crowd-footer { #footer #crowd-footer-viewport {
width: 1000px; position: relative;
height: 114px; overflow: hidden;
width: 1090px;
height: 116px;
margin-top: 20px; margin-top: 20px;
background: url("/images/crowd-footer.png") center no-repeat; } margin-left: -50px; }
#footer #crowd-footer-viewport #crowd-footer, #footer #crowd-footer-viewport #crowd-footer2 {
position: absolute; }
#footer #crowd-footer-viewport #crowd-footer {
width: 1100px;
height: 120px;
background: url("/images/crowd-footer.png") center no-repeat;
z-index: 3; }
#footer #crowd-footer-viewport #crowd-footer2 {
width: 1110px;
height: 125px;
background: url("/images/crowd-footer2.png") center no-repeat;
z-index: 2; }


/*------------------------------ /*------------------------------
* portrait slider * portrait slider
Expand Down

0 comments on commit 6a8ff74

Please sign in to comment.