From 2a55f35211c3e8504a0cfa52d2f68933e8424947 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Wed, 23 May 2012 21:20:03 -0500 Subject: [PATCH 01/24] Updated Gemfile --- Gemfile | 26 ++++++++-------- Gemfile.lock | 85 +++++++++++++++++++++++++++------------------------- 2 files changed, 57 insertions(+), 54 deletions(-) diff --git a/Gemfile b/Gemfile index 6160f94..be2518b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,18 +1,18 @@ source "http://rubygems.org" group :development do - gem 'rake' - gem 'rack' - gem 'jekyll' - gem 'rdiscount' - gem 'pygments.rb' - gem 'RedCloth' - gem 'haml', '>= 3.1' - gem 'compass', '>= 0.11' - gem 'rubypants' - gem 'rb-fsevent' - gem 'stringex' - gem 'liquid', '2.2.2' + gem 'rake', '~> 0.9.2' + gem 'rack', '~> 1.4.1' + gem 'jekyll', '~> 0.11.2' + gem 'rdiscount', '~> 1.6.8' + gem 'pygments.rb', '~> 0.2.12' + gem 'RedCloth', '~> 4.2.9' + gem 'haml', '~> 3.1.6' + gem 'compass', '~> 0.12.1' + gem 'rubypants', '~> 0.2.0' + gem 'rb-fsevent', '~> 0.9' + gem 'stringex', '~> 1.4.0' + gem 'liquid', '~> 2.3.0' end -gem 'sinatra', '1.2.6' +gem 'sinatra', '~> 1.3.2' diff --git a/Gemfile.lock b/Gemfile.lock index c7278fa..1c1bf8d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,66 +1,69 @@ GEM remote: http://rubygems.org/ specs: - RedCloth (4.2.8) + RedCloth (4.2.9) albino (1.3.3) posix-spawn (>= 0.3.6) blankslate (2.1.2.4) - chunky_png (1.2.1) + chunky_png (1.2.5) classifier (1.3.3) fast-stemmer (>= 1.0.0) - compass (0.11.5) + compass (0.12.1) chunky_png (~> 1.2) fssm (>= 0.2.7) sass (~> 3.1) - directory_watcher (1.4.0) - fast-stemmer (1.0.0) - ffi (1.0.9) - fssm (0.2.7) - haml (3.1.2) - jekyll (0.11.0) - albino (>= 1.3.2) - classifier (>= 1.3.1) - directory_watcher (>= 1.1.1) - kramdown (>= 0.13.2) - liquid (>= 1.9.0) - maruku (>= 0.5.9) - kramdown (0.13.3) - liquid (2.2.2) + directory_watcher (1.4.1) + fast-stemmer (1.0.1) + ffi (1.0.11) + fssm (0.2.9) + haml (3.1.6) + jekyll (0.11.2) + albino (~> 1.3) + classifier (~> 1.3) + directory_watcher (~> 1.1) + kramdown (~> 0.13) + liquid (~> 2.3) + maruku (~> 0.5) + kramdown (0.13.6) + liquid (2.3.0) maruku (0.6.0) syntax (>= 1.0.0) posix-spawn (0.3.6) - pygments.rb (0.1.3) - rubypython (>= 0.5.1) - rack (1.3.2) - rake (0.9.2) - rb-fsevent (0.4.3.1) + pygments.rb (0.2.12) + rubypython (~> 0.5.3) + rack (1.4.1) + rack-protection (1.2.0) + rack + rake (0.9.2.2) + rb-fsevent (0.9.1) rdiscount (1.6.8) rubypants (0.2.0) - rubypython (0.5.1) + rubypython (0.5.3) blankslate (>= 2.1.2.3) ffi (~> 1.0.7) sass (3.1.18) - sinatra (1.2.6) - rack (~> 1.1) - tilt (>= 1.2.2, < 2.0) - stringex (1.3.0) + sinatra (1.3.2) + rack (~> 1.3, >= 1.3.6) + rack-protection (~> 1.2) + tilt (~> 1.3, >= 1.3.3) + stringex (1.4.0) syntax (1.0.0) - tilt (1.3.2) + tilt (1.3.3) PLATFORMS ruby DEPENDENCIES - RedCloth - compass (>= 0.11) - haml (>= 3.1) - jekyll - liquid (= 2.2.2) - pygments.rb - rack - rake - rb-fsevent - rdiscount - rubypants - sinatra (= 1.2.6) - stringex + RedCloth (~> 4.2.9) + compass (~> 0.12.1) + haml (~> 3.1.6) + jekyll (~> 0.11.2) + liquid (~> 2.3.0) + pygments.rb (~> 0.2.12) + rack (~> 1.4.1) + rake (~> 0.9.2) + rb-fsevent (~> 0.9) + rdiscount (~> 1.6.8) + rubypants (~> 0.2.0) + sinatra (~> 1.3.2) + stringex (~> 1.4.0) From e53b26ad3042d5657c869ab1961c35e7b716e4e9 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Thu, 24 May 2012 10:28:32 -0500 Subject: [PATCH 02/24] updated plugins to work with latest version of Liquid --- plugins/blockquote.rb | 4 ++-- plugins/code_block.rb | 2 +- plugins/pullquote.rb | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/blockquote.rb b/plugins/blockquote.rb index 7fb8c26..62e7d14 100644 --- a/plugins/blockquote.rb +++ b/plugins/blockquote.rb @@ -46,7 +46,7 @@ module Jekyll end def render(context) - quote = paragraphize(super.map(&:strip).join) + quote = paragraphize(super) author = "#{@by.strip}" if @by if @source url = @source.match(/https?:\/\/(.+)/)[1].split('/') @@ -75,7 +75,7 @@ module Jekyll end def paragraphize(input) - "

