diff options
Diffstat (limited to '.themes/classic/source')
4 files changed, 18 insertions, 26 deletions
diff --git a/.themes/classic/source/_includes/asides/recent_posts.html b/.themes/classic/source/_includes/asides/recent_posts.html index cc628145..4b108474 100644 --- a/.themes/classic/source/_includes/asides/recent_posts.html +++ b/.themes/classic/source/_includes/asides/recent_posts.html @@ -3,7 +3,7 @@ <ul id="recent_posts"> {% for post in site.posts limit: site.recent_posts %} <li class="post"> - <a href="{{ root_url }}{{ post.url }}">{{ post.title }}</a> + <a href="{{ root_url }}{{ post.url }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a> </li> {% endfor %} </ul> diff --git a/.themes/classic/source/_includes/post/sharing.html b/.themes/classic/source/_includes/post/sharing.html index e32500d0..d639faa1 100644 --- a/.themes/classic/source/_includes/post/sharing.html +++ b/.themes/classic/source/_includes/post/sharing.html @@ -1,6 +1,6 @@ <div class="sharing"> {% if site.twitter_tweet_button %} - <a href="http://twitter.com/share" class="twitter-share-button" data-url="{{ site.url }}{{ page.url }}" data-via="{{ site.twitter_user }}" data-counturl="{{ site.url }}{{ page.url }}" >Tweet</a> + <a href="//twitter.com/share" class="twitter-share-button" data-url="{{ site.url }}{{ page.url }}" data-via="{{ site.twitter_user }}" data-counturl="{{ site.url }}{{ page.url }}" >Tweet</a> {% endif %} {% if site.google_plus_one %} <div class="g-plusone" data-size="{{ site.google_plus_one_size }}"></div> diff --git a/.themes/classic/source/_includes/twitter_sharing.html b/.themes/classic/source/_includes/twitter_sharing.html index 687e77de..7cd5fbc2 100644 --- a/.themes/classic/source/_includes/twitter_sharing.html +++ b/.themes/classic/source/_includes/twitter_sharing.html @@ -4,7 +4,7 @@ var twitterWidgets = document.createElement('script'); twitterWidgets.type = 'text/javascript'; twitterWidgets.async = true; - twitterWidgets.src = 'http://platform.twitter.com/widgets.js'; + twitterWidgets.src = '//platform.twitter.com/widgets.js'; document.getElementsByTagName('head')[0].appendChild(twitterWidgets); })(); </script> diff --git a/.themes/classic/source/javascripts/octopress.js b/.themes/classic/source/javascripts/octopress.js index c3f59156..218a0a1a 100644 --- a/.themes/classic/source/javascripts/octopress.js +++ b/.themes/classic/source/javascripts/octopress.js @@ -1,17 +1,15 @@ function getNav() { - var mobileNav = $('nav[role=navigation] fieldset[role=search]').after('<fieldset class="mobile-nav"></fieldset>').next().append('<select></select>'); - mobileNav.children('select').append('<option value="">Navigate…</option>'); - $('ul[role=main-navigation]').addClass('main-navigation'); - $('ul.main-navigation a').each(function(i, link) { - mobileNav.children('select').append('<option value="'+link.href+'">» '+link.text+'</option>'); - }); - $('ul.subscription a').each(function(i, link) { - mobileNav.children('select').append('<option value="'+link.href+'">» '+link.text+'</option>'); - }); - mobileNav.children('select').bind('change', function(event) { + var mainNav = $('ul.main-navigation, ul[role=main-navigation]').before('<fieldset class="mobile-nav">') + var mobileNav = $('fieldset.mobile-nav').append('<select>'); + mobileNav.find('select').append('<option value="">Navigate…</option>'); + var addOption = function(i, option) { + mobileNav.find('select').append('<option value="' + this.href + '">» ' + $(this).text() + '</option>'); + } + mainNav.find('a').each(addOption); + $('ul.subscription a').each(addOption); + mobileNav.find('select').bind('change', function(event) { if (event.target.value) { window.location.href = event.target.value; } }); - mobileNav.children('select').val(''); } function addSidebarToggler() { @@ -74,10 +72,10 @@ function addCodeLineNumbers() { function flashVideoFallback(){ var flashplayerlocation = "/assets/jwplayer/player.swf", flashplayerskin = "/assets/jwplayer/glow/glow.xml"; - $('video').each(function(video){ + $('video').each(function(i, video){ video = $(video); if (!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") !== -1){ - video.children('source[src$=mp4]').first().map(function(i, source){ + video.children('source[src$=mp4]').first().map(i, function(source){ var src = $(source).attr('src'), id = 'video_'+Math.round(1 + Math.random()*(100000)), width = video.attr('width'), @@ -94,18 +92,12 @@ function flashVideoFallback(){ } function wrapFlashVideos() { - $('object').each(function(object) { - object = $(object); - if ( $('param[name=movie]', object).length ) { - var wrapper = object.before('<div class="flash-video"><div>').previous(); - $(wrapper).children().append(object); + $('object').each(function(i, object) { + if( $(object).find('param[name=movie]').length ){ + $(object).wrap('<div class="flash-video">') } }); - $('iframe[src*=vimeo],iframe[src*=youtube]').each(function(iframe) { - iframe = $(iframe); - var wrapper = iframe.before('<div class="flash-video"><div>').previous(); - $(wrapper).children().append(iframe); - }); + $('iframe[src*=vimeo],iframe[src*=youtube]').wrap('<div class="flash-video">') } function renderDeliciousLinks(items) { |