Browse Source

Site updated at 2012-10-28 13:45:39 UTC

Abhinav Sarkar 8 years ago
parent
commit
80736c1ecb
62 changed files with 2659 additions and 1 deletions
  1. 1
    0
      CNAME
  2. BIN
      assets/jwplayer/glow/controlbar/background.png
  3. BIN
      assets/jwplayer/glow/controlbar/blankButton.png
  4. BIN
      assets/jwplayer/glow/controlbar/divider.png
  5. BIN
      assets/jwplayer/glow/controlbar/fullscreenButton.png
  6. BIN
      assets/jwplayer/glow/controlbar/fullscreenButtonOver.png
  7. BIN
      assets/jwplayer/glow/controlbar/muteButton.png
  8. BIN
      assets/jwplayer/glow/controlbar/muteButtonOver.png
  9. BIN
      assets/jwplayer/glow/controlbar/normalscreenButton.png
  10. BIN
      assets/jwplayer/glow/controlbar/normalscreenButtonOver.png
  11. BIN
      assets/jwplayer/glow/controlbar/pauseButton.png
  12. BIN
      assets/jwplayer/glow/controlbar/pauseButtonOver.png
  13. BIN
      assets/jwplayer/glow/controlbar/playButton.png
  14. BIN
      assets/jwplayer/glow/controlbar/playButtonOver.png
  15. BIN
      assets/jwplayer/glow/controlbar/timeSliderBuffer.png
  16. BIN
      assets/jwplayer/glow/controlbar/timeSliderCapLeft.png
  17. BIN
      assets/jwplayer/glow/controlbar/timeSliderCapRight.png
  18. BIN
      assets/jwplayer/glow/controlbar/timeSliderProgress.png
  19. BIN
      assets/jwplayer/glow/controlbar/timeSliderRail.png
  20. BIN
      assets/jwplayer/glow/controlbar/unmuteButton.png
  21. BIN
      assets/jwplayer/glow/controlbar/unmuteButtonOver.png
  22. BIN
      assets/jwplayer/glow/display/background.png
  23. BIN
      assets/jwplayer/glow/display/bufferIcon.png
  24. BIN
      assets/jwplayer/glow/display/muteIcon.png
  25. BIN
      assets/jwplayer/glow/display/playIcon.png
  26. BIN
      assets/jwplayer/glow/dock/button.png
  27. 115
    0
      assets/jwplayer/glow/glow.xml
  28. BIN
      assets/jwplayer/glow/playlist/item.png
  29. BIN
      assets/jwplayer/glow/playlist/itemOver.png
  30. BIN
      assets/jwplayer/glow/playlist/sliderCapBottom.png
  31. BIN
      assets/jwplayer/glow/playlist/sliderCapTop.png
  32. BIN
      assets/jwplayer/glow/playlist/sliderRail.png
  33. BIN
      assets/jwplayer/glow/playlist/sliderThumb.png
  34. BIN
      assets/jwplayer/glow/sharing/embedIcon.png
  35. BIN
      assets/jwplayer/glow/sharing/embedScreen.png
  36. BIN
      assets/jwplayer/glow/sharing/shareIcon.png
  37. BIN
      assets/jwplayer/glow/sharing/shareScreen.png
  38. BIN
      assets/jwplayer/player.swf
  39. 16
    0
      atom.xml
  40. 131
    0
      blog/archives/index.html
  41. BIN
      favicon.png
  42. BIN
      images/bird_32_gray.png
  43. BIN
      images/bird_32_gray_fail.png
  44. BIN
      images/code_bg.png
  45. BIN
      images/dotted-border.png
  46. BIN
      images/email.png
  47. BIN
      images/line-tile.png
  48. BIN
      images/noise.png
  49. BIN
      images/rss.png
  50. BIN
      images/search.png
  51. 122
    1
      index.html
  52. 45
    0
      javascripts/ender.js
  53. 37
    0
      javascripts/github.js
  54. 1497
    0
      javascripts/libs/ender.js
  55. 85
    0
      javascripts/libs/jXHR.js
  56. 298
    0
      javascripts/libs/swfobject-dynamic.js
  57. 5
    0
      javascripts/modernizr-2.0.js
  58. 161
    0
      javascripts/octopress.js
  59. 56
    0
      javascripts/pinboard.js
  60. 78
    0
      javascripts/twitter.js
  61. 11
    0
      sitemap.xml
  62. 1
    0
      stylesheets/screen.css

+ 1
- 0
CNAME View File

@@ -0,0 +1 @@
1
+abhinavsarkar.net

BIN
assets/jwplayer/glow/controlbar/background.png View File


BIN
assets/jwplayer/glow/controlbar/blankButton.png View File


BIN
assets/jwplayer/glow/controlbar/divider.png View File


BIN
assets/jwplayer/glow/controlbar/fullscreenButton.png View File


BIN
assets/jwplayer/glow/controlbar/fullscreenButtonOver.png View File


BIN
assets/jwplayer/glow/controlbar/muteButton.png View File


BIN
assets/jwplayer/glow/controlbar/muteButtonOver.png View File


BIN
assets/jwplayer/glow/controlbar/normalscreenButton.png View File


BIN
assets/jwplayer/glow/controlbar/normalscreenButtonOver.png View File


BIN
assets/jwplayer/glow/controlbar/pauseButton.png View File


BIN
assets/jwplayer/glow/controlbar/pauseButtonOver.png View File


BIN
assets/jwplayer/glow/controlbar/playButton.png View File


BIN
assets/jwplayer/glow/controlbar/playButtonOver.png View File


BIN
assets/jwplayer/glow/controlbar/timeSliderBuffer.png View File


BIN
assets/jwplayer/glow/controlbar/timeSliderCapLeft.png View File


BIN
assets/jwplayer/glow/controlbar/timeSliderCapRight.png View File


BIN
assets/jwplayer/glow/controlbar/timeSliderProgress.png View File


BIN
assets/jwplayer/glow/controlbar/timeSliderRail.png View File


BIN
assets/jwplayer/glow/controlbar/unmuteButton.png View File


BIN
assets/jwplayer/glow/controlbar/unmuteButtonOver.png View File


BIN
assets/jwplayer/glow/display/background.png View File


BIN
assets/jwplayer/glow/display/bufferIcon.png View File


BIN
assets/jwplayer/glow/display/muteIcon.png View File


BIN
assets/jwplayer/glow/display/playIcon.png View File


BIN
assets/jwplayer/glow/dock/button.png View File


+ 115
- 0
assets/jwplayer/glow/glow.xml View File