#{input.gsub(/\n\n/, '

').gsub(/\n/, '
')}

" + "

#{input.lstrip.rstrip.gsub(/\n\n/, '

').gsub(/\n/, '
')}

" end end end diff --git a/plugins/code_block.rb b/plugins/code_block.rb index e175d44..44e3494 100644 --- a/plugins/code_block.rb +++ b/plugins/code_block.rb @@ -79,7 +79,7 @@ module Jekyll def render(context) output = super - code = super.join + code = super source = "
" source += @caption if @caption if @filetype diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb index 2b59bad..3c65e66 100644 --- a/plugins/pullquote.rb +++ b/plugins/pullquote.rb @@ -32,11 +32,9 @@ module Jekyll def render(context) output = super - if output.join =~ /\{"\s*(.+)\s*"\}/ - #@quote = $1 + if output =~ /\{"\s*(.+?)\s*"\}/m @quote = RubyPants.new($1).to_html - #@quote = CGI.escape($1) - "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" + "#{output.gsub(/\{"\s*|\s*"\}/, '')}" else return "Surround your pullquote like this {\" text to be quoted \"}" end From f3c68bb73f4763c52dbdfc9d958707e3816d0475 Mon Sep 17 00:00:00 2001 From: OGINO Masanori Date: Mon, 28 May 2012 17:21:26 +0900 Subject: [PATCH 03/24] Do not strip trailing slash of canonical URLs. Usually, links for posts are generated with a trailing slash, but canonical URLs aren't. Some services (e.g. http://b.hatena.ne.jp/) are confused with that behavior. We can fix it by removing canonical URLs, but then anyone may read a post with /index.html URL and post the URL to some tool or service. Therefore rel="canonical" seems useful IMHO. Signed-off-by: OGINO Masanori --- .themes/classic/source/_includes/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html index 0fdc401..d7abd6f 100644 --- a/.themes/classic/source/_includes/head.html +++ b/.themes/classic/source/_includes/head.html @@ -16,7 +16,7 @@ - {% 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 %} From d0257bd9306462f35b74658f338d10b5858dda35 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 3 Jun 2012 17:21:58 -0500 Subject: [PATCH 04/24] Removing .sass-cache in update_style task to ensure that Sass caches don't cause problems when users update. Related to issue #555 --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index 2130a7f..d519cb3 100644 --- a/Rakefile +++ b/Rakefile @@ -216,6 +216,7 @@ task :update_style, :theme do |t, args| cp_r "#{themes_dir}/"+theme+"/sass/", "sass" cp_r "sass.old/custom/.", "sass/custom" puts "## Updated Sass ##" + rm_r ".sass-cache", :secure=>true if File.directory?(".sass-cache") end desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation" From f180feb4024eebd54a6845af2097d3429f501a7c Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Mon, 4 Jun 2012 23:13:56 -0500 Subject: [PATCH 05/24] Added video and css masks to modernizer tests. Updated styles to work with new image mask classname --- .themes/classic/sass/partials/_navigation.scss | 2 +- .themes/classic/source/javascripts/modernizr-2.0.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.themes/classic/sass/partials/_navigation.scss b/.themes/classic/sass/partials/_navigation.scss index 30fa011..781d2f7 100644 --- a/.themes/classic/sass/partials/_navigation.scss +++ b/.themes/classic/sass/partials/_navigation.scss @@ -117,7 +117,7 @@ body > nav { } &:hover:after { background-color: lighten($nav-color, 20); } } -.maskImage { +.cssmask { body > nav { @media only screen and (min-width: 550px) { ul[data-subscription$=email] + form { diff --git a/.themes/classic/source/javascripts/modernizr-2.0.js b/.themes/classic/source/javascripts/modernizr-2.0.js index 2e3a65d..f610af7 100644 --- a/.themes/classic/source/javascripts/modernizr-2.0.js +++ b/.themes/classic/source/javascripts/modernizr-2.0.js @@ -1,4 +1,4 @@ /* Modernizr 2.5.3 (Custom Build) | MIT & BSD - * Build: http://www.modernizr.com/download/#-shiv-cssclasses-addtest-forms_placeholder-load + * Build: http://www.modernizr.com/download/#-video-shiv-cssclasses-addtest-testprop-testallprops-domprefixes-css_mask-forms_placeholder-load */ -;window.Modernizr=function(a,b,c){function u(a){j.cssText=a}function v(a,b){return u(prefixes.join(a+";")+(b||""))}function w(a,b){return typeof a===b}function x(a,b){return!!~(""+a).indexOf(b)}function y(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:w(f,"function")?f.bind(d||b):f}return!1}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m={},n={},o={},p=[],q=p.slice,r,s={}.hasOwnProperty,t;!w(s,"undefined")&&!w(s.call,"undefined")?t=function(a,b){return s.call(a,b)}:t=function(a,b){return b in a&&w(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(q.call(arguments)))};return e});for(var z in m)t(m,z)&&(r=z.toLowerCase(),e[r]=m[z](),p.push((e[r]?"":"no-")+r));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)t(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},u(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+p.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return B([a])},e.testAllProps=D,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+s.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f Date: Tue, 5 Jun 2012 00:07:23 -0500 Subject: [PATCH 06/24] Added support for using text based social sharing links instead of javascript widgets which may track users and do trigger crazy high http requests. Also added a custom sharing template file for injecting any other sharing widget into the sharing section after a post --- .themes/classic/sass/base/_theme.scss | 3 +- .themes/classic/sass/partials/_blog.scss | 2 +- .themes/classic/sass/partials/_sharing.scss | 47 ++++++++++++++++++ .../classic/sass/partials/sidebar/_base.scss | 4 +- .../source/_includes/after_footer.html | 2 + .../source/_includes/custom/sharing.html | 3 ++ .../source/_includes/facebook_like.html | 2 +- .../source/_includes/post/sharing.html | 19 +++++-- .themes/classic/source/images/facebook.png | Bin 0 -> 209 bytes .themes/classic/source/images/googleplus.png | Bin 0 -> 365 bytes .themes/classic/source/images/twitter.png | Bin 0 -> 302 bytes _config.yml | 7 ++- 12 files changed, 79 insertions(+), 10 deletions(-) create mode 100644 .themes/classic/source/_includes/custom/sharing.html create mode 100644 .themes/classic/source/images/facebook.png create mode 100644 .themes/classic/source/images/googleplus.png create mode 100644 .themes/classic/source/images/twitter.png diff --git a/.themes/classic/sass/base/_theme.scss b/.themes/classic/sass/base/_theme.scss index 7f3fa5c..076080f 100644 --- a/.themes/classic/sass/base/_theme.scss +++ b/.themes/classic/sass/base/_theme.scss @@ -62,9 +62,10 @@ $page-border-bottom: darken($footer-bg, 5) !default; /* Core theme application */ a { + color: $link-color; @include link-colors($link-color, $hover: $link-color-hover, $focus: $link-color-hover, $visited: $link-color-visited, $active: $link-color-active); } -aside.sidebar a { +.sidebar a { @include link-colors($sidebar-link-color, $hover: $sidebar-link-color-hover, $focus: $sidebar-link-color-hover, $active: $sidebar-link-color-active); } a { diff --git a/.themes/classic/sass/partials/_blog.scss b/.themes/classic/sass/partials/_blog.scss index 1d0db04..189f1e9 100644 --- a/.themes/classic/sass/partials/_blog.scss +++ b/.themes/classic/sass/partials/_blog.scss @@ -19,7 +19,7 @@ article { } .blog-index & { background: none; padding-bottom: 0; } p { - font-size: .9em; + font-size: .8em; margin: 0; color: $text-color-light; &.meta { @extend .sans; position: absolute; top: 0; } diff --git a/.themes/classic/sass/partials/_sharing.scss b/.themes/classic/sass/partials/_sharing.scss index 3eecb48..e6a220a 100644 --- a/.themes/classic/sass/partials/_sharing.scss +++ b/.themes/classic/sass/partials/_sharing.scss @@ -1,3 +1,37 @@ +@mixin social-button-bg($img, $color: #444) { + color: $color; + &:visited, &:hover, &:visited:hover { color: $color; } + position: relative; + padding-left: image-width($img) + 6px; + &:before { + content: ""; + background: image-url($img) no-repeat center center; + width: image-width($img); + height: image-height($img); + display: inline-block; + position: absolute; left: 3px; + top: 3px; + } +} + +.simple-social-button { + display: inline-block; + border: 1px solid #ccc; + background-color: #e5e5e5; + @include background-image(linear-gradient(#fff, #ddd)); + &:hover { + @include background-image(linear-gradient(#f5f5f5, #ccc)); + border-color: #b5b5b5; + background-color: #ddd; + } + padding: .2em .5em .1em; line-height: 1.45em; + font-size: 13px; + font-weight: bold; + text-decoration: none; + text-shadow: #fff 0 1px; + @include border-radius(.3em); +} + .sharing { p.meta + & { padding: { top: 1em; left: 0; } @@ -6,3 +40,16 @@ } #fb-root { display: none; } + +.googleplus-share { + @extend .simple-social-button; + @include social-button-bg('googleplus.png', #db583b); +} +.facebook-share { + @extend .simple-social-button; + @include social-button-bg('facebook.png', #4e5a9b); +} +.twitter-share, .sidebar a.twitter-follow-button { + @extend .simple-social-button; + @include social-button-bg('twitter.png'); +} diff --git a/.themes/classic/sass/partials/sidebar/_base.scss b/.themes/classic/sass/partials/sidebar/_base.scss index 5441304..83d70cc 100644 --- a/.themes/classic/sass/partials/sidebar/_base.scss +++ b/.themes/classic/sass/partials/sidebar/_base.scss @@ -1,7 +1,7 @@ .side-shadow-border { @include box-shadow(lighten($sidebar-bg, 5) 0 1px); } -aside.sidebar { +.sidebar { overflow: hidden; color: $sidebar-color; text-shadow: lighten($sidebar-bg, 8) 0 1px; @@ -44,7 +44,7 @@ aside.sidebar { color: inherit; @include transition(color .5s); } - &:hover a { + &:hover p a, &:hover li a { color: $sidebar-link-color; &:hover { color: $sidebar-link-color-hover; } } diff --git a/.themes/classic/source/_includes/after_footer.html b/.themes/classic/source/_includes/after_footer.html index 08b8e34..2aee47f 100644 --- a/.themes/classic/source/_includes/after_footer.html +++ b/.themes/classic/source/_includes/after_footer.html @@ -1,5 +1,7 @@ {% include disqus.html %} +{% unless site.do_not_track %} {% include facebook_like.html %} {% include google_plus_one.html %} {% include twitter_sharing.html %} +{% endunless %} {% include custom/after_footer.html %} diff --git a/.themes/classic/source/_includes/custom/sharing.html b/.themes/classic/source/_includes/custom/sharing.html new file mode 100644 index 0000000..c209d7e --- /dev/null +++ b/.themes/classic/source/_includes/custom/sharing.html @@ -0,0 +1,3 @@ +{% comment %} +You can add sharing buttons here. Just so you know, some services may use these buttons to track visitors to your site, and also these can trigger lots of http requests slowing your site down for low bandwidth and mobile users. +{% endcomment %} diff --git a/.themes/classic/source/_includes/facebook_like.html b/.themes/classic/source/_includes/facebook_like.html index 74f9130..83734c5 100644 --- a/.themes/classic/source/_includes/facebook_like.html +++ b/.themes/classic/source/_includes/facebook_like.html @@ -1,6 +1,6 @@ {% if site.facebook_like %}
- +{% endif %} +{% if site.twitter_user %} + +{% endif %} diff --git a/.themes/classic/source/_includes/asides/github.html b/.themes/classic/source/_includes/asides/github.html index e470007..349ffbe 100644 --- a/.themes/classic/source/_includes/asides/github.html +++ b/.themes/classic/source/_includes/asides/github.html @@ -1,30 +1,11 @@ {% if site.github_user %}
-

