updated theme

This commit is contained in:
Brandon Mathis 2012-06-16 17:56:45 -05:00
parent c0a18589b2
commit 1970ef43b0
16 changed files with 66 additions and 34 deletions

View File

@ -1,11 +0,0 @@
{% if site.googleplus_user %}
<section class="googleplus{% if site.googleplus_hidden %} googleplus-hidden{% endif %}">
<h1>
<a href="https://plus.google.com/{{ site.googleplus_user }}?rel=author">
<img src="http://www.google.com/images/icons/ui/gprofile_button-32.png" width="32" height="32">
Google+
</a>
</h1>
</section>
{% endif %}

View File

@ -1,4 +0,0 @@
<section>
<h1>About Me</h1>
<p>A little something about me.</p>
</section>

View File

@ -17,7 +17,7 @@
<meta name="MobileOptimized" content="320"> <meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
{% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %}
<link rel="canonical" href="{{ canonical }}"> <link rel="canonical" href="{{ canonical }}">
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css"> <link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="{{ root_url }}/javascripts/modernizr-2.0.js"></script> <script src="{{ root_url }}/javascripts/modernizr-2.0.js"></script>

View File

@ -0,0 +1,4 @@
{% include sidebars/sections/twitter.html %}
{% include sidebars/sections/delicious.html %}
{% include sidebars/sections/pinboard.html %}
{% include sidebars/sections/google_plus.html %}

View File

@ -0,0 +1,5 @@
{% include sidebars/sections/recent_posts.html %}
{% include sidebars/sections/twitter.html %}
{% include sidebars/sections/delicious.html %}
{% include sidebars/sections/pinboard.html %}
{% include sidebars/sections/google_plus.html %}

View File

@ -0,0 +1,5 @@
{% include sidebars/sections/recent_posts.html %}
{% include sidebars/sections/twitter.html %}
{% include sidebars/sections/delicious.html %}
{% include sidebars/sections/pinboard.html %}
{% include sidebars/sections/google_plus.html %}

View File

@ -0,0 +1,6 @@
{% if site.google_plus_user %}
<a href="https://plus.google.com/{{ site.google_plus_user }}?rel=author">
<img src="https://ssl.gstatic.com/images/icons/gplus-{{ site.google_plus_image_size}}.png" alt="Google Plus icon">
</a>
{% endif %}

View File

@ -23,12 +23,12 @@ layout: default
{% include custom/after_page.html %} {% include custom/after_page.html %}
{% if page.comments == true %}{% include comments.html %}{% endif %} {% if page.comments == true %}{% include comments.html %}{% endif %}
</div> </div>
{% unless page.sidebar == false %} {% unless page.sidebar == false or site.default_sidebar == false %}
<aside class="sidebar"> <aside class="sidebar">
{% if site.page_asides.size %}   {% if page.sidebar == nil or page.sidebar == 'collapse' %}
{% include_array page_asides %}    {% include_sidebar site.page_sidebar %}
{% else %}   {% else %}
{% include_array default_asides %}    {% include_sidebar %}
{% endif %}   {% endif %}
</aside> </aside>
{% endunless %} {% endunless %}

View File

@ -28,12 +28,12 @@ single: true
{% include custom/after_post.html %} {% include custom/after_post.html %}
{% if page.comments == true %}{% include comments.html %}{% endif %} {% if page.comments == true %}{% include comments.html %}{% endif %}
</div> </div>
{% unless page.sidebar == false %} {% unless page.sidebar == false or site.default_sidebar == false %}
<aside class="sidebar"> <aside class="sidebar">
{% if site.post_asides.size %}   {% if page.sidebar == nil or page.sidebar == 'collapse' %}
{% include_array post_asides %}    {% include_sidebar site.post_sidebar %}
{% else %}   {% else %}
{% include_array default_asides %}    {% include_sidebar %}
{% endif %}   {% endif %}
</aside> </aside>
{% endunless %} {% endunless %}

View File

@ -19,10 +19,12 @@ layout: default
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% unless page.sidebar == false or site.default_sidebar == false %}
<aside class="sidebar"> <aside class="sidebar">
{% if site.blog_index_asides.size %}   {% if page.sidebar == nil or page.sidebar == 'collapse' %}
{% include_array blog_index_asides %}    {% include_sidebar site.blog_index_sidebar %}
{% else %}   {% else %}
{% include_array default_asides %}    {% include_sidebar %}
{% endif %}   {% endif %}
</aside> </aside>
{% endunless %}

View File

@ -38,6 +38,7 @@ var octopress = (function(){
} }
if (sections.length >= 3){ $('aside.sidebar').addClass('thirds'); } if (sections.length >= 3){ $('aside.sidebar').addClass('thirds'); }
} }
, addCodeLineNumbers: function () { , addCodeLineNumbers: function () {
if (navigator.appName === 'Microsoft Internet Explorer') { return; } if (navigator.appName === 'Microsoft Internet Explorer') { return; }
$('div.gist-highlight').each(function(index) { $('div.gist-highlight').each(function(index) {
@ -208,11 +209,21 @@ var octopress = (function(){
})() })()
, github: (function(){ , github: (function(){
htmlEscape = function (str) {
return String(str)
.replace(/&/g, '&amp;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
}
function render(target, data){ function render(target, data){
var i = 0, repos = ''; var i = 0, repos = '';
for(i = 0; i < data.length; i++) { for(i = 0; i < data.length; i++) {
repos += '<li><a href="'+data[i].html_url+'">'+data[i].name+'</a><p>'+data[i].description+'</p></li>'; repos += '<li><a href="'+data[i].html_url+'">'+htmlEscape(data[i].name)+'</a><p>'+htmlEscape(data[i].description)+'</p></li>';
} }
target.html(repos); target.html(repos);
} }
@ -264,6 +275,20 @@ $(document).ready(function() {
octopress.github.showRepos('#gh_repos'); octopress.github.showRepos('#gh_repos');
}); });
var htmlEncode = (function() {
var entities = {
'&' : '&amp;'
, '<' : '&lt;'
, '"' : '&quot;'
};
return function(value) {
return value.replace(/[&<"]/g, function(c) {
return entities[c];
});
};
})();
// iOS scaling bug fix // iOS scaling bug fix
// Rewritten version // Rewritten version
// By @mathias, @cheeaun and @jdalton // By @mathias, @cheeaun and @jdalton