@@ -0,0 +1,115 @@
1
+<?xml version="1.0"?>
2
+<skin version="1.1" name="Glow" author="LongTail Video">
3
+
4
+	<settings>
5
+		<setting name="backcolor" value="0x000000" />
6
+		<setting name="frontcolor" value="0xeeeeee" />
7
+		<setting name="lightcolor" value="0xeeeeee" />
8
+		<setting name="screencolor" value="0x000000" />
9
+	</settings>
10
+
11
+	<components>
12
+		<component name="controlbar">
13
+			<settings>
14
+				<setting name="margin" value="0" />
15
+				<setting name="fontsize" value="11" />
16
+				<setting name="fontcolor" value="0xEEEEEE" />
17
+				<setting name="buttoncolor" value="0xEEEEEE" />
18
+			</settings>
19
+
20
+			<layout>
21
+				<group position="left">
22
+					<button name="play" />
23
+					<text name="elapsed" />
24
+				</group>
25
+				<group position="center">
26
+					<slider name="time" />
27
+				</group>
28
+				<group position="right">
29
+					<text name="duration" />
30
+					<button name="blank" />
31
+					<button name="mute" />
32
+					<button name="fullscreen" />
33
+				</group>
34
+			</layout>
35
+
36
+			<elements>
37
+				<element name="background" src="background.png" />
38
+				<element name="capLeft" src="divider.png" />
39
+				<element name="capRight" src="divider.png" />
40
+				<element name="divider" src="divider.png" />
41
+				<element name="blankButton" src="blankButton.png" />
42
+				<element name="fullscreenButton" src="fullscreenButton.png" />
43
+				<element name="fullscreenButtonOver" src="fullscreenButtonOver.png" />
44
+				<element name="muteButton" src="muteButton.png" />
45
+				<element name="muteButtonOver" src="muteButtonOver.png" />
46
+				<element name="pauseButton" src="pauseButton.png" />
47
+				<element name="pauseButtonOver" src="pauseButtonOver.png" />
48
+				<element name="playButton" src="playButton.png" />
49
+				<element name="playButtonOver" src="playButtonOver.png" />
50
+				<element name="timeSliderBuffer" src="timeSliderBuffer.png" />
51
+				<element name="timeSliderCapLeft" src="timeSliderCapLeft.png" />
52
+				<element name="timeSliderCapRight" src="timeSliderCapRight.png" />
53
+				<element name="timeSliderProgress" src="timeSliderProgress.png" />
54
+				<element name="timeSliderRail" src="timeSliderRail.png" />
55
+				<element name="normalscreenButton" src="normalscreenButton.png" />
56
+				<element name="normalscreenButtonOver" src="normalscreenButtonOver.png" />
57
+				<element name="unmuteButton" src="unmuteButton.png" />
58
+				<element name="unmuteButtonOver" src="unmuteButtonOver.png" />
59
+				<element name="volumeSliderRail" src="divider.png" />
60
+				<element name="volumeSliderProgress" src="divider.png" />
61
+			</elements>
62
+		</component>
63
+		
64
+		<component name="display">
65
+			<settings>
66
+				<setting name="bufferinterval" value="250" />
67
+				<setting name="bufferrotation" value="90" />
68
+			</settings>
69
+			<elements>
70
+				<element name="background" src="background.png" />
71
+				<element name="playIcon" src="playIcon.png" />
72
+				<element name="muteIcon" src="muteIcon.png" />
73
+				<element name="errorIcon" src="bufferIcon.png" />
74
+				<element name="bufferIcon" src="bufferIcon.png" />
75
+			</elements>
76
+		</component>
77
+		
78
+		<component name="dock">
79
+			<settings>
80
+				<setting name="fontcolor" value="0xFFFFFF" />
81
+			</settings>
82
+			<elements>
83
+				<element name="button" src="button.png" />
84
+			</elements>
85
+		</component>
86
+
87
+		<component name="playlist">
88
+			<settings>
89
+				<setting name="fontcolor" value="0xEEEEEE" />
90
+				<setting name="overcolor" value="0xFFFFFF" />
91
+				<setting name="activecolor" value="0xFFFFFF" />
92
+				<setting name="backgroundcolor" value="0x333333" />
93
+			</settings>
94
+			<elements>
95
+				<element name="item" src="item.png" />
96
+				<element name="itemOver" src="itemOver.png" />
97
+				<element name="sliderCapBottom" src="sliderCapBottom.png" />
98
+				<element name="sliderCapTop" src="sliderCapTop.png" />
99
+				<element name="sliderRail" src="sliderRail.png" />
100
+				<element name="sliderThumb" src="sliderThumb.png" />
101
+			</elements>
102
+		</component>
103
+
104
+		<component name="sharing">
105
+			<elements>
106
+				<element name="embedIcon" src="embedIcon.png" />
107
+				<element name="embedScreen" src="embedScreen.png" />
108
+				<element name="shareIcon" src="shareIcon.png" />
109
+				<element name="shareScreen" src="shareScreen.png" />
110
+			</elements>
111
+		</component>
112
+
113
+	</components>
114
+
115
+</skin>

BIN
assets/jwplayer/glow/playlist/item.png View File


BIN
assets/jwplayer/glow/playlist/itemOver.png View File


BIN
assets/jwplayer/glow/playlist/sliderCapBottom.png View File


BIN
assets/jwplayer/glow/playlist/sliderCapTop.png View File


BIN
assets/jwplayer/glow/playlist/sliderRail.png View File


BIN
assets/jwplayer/glow/playlist/sliderThumb.png View File


BIN
assets/jwplayer/glow/sharing/embedIcon.png View File


BIN
assets/jwplayer/glow/sharing/embedScreen.png View File


BIN
assets/jwplayer/glow/sharing/shareIcon.png View File


BIN
assets/jwplayer/glow/sharing/shareScreen.png View File


BIN
assets/jwplayer/player.swf View File


+ 16
- 0
atom.xml View File

@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<feed xmlns="http://www.w3.org/2005/Atom">
3
+
4
+  <title><![CDATA[My Octopress Blog]]></title>
5
+  <link href="http://abhin4v.github.com/atom.xml" rel="self"/>
6
+  <link href="http://abhin4v.github.com/"/>
7
+  <updated>2012-10-28T19:15:21+05:30</updated>
8
+  <id>http://abhin4v.github.com/</id>
9
+  <author>
10
+    <name><![CDATA[Your Name]]></name>
11
+    
12
+  </author>
13
+  <generator uri="http://octopress.org/">Octopress</generator>
14
+
15
+  
16
+</feed>

