aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/_helpers.rb9
-rw-r--r--source/_layouts/default.haml5
-rw-r--r--source/javascripts/twitter.js2
3 files changed, 13 insertions, 3 deletions
diff --git a/source/_helpers.rb b/source/_helpers.rb
index 4f7dbf6c..f957d2a6 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 ac686a5b..4842c792 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 <a class="small" href="http://delicious.com/#{page.delicious_user}">more &rarr;</a>
#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 &copy; #{Time.now.strftime('%Y')} - #{page.blog_title} -
%span.credit Powered by <a href="http://github.com/imathis/octopress/">Octopress</a>
- 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 b1949913..975e7adb 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,'<a href="$1">$1</a>').replace(/(^|\s)@(\w+)/g,'$1<a href="http://twitter.com/$2">@$2</a>').replace(/(^|\s)#(\w+)/g,'$1<a href="http://search.twitter.com/search?q=%23$2">#$2</a>');
+ return text.replace(/(https?:\/\/[\w\-:;?&=+.%#\/]+)/gi,'<a href="$1">$1</a>').replace(/(^|\s)@(\w+)/g,'$1<a class="user" href="http://twitter.com/$2">@$2</a>').replace(/(^|\s)#(\w+)/g,'$1<a class="topic" href="http://search.twitter.com/search?q=%23$2">#$2</a>');
}
});
//Compact Jsonp from http://clientcide.com/js