From bc033cfa8e2332a07c2b56ad36eb894c0a6f3ec2 Mon Sep 17 00:00:00 2001 From: B Mathis Date: Mon, 9 Nov 2009 23:38:48 -0600 Subject: [PATCH] updated styles for delicious and twitter --- source/_helpers.rb | 9 +++++++ source/_layouts/default.haml | 5 ++-- source/javascripts/twitter.js | 2 +- stylesheets/_theme.sass | 7 +---- stylesheets/partials/_sidebar.sass | 20 +++++++++++++-- stylesheets/partials/_twitter.sass | 41 ++++++++++-------------------- 6 files changed, 46 insertions(+), 38 deletions(-) diff --git a/source/_helpers.rb b/source/_helpers.rb index 4f7dbf6..f957d2a 100644 --- a/source/_helpers.rb +++ b/source/_helpers.rb @@ -156,6 +156,15 @@ module Helpers # My added helpers + def show_part (file) + data = '' + f = File.open(Dir.pwd+"/source/"+file) + f.each_line do |line| + data += line + end + data + end + def shorten_words (string, word_limit = 25) words = string.split(/\s/) if words.size >= word_limit diff --git a/source/_layouts/default.haml b/source/_layouts/default.haml index ac686a5..4842c79 100644 --- a/source/_layouts/default.haml +++ b/source/_layouts/default.haml @@ -6,6 +6,7 @@ tweet_count: 3 show_replies: false delicious_user: imathis +delicious_count: 3 full_url: disqus_short_name: @@ -82,13 +83,13 @@ google_analytics: true - if page.respond_to? :delicious_user %h4 My Delicious more → #delicious - %script(type="text/javascript" src="http://feeds.delicious.com/v2/js/#{page.delicious_user}?title=&count=5&sort=date&extended") + %script(type="text/javascript" src="http://feeds.delicious.com/v2/js/#{page.delicious_user}?title=&count=#{page.delicious_count}&sort=date&extended") #footer .page_width Copyright © #{Time.now.strftime('%Y')} - #{page.blog_title} - %span.credit Powered by Octopress - if page.respond_to? :disqus_short_name - //Disqus Commens code + //Disqus Comments code :javascript (function() { var links = document.getElementsByTagName('a'); diff --git a/source/javascripts/twitter.js b/source/javascripts/twitter.js index b194991..975e7ad 100644 --- a/source/javascripts/twitter.js +++ b/source/javascripts/twitter.js @@ -140,7 +140,7 @@ var TwitterGitter = new Class({ //format linkify: function(text) { //courtesy of Jeremy Parrish (rrish.org) - return text.replace(/(https?:\/\/\S+)/gi,'$1').replace(/(^|\s)@(\w+)/g,'$1@$2').replace(/(^|\s)#(\w+)/g,'$1#$2'); + return text.replace(/(https?:\/\/[\w\-:;?&=+.%#\/]+)/gi,'$1').replace(/(^|\s)@(\w+)/g,'$1@$2').replace(/(^|\s)#(\w+)/g,'$1#$2'); } }); //Compact Jsonp from http://clientcide.com/js diff --git a/stylesheets/_theme.sass b/stylesheets/_theme.sass index 016957b..7e59e01 100644 --- a/stylesheets/_theme.sass +++ b/stylesheets/_theme.sass @@ -42,9 +42,4 @@ !textinput_border_right = #c3c3c3 !textinput_border_focus = #989898 -!cancel_link = #555 - -// Button Colors -!default_button_text_color = #fff -!default_button_bg = yellow -!blue_btn = desaturate(adjust_hue(!default_button_bg, -16), 25) \ No newline at end of file +!twitter_topic = #888 \ No newline at end of file diff --git a/stylesheets/partials/_sidebar.sass b/stylesheets/partials/_sidebar.sass index 487df59..341455a 100644 --- a/stylesheets/partials/_sidebar.sass +++ b/stylesheets/partials/_sidebar.sass @@ -9,13 +9,29 @@ margin-top: 10px .small +sans-font - font-size: 50% + font-size: 50% + font-size: 80% + line-height: 1.625em + +#twitter, #delicious + +border-radius + background: #f8f8f8 + border: 1px solid #eee + padding: 5px 0 + ul + list-style-type: none + margin: 0 + li + margin: 0 15px + padding: 10px 0 0 + border-bottom: #ddd 1px dashed + &:last-child + border-bottom: 0 #delicious p font-style: italic li - font-size: 90% color: #666 font-style: normal padding-bottom: 8px \ No newline at end of file diff --git a/stylesheets/partials/_twitter.sass b/stylesheets/partials/_twitter.sass index d8f9249..2db993f 100644 --- a/stylesheets/partials/_twitter.sass +++ b/stylesheets/partials/_twitter.sass @@ -1,28 +1,15 @@ #twitter - font-size: 80% - +border-radius - background: #f8f8f8 - border: 1px solid #eee - padding: 5px 0 - ul - list-style-type: none - margin: 0 - li - margin: 0 15px - padding: 10px 0 0 - border-bottom: #ddd 1px dashed - line-height: 1.625em - &:last-child - border-bottom: 0 - p - padding-bottom: 10px - .meta - color= !light_text - font-size: 80% - display: block - padding: 8px 0 0 - a - color: inherit - text-decoration: none - &:hover - text-decoration: underline \ No newline at end of file + p + padding-bottom: 10px + a.topic + color= !twitter_topic + .meta + color= !light_text + font-size: 80% + display: block + padding: 8px 0 0 + a + color: inherit + text-decoration: none + &:hover + text-decoration: underline \ No newline at end of file