+ 131
- 0
blog/archives/index.html View File

@@ -0,0 +1,131 @@
1
+
2
+<!DOCTYPE html>
3
+<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
4
+<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
5
+<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
6
+<head>
7
+  <meta charset="utf-8">
8
+  <title>Blog Archive - My Octopress Blog</title>
9
+  <meta name="author" content="Your Name">
10
+
11
+  
12
+  <meta name="description" content=" Blog Archive Recent Posts ">
13
+  
14
+
15
+  <!-- http://t.co/dKP3o1e -->
16
+  <meta name="HandheldFriendly" content="True">
17
+  <meta name="MobileOptimized" content="320">
18
+  <meta name="viewport" content="width=device-width, initial-scale=1">
19
+
20
+  
21
+  <link rel="canonical" href="http://abhin4v.github.com/blog/archives/">
22
+  <link href="/favicon.png" rel="icon">
23
+  <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
24
+  <script src="/javascripts/modernizr-2.0.js"></script>
25
+  <script src="/javascripts/ender.js"></script>
26
+  <script src="/javascripts/octopress.js" type="text/javascript"></script>
27
+  <link href="/atom.xml" rel="alternate" title="My Octopress Blog" type="application/atom+xml">
28
+  <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
29
+<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
30
+<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
31
+
32
+  
33
+
34
+</head>
35
+
36
+<body   >
37
+  <header role="banner"><hgroup>
38
+  <h1><a href="/">My Octopress Blog</a></h1>
39
+  
40
+    <h2>A blogging framework for hackers.</h2>
41
+  
42
+</hgroup>
43
+
44
+</header>
45
+  <nav role="navigation"><ul class="subscription" data-subscription="rss">
46
+  <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
47
+  
48
+</ul>
49
+  
50
+<form action="http://google.com/search" method="get">
51
+  <fieldset role="search">
52
+    <input type="hidden" name="q" value="site:abhin4v.github.com" />
53
+    <input class="search" type="text" name="q" results="0" placeholder="Search"/>
54
+  </fieldset>
55
+</form>
56
+  
57
+<ul class="main-navigation">
58
+  <li><a href="/">Blog</a></li>
59
+  <li><a href="/blog/archives">Archives</a></li>
60
+</ul>
61
+
62
+</nav>
63
+  <div id="main">
64
+    <div id="content">
65
+      <div>
66
+<article role="article">
67
+  
68
+  <header>
69
+    <h1 class="entry-title">Blog Archive</h1>
70
+    
71
+  </header>
72
+  
73
+  <div id="blog-archives">
74
+
75
+</div>
76
+
77
+  
78
+</article>
79
+
80
+</div>
81
+
82
+<aside class="sidebar">
83
+  
84
+    <section>
85
+  <h1>Recent Posts</h1>
86
+  <ul id="recent_posts">
87
+    
88
+  </ul>
89
+</section>
90
+
91
+
92
+
93
+
94
+
95
+
96
+  
97
+</aside>
98
+
99
+
100
+    </div>
101
+  </div>
102
+  <footer role="contentinfo"><p>
103
+  Copyright &copy; 2012 - Your Name -
104
+  <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
105
+</p>
106
+
107
+</footer>
108
+  
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+  <script type="text/javascript">
117
+    (function(){
118
+      var twitterWidgets = document.createElement('script');
119
+      twitterWidgets.type = 'text/javascript';
120
+      twitterWidgets.async = true;
121
+      twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
122
+      document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
123
+    })();
124
+  </script>
125
+
126
+
127
+
128
+
129
+
130
+</body>
131
+</html>

BIN
favicon.png View File


BIN
images/bird_32_gray.png View File


BIN
images/bird_32_gray_fail.png View File


BIN
images/code_bg.png View File


BIN
images/dotted-border.png View File


BIN
images/email.png View File


BIN
images/line-tile.png View File


BIN
images/noise.png View File


BIN
images/rss.png View File


BIN
images/search.png View File


+ 122
- 1
index.html View File

@@ -1 +1,122 @@
1
-My Octopress Page is coming soon &hellip;
1
+
2
+<!DOCTYPE html>
3
+<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
4
+<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
5
+<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
6
+<head>
7
+  <meta charset="utf-8">
8
+  <title>My Octopress Blog</title>
9
+  <meta name="author" content="Your Name">
10
+
11
+  
12
+  <meta name="description" content=" Blog Archives Recent Posts ">
13
+  
14
+
15
+  <!-- http://t.co/dKP3o1e -->
16
+  <meta name="HandheldFriendly" content="True">
17
+  <meta name="MobileOptimized" content="320">
18
+  <meta name="viewport" content="width=device-width, initial-scale=1">
19
+
20
+  
21
+  <link rel="canonical" href="http://abhin4v.github.com/">
22
+  <link href="/favicon.png" rel="icon">
23
+  <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
24
+  <script src="/javascripts/modernizr-2.0.js"></script>
25
+  <script src="/javascripts/ender.js"></script>
26
+  <script src="/javascripts/octopress.js" type="text/javascript"></script>
27
+  <link href="/atom.xml" rel="alternate" title="My Octopress Blog" type="application/atom+xml">
28
+  <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
29
+<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
30
+<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
31
+
32
+  
33
+
34
+</head>
35
+
36
+<body   >
37
+  <header role="banner"><hgroup>
38
+  <h1><a href="/">My Octopress Blog</a></h1>
39
+  
40
+    <h2>A blogging framework for hackers.</h2>
41
+  
42
+</hgroup>
43
+
44
+</header>
45
+  <nav role="navigation"><ul class="subscription" data-subscription="rss">
46
+  <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
47
+  
48
+</ul>
49
+  
50
+<form action="http://google.com/search" method="get">
51
+  <fieldset role="search">
52
+    <input type="hidden" name="q" value="site:abhin4v.github.com" />
53
+    <input class="search" type="text" name="q" results="0" placeholder="Search"/>
54
+  </fieldset>
55
+</form>
56
+  
57
+<ul class="main-navigation">
58
+  <li><a href="/">Blog</a></li>
59
+  <li><a href="/blog/archives">Archives</a></li>
60
+</ul>
61
+
62
+</nav>
63
+  <div id="main">
64
+    <div id="content">
65
+      <div class="blog-index">
66
+  
67
+  
68
+  <div class="pagination">
69
+    
70
+    <a href="/blog/archives">Blog Archives</a>
71
+    
72
+  </div>
73
+</div>
74
+<aside class="sidebar">
75
+  
76
+    <section>
77
+  <h1>Recent Posts</h1>
78
+  <ul id="recent_posts">
79
+    
80
+  </ul>
81
+</section>
82
+
83
+
84
+
85
+
86
+
87
+
88
+  
89
+</aside>
90
+
91
+    </div>
92
+  </div>
93
+  <footer role="contentinfo"><p>
94
+  Copyright &copy; 2012 - Your Name -
95
+  <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
96
+</p>
97
+
98
+</footer>
99
+  
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+  <script type="text/javascript">
108
+    (function(){
109
+      var twitterWidgets = document.createElement('script');
110
+      twitterWidgets.type = 'text/javascript';
111
+      twitterWidgets.async = true;
112
+      twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
113
+      document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
114
+    })();
115
+  </script>
116
+
117
+
118
+
119
+
120
+
121
+</body>
122
+</html>

