Skip to content

Commit 3bd4ed0

Browse files
committed
Merge branch 'master' of github.com:imathis/octopress into compass
2 parents 3ad7715 + 9cf956c commit 3bd4ed0

File tree

14 files changed

+293
-166
lines changed

14 files changed

+293
-166
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ source.old
1010
source/_stash
1111
source/stylesheets/screen.css
1212
vendor
13+
node_modules

.rbenv-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.9.2-p290

.slugignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins
2+
sass
3+
source

.themes/classic/sass/partials/_syntax.scss

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.highlight, html .gist .gist-file .gist-syntax .gist-highlight {
2+
table td.code { width: 100%; }
23
.line-numbers {
34
text-align: right;
45
font-size: 13px;
@@ -85,19 +86,21 @@ h3.filename {
8586
+ pre { @include border-top-radius(0px); }
8687
}
8788

88-
p code,
89-
li code {
90-
@extend .mono;
91-
display: inline-block;
92-
white-space: no-wrap;
93-
background: #fff;
94-
font-size: .8em;
95-
line-height: 1.5em;
96-
color: #555;
97-
border: 1px solid #ddd;
98-
@include border-radius(.4em);
99-
padding: 0 .3em;
100-
margin: -1px 0;
89+
p, li {
90+
code {
91+
@extend .mono;
92+
display: inline-block;
93+
white-space: no-wrap;
94+
background: #fff;
95+
font-size: .8em;
96+
line-height: 1.5em;
97+
color: #555;
98+
border: 1px solid #ddd;
99+
@include border-radius(.4em);
100+
padding: 0 .3em;
101+
margin: -1px 0;
102+
}
103+
pre code { font-size: 1em !important; background: none; border: none; }
101104
}
102105

103106
.pre-code {
@@ -216,6 +219,7 @@ figure.code {
216219
margin-bottom: 0;
217220
}
218221
}
222+
219223
.code-title {
220224
text-align: center;
221225
font-size: 13px;
@@ -243,3 +247,4 @@ figure.code {
243247
text-shadow: #cbcccc 0 1px 0;
244248
padding-left: 3em;
245249
}
250+
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{% if site.delicious_user %}
22
<section>
33
<h1>On Delicious</h1>
4-
<script type="text/javascript" src="http://feeds.delicious.com/v2/js/{{ site.delicious_user }}?title=&amp;count={{ site.delicious_count }}&amp;sort=date&amp;extended"></script>
4+
<div id="delicious"></div>
5+
<script type="text/javascript" src="http://feeds.delicious.com/v1/json/{{ site.delicious_user }}?count={{ site.delicious_count }}&amp;sort=date&amp;callback=renderDeliciousLinks"></script>
56
<p><a href="http://delicious.com/{{ site.delicious_user }}">My Delicious Bookmarks &raquo;</a></p>
67
</section>
7-
{% endif %}
8+
{% endif %}

.themes/classic/source/_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<link href="{{ root_url }}/favicon.png" rel="icon">
2222
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
2323
<script src="{{ root_url }}/javascripts/modernizr-2.0.js"></script>
24-
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
24+
<script src="{{ root_url }}/javascripts/ender.js"></script>
2525
<script src="{{ root_url }}/javascripts/octopress.js" type="text/javascript"></script>
2626
<link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml">
2727
{% include custom/head.html %}

.themes/classic/source/_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% capture root_url %}{{ site.root | strip_slash }}{% endcapture %}
22
{% include head.html %}
3-
<body {% if page.body_id %} id="{{ page.body_id }}" {% endif %} {% if page.sidebar == false %} class="no-sidebar" {% endif %}>
3+
<body {% if page.body_id %} id="{{ page.body_id }}" {% endif %} {% if page.sidebar == false %} class="no-sidebar" {% endif %} {% if page.sidebar == 'collapse' or site.sidebar == 'collapse' %} class="collapse-sidebar sidebar-footer" {% endif %}>
44
<header role="banner">{% include header.html %}</header>
55
<nav role="navigation">{% include navigation.html %}</nav>
66
<div id="main">

.themes/classic/source/javascripts/ender.js

Lines changed: 44 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,39 @@
1-
github = (function(){
2-
function render(target, repos){
3-
var i = 0, fragment = '', t = $(target)[0];
1+
var github = (function(){
2+
function render(target, repos){
3+
var i = 0, fragment = '', t = $(target)[0];
44

5-
for(i = 0; i < repos.length; i++)
6-
fragment += '<li><a href="'+repos[i].url+'">'+repos[i].name+'</a><p>'+repos[i].description+'</p></li>';
7-
8-
t.innerHTML = fragment;
5+
for(i = 0; i < repos.length; i++) {
6+
fragment += '<li><a href="'+repos[i].url+'">'+repos[i].name+'</a><p>'+repos[i].description+'</p></li>';
97
}
10-
return {
11-
showRepos: function(options){
12-
var feed = new jXHR();
13-
feed.onerror = function (msg,url) {
14-
$(options.target + ' li.loading').addClass('error').text("Error loading feed");
15-
}
16-
feed.onreadystatechange = function(data){
17-
if (feed.readyState === 4) {
18-
var repos = [];
19-
var i;
20-
for (i = 0; i < data.repositories.length; i++){
21-
if (options.skip_forks && data.repositories[i].fork)
22-
continue;
23-
repos.push(data.repositories[i]);
24-
}
25-
repos.sort(function(a, b){
26-
var a = new Date(a.pushed_at),
27-
b = new Date(b.pushed_at);
28-
29-
if (a.valueOf() == b.valueOf()) return 0;
30-
return a.valueOf() > b.valueOf() ? -1 : 1;
31-
});
8+
t.innerHTML = fragment;
9+
}
10+
return {
11+
showRepos: function(options){
12+
var feed = new jXHR();
13+
feed.onerror = function (msg,url) {
14+
$(options.target + ' li.loading').addClass('error').text("Error loading feed");
15+
};
16+
feed.onreadystatechange = function(data) {
17+
if (feed.readyState === 4) {
18+
var repos = [];
19+
for (var i = 0; i < data.repositories.length; i++){
20+
if (options.skip_forks && data.repositories[i].fork) { continue; }
21+
repos.push(data.repositories[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();
3226

33-
if (options.count)
34-
repos.splice(options.count);
27+
if (aDate === bDate) { return 0; }
28+
return aDate > bDate ? -1 : 1;
29+
});
3530

36-
render(options.target, repos)
37-
}
38-
};
39-
feed.open("GET","http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?");
40-
feed.send();
31+
if (options.count) { repos.splice(options.count); }
32+
render(options.target, repos);
4133
}
42-
};
34+
};
35+
feed.open("GET","http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?");
36+
feed.send();
37+
}
38+
};
4339
})();

.themes/classic/source/javascripts/octopress.js

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
function getNav() {
22
var mobileNav = $('nav[role=navigation] fieldset[role=search]').after('<fieldset class="mobile-nav"></fieldset>').next().append('<select></select>');
33
mobileNav.children('select').append('<option value="">Navigate&hellip;</option>');
4+
$('ul[role=main-navigation]').addClass('main-navigation');
45
$('ul.main-navigation a').each(function(link) {
56
mobileNav.children('select').append('<option value="'+link.href+'">&bull; '+link.text+'</option>');
67
});
78
mobileNav.children('select').bind('change', function(event) {
8-
if (event.target.value) window.location.href = event.target.value;
9+
if (event.target.value) { window.location.href = event.target.value; }
910
});
1011
}
1112

1213
function addSidebarToggler() {
13-
$('#content').append('<span class="toggle-sidebar"></span>');
14-
$('.toggle-sidebar').bind('click', function(e) {
15-
e.preventDefault();
16-
if ($('body').hasClass('collapse-sidebar')) {
17-
$('body').removeClass('collapse-sidebar');
18-
} else {
19-
$('body').addClass('collapse-sidebar');
20-
}
21-
});
14+
if(!$('body').hasClass('sidebar-footer')) {
15+
$('#content').append('<span class="toggle-sidebar"></span>');
16+
$('.toggle-sidebar').bind('click', function(e) {
17+
e.preventDefault();
18+
if ($('body').hasClass('collapse-sidebar')) {
19+
$('body').removeClass('collapse-sidebar');
20+
} else {
21+
$('body').addClass('collapse-sidebar');
22+
}
23+
});
24+
}
2225
var sections = $('aside.sidebar > section');
2326
if (sections.length > 1) {
2427
sections.each(function(section, index){
@@ -49,13 +52,13 @@ function testFeatures() {
4952
}
5053

5154
function addCodeLineNumbers() {
52-
if (navigator.appName == 'Microsoft Internet Explorer') { return; }
55+
if (navigator.appName === 'Microsoft Internet Explorer') { return; }
5356
$('div.gist-highlight').each(function(code) {
5457
var tableStart = '<table><tbody><tr><td class="gutter">',
5558
lineNumbers = '<pre class="line-numbers">',
5659
tableMiddle = '</pre></td><td class="code">',
5760
tableEnd = '</td></tr></tbody></table>',
58-
count = $('span.line', code).length;
61+
count = $('.line', code).length;
5962
for (var i=1;i<=count; i++) {
6063
lineNumbers += '<span class="line-number">'+i+'</span>\n';
6164
}
@@ -69,7 +72,7 @@ function flashVideoFallback(){
6972
flashplayerskin = "/assets/jwplayer/glow/glow.xml";
7073
$('video').each(function(video){
7174
video = $(video);
72-
if (!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") != -1){
75+
if (!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") !== -1){
7376
video.children('source[src$=mp4]').first().map(function(source){
7477
var src = $(source).attr('src'),
7578
id = 'video_'+Math.round(1 + Math.random()*(100000)),
@@ -89,7 +92,7 @@ function flashVideoFallback(){
8992
function wrapFlashVideos() {
9093
$('object').each(function(object) {
9194
object = $(object);
92-
if (object.children('param[name=movie]')) {
95+
if ( $('param[name=movie]', object).length ) {
9396
var wrapper = object.before('<div class="flash-video"><div>').previous();
9497
$(wrapper).children().append(object);
9598
}
@@ -101,6 +104,15 @@ function wrapFlashVideos() {
101104
});
102105
}
103106

107+
function renderDeliciousLinks(items) {
108+
var output = "<ul>";
109+
for (var i=0,l=items.length; i<l; i++) {
110+
output += '<li><a href="' + items[i].u + '" title="Tags: ' + items[i].t.join(', ') + '">' + items[i].d + '</a></li>';
111+
}
112+
output += "</ul>";
113+
$('#delicious').html(output);
114+
}
115+
104116
$.domReady(function() {
105117
testFeatures();
106118
wrapFlashVideos();

0 commit comments

Comments
 (0)