GitHub Repos

-
    +

    On GitHub

    +
    • Status updating...
    {% if site.github_show_profile_link %} - @{{site.github_user}} on GitHub + Follow @{{site.github_user}} {% endif %} - -
{% endif %} diff --git a/.themes/classic/source/_includes/asides/twitter.html b/.themes/classic/source/_includes/asides/twitter.html index 32a894f..3954a8b 100644 --- a/.themes/classic/source/_includes/asides/twitter.html +++ b/.themes/classic/source/_includes/asides/twitter.html @@ -1,19 +1,9 @@ {% if site.twitter_user %}

Latest Tweets

-
    +
    • Status updating...
    - - {% if site.twitter_follow_button %} {% else %} diff --git a/.themes/classic/source/images/icon-s02358152fa.png b/.themes/classic/source/images/icon-s02358152fa.png deleted file mode 100644 index 6e40dd926f5c482492ac14087aa2211afa0cadcf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 568 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!3-qz8@W<}R7HSKh%1oRnst?U-V3(|Ng&%LqfxTAPp8yK!``B&ws+e!07Jj z;uunKYwM&y|7HV`R{uf zSA;UwEHjyHygQmbAnBNj)4fWaj~#(^Aql5CRZXy}5j=n9*Hrxxp!_xoNs(im14|0XG>I=I;Ca22bTHuH@rw>6u47u&7ZongQ> zFzKH)jx*qFJZ+GK_>gF{$@&?*CC=Je?OrE?-zumcwSlr3$89=(}-wJ9vZDfr47 zZ(*FC#*RVHJ!I{S2poVq1IPx#07*qoM6N<$g5G'+repos[i].name+'

    '+repos[i].description+'

    '; + for(i = 0; i < data.length; i++) { + repos += '
  • '+data[i].name+'

    '+data[i].description+'

  • '; } - t.innerHTML = fragment; + target.html(repos); } return { showRepos: function(options){ $.ajax({ url: "https://api.github.com/users/"+options.user+"/repos?callback=?" , dataType: 'jsonp' - , error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); } + , error: function (err) { options.target.find('.loading').addClass('error').text("Error loading feed"); } , success: function(data) { var repos = []; if (!data.data) { return; } @@ -35,3 +35,14 @@ var github = (function(){ } }; })(); + +$(document).ready(function(){ + g = $('#gh_repos'); + + github.showRepos({ + user: g.attr('data-user') + , count: parseInt(g.attr('data-count')) + , skip_forks: g.attr('data-skip') == 'true' + , target: g + }); +}); diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js index b729b12..4f85e20 100644 --- a/.themes/classic/source/javascripts/twitter.js +++ b/.themes/classic/source/javascripts/twitter.js @@ -72,7 +72,8 @@ var twitter = (function(){ return { getFeed: function(options){ - count = parseInt(options.count, 10); + count = options.count; + console.log(options); $.ajax({ url: "http://api.twitter.com/1/statuses/user_timeline/" + options.user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (options.replies ? "0" : "1") + "&callback=?" , dataType: 'jsonp' @@ -82,3 +83,12 @@ var twitter = (function(){ } } })(); + +$(document).ready(function(){ + t = $('#tweets'); + twitter.getFeed({ + user: t.attr('data-user') + , count: parseInt(t.attr('data-count'), 10) + , replies: t.attr('data-replies') == 'true' + }); +}); From 22e6de10c3eda79819d3a60d2c447b5657e8e007 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Wed, 6 Jun 2012 01:04:17 -0500 Subject: [PATCH 13/24] Added more customization points in layout for pages, posts, comments, and meta data. --- .themes/classic/source/_includes/comments.html | 7 +++++++ .../source/_includes/custom/after_page.html | 1 + .../source/_includes/custom/after_post.html | 0 .../classic/source/_includes/custom/comments.html | 3 +++ .../classic/source/_includes/custom/page_meta.html | 1 + .../classic/source/_includes/custom/post_meta.html | 1 + .themes/classic/source/_includes/post/meta.html | 5 +++++ .themes/classic/source/_layouts/page.html | 14 +++----------- .themes/classic/source/_layouts/post.html | 13 +++---------- 9 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 .themes/classic/source/_includes/comments.html create mode 100644 .themes/classic/source/_includes/custom/after_page.html create mode 100644 .themes/classic/source/_includes/custom/after_post.html create mode 100644 .themes/classic/source/_includes/custom/comments.html create mode 100644 .themes/classic/source/_includes/custom/page_meta.html create mode 100644 .themes/classic/source/_includes/custom/post_meta.html create mode 100644 .themes/classic/source/_includes/post/meta.html diff --git a/.themes/classic/source/_includes/comments.html b/.themes/classic/source/_includes/comments.html new file mode 100644 index 0000000..c910032 --- /dev/null +++ b/.themes/classic/source/_includes/comments.html @@ -0,0 +1,7 @@ +
    +

    Comments

    + {% include custom/comments.html %} + {% if site.disqus_short_name %} +
    {% include post/disqus_thread.html %}
    + {% endif %} +
    diff --git a/.themes/classic/source/_includes/custom/after_page.html b/.themes/classic/source/_includes/custom/after_page.html new file mode 100644 index 0000000..c537f59 --- /dev/null +++ b/.themes/classic/source/_includes/custom/after_page.html @@ -0,0 +1 @@ +{% comment %} Add content at the bottom of every page {% endcomment %} diff --git a/.themes/classic/source/_includes/custom/after_post.html b/.themes/classic/source/_includes/custom/after_post.html new file mode 100644 index 0000000..e69de29 diff --git a/.themes/classic/source/_includes/custom/comments.html b/.themes/classic/source/_includes/custom/comments.html new file mode 100644 index 0000000..c5202f3 --- /dev/null +++ b/.themes/classic/source/_includes/custom/comments.html @@ -0,0 +1,3 @@ +{% comment %} +To use a custom comment system, add the javascript to custom/after_footer.html then add the container for your comments here. +{% endcomment %} diff --git a/.themes/classic/source/_includes/custom/page_meta.html b/.themes/classic/source/_includes/custom/page_meta.html new file mode 100644 index 0000000..a93e18e --- /dev/null +++ b/.themes/classic/source/_includes/custom/page_meta.html @@ -0,0 +1 @@ +{% comment %} Add content to the meta section after any page. {% endcomment %} diff --git a/.themes/classic/source/_includes/custom/post_meta.html b/.themes/classic/source/_includes/custom/post_meta.html new file mode 100644 index 0000000..9c8c85c --- /dev/null +++ b/.themes/classic/source/_includes/custom/post_meta.html @@ -0,0 +1 @@ +{% comment %} Add content to the meta section after any post. {% endcomment %} diff --git a/.themes/classic/source/_includes/post/meta.html b/.themes/classic/source/_includes/post/meta.html new file mode 100644 index 0000000..37e9cdf --- /dev/null +++ b/.themes/classic/source/_includes/post/meta.html @@ -0,0 +1,5 @@ +

    +{% include post/author.html %} +{% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %} +{% if page.categories %}{% include post/categories.html %}{% endif %} +

    diff --git a/.themes/classic/source/_layouts/page.html b/.themes/classic/source/_layouts/page.html index 8ba6ec9..2837a98 100644 --- a/.themes/classic/source/_layouts/page.html +++ b/.themes/classic/source/_layouts/page.html @@ -13,23 +13,15 @@ layout: default {{ content }} {% unless page.footer == false %}
    - {% if page.date or page.author %}

    - {% if page.author %}{% include post/author.html %}{% endif %} - {% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %} - {% if page.categories %}{% include post/categories.html %}{% endif %} -

    {% endif %} +

    {% include post/meta.html %}{% include custom/page-meta.html %}

    {% unless page.sharing == false %} {% include post/sharing.html %} {% endunless %}
    {% endunless %} -{% if site.disqus_short_name and page.comments == true %} -
    -

    Comments

    -
    {% include post/disqus_thread.html %}
    -
    -{% endif %} +{% include custom/after_page.html %} +{% if page.comments == true %}{% include comments.html %}{% endif %} {% unless page.sidebar == false %}