+ 45
- 0
javascripts/ender.js
File diff suppressed because it is too large
View File


+ 37
- 0
javascripts/github.js View File

@@ -0,0 +1,37 @@
1
+var github = (function(){
2
+  function render(target, repos){
3
+    var i = 0, fragment = '', t = $(target)[0];
4
+
5
+    for(i = 0; i < repos.length; i++) {
6
+      fragment += '<li><a href="'+repos[i].html_url+'">'+repos[i].name+'</a><p>'+(repos[i].description||'')+'</p></li>';
7
+    }
8
+    t.innerHTML = fragment;
9
+  }
10
+  return {
11
+    showRepos: function(options){
12
+      $.ajax({
13
+          url: "https://api.github.com/users/"+options.user+"/repos?callback=?"
14
+        , type: 'jsonp'
15
+        , error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
16
+        , success: function(data) {
17
+          var repos = [];
18
+          if (!data || !data.data) { return; }
19
+          for (var i = 0; i < data.data.length; i++) {
20
+            if (options.skip_forks && data.data[i].fork) { continue; }
21
+            repos.push(data.data[i]);
22
+          }
23
+          repos.sort(function(a, b) {
24
+            var aDate = new Date(a.pushed_at).valueOf(),
25
+                bDate = new Date(b.pushed_at).valueOf();
26
+
27
+            if (aDate === bDate) { return 0; }
28
+            return aDate > bDate ? -1 : 1;
29
+          });
30
+
31
+          if (options.count) { repos.splice(options.count); }
32
+          render(options.target, repos);
33
+        }
34
+      });
35
+    }
36
+  };
37
+})();

+ 1497
- 0
javascripts/libs/ender.js
File diff suppressed because it is too large
View File


+ 85
- 0
javascripts/libs/jXHR.js View File

@@ -0,0 +1,85 @@
1
+// jXHR.js (JSON-P XHR)
2
+// v0.1 (c) Kyle Simpson
3
+// MIT License
4
+
5
+(function(global){
6
+	var SETTIMEOUT = global.setTimeout, // for better compression
7
+		doc = global.document,
8
+		callback_counter = 0;
9
+
10
+	global.jXHR = function() {
11
+		var script_url,
12
+			script_loaded,
13
+			jsonp_callback,
14
+			scriptElem,
15
+			publicAPI = null;
16
+
17
+		function removeScript() { try { scriptElem.parentNode.removeChild(scriptElem); } catch (err) { } }
18
+
19
+		function reset() {
20
+			script_loaded = false;
21
+			script_url = "";
22
+			removeScript();
23
+			scriptElem = null;
24
+			fireReadyStateChange(0);
25
+		}
26
+
27
+		function ThrowError(msg) {
28
+			try { publicAPI.onerror.call(publicAPI,msg,script_url); } catch (err) { throw new Error(msg); }
29
+		}
30
+
31
+		function handleScriptLoad() {
32
+			if ((this.readyState && this.readyState!=="complete" && this.readyState!=="loaded") || script_loaded) { return; }
33
+			this.onload = this.onreadystatechange = null; // prevent memory leak
34
+			script_loaded = true;
35
+			if (publicAPI.readyState !== 4) ThrowError("Script failed to load ["+script_url+"].");
36
+			removeScript();
37
+		}
38
+
39
+		function fireReadyStateChange(rs,args) {
40
+			args = args || [];
41
+			publicAPI.readyState = rs;
42
+			if (typeof publicAPI.onreadystatechange === "function") publicAPI.onreadystatechange.apply(publicAPI,args);
43
+		}
44
+
45
+		publicAPI = {
46
+			onerror:null,
47
+			onreadystatechange:null,
48
+			readyState:0,
49
+			open:function(method,url){
50
+				reset();
51
+				internal_callback = "cb"+(callback_counter++);
52
+				(function(icb){
53
+					global.jXHR[icb] = function() {
54
+						try { fireReadyStateChange.call(publicAPI,4,arguments); }
55
+						catch(err) {
56
+							publicAPI.readyState = -1;
57
+							ThrowError("Script failed to run ["+script_url+"].");
58
+						}
59
+						global.jXHR[icb] = null;
60
+					};
61
+				})(internal_callback);
62
+				script_url = url.replace(/=\?/,"=jXHR."+internal_callback);
63
+				fireReadyStateChange(1);
64
+			},
65
+			send:function(){
66
+				SETTIMEOUT(function(){
67
+					scriptElem = doc.createElement("script");
68
+					scriptElem.setAttribute("type","text/javascript");
69
+					scriptElem.onload = scriptElem.onreadystatechange = function(){handleScriptLoad.call(scriptElem);};
70
+					scriptElem.setAttribute("src",script_url);
71
+					doc.getElementsByTagName("head")[0].appendChild(scriptElem);
72
+				},0);
73
+				fireReadyStateChange(2);
74
+			},
75
+			setRequestHeader:function(){}, // noop
76
+			getResponseHeader:function(){return "";}, // basically noop
77
+			getAllResponseHeaders:function(){return [];} // ditto
78
+		};
79
+
80
+		reset();
81
+
82
+		return publicAPI;
83
+	};
84
+})(window);
85
+

+ 298
- 0
javascripts/libs/swfobject-dynamic.js View File

