From 5c7fff599d53095ea45268ba99b28cd4d62354b7 Mon Sep 17 00:00:00 2001 From: Jimmy Schementi Date: Mon, 12 Jul 2010 03:43:25 -0700 Subject: [PATCH] Add simple sticky footer. --- app.rb | 3 +- public/app.js | 5 ++ public/sticky-footer.css | 49 ++++++++++++ public/style.css | 25 +++++- views/_footer.erb | 7 ++ views/layout.erb | 162 ++++++++++++++++++++++----------------- 6 files changed, 176 insertions(+), 75 deletions(-) create mode 100644 public/sticky-footer.css create mode 100644 views/_footer.erb diff --git a/app.rb b/app.rb index f2835c3..37d19de 100644 --- a/app.rb +++ b/app.rb @@ -14,15 +14,14 @@ def get_feed(url) res = Net::HTTP.start(url.host, url.port) { |http| http.get(url.path) } + content_type 'application/xml', :charset => 'utf-8' res.body end get '/blog.rss' do - content_type 'application/xml', :charset => 'utf-8' get_feed 'http://feeds.feedburner.com/jimmy-thinking' end get '/twitter.rss' do - content_type 'application/xml', :charset => 'utf-8' get_feed 'http://twitter.com/statuses/user_timeline/8007442.rss' end \ No newline at end of file diff --git a/public/app.js b/public/app.js index 3b0ed41..c94c068 100644 --- a/public/app.js +++ b/public/app.js @@ -268,6 +268,11 @@ var renderResume = function() { var roundTheWorld = function() { $(document).ready(function() { $('.area, .island').corner('round tr br 10px'); + $('#navigation a').corner('round 5px'); + $('.section').not('#most-recent-post, #home-writing').corner('round tl bl 10px'); + $('#most-recent-post').corner('round tl 10px') + $('#home-writing').corner('round bl 10px') + $('#most-recent-post .rss_item a, #home-writing .rss_item a').corner('round 5px'); }); } diff --git a/public/sticky-footer.css b/public/sticky-footer.css new file mode 100644 index 0000000..a781818 --- /dev/null +++ b/public/sticky-footer.css @@ -0,0 +1,49 @@ +/* +Sticky Footer Solution +by Steve Hatcher +http://stever.ca +http://www.cssstickyfooter.com +*/ + +/* +* {margin:0;padding:0;} +*/ + +/* must declare 0 margins on everything, also for main layout components use padding, not +vertical margins (top and bottom) to add spacing, else those margins get added to total height +and your footer gets pushed down a bit more, creating vertical scroll bars in the browser */ + +html, body {height: 100%;} + +#wrap {min-height: 100%;} + +#main {overflow:auto; + padding-bottom: 150px;} /* must be same height as the footer */ + +#footer {position: relative; + margin-top: -150px; /* negative value of footer height */ + height: 150px; + clear:both;} + +/*Opera Fix*/ +body:before {/* thanks to Maleika (Kohoutec)*/ +content:""; +height:100%; +float:left; +width:0; +margin-top:-32767px;/* thank you Erik J - negate effect of float*/ +} + + + +/* IMPORTANT + +You also need to include this conditional style in the of your HTML file to feed this style to IE 6 and lower and 8 and higher. + + + +*/ \ No newline at end of file diff --git a/public/style.css b/public/style.css index cc5875b..e48548c 100644 --- a/public/style.css +++ b/public/style.css @@ -21,7 +21,12 @@ a:hover { text-decoration: underline; } -#page { +#wrap { + text-align: center; + width: 100%; +} + +#main, #footer .inside { margin: 0 auto; text-align: left; width: 92.7em; @@ -203,7 +208,7 @@ a:hover { color: #444; }*/ - #page #twitter-status { + #twitter-status { font-size:1.5em; margin-left:1.5em; margin-top:0.3em; @@ -514,3 +519,19 @@ a:hover { #code #github-badge-wrapper #github-badge { padding: 5px; } + +/* footer */ + + #footer { + background-color: #222; + color: white; + text-align: center; + border-top: 3px solid #444; + } + + #footer .inside { + } + + #footer .inside p { + font-size: 1.35em; + } \ No newline at end of file diff --git a/views/_footer.erb b/views/_footer.erb new file mode 100644 index 0000000..d54dbe7 --- /dev/null +++ b/views/_footer.erb @@ -0,0 +1,7 @@ +

+ © Jimmy Schementi › + about | + projects | + writing | + photos +

\ No newline at end of file diff --git a/views/layout.erb b/views/layout.erb index c439464..595551a 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -14,9 +14,15 @@ + + - - -
- -
- -
- - - - <%= erb :_twitter_status, :layout => false %> + +
-
+ - - - - - - - - - - - - - - - - - - - - - + + + +