Skip to content

Commit

Permalink
Updated source, style and twitter sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
markstickley committed Aug 18, 2013
1 parent 5934701 commit f770619
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 90 deletions.
1 change: 1 addition & 0 deletions _config.yml
Expand Up @@ -70,6 +70,7 @@ github_skip_forks: true

# Twitter
twitter_user: norestftw
twitter_widget_id: 369131738645004288
twitter_tweet_count: 4
twitter_show_replies: false
twitter_follow_button: true
Expand Down
3 changes: 1 addition & 2 deletions sass/base/_theme.scss
@@ -1,5 +1,5 @@
$noise-bg: image-url('noise.png') top left !default;
$img-border: inline-image('dotted-border.png');
$img-border: inline-image('dotted-border.png') !default;

// Main Link Colors
$link-color: lighten(#165b94, 3) !default;
Expand Down Expand Up @@ -44,7 +44,6 @@ $sidebar-border: desaturate(darken($sidebar-bg, 7), 10) !default;
$sidebar-border-hover: darken($sidebar-bg, 7) !default;
$sidebar-link-color-subdued: lighten($sidebar-color, 20) !default;
$sidebar-link-color-subdued-hover: $sidebar-link-color-hover !default;
$twitter-status-link: lighten($sidebar-link-color-subdued, 15) !default;

$footer-color: #888 !default;
$footer-bg: #ccc !default;
Expand Down
13 changes: 8 additions & 5 deletions sass/base/_typography.scss
Expand Up @@ -62,7 +62,8 @@ h5, section h4, section section h3 {
h6, section h5, section section h4, section section section h3 {
font-size: .8em;
}
p, blockquote, ul, ol { margin-bottom: 1.5em; }

p, article blockquote, ul, ol { margin-bottom: 1.5em; }

ul { list-style-type: disc;
ul { list-style-type: circle; margin-bottom: 0px;
Expand All @@ -73,15 +74,18 @@ ol { list-style-type: decimal;
ol { list-style-type: lower-roman; margin-bottom: 0px; }}}

ul, ol { &, ul, ol { margin-left: 1.3em; }}
ul, ol { ul, ol { margin-bottom: 0em; }}

strong { font-weight: bold; }

em { font-style: italic; }

sup, sub { font-size: 0.8em; position: relative; display: inline-block; }
sup, sub { font-size: 0.75em; position: relative; display: inline-block; padding: 0 .2em; line-height: .8em;}
sup { top: -.5em; }
sub { bottom: -.5em; }

a[rev='footnote']{ font-size: .75em; padding: 0 .3em; line-height: 1; }

q { font-style: italic;
&:before { content: "\201C"; }
&:after { content: "\201D"; }
Expand All @@ -97,15 +101,13 @@ abbr, acronym { border-bottom: 1px dotted; cursor: help; }

pre, code, tt { @extend .mono; }

sub, sup { line-height: 0; }

hr { margin-bottom: 0.2em; }

small { font-size: .8em; }

big { font-size: 1.2em; }

blockquote {
article blockquote {
$bq-margin: 1.2em;
font-style: italic;
position: relative;
Expand Down Expand Up @@ -159,3 +161,4 @@ blockquote {
white-space: pre-wrap;
word-wrap: break-word;
}

1 change: 0 additions & 1 deletion sass/partials/_sidebar.scss
@@ -1,5 +1,4 @@
@import "sidebar/base";
@import "sidebar/twitter";
@import "sidebar/googleplus";
@import "sidebar/pinboard";
@import "sidebar/delicious";
34 changes: 0 additions & 34 deletions sass/partials/sidebar/_twitter.scss

This file was deleted.

2 changes: 1 addition & 1 deletion sass/screen.scss
@@ -1,10 +1,10 @@
@import "compass";
@include global-reset;
@include reset-html5;

@import "custom/colors";
@import "custom/fonts";
@import "custom/layout";
@import "base";
@import "partials";
@import "plugins/**/*";
@import "custom/styles";
2 changes: 1 addition & 1 deletion source/_includes/asides/github.html
Expand Up @@ -8,7 +8,7 @@ <h1>GitHub Repos</h1>
<a href="https://github.com/{{site.github_user}}">@{{site.github_user}}</a> on GitHub
{% endif %}
<script type="text/javascript">
$.domReady(function(){
$(document).ready(function(){
if (!window.jXHR){
var jxhr = document.createElement('script');
jxhr.type = 'text/javascript';
Expand Down
2 changes: 1 addition & 1 deletion source/_includes/asides/recent_posts.html
Expand Up @@ -3,7 +3,7 @@ <h1>Recent Posts</h1>
<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>
Expand Down
5 changes: 5 additions & 0 deletions source/_includes/asides/twitter.html
@@ -1,6 +1,7 @@
{% if site.twitter_user %}
<section>
<h1>Latest Tweets</h1>
<!--
<ul id="tweets">
<li class="loading">Status updating...</li>
</ul>
Expand All @@ -15,5 +16,9 @@ <h1>Latest Tweets</h1>
{% else %}
<p>Follow <a href="http://twitter.com/{{site.twitter_user}}">@{{ site.twitter_user }}</a></p>
{% endif %}
-->
<a class="twitter-timeline" data-dnt="true" href="https://twitter.com/{{ site.twitter_user }}" data-widget-id="{{ site.twitter_widget_id }}">Tweets by @{{ site.twitter_user }}</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

</section>
{% endif %}
2 changes: 1 addition & 1 deletion source/_includes/facebook_like.html
Expand Up @@ -3,7 +3,7 @@
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js = d.createElement(s); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js#appId=212934732101925&xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Expand Down
7 changes: 4 additions & 3 deletions source/_includes/head.html
Expand Up @@ -16,14 +16,15 @@
<meta name="MobileOptimized" content="320">
<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' }}{% endif %}{% endcapture %}
{% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
<link rel="canonical" href="{{ canonical }}">
<link href="{{ root_url }}/favicon.ico" rel="icon">
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml">
<script src="{{ root_url }}/javascripts/modernizr-2.0.js"></script>
<script src="{{ root_url }}/javascripts/ender.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/lib/jquery.min.js"%3E%3C/script%3E'))</script>
<script src="{{ root_url }}/javascripts/octopress.js" type="text/javascript"></script>
<link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml">
{% include custom/head.html %}
{% include google_analytics.html %}
</head>
2 changes: 1 addition & 1 deletion 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>
Expand Down
2 changes: 1 addition & 1 deletion source/_includes/twitter_sharing.html
Expand Up @@ -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>
Expand Down
12 changes: 2 additions & 10 deletions source/javascripts/github.js
Expand Up @@ -13,8 +13,8 @@ var github = (function(){
return {
showRepos: function(options){
$.ajax({
url: "https://api.github.com/users/"+options.user+"/repos?callback=?"
, type: 'jsonp'
url: "https://api.github.com/users/"+options.user+"/repos?sort=pushed&callback=?"
, dataType: 'jsonp'
, error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
, success: function(data) {
var repos = [];
Expand All @@ -23,14 +23,6 @@ var github = (function(){
if (options.skip_forks && data.data[i].fork) { continue; }
repos.push(data.data[i]);
}
repos.sort(function(a, b) {
var aDate = new Date(a.pushed_at).valueOf(),
bDate = new Date(b.pushed_at).valueOf();

if (aDate === bDate) { return 0; }
return aDate > bDate ? -1 : 1;
});

if (options.count) { repos.splice(options.count); }
render(options.target, repos);
}
Expand Down
8 changes: 4 additions & 4 deletions source/javascripts/modernizr-2.0.js

Large diffs are not rendered by default.

44 changes: 19 additions & 25 deletions source/javascripts/octopress.js
@@ -1,14 +1,13 @@
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&hellip;</option>');
$('ul[role=main-navigation]').addClass('main-navigation');
$('ul.main-navigation a').each(function(link) {
mobileNav.children('select').append('<option value="'+link.href+'">&raquo; '+link.text+'</option>');
});
$('ul.subscription a').each(function(link) {
mobileNav.children('select').append('<option value="'+link.href+'">&raquo; '+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&hellip;</option>');
var addOption = function(i, option) {
mobileNav.find('select').append('<option value="' + this.href + '">&raquo; ' + $(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; }
});
}
Expand All @@ -27,7 +26,7 @@ function addSidebarToggler() {
}
var sections = $('aside.sidebar > section');
if (sections.length > 1) {
sections.each(function(section, index){
sections.each(function(index, section){
if ((sections.length >= 3) && index % 3 === 0) {
$(section).addClass("first");
}
Expand All @@ -40,7 +39,7 @@ function addSidebarToggler() {

function testFeatures() {
var features = ['maskImage'];
$(features).map(function(feature) {
$(features).map(function(i, feature) {
if (Modernizr.testAllProps(feature)) {
$('html').addClass(feature);
} else {
Expand Down Expand Up @@ -73,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(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'),
Expand All @@ -93,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) {
Expand All @@ -116,7 +109,7 @@ function renderDeliciousLinks(items) {
$('#delicious').html(output);
}

$.domReady(function() {
$('document').ready(function() {
testFeatures();
wrapFlashVideos();
flashVideoFallback();
Expand Down Expand Up @@ -159,3 +152,4 @@ b=j.userAgent.toLowerCase(),d=j.platform.toLowerCase(),g=d?/win/.test(d):/win/.t
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=
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""}}}();


0 comments on commit f770619

Please sign in to comment.