@@ -0,0 +1,298 @@
1
+/*!	SWFObject v2.2 <http://code.google.com/p/swfobject/>
2
+	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
3
+*/
4
+
5
+var swfobject = function() {
6
+
7
+	var UNDEF = "undefined",
8
+		OBJECT = "object",
9
+		SHOCKWAVE_FLASH = "Shockwave Flash",
10
+		SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
11
+		FLASH_MIME_TYPE = "application/x-shockwave-flash",
12
+		EXPRESS_INSTALL_ID = "SWFObjectExprInst",
13
+
14
+		win = window,
15
+		doc = document,
16
+		nav = navigator,
17
+
18
+		plugin = false,
19
+		regObjArr = [],
20
+		objIdArr = [],
21
+		storedAltContent,
22
+		storedAltContentId,
23
+		storedCallbackFn,
24
+		storedCallbackObj,
25
+		autoHideShow = true,
26
+
27
+	/* Centralized function for browser feature detection
28
+		- User agent string detection is only used when no good alternative is possible
29
+		- Is executed directly for optimal performance
30
+	*/
31
+	ua = function() {
32
+		var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
33
+			u = nav.userAgent.toLowerCase(),
34
+			p = nav.platform.toLowerCase(),
35
+			windows = p ? /win/.test(p) : /win/.test(u),
36
+			mac = p ? /mac/.test(p) : /mac/.test(u),
37
+			webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
38
+			ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
39
+			playerVersion = [0,0,0],
40
+			d = null;
41
+		if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
42
+			d = nav.plugins[SHOCKWAVE_FLASH].description;
43
+			if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
44
+				plugin = true;
45
+				ie = false; // cascaded feature detection for Internet Explorer
46
+				d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
47
+				playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
48
+				playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
49
+				playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
50
+			}
51
+		}
52
+		else if (typeof win.ActiveXObject != UNDEF) {
53
+			try {
54
+				var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
55
+				if (a) { // a will return null when ActiveX is disabled
56
+					d = a.GetVariable("$version");
57
+					if (d) {
58
+						ie = true; // cascaded feature detection for Internet Explorer
59
+						d = d.split(" ")[1].split(",");
60
+						playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
61
+					}
62
+				}
63
+			}
64
+			catch(e) {}
65
+		}
66
+		return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
67
+	}()
68
+
69
+
70
+	/* Main function
71
+		- Will preferably execute onDomLoad, otherwise onload (as a fallback)
72
+	*/
73
+	function main() {
74
+		if (plugin) { testPlayerVersion(); }
75
+		else { matchVersions(); }
76
+	}
77
+
78
+	/* Detect the Flash Player version for non-Internet Explorer browsers
79
+		- Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
80
+		  a. Both release and build numbers can be detected
81
+		  b. Avoid wrong descriptions by corrupt installers provided by Adobe
82
+		  c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
83
+		- Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
84
+	*/
85
+	function testPlayerVersion() {
86
+		var b = doc.getElementsByTagName("body")[0];
87
+		var o = createElement(OBJECT);
88
+		o.setAttribute("type", FLASH_MIME_TYPE);
89
+		var t = b.appendChild(o);
90
+		if (t) {
91
+			var counter = 0;
92
+			(function(){
93
+				if (typeof t.GetVariable != UNDEF) {
94
+					var d = t.GetVariable("$version");
95
+					if (d) {
96
+						d = d.split(" ")[1].split(",");
97
+						ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
98
+					}
99
+				}
100
+				else if (counter < 10) {
101
+					counter++;
102
+					setTimeout(arguments.callee, 10);
103
+					return;
104
+				}
105
+				b.removeChild(o);
106
+				t = null;
107
+				matchVersions();
108
+			})();
109
+		}
110
+		else {
111
+			matchVersions();
112
+		}
113
+	}
114
+
115
+
116
+	/* Cross-browser dynamic SWF creation
117
+	*/
118
+	function createSWF(attObj, parObj, id) {
119
+		var r, el = getElementById(id);
120
+		if (ua.wk && ua.wk < 312) { return r; }
121
+		if (el) {
122
+			if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
123
+				attObj.id = id;
124
+			}
125
+			if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
126
+				var att = "";
127
+				for (var i in attObj) {
128
+					if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
129
+						if (i.toLowerCase() == "data") {
130
+							parObj.movie = attObj[i];
131
+						}
132
+						else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
133
+							att += ' class="' + attObj[i] + '"';
134
+						}
135
+						else if (i.toLowerCase() != "classid") {
136
+							att += ' ' + i + '="' + attObj[i] + '"';
137
+						}
138
+					}
139
+				}
140
+				var par = "";
141
+				for (var j in parObj) {
142
+					if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
143
+						par += '<param name="' + j + '" value="' + parObj[j] + '" />';
144
+					}
145
+				}
146
+				el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
147
+				objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
148
+				r = getElementById(attObj.id);
149
+			}
150
+			else { // well-behaving browsers
151
+				var o = createElement(OBJECT);
152
+				o.setAttribute("type", FLASH_MIME_TYPE);
153
+				for (var m in attObj) {
154
+					if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
155
+						if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
156
+							o.setAttribute("class", attObj[m]);
157
+						}
158
+						else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
159
+							o.setAttribute(m, attObj[m]);
160
+						}
161
+					}
162
+				}
163
+				for (var n in parObj) {
164
+					if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
165
+						createObjParam(o, n, parObj[n]);
166
+					}
167
+				}
168
+				el.parentNode.replaceChild(o, el);
169
+				r = o;
170
+			}
171
+		}
172
+		return r;
173
+	}
174
+
175
+	function createObjParam(el, pName, pValue) {
176
+		var p = createElement("param");
177
+		p.setAttribute("name", pName);
178
+		p.setAttribute("value", pValue);
179
+		el.appendChild(p);
180
+	}
181
+
182
+	/* Cross-browser SWF removal
183
+		- Especially needed to safely and completely remove a SWF in Internet Explorer
184
+	*/
185
+	/* Functions to optimize JavaScript compression
186
+	*/
187
+	function getElementById(id) {
188
+		var el = null;
189
+		try {
190
+			el = doc.getElementById(id);
191
+		}
192
+		catch (e) {}
193
+		return el;
194
+	}
195
+
196
+	function createElement(el) {
197
+		return doc.createElement(el);
198
+	}
199
+
200
+	/* Flash Player and SWF content version matching
201
+	*/
202
+	function hasPlayerVersion(rv) {
203
+		var pv = ua.pv, v = rv.split(".");
204
+		v[0] = parseInt(v[0], 10);
205
+		v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
206
+		v[2] = parseInt(v[2], 10) || 0;
207
+		return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
208
+	}
209
+
210
+
211
+	/* Filter to avoid XSS attacks
212
+	*/
213
+	function urlEncodeIfNecessary(s) {
214
+		var regex = /[\\\"<>\.;]/;
215
+		var hasBadChars = regex.exec(s) != null;
216
+		return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
217
+	}
218
+
219
+	return {
220
+		/* Public API
221
+			- Reference: http://code.google.com/p/swfobject/wiki/documentation
222
+		*/
223
+
224
+		embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, flashvarsObj, parObj, attObj, callbackFn) {
225
+			var callbackObj = {success:false, id:replaceElemIdStr};
226
+			if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
227
+              widthStr += ""; // auto-convert to string
228
+              heightStr += "";
229
+              var att = {};
230
+              if (attObj && typeof attObj === OBJECT) {
231
+                for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
232
+                  att[i] = attObj[i];
233
+                }
234
+              }
235
+              att.data = swfUrlStr;
236
+              att.width = widthStr;
237
+              att.height = heightStr;
238
+              var par = {};
239
+              if (parObj && typeof parObj === OBJECT) {
240
+                for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
241
+                  par[j] = parObj[j];
242
+                }
243
+              }
244
+              if (flashvarsObj && typeof flashvarsObj === OBJECT) {
245
+                for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
246
+                  if (typeof par.flashvars != UNDEF) {
247
+                    par.flashvars += "&" + k + "=" + flashvarsObj[k];
248
+                  }
249
+                  else {
250
+                    par.flashvars = k + "=" + flashvarsObj[k];
251
+                  }
252
+                }
253
+              }
254
+              if (hasPlayerVersion(swfVersionStr)) { // create SWF
255
+                var obj = createSWF(att, par, replaceElemIdStr);
256
+                callbackObj.success = true;
257
+                callbackObj.ref = obj;
258
+              }
259
+              if (callbackFn) { callbackFn(callbackObj); }
260
+			}
261
+			else if (callbackFn) { callbackFn(callbackObj);	}
262
+		},
263
+
264
+		ua: ua,
265
+
266
+		getFlashPlayerVersion: function() {
267
+			return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
268
+		},
269
+
270
+		hasFlashPlayerVersion: hasPlayerVersion,
271
+
272
+		createSWF: function(attObj, parObj, replaceElemIdStr) {
273
+			if (ua.w3) {
274
+				return createSWF(attObj, parObj, replaceElemIdStr);
275
+			}
276
+			else {
277
+				return undefined;
278
+			}
279
+		},
280
+
281
+		getQueryParamValue: function(param) {
282
+			var q = doc.location.search || doc.location.hash;
283
+			if (q) {
284
+				if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
285
+				if (param == null) {
286
+					return urlEncodeIfNecessary(q);
287
+				}
288
+				var pairs = q.split("&");
289
+				for (var i = 0; i < pairs.length; i++) {
290
+					if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
291
+						return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
292
+					}
293
+				}
294
+			}
295
+			return "";
296
+		}
297
+	};
298
+}();

