-
-
+
+
+
+ {{ date | date: "%b %e" }}
+ {% include post/categories.html %}
+ {% if site.disqus_short_name and post.comments == true and site.disqus_show_comment_count == true %}
+
+ {% endif %}
+
\ No newline at end of file
diff --git a/source/_includes/article.html b/source/_includes/article.html
index aee6efb1..13861563 100644
--- a/source/_includes/article.html
+++ b/source/_includes/article.html
@@ -1,32 +1,26 @@
-
- {% if index %}
-
- {% else %}
- {% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}
- {% endif %}
- {% if post or page.single %}{% include post/date.html %}{% endif %}
-
-
- {% if index %}
- {{ content | excerpt }}
- {% else %}
- {{ content }}
- {% unless index %}
- {% include post/sharing.html %}
- {% endunless %}
- {% endif %}
- {% if post or page.single %}
-
- {% endif %}
-
-{% include post/comment.html %}
\ No newline at end of file
+{% if index %}
+
+
+ {{ content | excerpt }}
+ {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
+ {% if excerpted == 'true' %}
{{ site.excerpt_link }} {% endif %}
+
+{% else %}
+ {% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}
+ {{ content }}
+{% endif %}
+
+
\ No newline at end of file
diff --git a/source/_includes/banner.html b/source/_includes/banner.html
new file mode 100644
index 00000000..af38f032
--- /dev/null
+++ b/source/_includes/banner.html
@@ -0,0 +1,15 @@
+{% if site.twitter_user and site.twitter_tweet_count > 0 %}
+
+
+
+{% endif %}
\ No newline at end of file
diff --git a/source/_includes/custom/footer.html b/source/_includes/custom/footer.html
index 2a654ea5..d6b4a362 100644
--- a/source/_includes/custom/footer.html
+++ b/source/_includes/custom/footer.html
@@ -1 +1,6 @@
-© {{ site.time | date: "%Y" }} {{ site.author }}
\ No newline at end of file
+Copyright © {{ site.time | date: "%Y" }}
+{% if site.author %}
+ {{ site.author }}
+{% else %}
+ {{ site.title }}
+{% endif %}
diff --git a/source/_includes/custom/navigation.html b/source/_includes/custom/navigation.html
index b207ca4a..f16a7a2a 100644
--- a/source/_includes/custom/navigation.html
+++ b/source/_includes/custom/navigation.html
@@ -1,7 +1,7 @@
\ No newline at end of file
diff --git a/source/_includes/fancybox.html b/source/_includes/fancybox.html
index 0529d671..fd5bcfdb 100644
--- a/source/_includes/fancybox.html
+++ b/source/_includes/fancybox.html
@@ -1,18 +1,6 @@
\ No newline at end of file
diff --git a/source/_includes/footer.html b/source/_includes/footer.html
index 72e2c3df..aa810747 100644
--- a/source/_includes/footer.html
+++ b/source/_includes/footer.html
@@ -1,20 +1 @@
-
- {% if site.facebook_user %}
-
Facebook
- {% endif %}
- {% if site.googleplus_user %}
-
Google+
- {% endif %}
- {% if site.twitter_user %}
-
- {% endif %}
- {% if site.github_user %}
-
GitHub
- {% endif %}
- {% if site.pinterest_user %}
-
Pinterest
- {% endif %}
-
-
-{% include custom/footer.html %}
-
\ No newline at end of file
+{% include custom/footer.html %}
\ No newline at end of file
diff --git a/source/_includes/google_analytics.html b/source/_includes/google_analytics.html
index 4d4d5969..2950c768 100644
--- a/source/_includes/google_analytics.html
+++ b/source/_includes/google_analytics.html
@@ -1,13 +1,13 @@
{% if site.google_analytics_tracking_id %}
-
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
{% endif %}
diff --git a/source/_includes/head.html b/source/_includes/head.html
index 16d74d6f..2adee9f3 100644
--- a/source/_includes/head.html
+++ b/source/_includes/head.html
@@ -2,19 +2,19 @@
- {% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}
+ {% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}
{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}
{% if page.keywords %} {% endif %}
+
-
- {% include google_analytics.html %}
+
{% include custom/head.html %}
\ No newline at end of file
diff --git a/source/_includes/header.html b/source/_includes/header.html
index f2961830..5fb456ae 100644
--- a/source/_includes/header.html
+++ b/source/_includes/header.html
@@ -1,2 +1,56 @@
-{% include custom/navigation.html %}
-{% include custom/header.html %}
\ No newline at end of file
+
+{% include navigation.html %}
+
+
+
+
+
+
+ {% if site.facebook_user %}
+
Facebook
+ {% endif %}
+ {% if site.googleplus_user and site.googleplus_hidden == false %}
+
Google+
+ {% endif %}
+ {% if site.twitter_user %}
+
+ {% endif %}
+ {% if site.github_user %}
+
GitHub
+ {% endif %}
+ {% if site.pinboard_user %}
+
Pinboard
+ {% endif %}
+ {% if site.coderwall_user %}
+
Coderwall
+ {% endif %}
+ {% if site.linkedin_user %}
+
LinkedIn
+ {% endif %}
+ {% if site.pinterest_user %}
+
Pinterest
+ {% endif %}
+ {% if site.delicious_user %}
+
Delicious
+ {% endif %}
+ {% if site.subscribe_rss %}
+
+ {% endif %}
+
+
+
+{% include custom/header.html %}
diff --git a/source/_includes/navigation.html b/source/_includes/navigation.html
index 2f0e6280..888042ea 100644
--- a/source/_includes/navigation.html
+++ b/source/_includes/navigation.html
@@ -1,15 +1 @@
-
- RSS
- {% if site.subscribe_email %}
- Email
- {% endif %}
-
- {% if site.simple_search %}
-
- {% endif %}
-{% include custom/navigation.html %}
+{% include custom/navigation.html %}
\ No newline at end of file
diff --git a/source/_includes/post/categories.html b/source/_includes/post/categories.html
index 9763a528..8c1c81f7 100644
--- a/source/_includes/post/categories.html
+++ b/source/_includes/post/categories.html
@@ -1,6 +1,8 @@
-{% capture category %}{% if post %}{{ post.categories | category_links | replace:', ','' }}{% else %}{{ page.categories | category_links | replace:', ','' }}{% endif %}{% endcapture %}
-{% capture has_category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %}
-
-{% unless has_category == '0' %}
- {{ category }}
-{% endunless %}
\ No newline at end of file
+{% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %}
+{% unless category == '0' %}
+{% if post %}
+ {{ post.categories | category_links }}
+{% else %}
+ {{ page.categories | category_links }}
+{% endif %}
+{% endunless %}
diff --git a/source/_includes/post/date.html b/source/_includes/post/date.html
index fd27160a..ecf1ad71 100644
--- a/source/_includes/post/date.html
+++ b/source/_includes/post/date.html
@@ -6,14 +6,10 @@
{% capture updated_formatted %}{{ page.updated_formatted }}{{ post.updated_formatted }}{% endcapture %}
{% capture was_updated %}{{ updated | size }}{% endcapture %}
+{% if has_date != '0' %}
+ {% capture time %}{{ date_formatted }} {% endcapture %}
+{% endif %}
+
{% if was_updated != '0' %}
-
- {{ updated_formatted | date: "%e" }} {{ updated_formatted | date: "%b" }}
-
-{% else %}
- {% if has_date != '0' %}
-
- {{ date_formatted | date: "%e" }} {{ date_formatted | date: "%b" }}
-
- {% endif %}
-{% endif %}
\ No newline at end of file
+ {% capture updated %}Updated {{ updated_formatted }} {% endcapture %}
+{% else %}{% assign updated = false %}{% endif %}
\ No newline at end of file
diff --git a/source/_includes/post/sharing.html b/source/_includes/post/sharing.html
index 205664d2..735c992f 100644
--- a/source/_includes/post/sharing.html
+++ b/source/_includes/post/sharing.html
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
+
+
diff --git a/source/_layouts/category_index.html b/source/_layouts/category_index.html
index 228b6ab5..8ab5341a 100644
--- a/source/_layouts/category_index.html
+++ b/source/_layouts/category_index.html
@@ -2,14 +2,6 @@
layout: default
---
-
-
{% for post in site.categories[page.category] %}
{% include archive_post.html %}
-{% endfor %}
\ No newline at end of file
+{% endfor %}
diff --git a/source/_layouts/default.html b/source/_layouts/default.html
index 18f16dfa..a3fc49db 100644
--- a/source/_layouts/default.html
+++ b/source/_layouts/default.html
@@ -3,6 +3,9 @@
+ {% unless page.banner == false %}
+ {% include banner.html %}
+ {% endunless %}
{{ content | expand_urls: root_url }}
{% include after_footer.html %}
diff --git a/source/_layouts/page.html b/source/_layouts/page.html
index 5f4baca5..5c1381dc 100644
--- a/source/_layouts/page.html
+++ b/source/_layouts/page.html
@@ -2,4 +2,18 @@
layout: default
---
-{% include article.html %}
\ No newline at end of file
+
+ {% if page.title %}
+ {% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}
+ {% endif %}
+ {{ content }}
+
+{% unless page.sharing == false %}
+ {% include post/sharing.html %}
+{% endunless %}
+{% if site.disqus_short_name and page.comments == true %}
+
+{% endif %}
diff --git a/source/_layouts/post.html b/source/_layouts/post.html
index e43605f0..eed607e3 100644
--- a/source/_layouts/post.html
+++ b/source/_layouts/post.html
@@ -3,4 +3,13 @@ layout: default
single: true
---
-{% include article.html %}
\ No newline at end of file
+{% include article.html %}
+{% unless page.sharing == false %}
+ {% include post/sharing.html %}
+{% endunless %}
+{% if site.disqus_short_name and page.comments == true %}
+
+{% endif %}
\ No newline at end of file
diff --git a/source/blog/archives/index.html b/source/blog/archives/index.html
index 0402bd6a..e4bc23ca 100644
--- a/source/blog/archives/index.html
+++ b/source/blog/archives/index.html
@@ -1,16 +1,8 @@
---
layout: default
-title: Archives
+title: Blog Archives
---
-
-
{% for post in site.posts reverse %}
{% include archive_post.html %}
{% endfor %}
\ No newline at end of file
diff --git a/source/images/loading_gray.gif b/source/images/loading_gray.gif
new file mode 100644
index 00000000..945a2aa1
Binary files /dev/null and b/source/images/loading_gray.gif differ
diff --git a/source/images/loading_pacman.gif b/source/images/loading_pacman.gif
new file mode 100644
index 00000000..8f61add1
Binary files /dev/null and b/source/images/loading_pacman.gif differ
diff --git a/source/images/social/coderwall.png b/source/images/social/coderwall.png
new file mode 100644
index 00000000..48e32cfc
Binary files /dev/null and b/source/images/social/coderwall.png differ
diff --git a/source/images/social/delicious.png b/source/images/social/delicious.png
new file mode 100644
index 00000000..a936776b
Binary files /dev/null and b/source/images/social/delicious.png differ
diff --git a/source/images/social/linkedin.png b/source/images/social/linkedin.png
new file mode 100644
index 00000000..1a7ae919
Binary files /dev/null and b/source/images/social/linkedin.png differ
diff --git a/source/images/social/pinboard.png b/source/images/social/pinboard.png
new file mode 100644
index 00000000..2961f30f
Binary files /dev/null and b/source/images/social/pinboard.png differ
diff --git a/source/index.html b/source/index.html
index d87fe87a..8e298160 100644
--- a/source/index.html
+++ b/source/index.html
@@ -5,6 +5,14 @@ layout: default
{% assign index = true %}
{% for post in paginator.posts %}
{% assign content = post.content %}
- {% include article.html %}
+ {% include article.html %}
{% endfor %}
-{% include pagination.html %}
\ No newline at end of file
+
+ {% if paginator.previous_page %}
+ Prev
+ {% endif %}
+ {% if paginator.next_page %}
+ Next
+ {% endif %}
+
+
\ No newline at end of file
diff --git a/source/javascripts/slash.js b/source/javascripts/slash.js
new file mode 100644
index 00000000..52885722
--- /dev/null
+++ b/source/javascripts/slash.js
@@ -0,0 +1,62 @@
+(function($){
+ // Open external links in new window
+ var externalLinks = function(){
+ var host = location.host;
+
+ $('body').on('click', 'a', function(e){
+ var href = this.href,
+ link = href.replace(/https?:\/\/([^\/]+)(.*)/, '$1');
+
+ if (link != '' && link != host && !$(this).hasClass('fancybox')){
+ window.open(href);
+ e.preventDefault();
+ }
+ });
+ };
+
+ // Append caption after pictures
+ var appendCaption = function(){
+ $('.entry-content').each(function(i){
+ var _i = i;
+ $(this).find('img').each(function(){
+ var alt = this.alt;
+
+ if (alt != ''){
+ $(this).after(''+alt+' ');
+ }
+
+ $(this).wrap(' ');
+ });
+ });
+ };
+
+ externalLinks(); // Delete or comment this line to disable opening external links in new window
+ appendCaption(); // Delete or comment this line to disable caption
+
+ var mobilenav = $('#mobile-nav');
+
+ $('html').click(function(){
+ mobilenav.find('.on').each(function(){
+ $(this).removeClass('on').next().hide();
+ });
+ });
+
+ mobilenav.on('click', '.menu .button', function(){
+ if (!$(this).hasClass('on')){
+ var width = $(this).width() + 42;
+ $(this).addClass('on').next().show().css({width: width});
+ } else {
+ $(this).removeClass('on').next().hide();
+ }
+ }).on('click', '.search .button', function(){
+ if (!$(this).hasClass('on')){
+ var width = mobilenav.width() - 51;
+ mobilenav.children('.menu').children().eq(0).removeClass('on').next().hide();
+ $(this).addClass('on').next().show().css({width: width}).children().children().eq(0).focus();
+ } else {
+ $(this).removeClass('on').next().hide().children().children().eq(0).val('');
+ }
+ }).click(function(e){
+ e.stopPropagation();
+ });
+})(jQuery);
\ No newline at end of file
diff --git a/source/javascripts/twitter.js b/source/javascripts/twitter.js
index 3e2dd0d7..00ecc365 100644
--- a/source/javascripts/twitter.js
+++ b/source/javascripts/twitter.js
@@ -1,78 +1,92 @@
-// JSON-P Twitter fetcher for Octopress
-// (c) Brandon Mathis // MIT License
+(function($){
+ $.fn.getTwitterFeed = function(userid, count, reply){
+ var banner = $(this),
+ feed = banner.find('.feed'),
+ interval = 10000,
+ speed = 500;
-/* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */
-function prettyDate(time) {
- if (navigator.appName === 'Microsoft Internet Explorer') {
- return "∞ "; // because IE date parsing isn't fun.
- }
- var say = {
- just_now: " now",
- minute_ago: "1m",
- minutes_ago: "m",
- hour_ago: "1h",
- hours_ago: "h",
- yesterday: "1d",
- days_ago: "d",
- last_week: "1w",
- weeks_ago: "w"
- };
+ var linkify = function(text){
+ text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$2 ').replace(/(^|\W)@(\w+)/g, '$1@$2 ').replace(/(^|\W)#(\w+)/g, '$1#$2 ');
- var current_date = new Date(),
- current_date_time = current_date.getTime(),
- current_date_full = current_date_time + (1 * 60000),
- date = new Date(time),
- diff = ((current_date_full - date.getTime()) / 1000),
- day_diff = Math.floor(diff / 86400);
+ return text;
+ }
- if (isNaN(day_diff) || day_diff < 0) { return "∞ "; }
+ var relativeDate = function(date){
+ if (navigator.appName === 'Microsoft Internet Explorer') return '';
- return day_diff === 0 && (
- diff < 60 && say.just_now ||
- diff < 120 && say.minute_ago ||
- diff < 3600 && Math.floor(diff / 60) + say.minutes_ago ||
- diff < 7200 && say.hour_ago ||
- diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) ||
- day_diff === 1 && say.yesterday ||
- day_diff < 7 && day_diff + say.days_ago ||
- day_diff === 7 && say.last_week ||
- day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago;
-}
+ var unit = {
+ now: 'Now',
+ minute: '1 min',
+ minutes: ' mins',
+ hour: '1 hr',
+ hours: ' hrs',
+ day: 'Yesterday',
+ days: ' days',
+ week: '1 week',
+ weeks: ' weeks'
+ };
-function linkifyTweet(text, url) {
- // Linkify urls, usernames, hashtags
- text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$2 ')
- .replace(/(^|\W)@(\w+)/g, '$1@$2 ')
- .replace(/(^|\W)#(\w+)/g, '$1#$2 ');
+ var current = new Date(),
+ tweet = new Date(date),
+ diff = (((current.getTime() + (1 * 60000)) - tweet.getTime()) / 1000),
+ day_diff = Math.floor(diff / 86400);
+
+ if (day_diff == 0){
+ if (diff < 60) return unit.now;
+ else if (diff < 120) return unit.minute;
+ else if (diff < 3600) return Math.floor(diff / 60) + unit.minutes;
+ else if (diff < 7200) return unit.hour;
+ else if (diff < 86400) return Math.floor(diff / 3600) + unit.hours;
+ else return '';
+ } else if (day_diff == 1) {
+ return unit.day;
+ } else if (day_diff < 7) {
+ return day_diff + unit.days;
+ } else if (day_diff == 7) {
+ return unit.week;
+ } else if (day_diff > 7) {
+ return Math.ceil(day_diff / 7) + unit.weeks;
+ } else {
+ return '';
+ }
+ }
- // Use twitter's api to replace t.co shortened urls with expanded ones.
- for (var u in url) {
- if(url[u].expanded_url != null){
- var shortUrl = new RegExp(url[u].url, 'g');
- text = text.replace(shortUrl, url[u].expanded_url);
- var shortUrl = new RegExp(">"+(url[u].url.replace(/https?:\/\//, '')), 'g');
- text = text.replace(shortUrl, ">"+url[u].display_url);
- }
- }
- return text
-}
+ if ($(window).width() > 600){
+ var url = 'https://api.twitter.com/1/statuses/user_timeline/'+userid+'.json?count='+count+'&exclude_replies='+(reply ? '0' : '1')+'&trim_user=true&callback=?';
+ banner.show();
+ $.getJSON(url, function(json){
+ var length = json.length,
+ fragment = document.createDocumentFragment(),
+ counts = 0,
+ timeout;
-function showTwitterFeed(tweets, twitter_user) {
- var timeline = document.getElementById('tweets'),
- content = '';
+ for (var i=0; i'+relativeDate(json[i].created_at)+'';
+ fragment.appendChild(item);
+ }
- for (var t in tweets) {
- content += ''+''+''+prettyDate(tweets[t].created_at)+' '+linkifyTweet(tweets[t].text.replace(/\n/g, ' '), tweets[t].entities.urls)+'
'+' ';
- }
- timeline.innerHTML = content;
-}
+ var play = function(){
+ timeout = setTimeout(function(){
+ feed.animate({top: '-='+30}, speed, function(){
+ $(this).append($(this).children().eq(counts).clone());
+ counts++;
+ play();
+ });
+ }, interval);
+ }
-function getTwitterFeed(user, count, replies) {
- count = parseInt(count, 10);
- $.ajax({
- url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?"
- , type: 'jsonp'
- , error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); }
- , success: function(data) { showTwitterFeed(data.slice(0, count), user); }
- })
-}
+ var pause = function(){
+ clearTimeout(timeout);
+ }
+
+ banner.on('mouseenter', pause).on('mouseleave', play)
+ .children('.loading').hide().end()
+ .children('.container').show()
+ .children('.feed').append(fragment);
+
+ play();
+ });
+ }
+ };
+})(jQuery);
\ No newline at end of file