+ 5
- 0
javascripts/modernizr-2.0.js
File diff suppressed because it is too large
View File


+ 161
- 0
javascripts/octopress.js View File

@@ -0,0 +1,161 @@
1
+function getNav() {
2
+  var mobileNav = $('nav[role=navigation] fieldset[role=search]').after('<fieldset class="mobile-nav"></fieldset>').next().append('<select></select>');
3
+  mobileNav.children('select').append('<option value="">Navigate&hellip;</option>');
4
+  $('ul[role=main-navigation]').addClass('main-navigation');
5
+  $('ul.main-navigation a').each(function(link) {
6
+    mobileNav.children('select').append('<option value="'+link.href+'">&raquo; '+link.text+'</option>');
7
+  });
8
+  $('ul.subscription a').each(function(link) {
9
+    mobileNav.children('select').append('<option value="'+link.href+'">&raquo; '+link.text+'</option>');
10
+  });
11
+  mobileNav.children('select').bind('change', function(event) {
12
+    if (event.target.value) { window.location.href = event.target.value; }
13
+  });
14
+}
15
+
16
+function addSidebarToggler() {
17
+  if(!$('body').hasClass('sidebar-footer')) {
18
+    $('#content').append('<span class="toggle-sidebar"></span>');
19
+    $('.toggle-sidebar').bind('click', function(e) {
20
+      e.preventDefault();
21
+      if ($('body').hasClass('collapse-sidebar')) {
22
+        $('body').removeClass('collapse-sidebar');
23
+      } else {
24
+        $('body').addClass('collapse-sidebar');
25
+      }
26
+    });
27
+  }
28
+  var sections = $('aside.sidebar > section');
29
+  if (sections.length > 1) {
30
+    sections.each(function(section, index){
31
+      if ((sections.length >= 3) && index % 3 === 0) {
32
+        $(section).addClass("first");
33
+      }
34
+      var count = ((index +1) % 2) ? "odd" : "even";
35
+      $(section).addClass(count);
36
+    });
37
+  }
38
+  if (sections.length >= 3){ $('aside.sidebar').addClass('thirds'); }
39
+}
40
+
41
+function testFeatures() {
42
+  var features = ['maskImage'];
43
+  $(features).map(function(feature) {
44
+    if (Modernizr.testAllProps(feature)) {
45
+      $('html').addClass(feature);
46
+    } else {
47
+      $('html').addClass('no-'+feature);
48
+    }
49
+  });
50
+  if ("placeholder" in document.createElement("input")) {
51
+    $('html').addClass('placeholder');
52
+  } else {
53
+    $('html').addClass('no-placeholder');
54
+  }
55
+}
56
+
57
+function addCodeLineNumbers() {
58
+  if (navigator.appName === 'Microsoft Internet Explorer') { return; }
59
+  $('div.gist-highlight').each(function(code) {
60
+    var tableStart = '<table><tbody><tr><td class="gutter">',
61
+        lineNumbers = '<pre class="line-numbers">',
62
+        tableMiddle = '</pre></td><td class="code">',
63
+        tableEnd = '</td></tr></tbody></table>',
64
+        count = $('.line', code).length;
65
+    for (var i=1;i<=count; i++) {
66
+      lineNumbers += '<span class="line-number">'+i+'</span>\n';
67
+    }
68
+    var table = tableStart + lineNumbers + tableMiddle + '<pre>'+$('pre', code).html()+'</pre>' + tableEnd;
69
+    $(code).html(table);
70
+  });
71
+}
72
+
73
+function flashVideoFallback(){
74
+  var flashplayerlocation = "/assets/jwplayer/player.swf",
75
+      flashplayerskin = "/assets/jwplayer/glow/glow.xml";
76
+  $('video').each(function(video){
77
+    video = $(video);
78
+    if (!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") !== -1){
79
+      video.children('source[src$=mp4]').first().map(function(source){
80
+        var src = $(source).attr('src'),
81
+            id = 'video_'+Math.round(1 + Math.random()*(100000)),
82
+            width = video.attr('width'),
83
+            height = parseInt(video.attr('height'), 10) + 30;
84
+            video.after('<div class="flash-video"><div><div id='+id+'>');
85
+        swfobject.embedSWF(flashplayerlocation, id, width, height + 30, "9.0.0",
86
+          { file : src, image : video.attr('poster'), skin : flashplayerskin } ,
87
+          { movie : src, wmode : "opaque", allowfullscreen : "true" }
88
+        );
89
+      });
90
+      video.remove();
91
+    }
92
+  });
93
+}
94
+
95
+function wrapFlashVideos() {
96
+  $('object').each(function(object) {
97
+    object = $(object);
98
+    if ( $('param[name=movie]', object).length ) {
99
+      var wrapper = object.before('<div class="flash-video"><div>').previous();
100
+      $(wrapper).children().append(object);
101
+    }
102
+  });
103
+  $('iframe[src*=vimeo],iframe[src*=youtube]').each(function(iframe) {
104
+    iframe = $(iframe);
105
+    var wrapper = iframe.before('<div class="flash-video"><div>').previous();
106
+    $(wrapper).children().append(iframe);
107
+  });
108
+}
109
+
110
+function renderDeliciousLinks(items) {
111
+  var output = "<ul>";
112
+  for (var i=0,l=items.length; i<l; i++) {
113
+    output += '<li><a href="' + items[i].u + '" title="Tags: ' + (items[i].t == "" ? "" : items[i].t.join(', ')) + '">' + items[i].d + '</a></li>';
114
+  }
115
+  output += "</ul>";
116
+  $('#delicious').html(output);
117
+}
118
+
119
+$.domReady(function() {
120
+  testFeatures();
121
+  wrapFlashVideos();
122
+  flashVideoFallback();
123
+  addCodeLineNumbers();
124
+  getNav();
125
+  addSidebarToggler();
126
+});
127
+
128
+// iOS scaling bug fix
129
+// Rewritten version
130
+// By @mathias, @cheeaun and @jdalton
131
+// Source url: https://gist.github.com/901295
132
+(function(doc) {
133
+  var addEvent = 'addEventListener',
134
+      type = 'gesturestart',
135
+      qsa = 'querySelectorAll',
136
+      scales = [1, 1],
137
+      meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
138
+  function fix() {
139
+    meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
140
+    doc.removeEventListener(type, fix, true);
141
+  }
142
+  if ((meta = meta[meta.length - 1]) && addEvent in doc) {
143
+    fix();
144
+    scales = [0.25, 1.6];
145
+    doc[addEvent](type, fix, true);
146
+  }
147
+}(document));
148
+
149
+/*!	SWFObject v2.2 modified by Brandon Mathis to contain only what is necessary to dynamically embed flash objects
150
+  * Uncompressed source in javascripts/libs/swfobject-dynamic.js
151
+  * <http://code.google.com/p/swfobject/>
152
+	released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
153
+*/
154
+var swfobject=function(){function s(a,b,d){var q,k=n(d);if(g.wk&&g.wk<312)return q;if(k){if(typeof a.id==l)a.id=d;if(g.ie&&g.win){var e="",c;for(c in a)if(a[c]!=Object.prototype[c])c.toLowerCase()=="data"?b.movie=a[c]:c.toLowerCase()=="styleclass"?e+=' class="'+a[c]+'"':c.toLowerCase()!="classid"&&(e+=" "+c+'="'+a[c]+'"');c="";for(var f in b)b[f]!=Object.prototype[f]&&(c+='<param name="'+f+'" value="'+b[f]+'" />');k.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+e+">"+c+
155
+"</object>";q=n(a.id)}else{f=i.createElement(o);f.setAttribute("type",m);for(var h in a)a[h]!=Object.prototype[h]&&(h.toLowerCase()=="styleclass"?f.setAttribute("class",a[h]):h.toLowerCase()!="classid"&&f.setAttribute(h,a[h]));for(e in b)b[e]!=Object.prototype[e]&&e.toLowerCase()!="movie"&&(a=f,c=e,h=b[e],d=i.createElement("param"),d.setAttribute("name",c),d.setAttribute("value",h),a.appendChild(d));k.parentNode.replaceChild(f,k);q=f}}return q}function n(a){var b=null;try{b=i.getElementById(a)}catch(d){}return b}
156
+function t(a){var b=g.pv,a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:!1}function u(a){return/[\\\"<>\.;]/.exec(a)!=null&&typeof encodeURIComponent!=l?encodeURIComponent(a):a}var l="undefined",o="object",m="application/x-shockwave-flash",v=window,i=document,j=navigator,g=function(){var a=typeof i.getElementById!=l&&typeof i.getElementsByTagName!=l&&typeof i.createElement!=l,
157
+b=j.userAgent.toLowerCase(),d=j.platform.toLowerCase(),g=d?/win/.test(d):/win/.test(b),d=d?/mac/.test(d):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,k=!+"\u000b1",e=[0,0,0],c=null;if(typeof j.plugins!=l&&typeof j.plugins["Shockwave Flash"]==o){if((c=j.plugins["Shockwave Flash"].description)&&!(typeof j.mimeTypes!=l&&j.mimeTypes[m]&&!j.mimeTypes[m].enabledPlugin))k=!1,c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),e[0]=parseInt(c.replace(/^(.*)\..*$/,"$1"),
158
+10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&
159
+a&&b&&d&&i&&k){d+="";i+="";var p={};if(f&&typeof f===o)for(var m in f)p[m]=f[m];p.data=a;p.width=d;p.height=i;a={};if(c&&typeof c===o)for(var n in c)a[n]=c[n];if(e&&typeof e===o)for(var r in e)typeof a.flashvars!=l?a.flashvars+="&"+r+"="+e[r]:a.flashvars=r+"="+e[r];if(t(k))b=s(p,a,b),j.success=!0,j.ref=b}h&&h(j)},ua:g,getFlashPlayerVersion:function(){return{major:g.pv[0],minor:g.pv[1],release:g.pv[2]}},hasFlashPlayerVersion:t,createSWF:function(a,b,d){if(g.w3)return s(a,b,d)},getQueryParamValue:function(a){var b=
160
+i.location.search||i.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(a==null)return u(b);for(var b=b.split("&"),d=0;d<b.length;d++)if(b[d].substring(0,b[d].indexOf("="))==a)return u(b[d].substring(b[d].indexOf("=")+1))}return""}}}();
161
+

+ 56
- 0
javascripts/pinboard.js View File

@@ -0,0 +1,56 @@
1
+function pinboardNS_fetch_script(url) {
2
+  //document.writeln('<s'+'cript type="text/javascript" src="' + url + '"></s'+'cript>');
3
+  (function(){
4
+    var pinboardLinkroll = document.createElement('script');
5
+    pinboardLinkroll.type = 'text/javascript';
6
+    pinboardLinkroll.async = true;
7
+    pinboardLinkroll.src = url;
8
+    document.getElementsByTagName('head')[0].appendChild(pinboardLinkroll);
9
+  })();
10
+}
11
+
12
+function pinboardNS_show_bmarks(r) {
13
+  var lr = new Pinboard_Linkroll();
14
+  lr.set_items(r);
15
+  lr.show_bmarks();
16
+}
17
+
18
+function Pinboard_Linkroll() {
19
+  var items;
20
+
21
+  this.set_items = function(i) {
22
+    this.items = i;
23
+  }
24
+  this.show_bmarks = function() {
25
+    var lines = [];
26
+    for (var i = 0; i < this.items.length; i++) {
27
+      var item = this.items[i];
28
+      var str = this.format_item(item);
29
+      lines.push(str);
30
+    }
31
+    document.getElementById(linkroll).innerHTML = lines.join("\n");
32
+  }
33
+  this.cook = function(v) {
34
+    return v.replace('<', '&lt;').replace('>', '&gt>');
35
+  }
36
+
37
+  this.format_item = function(it) {
38
+    var str = "<li class=\"pin-item\">";
39
+    if (!it.d) { return; }
40
+    str += "<p><a class=\"pin-title\" href=\"" + this.cook(it.u) + "\">" + this.cook(it.d) + "</a>";
41
+    if (it.n) {
42
+      str += "<span class=\"pin-description\">" + this.cook(it.n) + "</span>\n";
43
+    }
44
+    if (it.t.length > 0) {
45
+      for (var i = 0; i < it.t.length; i++) {
46
+        var tag = it.t[i];
47
+        str += " <a class=\"pin-tag\" href=\"https://pinboard.in/u:"+ this.cook(it.a) + "/t:" + this.cook(tag) + "\">" + this.cook(tag).replace(/^\s+|\s+$/g, '') + "</a> ";
48
+      }
49
+    }
50
+    str += "</p></li>\n";
51
+    return str;
52
+  }
53
+}
54
+Pinboard_Linkroll.prototype = new Pinboard_Linkroll();
55
+pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count);
56
+

+ 78
- 0
javascripts/twitter.js View File

@@ -0,0 +1,78 @@
1
+// JSON-P Twitter fetcher for Octopress
2
+// (c) Brandon Mathis // MIT License
3
+
4
+/* Sky Slavin, Ludopoli. MIT license.  * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license.  */
5
+function prettyDate(time) {
6
+  if (navigator.appName === 'Microsoft Internet Explorer') {
7
+    return "<span>&infin;</span>"; // because IE date parsing isn't fun.
8
+  }
9
+  var say = {
10
+    just_now:    " now",
11
+    minute_ago:  "1m",
12
+    minutes_ago: "m",
13
+    hour_ago:    "1h",
14
+    hours_ago:   "h",
15
+    yesterday:   "1d",
16
+    days_ago:    "d",
17
+    last_week:   "1w",
18
+    weeks_ago:   "w"
19
+  };
20
+
21
+  var current_date = new Date(),
22
+      current_date_time = current_date.getTime(),
23
+      current_date_full = current_date_time + (1 * 60000),
24
+      date = new Date(time),
25
+      diff = ((current_date_full - date.getTime()) / 1000),
26
+      day_diff = Math.floor(diff / 86400);
27
+
28
+  if (isNaN(day_diff) || day_diff < 0) { return "<span>&infin;</span>"; }
29
+
30
+  return day_diff === 0 && (
31
+    diff < 60 && say.just_now ||
32
+    diff < 120 && say.minute_ago ||
33
+    diff < 3600 && Math.floor(diff / 60) + say.minutes_ago ||
34
+    diff < 7200 && say.hour_ago ||
35
+    diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) ||
36
+    day_diff === 1 && say.yesterday ||
37
+    day_diff < 7 && day_diff + say.days_ago ||
38
+    day_diff === 7 && say.last_week ||
39
+    day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago;
40
+}
41
+
42
+function linkifyTweet(text, url) {
43
+  // Linkify urls, usernames, hashtags
44
+  text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>')
45
+    .replace(/(^|\W)@(\w+)/g, '$1<a href="https://twitter.com/$2">@$2</a>')
46
+    .replace(/(^|\W)#(\w+)/g, '$1<a href="https://search.twitter.com/search?q=%23$2">#$2</a>');
47
+
48
+  // Use twitter's api to replace t.co shortened urls with expanded ones.
49
+  for (var u in url) {
50
+    if(url[u].expanded_url != null){
51
+      var shortUrl = new RegExp(url[u].url, 'g');
52
+      text = text.replace(shortUrl, url[u].expanded_url);
53
+      var shortUrl = new RegExp(">"+(url[u].url.replace(/https?:\/\//, '')), 'g');
54
+      text = text.replace(shortUrl, ">"+url[u].display_url);
55
+    }
56
+  }
57
+  return text
58
+}
59
+
60
+function showTwitterFeed(tweets, twitter_user) {
61
+  var timeline = document.getElementById('tweets'),
62
+      content = '';
63
+
64
+  for (var t in tweets) {
65
+    content += '<li>'+'<p>'+'<a href="https://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'), tweets[t].entities.urls)+'</p>'+'</li>';
66
+  }
67
+  timeline.innerHTML = content;
68
+}
69
+
70
+function getTwitterFeed(user, count, replies) {
71
+  count = parseInt(count, 10);
72
+  $.ajax({
73
+      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=?"
74
+    , type: 'jsonp'
75
+    , error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); }
76
+    , success: function(data) { showTwitterFeed(data.slice(0, count), user); }
77
+  })
78
+}

+ 11
- 0
sitemap.xml View File

@@ -0,0 +1,11 @@
1
+<?xml version='1.0' encoding='UTF-8'?>
2
+<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>
3
+    <url>
4
+        <loc>http://abhin4v.github.com/</loc>
5
+        <lastmod>2012-10-28T19:10:21+05:30</lastmod>
6
+    </url>
7
+    <url>
8
+        <loc>http://abhin4v.github.com/blog/archives/</loc>
9
+        <lastmod>2012-10-28T19:10:21+05:30</lastmod>
10
+    </url>
11
+</urlset>

+ 1
- 0
stylesheets/screen.css
File diff suppressed because it is too large
View File


Loading…
Cancel
Save