├── .rvmrc ├── .gitattributes ├── .rbenv-version ├── .slugignore ├── .themes └── classic │ ├── source │ ├── _includes │ │ ├── footer.html │ │ ├── header.html │ │ ├── custom │ │ │ ├── asides │ │ │ │ └── about.html │ │ │ ├── after_footer.html │ │ │ ├── navigation.html │ │ │ ├── header.html │ │ │ ├── footer.html │ │ │ ├── head.html │ │ │ └── category_feed.xml │ │ ├── post │ │ │ ├── disqus_thread.html │ │ │ ├── author.html │ │ │ ├── categories.html │ │ │ ├── sharing.html │ │ │ └── date.html │ │ ├── after_footer.html │ │ ├── asides │ │ │ ├── recent_posts.html │ │ │ ├── googleplus.html │ │ │ ├── delicious.html │ │ │ ├── pinboard.html │ │ │ └── github.html │ │ ├── google_plus_one.html │ │ ├── facebook_like.html │ │ ├── archive_post.html │ │ ├── twitter_sharing.html │ │ ├── google_analytics.html │ │ ├── navigation.html │ │ ├── disqus.html │ │ ├── article.html │ │ └── head.html │ ├── favicon.png │ ├── images │ │ ├── rss.png │ │ ├── email.png │ │ ├── noise.png │ │ ├── search.png │ │ ├── code_bg.png │ │ ├── line-tile.png │ │ ├── bird_32_gray.png │ │ ├── dotted-border.png │ │ └── bird_32_gray_fail.png │ ├── robots.txt │ ├── assets │ │ └── jwplayer │ │ │ ├── player.swf │ │ │ └── glow │ │ │ ├── dock │ │ │ └── button.png │ │ │ ├── playlist │ │ │ ├── item.png │ │ │ ├── itemOver.png │ │ │ ├── sliderRail.png │ │ │ ├── sliderCapTop.png │ │ │ ├── sliderThumb.png │ │ │ └── sliderCapBottom.png │ │ │ ├── display │ │ │ ├── muteIcon.png │ │ │ ├── playIcon.png │ │ │ ├── background.png │ │ │ └── bufferIcon.png │ │ │ ├── sharing │ │ │ ├── embedIcon.png │ │ │ ├── shareIcon.png │ │ │ ├── embedScreen.png │ │ │ └── shareScreen.png │ │ │ ├── controlbar │ │ │ ├── divider.png │ │ │ ├── background.png │ │ │ ├── blankButton.png │ │ │ ├── muteButton.png │ │ │ ├── pauseButton.png │ │ │ ├── playButton.png │ │ │ ├── unmuteButton.png │ │ │ ├── fullscreenButton.png │ │ │ ├── muteButtonOver.png │ │ │ ├── pauseButtonOver.png │ │ │ ├── playButtonOver.png │ │ │ ├── timeSliderBuffer.png │ │ │ ├── timeSliderRail.png │ │ │ ├── unmuteButtonOver.png │ │ │ ├── normalscreenButton.png │ │ │ ├── timeSliderCapLeft.png │ │ │ ├── timeSliderCapRight.png │ │ │ ├── timeSliderProgress.png │ │ │ ├── fullscreenButtonOver.png │ │ │ └── normalscreenButtonOver.png │ │ │ └── glow.xml │ ├── blog │ │ └── archives │ │ │ └── index.html │ ├── _layouts │ │ ├── category_index.html │ │ ├── default.html │ │ ├── page.html │ │ └── post.html │ ├── index.html │ ├── atom.xml │ └── javascripts │ │ ├── github.js │ │ ├── pinboard.js │ │ ├── libs │ │ ├── jXHR.js │ │ └── swfobject-dynamic.js │ │ ├── twitter.js │ │ ├── modernizr-2.0.js │ │ └── octopress.js │ ├── sass │ ├── partials │ │ ├── _sidebar.scss │ │ ├── sidebar │ │ │ ├── _delicious.scss │ │ │ ├── _pinboard.scss │ │ │ ├── _googleplus.scss │ │ │ └── _base.scss │ │ ├── _sharing.scss │ │ ├── _header.scss │ │ ├── _footer.scss │ │ ├── _archive.scss │ │ ├── _blog.scss │ │ ├── _navigation.scss │ │ └── _syntax.scss │ ├── _base.scss │ ├── custom │ │ ├── _styles.scss │ │ ├── _fonts.scss │ │ ├── _layout.scss │ │ └── _colors.scss │ ├── _partials.scss │ ├── plugins │ │ └── _plugins.scss │ ├── screen.scss │ └── base │ │ ├── _utilities.scss │ │ ├── _solarized.scss │ │ ├── _theme.scss │ │ ├── _typography.scss │ │ └── _layout.scss │ └── .editorconfig ├── .travis.yml ├── .powrc ├── .gitignore ├── config.rb ├── .editorconfig ├── Gemfile ├── plugins ├── haml.rb ├── titlecase.rb ├── raw.rb ├── config_tag.rb ├── backtick_code_block.rb ├── jsfiddle.rb ├── pygments_code.rb ├── preview_unpublished.rb ├── video_tag.rb ├── include_array.rb ├── pullquote.rb ├── image_tag.rb ├── render_partial.rb ├── include_code.rb ├── blockquote.rb ├── code_block.rb ├── date.rb ├── gist_tag.rb ├── octopress_filters.rb ├── pagination.rb ├── post_filters.rb ├── category_generator.rb └── sitemap_generator.rb ├── config.ru ├── CHANGELOG.markdown ├── Gemfile.lock ├── README.markdown └── _config.yml /.rvmrc: -------------------------------------------------------------------------------- 1 | rvm use 1.9.3 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.rbenv-version: -------------------------------------------------------------------------------- 1 | 1.9.3-p194 2 | -------------------------------------------------------------------------------- /.slugignore: -------------------------------------------------------------------------------- 1 | plugins 2 | sass 3 | source 4 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/footer.html: -------------------------------------------------------------------------------- 1 | {% include custom/footer.html %} 2 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/header.html: -------------------------------------------------------------------------------- 1 | {% include custom/header.html %} 2 | -------------------------------------------------------------------------------- /.themes/classic/source/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/favicon.png -------------------------------------------------------------------------------- /.themes/classic/source/images/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/images/rss.png -------------------------------------------------------------------------------- /.themes/classic/source/images/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/images/email.png -------------------------------------------------------------------------------- /.themes/classic/source/images/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/images/noise.png -------------------------------------------------------------------------------- /.themes/classic/source/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/images/search.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | rvm: 3 | - 1.9.3 4 | - 1.9.2 5 | script: bundle exec rake install; bundle exec rake generate 6 | -------------------------------------------------------------------------------- /.powrc: -------------------------------------------------------------------------------- 1 | if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".rvmrc" ] ; then 2 | source "$rvm_path/scripts/rvm" 3 | source ".rvmrc" 4 | fi 5 | -------------------------------------------------------------------------------- /.themes/classic/source/images/code_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/images/code_bg.png -------------------------------------------------------------------------------- /.themes/classic/source/images/line-tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/images/line-tile.png -------------------------------------------------------------------------------- /.themes/classic/source/robots.txt: -------------------------------------------------------------------------------- 1 | --- 2 | layout: nil 3 | --- 4 | User-agent: * 5 | Disallow: 6 | 7 | Sitemap: {{ site.url }}/sitemap.xml -------------------------------------------------------------------------------- /.themes/classic/source/images/bird_32_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/images/bird_32_gray.png -------------------------------------------------------------------------------- /.themes/classic/source/images/dotted-border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/images/dotted-border.png -------------------------------------------------------------------------------- /.themes/classic/source/_includes/custom/asides/about.html: -------------------------------------------------------------------------------- 1 |
2 |

About Me

3 |

A little something about me.

4 |
5 | -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/player.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/player.swf -------------------------------------------------------------------------------- /.themes/classic/source/images/bird_32_gray_fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/images/bird_32_gray_fail.png -------------------------------------------------------------------------------- /.themes/classic/sass/partials/_sidebar.scss: -------------------------------------------------------------------------------- 1 | @import "sidebar/base"; 2 | @import "sidebar/googleplus"; 3 | @import "sidebar/pinboard"; 4 | @import "sidebar/delicious"; 5 | -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/dock/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/dock/button.png -------------------------------------------------------------------------------- /.themes/classic/sass/_base.scss: -------------------------------------------------------------------------------- 1 | @import "base/utilities"; 2 | @import "base/solarized"; 3 | @import "base/theme"; 4 | @import "base/typography"; 5 | @import "base/layout"; 6 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/sidebar/_delicious.scss: -------------------------------------------------------------------------------- 1 | .delicious-posts { 2 | a.delicious-link { margin-bottom: .5em; display: block; } 3 | p { font-size: 1em; } 4 | } 5 | -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/playlist/item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/playlist/item.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/display/muteIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/display/muteIcon.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/display/playIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/display/playIcon.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/playlist/itemOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/playlist/itemOver.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/sharing/embedIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/sharing/embedIcon.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/sharing/shareIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/sharing/shareIcon.png -------------------------------------------------------------------------------- /.themes/classic/sass/custom/_styles.scss: -------------------------------------------------------------------------------- 1 | // This File is imported last, and will override other styles in the cascade 2 | // Add styles here to make changes without digging in too much 3 | -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/divider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/divider.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/display/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/display/background.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/display/bufferIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/display/bufferIcon.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/playlist/sliderRail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/playlist/sliderRail.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/sharing/embedScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/sharing/embedScreen.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/sharing/shareScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/sharing/shareScreen.png -------------------------------------------------------------------------------- /.themes/classic/source/_includes/post/disqus_thread.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/background.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/blankButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/blankButton.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/muteButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButton.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButton.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/playButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/playButton.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapTop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapTop.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/playlist/sliderThumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/playlist/sliderThumb.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButton.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapBottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapBottom.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButton.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/muteButtonOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButtonOver.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/playButtonOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/playButtonOver.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderRail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderRail.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButton.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png -------------------------------------------------------------------------------- /.themes/classic/source/_includes/custom/after_footer.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Add content to be output at the bottom of each page. (You might use this for analytics scripts, for example) 3 | {% endcomment %} 4 | -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png -------------------------------------------------------------------------------- /.themes/classic/source/_includes/custom/navigation.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steam/octopress/master/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png -------------------------------------------------------------------------------- /.themes/classic/sass/partials/_sharing.scss: -------------------------------------------------------------------------------- 1 | .sharing { 2 | p.meta + & { 3 | padding: { top: 1em; left: 0; } 4 | background: $img-border top left repeat-x; 5 | } 6 | } 7 | 8 | #fb-root { display: none; } 9 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/custom/header.html: -------------------------------------------------------------------------------- 1 |
2 |

{{ site.title }}

3 | {% if site.subtitle %} 4 |

{{ site.subtitle }}

5 | {% endif %} 6 |
7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .bundle 2 | .DS_Store 3 | .sass-cache 4 | .gist-cache 5 | .pygments-cache 6 | _deploy 7 | public 8 | sass.old 9 | source.old 10 | source/_stash 11 | source/stylesheets/screen.css 12 | vendor 13 | node_modules 14 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/custom/footer.html: -------------------------------------------------------------------------------- 1 |

2 | Copyright © {{ site.time | date: "%Y" }} - {{ site.author }} - 3 | Powered by Octopress 4 |

5 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/after_footer.html: -------------------------------------------------------------------------------- 1 | {% include disqus.html %} 2 | {% include facebook_like.html %} 3 | {% include google_plus_one.html %} 4 | {% include twitter_sharing.html %} 5 | {% include custom/after_footer.html %} 6 | -------------------------------------------------------------------------------- /.themes/classic/sass/_partials.scss: -------------------------------------------------------------------------------- 1 | @import "partials/header"; 2 | @import "partials/navigation"; 3 | @import "partials/blog"; 4 | @import "partials/sharing"; 5 | @import "partials/syntax"; 6 | @import "partials/archive"; 7 | @import "partials/sidebar"; 8 | @import "partials/footer"; 9 | -------------------------------------------------------------------------------- /.themes/classic/sass/plugins/_plugins.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Add plugin stylesheets to this directory and they will be automatically 3 | Imported. Load order is alphabetical and styles can be overriden in 4 | custom/_style.scss which is loaded after all plugin stylesheets. 5 | */ 6 | 7 | -------------------------------------------------------------------------------- /.themes/classic/sass/screen.scss: -------------------------------------------------------------------------------- 1 | @import "compass"; 2 | @include global-reset; 3 | @include reset-html5; 4 | 5 | @import "custom/colors"; 6 | @import "custom/fonts"; 7 | @import "custom/layout"; 8 | @import "base"; 9 | @import "partials"; 10 | @import "plugins/**/*"; 11 | @import "custom/styles"; 12 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/sidebar/_pinboard.scss: -------------------------------------------------------------------------------- 1 | #pinboard_linkroll { 2 | .pin-title, .pin-description { 3 | display: block; 4 | margin-bottom: .5em; 5 | } 6 | .pin-tag { 7 | @include hover-link; 8 | @extend .aside-alt-link; 9 | &:after { content: ','; } 10 | &:last-child:after { content: ''; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/post/author.html: -------------------------------------------------------------------------------- 1 | {% if post.author %} 2 | {% assign author = post.author %} 3 | {% elsif page.author %} 4 | {% assign author = page.author %} 5 | {% else %} 6 | {% assign author = site.author %} 7 | {% endif %} 8 | {% if author %}Posted by {{ author }}{% endif %} 9 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/custom/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/asides/recent_posts.html: -------------------------------------------------------------------------------- 1 |
2 |

Recent Posts

3 | 10 |
11 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/_header.scss: -------------------------------------------------------------------------------- 1 | body > header { 2 | background: $header-bg; 3 | h1 { 4 | display: inline-block; 5 | margin: 0; 6 | a, a:visited, a:hover { 7 | color: $title_color; 8 | text-decoration: none; 9 | } 10 | } 11 | h2 { 12 | margin: .2em 0 0; 13 | @extend .sans; 14 | font-size: 1em; 15 | color: $subtitle-color; 16 | font-weight: normal; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/asides/googleplus.html: -------------------------------------------------------------------------------- 1 | {% if site.googleplus_user %} 2 |
3 |

4 | 5 | 6 | Google+ 7 | 8 |

9 |
10 | {% endif %} 11 | 12 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/google_plus_one.html: -------------------------------------------------------------------------------- 1 | {% if site.google_plus_one %} 2 | 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/post/categories.html: -------------------------------------------------------------------------------- 1 | {% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %} 2 | {% unless category == '0' %} 3 | 4 | {% if post %} 5 | {{ post.categories | category_links }} 6 | {% else %} 7 | {{ page.categories | category_links }} 8 | {% endif %} 9 | 10 | {% endunless %} 11 | -------------------------------------------------------------------------------- /config.rb: -------------------------------------------------------------------------------- 1 | require 'sass-globbing' 2 | 3 | # Require any additional compass plugins here. 4 | project_type = :stand_alone 5 | 6 | # Publishing paths 7 | http_path = "/" 8 | http_images_path = "/images" 9 | http_fonts_path = "/fonts" 10 | css_dir = "public/stylesheets" 11 | 12 | # Local development paths 13 | sass_dir = "sass" 14 | images_dir = "source/images" 15 | fonts_dir = "source/fonts" 16 | 17 | line_comments = false 18 | output_style = :compressed 19 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/asides/delicious.html: -------------------------------------------------------------------------------- 1 | {% if site.delicious_user %} 2 |
3 |

On Delicious

4 |
5 | 6 |

My Delicious Bookmarks »

7 |
8 | {% endif %} -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | ; This file is for unifying the coding style for different editors and IDEs. 2 | ; More information at http://EditorConfig.org 3 | 4 | root = true 5 | 6 | ; Use 2 spaces for indentation in all Ruby files 7 | 8 | [*.rb] 9 | indent_style = space 10 | indent_size = 2 11 | 12 | [Rakefile] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [Gemfile*] 17 | indent_style = space 18 | indent_size = 2 19 | 20 | [config.ru] 21 | indent_style = space 22 | indent_size = 2 23 | -------------------------------------------------------------------------------- /.themes/classic/source/blog/archives/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Blog Archive 4 | footer: false 5 | --- 6 | 7 |
8 | {% for post in site.posts reverse %} 9 | {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} 10 | {% unless year == this_year %} 11 | {% assign year = this_year %} 12 |

{{ year }}

13 | {% endunless %} 14 |
15 | {% include archive_post.html %} 16 |
17 | {% endfor %} 18 |
19 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/facebook_like.html: -------------------------------------------------------------------------------- 1 | {% if site.facebook_like %} 2 |
3 | 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /.themes/classic/source/_layouts/category_index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | footer: false 4 | --- 5 | 6 |
7 | {% for post in site.categories[page.category] %} 8 | {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} 9 | {% unless year == this_year %} 10 | {% assign year = this_year %} 11 |

{{ year }}

12 | {% endunless %} 13 |
14 | {% include archive_post.html %} 15 |
16 | {% endfor %} 17 |
18 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "http://rubygems.org" 2 | 3 | group :development do 4 | gem 'rake', '~> 0.9' 5 | gem 'jekyll', '~> 0.12' 6 | gem 'rdiscount', '~> 2.0.7' 7 | gem 'pygments.rb', '~> 0.3.4' 8 | gem 'RedCloth', '~> 4.2.9' 9 | gem 'haml', '~> 3.1.7' 10 | gem 'compass', '~> 0.12.2' 11 | gem 'sass-globbing', '~> 1.0.0' 12 | gem 'rubypants', '~> 0.2.0' 13 | gem 'rb-fsevent', '~> 0.9' 14 | gem 'stringex', '~> 1.4.0' 15 | gem 'liquid', '~> 2.3.0' 16 | end 17 | 18 | gem 'sinatra', '~> 1.4.2' 19 | -------------------------------------------------------------------------------- /plugins/haml.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | require 'haml' 3 | class HamlConverter < Converter 4 | safe true 5 | priority :low 6 | 7 | def matches(ext) 8 | ext =~ /haml/i 9 | end 10 | 11 | def output_ext(ext) 12 | ".html" 13 | end 14 | 15 | def convert(content) 16 | begin 17 | engine = Haml::Engine.new(content) 18 | engine.render 19 | rescue StandardError => e 20 | puts "!!! HAML Error: " + e.message 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/archive_post.html: -------------------------------------------------------------------------------- 1 | {% capture category %}{{ post.categories | size }}{% endcapture %} 2 |

{{post.title}}

3 | 4 | {% if category != '0' %} 5 | 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/twitter_sharing.html: -------------------------------------------------------------------------------- 1 | {% if site.twitter_follow_button or site.twitter_tweet_button %} 2 | 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /.themes/classic/sass/custom/_fonts.scss: -------------------------------------------------------------------------------- 1 | // Here you can easily change font faces which are used in your site. 2 | // To give it a try, uncomment some of the lines below rebuild your blog, and see how it works. your sites's. 3 | // If you love to use Web Fonts, you also need to add some lines to source/_includes/custom/head.html 4 | 5 | //$sans: "Optima", sans-serif; 6 | //$serif: "Baskerville", serif; 7 | //$mono: "Courier", monospace; 8 | //$heading-font-family: "Verdana", sans-serif; 9 | //$header-title-font-family: "Futura", sans-serif; 10 | //$header-subtitle-font-family: "Futura", sans-serif; 11 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/post/sharing.html: -------------------------------------------------------------------------------- 1 |
2 | {% if site.twitter_tweet_button %} 3 | Tweet 4 | {% endif %} 5 | {% if site.google_plus_one %} 6 |
7 | {% endif %} 8 | {% if site.facebook_like %} 9 |
10 | {% endif %} 11 |
12 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/sidebar/_googleplus.scss: -------------------------------------------------------------------------------- 1 | .googleplus { 2 | h1 { 3 | -moz-box-shadow: none !important; 4 | -webkit-box-shadow: none !important; 5 | -o-box-shadow: none !important; 6 | box-shadow: none !important; 7 | border-bottom: 0px none !important; 8 | } 9 | a { 10 | text-decoration: none; 11 | white-space: normal !important; 12 | line-height: 32px; 13 | 14 | img { 15 | float: left; 16 | margin-right: 0.5em; 17 | border: 0 none; 18 | } 19 | } 20 | } 21 | 22 | .googleplus-hidden { 23 | position: absolute; 24 | top: -1000em; 25 | left: -1000em; 26 | } 27 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/_footer.scss: -------------------------------------------------------------------------------- 1 | body > footer { 2 | @extend .sans; 3 | font-size: .8em; 4 | color: $footer-color; 5 | text-shadow: lighten($footer-bg, 5) 0 1px; 6 | background-color: $footer-bg; 7 | @include background($footer-bg-front, $footer-bg-back); 8 | border-top: 1px solid $footer-border-top; 9 | position: relative; 10 | padding-top: 1em; 11 | padding-bottom: 1em; 12 | margin-bottom: 3em; 13 | @include border-bottom-radius(.4em); 14 | z-index: 1; 15 | a { 16 | @include link-colors($footer-link-color, $footer-link-color-hover, $visited: $footer-link-color); 17 | } 18 | p:last-child { margin-bottom: 0; } 19 | } 20 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/google_analytics.html: -------------------------------------------------------------------------------- 1 | {% if site.google_analytics_tracking_id %} 2 | 13 | {% endif %} 14 | -------------------------------------------------------------------------------- /.themes/classic/sass/custom/_layout.scss: -------------------------------------------------------------------------------- 1 | // Here you can easily change your sites's layout. 2 | // To give it a try, uncomment some of the lines below, make changes, rebuild your blog, and see how it works. 3 | 4 | //$header-font-size: 1em; 5 | //$header-padding-top: 1.5em; 6 | //$header-padding-bottom: 1.5em; 7 | 8 | //$max-width: 1350px; 9 | //$indented-lists: true; 10 | 11 | // Padding used for layout margins 12 | //$pad-min: 18px; 13 | //$pad-narrow: 25px; 14 | //$pad-medium: 35px; 15 | //$pad-wide: 55px; 16 | 17 | // Sidebar widths used in media queries 18 | //$sidebar-width-medium: 240px; 19 | //$sidebar-pad-medium: 15px; 20 | //$sidebar-pad-wide: 20px; 21 | //$sidebar-width-wide: 300px; 22 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | require 'bundler/setup' 2 | require 'sinatra/base' 3 | 4 | # The project root directory 5 | $root = ::File.dirname(__FILE__) 6 | 7 | class SinatraStaticServer < Sinatra::Base 8 | 9 | get(/.+/) do 10 | send_sinatra_file(request.path) {404} 11 | end 12 | 13 | not_found do 14 | send_file(File.join(File.dirname(__FILE__), 'public', '404.html'), {:status => 404}) 15 | end 16 | 17 | def send_sinatra_file(path, &missing_file_block) 18 | file_path = File.join(File.dirname(__FILE__), 'public', path) 19 | file_path = File.join(file_path, 'index.html') unless file_path =~ /\.[a-z]+$/i 20 | File.exist?(file_path) ? send_file(file_path) : missing_file_block.call 21 | end 22 | 23 | end 24 | 25 | run SinatraStaticServer 26 | -------------------------------------------------------------------------------- /.themes/classic/source/_layouts/default.html: -------------------------------------------------------------------------------- 1 | {% capture root_url %}{{ site.root | strip_slash }}{% endcapture %} 2 | {% include head.html %} 3 | 4 |
{% include header.html %}
5 | 6 |
7 |
8 | {{ content | expand_urls: root_url }} 9 |
10 |
11 | 12 | {% include after_footer.html %} 13 | 14 | 15 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/navigation.html: -------------------------------------------------------------------------------- 1 | 7 | {% if site.simple_search %} 8 |
9 |
10 | 11 | 12 |
13 |
14 | {% endif %} 15 | {% include custom/navigation.html %} 16 | -------------------------------------------------------------------------------- /.themes/classic/source/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 | {% assign index = true %} 7 | {% for post in paginator.posts %} 8 | {% assign content = post.content %} 9 |
10 | {% include article.html %} 11 |
12 | {% endfor %} 13 | 22 |
23 | 30 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/asides/pinboard.html: -------------------------------------------------------------------------------- 1 | {% if site.pinboard_user %} 2 |
3 |

My Pinboard

4 | 5 |

My Pinboard Bookmarks »

6 |
7 | 19 | {% endif %} 20 | -------------------------------------------------------------------------------- /.themes/classic/.editorconfig: -------------------------------------------------------------------------------- 1 | ; This file is for unifying the coding style for different editors and IDEs. 2 | ; More information at http://EditorConfig.org 3 | 4 | 5 | ; Use 2 spaces for indentation in SCSS, JavaScript, HTML, and XML 6 | 7 | [*.scss] 8 | indent_style = space 9 | indent_size = 2 10 | 11 | [*.js] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.html] 16 | indent_style = space 17 | indent_size = 2 18 | 19 | [*.xml] 20 | indent_style = space 21 | indent_size = 2 22 | 23 | 24 | ; Use 4 spaces for indentation in Markdown files 25 | 26 | [*.md] 27 | indent_style = space 28 | indent_size = 4 29 | 30 | [*.markdown] 31 | indent_style = space 32 | indent_size = 4 33 | 34 | 35 | ; Override default indentation for some library files 36 | 37 | [jwplayer/glow/glow.xml] 38 | indent_style = tab 39 | 40 | [libs/jXHR.js] 41 | indent_style = tab 42 | 43 | [libs/swfobject-dynamic.js] 44 | indent_style = tab 45 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/post/date.html: -------------------------------------------------------------------------------- 1 | {% capture date %}{{ page.date }}{{ post.date }}{% endcapture %} 2 | {% capture date_formatted %}{{ page.date_formatted }}{{ post.date_formatted }}{% endcapture %} 3 | {% capture has_date %}{{ date | size }}{% endcapture %} 4 | 5 | {% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %} 6 | {% capture updated_formatted %}{{ page.updated_formatted }}{{ post.updated_formatted }}{% endcapture %} 7 | {% capture was_updated %}{{ updated | size }}{% endcapture %} 8 | 9 | {% if has_date != '0' %} 10 | {% capture time %}{% endcapture %} 11 | {% endif %} 12 | 13 | {% if was_updated != '0' %} 14 | {% capture updated %}{% endcapture %} 15 | {% else %}{% assign updated = false %}{% endif %} -------------------------------------------------------------------------------- /.themes/classic/source/atom.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: nil 3 | --- 4 | 5 | 6 | 7 | <![CDATA[{{ site.title }}]]> 8 | 9 | 10 | {{ site.time | date_to_xmlschema }} 11 | {{ site.url }}/ 12 | 13 | 14 | {% if site.email %}{% endif %} 15 | 16 | Octopress 17 | 18 | {% for post in site.posts limit: 20 %} 19 | 20 | <![CDATA[{{ post.title | cdata_escape }}]]> 21 | 22 | {{ post.date | date_to_xmlschema }} 23 | {{ site.url }}{{ post.id }} 24 | 25 | 26 | {% endfor %} 27 | 28 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/asides/github.html: -------------------------------------------------------------------------------- 1 | {% if site.github_user %} 2 |
3 |

GitHub Repos

4 | 7 | {% if site.github_show_profile_link %} 8 | @{{site.github_user}} on GitHub 9 | {% endif %} 10 | 28 | 29 |
30 | {% endif %} 31 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/custom/category_feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: nil 3 | --- 4 | 5 | 6 | 7 | <![CDATA[{{ page.title }} | {{ site.title }}]]> 8 | 9 | 10 | {{ site.time | date_to_xmlschema }} 11 | {{ site.url }}/ 12 | 13 | 14 | {% if site.email %}{% endif %} 15 | 16 | Octopress 17 | 18 | {% for post in site.categories[page.category] limit: 5 %} 19 | 20 | <![CDATA[{{ post.title | cdata_escape }}]]> 21 | 22 | {{ post.date | date_to_xmlschema }} 23 | {{ site.url }}{{ post.id }} 24 | 25 | 26 | {% endfor %} 27 | 28 | -------------------------------------------------------------------------------- /.themes/classic/sass/base/_utilities.scss: -------------------------------------------------------------------------------- 1 | @mixin mask-image($img, $repeat: no-repeat){ 2 | @include experimental(mask-image, image-url($img), -webkit, -moz, -o, -ms); 3 | @include experimental(mask-repeat, $repeat, -webkit, -moz, -o, -ms); 4 | width: image-width($img); 5 | height: image-height($img); 6 | } 7 | 8 | @mixin shadow-box($border: #fff .5em solid, $shadow: rgba(#000, .15) 0 1px 4px, $border-radius: .3em) { 9 | @include border-radius($border-radius); 10 | @include box-shadow($shadow); 11 | @include box-sizing(border-box); 12 | border: $border; 13 | } 14 | 15 | @mixin selection($bg, $color: inherit, $text-shadow: none){ 16 | * { 17 | &::-moz-selection { background: $bg; color: $color; text-shadow: $text-shadow; } 18 | &::-webkit-selection { background: $bg; color: $color; text-shadow: $text-shadow; } 19 | &::selection { background: $bg; color: $color; text-shadow: $text-shadow; } 20 | } 21 | } 22 | 23 | @function text-color($color, $dark: dark, $light: light){ 24 | $text-color: ( (red($color)*299) + (green($color)*587) + (blue($color)*114) ) / 1000; 25 | $text-color: if($text-color >= 150, $dark, $light); 26 | @return $text-color; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/disqus.html: -------------------------------------------------------------------------------- 1 | {% comment %} Load script if disquss comments are enabled and `page.comments` is either empty (index) or set to true {% endcomment %} 2 | {% if site.disqus_short_name and page.comments != false %} 3 | 21 | {% endif %} 22 | -------------------------------------------------------------------------------- /.themes/classic/source/javascripts/github.js: -------------------------------------------------------------------------------- 1 | var github = (function(){ 2 | function escapeHtml(str) { 3 | return $('
').text(str).html(); 4 | } 5 | function render(target, repos){ 6 | var i = 0, fragment = '', t = $(target)[0]; 7 | 8 | for(i = 0; i < repos.length; i++) { 9 | fragment += '
  • '+repos[i].name+'

    '+escapeHtml(repos[i].description||'')+'

  • '; 10 | } 11 | t.innerHTML = fragment; 12 | } 13 | return { 14 | showRepos: function(options){ 15 | $.ajax({ 16 | url: "https://api.github.com/users/"+options.user+"/repos?sort=pushed&callback=?" 17 | , dataType: 'jsonp' 18 | , error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); } 19 | , success: function(data) { 20 | var repos = []; 21 | if (!data || !data.data) { return; } 22 | for (var i = 0; i < data.data.length; i++) { 23 | if (options.skip_forks && data.data[i].fork) { continue; } 24 | repos.push(data.data[i]); 25 | } 26 | if (options.count) { repos.splice(options.count); } 27 | render(options.target, repos); 28 | } 29 | }); 30 | } 31 | }; 32 | })(); 33 | -------------------------------------------------------------------------------- /plugins/titlecase.rb: -------------------------------------------------------------------------------- 1 | class String 2 | def titlecase 3 | small_words = %w(a an and as at but by en for if in of on or the to v v. via vs vs.) 4 | 5 | x = split(" ").map do |word| 6 | # note: word could contain non-word characters! 7 | # downcase all small_words, capitalize the rest 8 | small_words.include?(word.gsub(/\W/, "").downcase) ? word.downcase! : word.smart_capitalize! 9 | word 10 | end 11 | # capitalize first and last words 12 | x.first.to_s.smart_capitalize! 13 | x.last.to_s.smart_capitalize! 14 | # small words are capitalized after colon, period, exclamation mark, question mark 15 | x.join(" ").gsub(/(:|\.|!|\?)\s?(\W*#{small_words.join("|")}\W*)\s/) { "#{$1} #{$2.smart_capitalize} " } 16 | end 17 | 18 | def titlecase! 19 | replace(titlecase) 20 | end 21 | 22 | def smart_capitalize 23 | # ignore any leading crazy characters and capitalize the first real character 24 | if self =~ /^['"\(\[']*([a-z])/ 25 | i = index($1) 26 | x = self[i,self.length] 27 | # word with capitals and periods mid-word are left alone 28 | self[i,1] = self[i,1].upcase unless x =~ /[A-Z]/ or x =~ /\.\w+/ 29 | end 30 | self 31 | end 32 | 33 | def smart_capitalize! 34 | replace(smart_capitalize) 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/article.html: -------------------------------------------------------------------------------- 1 | {% unless page.no_header %} 2 |
    3 | {% if index %} 4 |

    {% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}

    5 | {% else %} 6 |

    {% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}

    7 | {% endif %} 8 | {% unless page.meta == false %} 9 |

    10 | {% include post/date.html %}{{ time }} 11 | {% if site.disqus_short_name and page.comments != false and post.comments != false and site.disqus_show_comment_count == true %} 12 | | Comments 13 | {% endif %} 14 |

    15 | {% endunless %} 16 |
    17 | {% endunless %} 18 | {% if index %} 19 |
    {{ content | excerpt }}
    20 | {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %} 21 | {% if excerpted == 'true' %} 22 | 25 | {% endif %} 26 | {% else %} 27 |
    {{ content }}
    28 | {% endif %} 29 | -------------------------------------------------------------------------------- /plugins/raw.rb: -------------------------------------------------------------------------------- 1 | # Author: Brandon Mathis 2 | # Description: Provides plugins with a method for wrapping and unwrapping input to prevent Markdown and Textile from parsing it. 3 | # Purpose: This is useful for preventing Markdown and Textile from being too aggressive and incorrectly parsing in-line HTML. 4 | module TemplateWrapper 5 | # Wrap input with a
    6 | def safe_wrap(input) 7 | "
    #{input}
    " 8 | end 9 | # This must be applied after the 10 | def unwrap(input) 11 | input.gsub /
    (.+?)<\/notextile><\/div>/m do 12 | $1 13 | end 14 | end 15 | end 16 | 17 | # Author: phaer, https://github.com/phaer 18 | # Source: https://gist.github.com/1020852 19 | # Description: Raw tag for jekyll. Keeps liquid from parsing text betweeen {% raw %} and {% endraw %} 20 | 21 | module Jekyll 22 | class RawTag < Liquid::Block 23 | def parse(tokens) 24 | @nodelist ||= [] 25 | @nodelist.clear 26 | 27 | while token = tokens.shift 28 | if token =~ FullToken 29 | if block_delimiter == $1 30 | end_tag 31 | return 32 | end 33 | end 34 | @nodelist << token if not token.empty? 35 | end 36 | end 37 | end 38 | end 39 | 40 | Liquid::Template.register_tag('raw', Jekyll::RawTag) 41 | -------------------------------------------------------------------------------- /plugins/config_tag.rb: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | class ConfigTag < Liquid::Tag 4 | def initialize(tag_name, options, tokens) 5 | super 6 | options = options.split(' ').map {|i| i.strip } 7 | @key = options.slice!(0) 8 | @tag = nil 9 | @classname = nil 10 | options.each do |option| 11 | @tag = $1 if option =~ /tag:(\S+)/ 12 | @classname = $1 if option =~ /classname:(\S+)/ 13 | end 14 | end 15 | 16 | def render(context) 17 | config_tag(context.registers[:site].config, @key, @tag, @classname) 18 | end 19 | end 20 | 21 | def config_tag(config, key, tag=nil, classname=nil) 22 | options = key.split('.').map { |k| config[k] }.last #reference objects with dot notation 23 | tag ||= 'div' 24 | classname ||= key.sub(/_/, '-').sub(/\./, '-') 25 | output = "<#{tag} class='#{classname}'" 26 | 27 | if options.respond_to? 'keys' 28 | options.each do |k,v| 29 | unless v.nil? 30 | v = v.join ',' if v.respond_to? 'join' 31 | v = v.to_json if v.respond_to? 'keys' 32 | output += " data-#{k.sub'_','-'}='#{v}'" 33 | end 34 | end 35 | elsif options.respond_to? 'join' 36 | output += " data-value='#{config[key].join(',')}'" 37 | else 38 | output += " data-value='#{config[key]}'" 39 | end 40 | output += ">" 41 | end 42 | 43 | Liquid::Template.register_tag('config_tag', ConfigTag) 44 | 45 | -------------------------------------------------------------------------------- /CHANGELOG.markdown: -------------------------------------------------------------------------------- 1 | # Octopress Changelog 2 | 3 | ## 2.0 4 | 5 | - Now based on [mojombo/jekyll](http://github.com/mojombo/jekyll) 6 | - Sports a semantic HTML5 template 7 | - Easy theming with Compass and Sass 8 | - A Mobile friendly responsive (320 and up) layout 9 | - Built in 3rd party support for Twitter, Google Plus One, Disqus Comments, Pinboard, Delicious, and Google Analytics 10 | - Deploy to Github pages or use Rsync 11 | - Built in support for POW and Rack servers 12 | - Beautiful [Solarized](http://ethanschoonover.com/solarized) syntax highlighting 13 | - Super easy setup and configuration 14 | 15 | **New Plugins, Filters, & Generators** 16 | 17 | - **Gist Tag** for easily embedding gists in your posts 18 | - **Pygments Cache** makes subsequent compiling much faster 19 | - **Include Code Tag** lets you embed external code snippets from your file system and adds a download link 20 | - **Pullquote Tag** Generate beautiful semantic pullquotes (no double data) based on Maykel Loomans's [technique](http://miekd.com/articles/pull-quotes-with-html5-and-css/) 21 | - **Blockquote Tag** makes it easy to semantically format blockquotes 22 | - **Category Generator** gives you archive pages for each category 23 | - **Sitemap.xml Generator** for search engines 24 | 25 | ## 1.0 26 | 27 | - **No longer supported.** 28 | - Jekyll Matured, but Henrik's Jekyll fork did not. 29 | - Thanks for all your pull requests, I learned a lot. 30 | -------------------------------------------------------------------------------- /plugins/backtick_code_block.rb: -------------------------------------------------------------------------------- 1 | require './plugins/pygments_code' 2 | 3 | module BacktickCodeBlock 4 | include HighlightCode 5 | AllOptions = /([^\s]+)\s+(.+?)\s+(https?:\/\/\S+|\/\S+)\s*(.+)?/i 6 | LangCaption = /([^\s]+)\s*(.+)?/i 7 | def render_code_block(input) 8 | @options = nil 9 | @caption = nil 10 | @lang = nil 11 | @url = nil 12 | @title = nil 13 | input.gsub(/^`{3} *([^\n]+)?\n(.+?)\n`{3}/m) do 14 | @options = $1 || '' 15 | str = $2 16 | 17 | if @options =~ AllOptions 18 | @lang = $1 19 | @caption = "
    #{$2}#{$4 || 'link'}
    " 20 | elsif @options =~ LangCaption 21 | @lang = $1 22 | @caption = "
    #{$2}
    " 23 | end 24 | 25 | if str.match(/\A( {4}|\t)/) 26 | str = str.gsub(/^( {4}|\t)/, '') 27 | end 28 | if @lang.nil? || @lang == 'plain' 29 | code = tableize_code(str.gsub('<','<').gsub('>','>')) 30 | "
    #{@caption}#{code}
    " 31 | else 32 | if @lang.include? "-raw" 33 | raw = "``` #{@options.sub('-raw', '')}\n" 34 | raw += str 35 | raw += "\n```\n" 36 | else 37 | code = highlight(str, @lang) 38 | "
    #{@caption}#{code}
    " 39 | end 40 | end 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /.themes/classic/sass/base/_solarized.scss: -------------------------------------------------------------------------------- 1 | $base03: #002b36 !default; //darkest blue 2 | $base02: #073642 !default; //dark blue 3 | $base01: #586e75 !default; //darkest gray 4 | $base00: #657b83 !default; //dark gray 5 | $base0: #839496 !default; //medium gray 6 | $base1: #93a1a1 !default; //medium light gray 7 | $base2: #eee8d5 !default; //cream 8 | $base3: #fdf6e3 !default; //white 9 | $solar-yellow: #b58900 !default; 10 | $solar-orange: #cb4b16 !default; 11 | $solar-red: #dc322f !default; 12 | $solar-magenta: #d33682 !default; 13 | $solar-violet: #6c71c4 !default; 14 | $solar-blue: #268bd2 !default; 15 | $solar-cyan: #2aa198 !default; 16 | $solar-green: #859900 !default; 17 | 18 | $solarized: dark !default; 19 | 20 | @if $solarized == light { 21 | 22 | $_base03: $base03; 23 | $_base02: $base02; 24 | $_base01: $base01; 25 | $_base00: $base00; 26 | $_base0: $base0; 27 | $_base1: $base1; 28 | $_base2: $base2; 29 | $_base3: $base3; 30 | 31 | $base03: $_base3; 32 | $base02: $_base2; 33 | $base01: $_base1; 34 | $base00: $_base0; 35 | $base0: $_base00; 36 | $base1: $_base01; 37 | $base2: $_base02; 38 | $base3: $_base03; 39 | } 40 | 41 | /* non highlighted code colors */ 42 | $pre-bg: $base03 !default; 43 | $pre-border: darken($base02, 5) !default; 44 | $pre-color: $base1 !default; 45 | 46 | 47 | -------------------------------------------------------------------------------- /.themes/classic/source/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
    6 |
    7 | {% if page.title %} 8 |
    9 |

    {% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}

    10 | {% if page.date %}

    {% include post/date.html %}{{ time }}

    {% endif %} 11 |
    12 | {% endif %} 13 | {{ content }} 14 | {% unless page.footer == false %} 15 |
    16 | {% if page.date or page.author %}

    17 | {% if page.author %}{% include post/author.html %}{% endif %} 18 | {% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %} 19 | {% if page.categories %}{% include post/categories.html %}{% endif %} 20 |

    {% endif %} 21 | {% unless page.sharing == false %} 22 | {% include post/sharing.html %} 23 | {% endunless %} 24 |
    25 | {% endunless %} 26 |
    27 | {% if site.disqus_short_name and page.comments == true %} 28 |
    29 |

    Comments

    30 |
    {% include post/disqus_thread.html %}
    31 |
    32 | {% endif %} 33 |
    34 | {% unless page.sidebar == false %} 35 | 42 | {% endunless %} 43 | -------------------------------------------------------------------------------- /.themes/classic/source/_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | single: true 4 | --- 5 | 6 |
    7 |
    8 | {% include article.html %} 9 |
    10 |

    11 | {% include post/author.html %} 12 | {% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %} 13 | {% include post/categories.html %} 14 |

    15 | {% unless page.sharing == false %} 16 | {% include post/sharing.html %} 17 | {% endunless %} 18 |

    19 | {% if page.previous.url %} 20 | « {{page.previous.title}} 21 | {% endif %} 22 | {% if page.next.url %} 23 | {{page.next.title}} » 24 | {% endif %} 25 |

    26 |
    27 |
    28 | {% if site.disqus_short_name and page.comments == true %} 29 |
    30 |

    Comments

    31 |
    {% include post/disqus_thread.html %}
    32 |
    33 | {% endif %} 34 |
    35 | {% unless page.sidebar == false %} 36 | 43 | {% endunless %} 44 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: http://rubygems.org/ 3 | specs: 4 | RedCloth (4.2.9) 5 | chunky_png (1.2.5) 6 | classifier (1.3.3) 7 | fast-stemmer (>= 1.0.0) 8 | compass (0.12.2) 9 | chunky_png (~> 1.2) 10 | fssm (>= 0.2.7) 11 | sass (~> 3.1) 12 | directory_watcher (1.4.1) 13 | fast-stemmer (1.0.1) 14 | fssm (0.2.9) 15 | haml (3.1.7) 16 | jekyll (0.12.0) 17 | classifier (~> 1.3) 18 | directory_watcher (~> 1.1) 19 | kramdown (~> 0.13.4) 20 | liquid (~> 2.3) 21 | maruku (~> 0.5) 22 | pygments.rb (~> 0.3.2) 23 | kramdown (0.13.8) 24 | liquid (2.3.0) 25 | maruku (0.6.1) 26 | syntax (>= 1.0.0) 27 | posix-spawn (0.3.6) 28 | pygments.rb (0.3.4) 29 | posix-spawn (~> 0.3.6) 30 | yajl-ruby (~> 1.1.0) 31 | rack (1.5.2) 32 | rack-protection (1.5.0) 33 | rack 34 | rake (0.9.2.2) 35 | rb-fsevent (0.9.1) 36 | rdiscount (1.6.8) 37 | rubypants (0.2.0) 38 | sass (3.1.20) 39 | sass-globbing (1.0.0) 40 | sass (>= 3.1) 41 | sinatra (1.4.2) 42 | rack (~> 1.5, >= 1.5.2) 43 | rack-protection (~> 1.4) 44 | tilt (~> 1.3, >= 1.3.4) 45 | stringex (1.4.0) 46 | syntax (1.0.0) 47 | tilt (1.3.7) 48 | yajl-ruby (1.1.0) 49 | 50 | PLATFORMS 51 | ruby 52 | 53 | DEPENDENCIES 54 | RedCloth (~> 4.2.9) 55 | compass (~> 0.12.2) 56 | haml (~> 3.1.7) 57 | jekyll (~> 0.12) 58 | liquid (~> 2.3.0) 59 | pygments.rb (~> 0.3.4) 60 | rake (~> 0.9) 61 | rb-fsevent (~> 0.9) 62 | rdiscount (~> 1.6.8) 63 | rubypants (~> 0.2.0) 64 | sass-globbing (~> 1.0.0) 65 | sinatra (~> 1.4.2) 66 | stringex (~> 1.4.0) 67 | -------------------------------------------------------------------------------- /plugins/jsfiddle.rb: -------------------------------------------------------------------------------- 1 | # Title: jsFiddle tag for Jekyll 2 | # Author: Brian Arnold (@brianarn) 3 | # Description: 4 | # Given a jsFiddle shortcode, outputs the jsFiddle iframe code. 5 | # Using 'default' will preserve defaults as specified by jsFiddle. 6 | # 7 | # Syntax: {% jsfiddle shorttag [tabs] [skin] [height] [width] %} 8 | # 9 | # Examples: 10 | # 11 | # Input: {% jsfiddle ccWP7 %} 12 | # Output: 13 | # 14 | # Input: {% jsfiddle ccWP7 js,html,result %} 15 | # Output: 16 | # 17 | 18 | module Jekyll 19 | class JsFiddle < Liquid::Tag 20 | def initialize(tag_name, markup, tokens) 21 | if /(?\w+)(?:\s+(?[\w,]+))?(?:\s+(?\w+))?(?:\s+(?\w+))?(?:\s+(?\w+))?/ =~ markup 22 | @fiddle = fiddle 23 | @sequence = (sequence unless sequence == 'default') || 'js,resources,html,css,result' 24 | @skin = (skin unless skin == 'default') || 'light' 25 | @width = width || '100%' 26 | @height = height || '300px' 27 | end 28 | end 29 | 30 | def render(context) 31 | if @fiddle 32 | "" 33 | else 34 | "Error processing input, expected syntax: {% jsfiddle shorttag [tabs] [skin] [height] [width] %}" 35 | end 36 | end 37 | end 38 | end 39 | 40 | Liquid::Template.register_tag('jsfiddle', Jekyll::JsFiddle) 41 | -------------------------------------------------------------------------------- /.themes/classic/sass/custom/_colors.scss: -------------------------------------------------------------------------------- 1 | // Here you can easily change your sites's color scheme. 2 | // To give it a try, uncomment some of the lines below rebuild your blog, and see how it works. 3 | // If you need a handy color picker try http://hslpicker.com 4 | 5 | //$header-bg: #263347; 6 | //$subtitle-color: lighten($header-bg, 58); 7 | //$nav-bg: desaturate(lighten(#8fc17a, 18), 5); 8 | //$nav-bg-front: image-url('noise.png'); 9 | //$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)); 10 | //$sidebar-bg: desaturate(#eceff5, 8); 11 | //$sidebar-link-color: saturate(#526f9a, 10); 12 | //$sidebar-link-color-hover: darken(#7ab662, 9); 13 | //$footer-bg: #ccc !default; 14 | //$footer-bg-front: image-url('noise.png'); 15 | //$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)); 16 | 17 | 18 | /* To use the light Solarized highlighting theme uncomment the following line */ 19 | //$solarized: light; 20 | 21 | /* If you want to tweak the Solarized colors you can do that here */ 22 | //$base03: #002b36; //darkest blue 23 | //$base02: #073642; //dark blue 24 | //$base01: #586e75; //darkest gray 25 | //$base00: #657b83; //dark gray 26 | //$base0: #839496; //medium gray 27 | //$base1: #93a1a1; //medium light gray 28 | //$base2: #eee8d5; //cream 29 | //$base3: #fdf6e3; //white 30 | //$solar-yellow: #b58900; 31 | //$solar-orange: #cb4b16; 32 | //$solar-red: #dc322f; 33 | //$solar-magenta: #d33682; 34 | //$solar-violet: #6c71c4; 35 | //$solar-blue: #268bd2; 36 | //$solar-cyan: #2aa198; 37 | //$solar-green: #859900; 38 | 39 | 40 | /* Non highlighted code colors */ 41 | //$pre-bg: $base03; 42 | //$pre-border: darken($base02, 5); 43 | //$pre-color: $base1; 44 | -------------------------------------------------------------------------------- /plugins/pygments_code.rb: -------------------------------------------------------------------------------- 1 | require 'pygments' 2 | require 'fileutils' 3 | require 'digest/md5' 4 | 5 | PYGMENTS_CACHE_DIR = File.expand_path('../../.pygments-cache', __FILE__) 6 | FileUtils.mkdir_p(PYGMENTS_CACHE_DIR) 7 | 8 | module HighlightCode 9 | def highlight(str, lang) 10 | lang = 'ruby' if lang == 'ru' 11 | lang = 'objc' if lang == 'm' 12 | lang = 'perl' if lang == 'pl' 13 | lang = 'yaml' if lang == 'yml' 14 | str = pygments(str, lang).match(/
    (.+)<\/pre>/m)[1].to_s.gsub(/ *$/, '') #strip out divs 
    15 | tableize_code(str, lang) 16 | end 17 | 18 | def pygments(code, lang) 19 | if defined?(PYGMENTS_CACHE_DIR) 20 | path = File.join(PYGMENTS_CACHE_DIR, "#{lang}-#{Digest::MD5.hexdigest(code)}.html") 21 | if File.exist?(path) 22 | highlighted_code = File.read(path) 23 | else 24 | begin 25 | highlighted_code = Pygments.highlight(code, :lexer => lang, :formatter => 'html', :options => {:encoding => 'utf-8'}) 26 | rescue MentosError 27 | raise "Pygments can't parse unknown language: #{lang}." 28 | end 29 | File.open(path, 'w') {|f| f.print(highlighted_code) } 30 | end 31 | else 32 | highlighted_code = Pygments.highlight(code, :lexer => lang, :formatter => 'html', :options => {:encoding => 'utf-8'}) 33 | end 34 | highlighted_code 35 | end 36 | def tableize_code (str, lang = '') 37 | table = '
    '
    38 |     code = ''
    39 |     str.lines.each_with_index do |line,index|
    40 |       table += "#{index+1}\n"
    41 |       code  += "#{line}"
    42 |     end
    43 |     table += "
    #{code}
    " 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /plugins/preview_unpublished.rb: -------------------------------------------------------------------------------- 1 | # Monkeypatch for Jekyll 2 | # Introduce distinction between preview/productive site generation 3 | # so posts with YAML attribute `published: false` can be previewed 4 | # on localhost without being published to the productive environment. 5 | 6 | module Jekyll 7 | 8 | class Site 9 | # Read all the files in //_posts and create a new Post 10 | # object with each one. 11 | # 12 | # dir - The String relative path of the directory to read. 13 | # 14 | # Returns nothing. 15 | def read_posts(dir) 16 | base = File.join(self.source, dir, '_posts') 17 | return unless File.exists?(base) 18 | entries = Dir.chdir(base) { filter_entries(Dir['**/*']) } 19 | 20 | # first pass processes, but does not yet render post content 21 | entries.each do |f| 22 | if Post.valid?(f) 23 | post = Post.new(self, self.source, dir, f) 24 | 25 | # Monkeypatch: 26 | # On preview environment (localhost), publish all posts 27 | if ENV.has_key?('OCTOPRESS_ENV') && ENV['OCTOPRESS_ENV'] == 'preview' && post.data.has_key?('published') && post.data['published'] == false 28 | post.published = true 29 | # Set preview mode flag (if necessary), `rake generate` will check for it 30 | # to prevent pushing preview posts to productive environment 31 | File.open(".preview-mode", "w") {} 32 | end 33 | 34 | if post.published && (self.future || post.date <= self.time) 35 | self.posts << post 36 | post.categories.each { |c| self.categories[c] << post } 37 | post.tags.each { |c| self.tags[c] << post } 38 | end 39 | end 40 | end 41 | 42 | self.posts.sort! 43 | 44 | # limit the posts if :limit_posts option is set 45 | self.posts = self.posts[-limit_posts, limit_posts] if limit_posts 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/_archive.scss: -------------------------------------------------------------------------------- 1 | #archive { 2 | #content > div { &, > article { padding-top: 0; } } 3 | } 4 | #blog-archives { 5 | article { 6 | padding: 1em 0 1em; 7 | position: relative; 8 | background: $img-border bottom left repeat-x; 9 | &:last-child { 10 | background: none; 11 | } 12 | footer { padding: 0; margin: 0;} 13 | } 14 | h1 { color: $text-color; margin-bottom: .3em; } 15 | h2 { display: none; } 16 | h1 { 17 | font-size: 1.5em; 18 | a { 19 | @include hover-link; 20 | color: inherit; 21 | &:hover { color: $link-color-hover; } 22 | font-weight: normal; 23 | display: inline-block; 24 | } 25 | } 26 | a.category, time { 27 | @extend .sans; 28 | color: $text-color-light; 29 | } 30 | color: $text-color-light; 31 | .entry-content { display: none; } 32 | time { 33 | font-size: .9em; 34 | line-height: 1.2em; 35 | .month, .day { display: inline-block; } 36 | .month { text-transform: uppercase; } 37 | } 38 | p { margin-bottom: 1em; } 39 | &, .entry-content { a { @include link-colors(inherit, $link-color-hover); }} 40 | a:hover { color: $link-color-hover; } 41 | @media only screen and (min-width: 550px) { 42 | article { margin-left: 5em; } 43 | h2 { 44 | margin-bottom: .3em; 45 | font-weight: normal; 46 | display: inline-block; 47 | position: relative; top: -1px; 48 | float: left; 49 | &:first-child { padding-top: .75em; } 50 | } 51 | time { 52 | position: absolute; 53 | text-align: right; 54 | left: 0em; 55 | top: 1.8em; 56 | } 57 | .year { display: none; } 58 | article { 59 | padding:{left: 4.5em; bottom: .7em;} 60 | } 61 | a.category { 62 | line-height: 1.1em; 63 | } 64 | } 65 | } 66 | #content > .category { 67 | article { 68 | margin-left: 0; 69 | padding-left: 6.8em; 70 | } 71 | .year { display: inline; } 72 | } 73 | -------------------------------------------------------------------------------- /plugins/video_tag.rb: -------------------------------------------------------------------------------- 1 | # Title: Simple Video tag for Jekyll 2 | # Author: Brandon Mathis http://brandonmathis.com 3 | # Description: Easily output MPEG4 HTML5 video with a flash backup. 4 | # 5 | # Syntax {% video url/to/video [width height] [url/to/poster] %} 6 | # 7 | # Example: 8 | # {% video http://site.com/video.mp4 720 480 http://site.com/poster-frame.jpg %} 9 | # 10 | # Output: 11 | # 14 | # 15 | 16 | module Jekyll 17 | 18 | class VideoTag < Liquid::Tag 19 | @video = nil 20 | @poster = '' 21 | @height = '' 22 | @width = '' 23 | 24 | def initialize(tag_name, markup, tokens) 25 | if markup =~ /(https?:\S+)(\s+(https?:\S+))?(\s+(https?:\S+))?(\s+(\d+)\s(\d+))?(\s+(https?:\S+))?/i 26 | @video = [$1, $3, $5].compact 27 | @width = $7 28 | @height = $8 29 | @poster = $10 30 | end 31 | super 32 | end 33 | 34 | def render(context) 35 | output = super 36 | type = { 37 | 'mp4' => "type='video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"'", 38 | 'ogv' => "type='video/ogg; codecs=theora, vorbis'", 39 | 'webm' => "type='video/webm; codecs=vp8, vorbis'" 40 | } 41 | if @video.size > 0 42 | video = "" 48 | else 49 | "Error processing input, expected syntax: {% video url/to/video [url/to/video] [url/to/video] [width height] [url/to/poster] %}" 50 | end 51 | end 52 | end 53 | end 54 | 55 | Liquid::Template.register_tag('video', Jekyll::VideoTag) 56 | 57 | -------------------------------------------------------------------------------- /.themes/classic/source/_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {% if page.title %}{{ page.title }} - {% endif %}{{ site.title }} 8 | 9 | 10 | {% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %} 11 | 12 | {% if page.keywords %}{% endif %} 13 | 14 | 15 | 16 | 17 | 18 | 19 | {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {% include custom/head.html %} 29 | {% include google_analytics.html %} 30 | 31 | -------------------------------------------------------------------------------- /.themes/classic/source/javascripts/pinboard.js: -------------------------------------------------------------------------------- 1 | function pinboardNS_fetch_script(url) { 2 | //document.writeln(''); 3 | (function(){ 4 | var pinboardLinkroll = document.createElement('script'); 5 | pinboardLinkroll.type = 'text/javascript'; 6 | pinboardLinkroll.async = true; 7 | pinboardLinkroll.src = url; 8 | document.getElementsByTagName('head')[0].appendChild(pinboardLinkroll); 9 | })(); 10 | } 11 | 12 | function pinboardNS_show_bmarks(r) { 13 | var lr = new Pinboard_Linkroll(); 14 | lr.set_items(r); 15 | lr.show_bmarks(); 16 | } 17 | 18 | function Pinboard_Linkroll() { 19 | var items; 20 | 21 | this.set_items = function(i) { 22 | this.items = i; 23 | } 24 | this.show_bmarks = function() { 25 | var lines = []; 26 | for (var i = 0; i < this.items.length; i++) { 27 | var item = this.items[i]; 28 | var str = this.format_item(item); 29 | lines.push(str); 30 | } 31 | document.getElementById(linkroll).innerHTML = lines.join("\n"); 32 | } 33 | this.cook = function(v) { 34 | return v.replace('<', '<').replace('>', '>>'); 35 | } 36 | 37 | this.format_item = function(it) { 38 | var str = "
  • "; 39 | if (!it.d) { return; } 40 | str += "

    " + this.cook(it.d) + ""; 41 | if (it.n) { 42 | str += "" + this.cook(it.n) + "\n"; 43 | } 44 | if (it.t.length > 0) { 45 | for (var i = 0; i < it.t.length; i++) { 46 | var tag = it.t[i]; 47 | str += " " + this.cook(tag).replace(/^\s+|\s+$/g, '') + " "; 48 | } 49 | } 50 | str += "

  • \n"; 51 | return str; 52 | } 53 | } 54 | Pinboard_Linkroll.prototype = new Pinboard_Linkroll(); 55 | pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count); 56 | 57 | -------------------------------------------------------------------------------- /plugins/include_array.rb: -------------------------------------------------------------------------------- 1 | # Title: Include Array Tag for Jekyll 2 | # Author: Jason Woodward http://www.woodwardjd.com 3 | # Description: Import files on your filesystem as specified in a configuration variable in _config.yml. Mostly cribbed from Jekyll's include tag. 4 | # Syntax: {% include_array variable_name_from_config.yml %} 5 | # 6 | # Example 1: 7 | # {% include_array asides %} 8 | # 9 | # _config.yml snippet: 10 | # asides: [asides/twitter.html, asides/custom/my_picture.html] 11 | # 12 | module Jekyll 13 | 14 | class IncludeArrayTag < Liquid::Tag 15 | Syntax = /(#{Liquid::QuotedFragment}+)/ 16 | def initialize(tag_name, markup, tokens) 17 | if markup =~ Syntax 18 | @array_name = $1 19 | else 20 | raise SyntaxError.new("Error in tag 'include_array' - Valid syntax: include_array [array from _config.yml]") 21 | end 22 | 23 | super 24 | end 25 | 26 | def render(context) 27 | includes_dir = File.join(context.registers[:site].source, '_includes') 28 | 29 | if File.symlink?(includes_dir) 30 | return "Includes directory '#{includes_dir}' cannot be a symlink" 31 | end 32 | 33 | rtn = '' 34 | (context.environments.first['site'][@array_name] || []).each do |file| 35 | if file !~ /^[a-zA-Z0-9_\/\.-]+$/ || file =~ /\.\// || file =~ /\/\./ 36 | rtn = rtn + "Include file '#{file}' contains invalid characters or sequences" 37 | end 38 | 39 | Dir.chdir(includes_dir) do 40 | choices = Dir['**/*'].reject { |x| File.symlink?(x) } 41 | if choices.include?(file) 42 | source = File.read(file) 43 | partial = Liquid::Template.parse(source) 44 | context.stack do 45 | rtn = rtn + partial.render(context) 46 | end 47 | else 48 | rtn = rtn + "Included file '#{file}' not found in _includes directory" 49 | end 50 | end 51 | end 52 | rtn 53 | end 54 | end 55 | 56 | end 57 | 58 | Liquid::Template.register_tag('include_array', Jekyll::IncludeArrayTag) 59 | -------------------------------------------------------------------------------- /plugins/pullquote.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Brandon Mathis 3 | # Based on the semantic pullquote technique by Maykel Loomans at http://miekd.com/articles/pull-quotes-with-html5-and-css/ 4 | # 5 | # Outputs a span with a data-pullquote attribute set from the marked pullquote. Example: 6 | # 7 | # {% pullquote %} 8 | # When writing longform posts, I find it helpful to include pullquotes, which help those scanning a post discern whether or not a post is helpful. 9 | # It is important to note, {" pullquotes are merely visual in presentation and should not appear twice in the text. "} That is why it is prefered 10 | # to use a CSS only technique for styling pullquotes. 11 | # {% endpullquote %} 12 | # ...will output... 13 | #

    14 | # 15 | # When writing longform posts, I find it helpful to include pullquotes, which help those scanning a post discern whether or not a post is helpful. 16 | # It is important to note, pullquotes are merely visual in presentation and should not appear twice in the text. This is why a CSS only approach 17 | # for styling pullquotes is prefered. 18 | # 19 | #

    20 | # 21 | # {% pullquote left %} will create a left-aligned pullquote instead. 22 | # 23 | # Note: this plugin now creates pullquotes with the class of pullquote-right by default 24 | 25 | module Jekyll 26 | 27 | class PullquoteTag < Liquid::Block 28 | def initialize(tag_name, markup, tokens) 29 | @align = (markup =~ /left/i) ? "left" : "right" 30 | super 31 | end 32 | 33 | def render(context) 34 | output = super 35 | if output =~ /\{"\s*(.+?)\s*"\}/m 36 | @quote = RubyPants.new($1).to_html 37 | "#{output.gsub(/\{"\s*|\s*"\}/, '')}" 38 | else 39 | return "Surround your pullquote like this {\" text to be quoted \"}" 40 | end 41 | end 42 | end 43 | end 44 | 45 | Liquid::Template.register_tag('pullquote', Jekyll::PullquoteTag) 46 | -------------------------------------------------------------------------------- /plugins/image_tag.rb: -------------------------------------------------------------------------------- 1 | # Title: Simple Image tag for Jekyll 2 | # Authors: Brandon Mathis http://brandonmathis.com 3 | # Felix Schäfer, Frederic Hemberger 4 | # Description: Easily output images with optional class names, width, height, title and alt attributes 5 | # 6 | # Syntax {% img [class name(s)] [http[s]:/]/path/to/image [width [height]] [title text | "title text" ["alt text"]] %} 7 | # 8 | # Examples: 9 | # {% img /images/ninja.png Ninja Attack! %} 10 | # {% img left half http://site.com/images/ninja.png Ninja Attack! %} 11 | # {% img left half http://site.com/images/ninja.png 150 150 "Ninja Attack!" "Ninja in attack posture" %} 12 | # 13 | # Output: 14 | # 15 | # Ninja Attack! 16 | # Ninja in attack posture 17 | # 18 | 19 | module Jekyll 20 | 21 | class ImageTag < Liquid::Tag 22 | @img = nil 23 | 24 | def initialize(tag_name, markup, tokens) 25 | attributes = ['class', 'src', 'width', 'height', 'title'] 26 | 27 | if markup =~ /(?\S.*\s+)?(?(?:https?:\/\/|\/|\S+\/)\S+)(?:\s+(?\d+))?(?:\s+(?\d+))?(?\s+.+)?/i 28 | @img = attributes.reduce({}) { |img, attr| img[attr] = $~[attr].strip if $~[attr]; img } 29 | if /(?:"|')(?<title>[^"']+)?(?:"|')\s+(?:"|')(?<alt>[^"']+)?(?:"|')/ =~ @img['title'] 30 | @img['title'] = title 31 | @img['alt'] = alt 32 | else 33 | @img['alt'] = @img['title'].gsub!(/"/, '"') if @img['title'] 34 | end 35 | @img['class'].gsub!(/"/, '') if @img['class'] 36 | end 37 | super 38 | end 39 | 40 | def render(context) 41 | if @img 42 | "<img #{@img.collect {|k,v| "#{k}=\"#{v}\"" if v}.join(" ")}>" 43 | else 44 | "Error processing input, expected syntax: {% img [class name(s)] [http[s]:/]/path/to/image [width [height]] [title text | \"title text\" [\"alt text\"]] %}" 45 | end 46 | end 47 | end 48 | end 49 | 50 | Liquid::Template.register_tag('img', Jekyll::ImageTag) 51 | -------------------------------------------------------------------------------- /plugins/render_partial.rb: -------------------------------------------------------------------------------- 1 | # Title: Render Partial Tag for Jekyll 2 | # Author: Brandon Mathis http://brandonmathis.com 3 | # Description: Import files on your filesystem into any blog post and render them inline. 4 | # Note: Paths are relative to the source directory, if you import a file with yaml front matter, the yaml will be stripped out. 5 | # 6 | # Syntax {% render_partial path/to/file %} 7 | # 8 | # Example 1: 9 | # {% render_partial about/_bio.markdown %} 10 | # 11 | # This will import source/about/_bio.markdown and render it inline. 12 | # In this example I used an underscore at the beginning of the filename to prevent Jekyll 13 | # from generating an about/bio.html (Jekyll doesn't convert files beginning with underscores) 14 | # 15 | # Example 2: 16 | # {% render_partial ../README.markdown %} 17 | # 18 | # You can use relative pathnames, to include files outside of the source directory. 19 | # This might be useful if you want to have a page for a project's README without having 20 | # to duplicated the contents 21 | # 22 | # 23 | 24 | require 'pathname' 25 | require './plugins/octopress_filters' 26 | 27 | module Jekyll 28 | 29 | class RenderPartialTag < Liquid::Tag 30 | include OctopressFilters 31 | def initialize(tag_name, markup, tokens) 32 | @file = nil 33 | @raw = false 34 | if markup =~ /^(\S+)\s?(\w+)?/ 35 | @file = $1.strip 36 | @raw = $2 == 'raw' 37 | end 38 | super 39 | end 40 | 41 | def render(context) 42 | file_dir = (context.registers[:site].source || 'source') 43 | file_path = Pathname.new(file_dir).expand_path 44 | file = file_path + @file 45 | 46 | unless file.file? 47 | return "File #{file} could not be found" 48 | end 49 | 50 | Dir.chdir(file_path) do 51 | contents = file.read 52 | if contents =~ /\A-{3}.+[^\A]-{3}\n(.+)/m 53 | contents = $1.lstrip 54 | end 55 | contents = pre_filter(contents) 56 | if @raw 57 | contents 58 | else 59 | partial = Liquid::Template.parse(contents) 60 | context.stack do 61 | partial.render(context) 62 | end 63 | end 64 | end 65 | end 66 | end 67 | end 68 | 69 | Liquid::Template.register_tag('render_partial', Jekyll::RenderPartialTag) 70 | -------------------------------------------------------------------------------- /plugins/include_code.rb: -------------------------------------------------------------------------------- 1 | # Title: Include Code Tag for Jekyll 2 | # Author: Brandon Mathis http://brandonmathis.com 3 | # Description: Import files on your filesystem into any blog post as embedded code snippets with syntax highlighting and a download link. 4 | # Configuration: You can set default import path in _config.yml (defaults to code_dir: downloads/code) 5 | # 6 | # Syntax {% include_code path/to/file %} 7 | # 8 | # Example 1: 9 | # {% include_code javascripts/test.js %} 10 | # 11 | # This will import test.js from source/downloads/code/javascripts/test.js 12 | # and output the contents in a syntax highlighted code block inside a figure, 13 | # with a figcaption listing the file name and download link 14 | # 15 | # Example 2: 16 | # You can also include an optional title for the <figcaption> 17 | # 18 | # {% include_code Example 2 javascripts/test.js %} 19 | # 20 | # will output a figcaption with the title: Example 2 (test.js) 21 | # 22 | 23 | require './plugins/pygments_code' 24 | require './plugins/raw' 25 | require 'pathname' 26 | 27 | module Jekyll 28 | 29 | class IncludeCodeTag < Liquid::Tag 30 | include HighlightCode 31 | include TemplateWrapper 32 | def initialize(tag_name, markup, tokens) 33 | @title = nil 34 | @file = nil 35 | if markup.strip =~ /\s*lang:(\S+)/i 36 | @filetype = $1 37 | markup = markup.strip.sub(/lang:\S+/i,'') 38 | end 39 | if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i 40 | @title = $1 || nil 41 | @file = $3 42 | end 43 | super 44 | end 45 | 46 | def render(context) 47 | code_dir = (context.registers[:site].config['code_dir'].sub(/^\//,'') || 'downloads/code') 48 | code_path = (Pathname.new(context.registers[:site].source) + code_dir).expand_path 49 | file = code_path + @file 50 | 51 | if File.symlink?(code_path) 52 | return "Code directory '#{code_path}' cannot be a symlink" 53 | end 54 | 55 | unless file.file? 56 | return "File #{file} could not be found" 57 | end 58 | 59 | Dir.chdir(code_path) do 60 | code = file.read 61 | @filetype = file.extname.sub('.','') if @filetype.nil? 62 | title = @title ? "#{@title} (#{file.basename})" : file.basename 63 | url = "/#{code_dir}/#{@file}" 64 | source = "<figure class='code'><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n" 65 | source += " #{highlight(code, @filetype)}</figure>" 66 | safe_wrap(source) 67 | end 68 | end 69 | end 70 | 71 | end 72 | 73 | Liquid::Template.register_tag('include_code', Jekyll::IncludeCodeTag) 74 | -------------------------------------------------------------------------------- /plugins/blockquote.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Brandon Mathis 3 | # A full rewrite based on the work of: Josediaz Gonzalez - https://github.com/josegonzalez/josediazgonzalez.com/blob/master/_plugins/blockquote.rb 4 | # 5 | # Outputs a string with a given attribution as a quote 6 | # 7 | # {% blockquote Bobby Willis http://google.com/search?q=pants the search for bobby's pants %} 8 | # Wheeee! 9 | # {% endblockquote %} 10 | # ... 11 | # <blockquote> 12 | # <p>Wheeee!</p> 13 | # <footer> 14 | # <strong>Bobby Willis</strong><cite><a href="http://google.com/search?q=pants">The Search For Bobby's Pants</a> 15 | # </blockquote> 16 | # 17 | require './plugins/titlecase.rb' 18 | 19 | module Jekyll 20 | 21 | class Blockquote < Liquid::Block 22 | FullCiteWithTitle = /(\S.*)\s+(https?:\/\/)(\S+)\s+(.+)/i 23 | FullCite = /(\S.*)\s+(https?:\/\/)(\S+)/i 24 | AuthorTitle = /([^,]+),([^,]+)/ 25 | Author = /(.+)/ 26 | 27 | def initialize(tag_name, markup, tokens) 28 | @by = nil 29 | @source = nil 30 | @title = nil 31 | if markup =~ FullCiteWithTitle 32 | @by = $1 33 | @source = $2 + $3 34 | @title = $4.titlecase.strip 35 | elsif markup =~ FullCite 36 | @by = $1 37 | @source = $2 + $3 38 | elsif markup =~ AuthorTitle 39 | @by = $1 40 | @title = $2.titlecase.strip 41 | elsif markup =~ Author 42 | @by = $1 43 | end 44 | super 45 | end 46 | 47 | def render(context) 48 | quote = paragraphize(super) 49 | author = "<strong>#{@by.strip}</strong>" if @by 50 | if @source 51 | url = @source.match(/https?:\/\/(.+)/)[1].split('/') 52 | parts = [] 53 | url.each do |part| 54 | if (parts + [part]).join('/').length < 32 55 | parts << part 56 | end 57 | end 58 | source = parts.join('/') 59 | source << '/…' unless source == @source 60 | end 61 | if !@source.nil? 62 | cite = " <cite><a href='#{@source}'>#{(@title || source)}</a></cite>" 63 | elsif !@title.nil? 64 | cite = " <cite>#{@title}</cite>" 65 | end 66 | blockquote = if @by.nil? 67 | quote 68 | elsif cite 69 | "#{quote}<footer>#{author + cite}</footer>" 70 | else 71 | "#{quote}<footer>#{author}</footer>" 72 | end 73 | "<blockquote>#{blockquote}</blockquote>" 74 | end 75 | 76 | def paragraphize(input) 77 | "<p>#{input.lstrip.rstrip.gsub(/\n\n/, '</p><p>').gsub(/\n/, '<br/>')}</p>" 78 | end 79 | end 80 | end 81 | 82 | Liquid::Template.register_tag('blockquote', Jekyll::Blockquote) 83 | -------------------------------------------------------------------------------- /.themes/classic/source/javascripts/libs/jXHR.js: -------------------------------------------------------------------------------- 1 | // jXHR.js (JSON-P XHR) 2 | // v0.1 (c) Kyle Simpson 3 | // MIT License 4 | 5 | (function(global){ 6 | var SETTIMEOUT = global.setTimeout, // for better compression 7 | doc = global.document, 8 | callback_counter = 0; 9 | 10 | global.jXHR = function() { 11 | var script_url, 12 | script_loaded, 13 | jsonp_callback, 14 | scriptElem, 15 | publicAPI = null; 16 | 17 | function removeScript() { try { scriptElem.parentNode.removeChild(scriptElem); } catch (err) { } } 18 | 19 | function reset() { 20 | script_loaded = false; 21 | script_url = ""; 22 | removeScript(); 23 | scriptElem = null; 24 | fireReadyStateChange(0); 25 | } 26 | 27 | function ThrowError(msg) { 28 | try { publicAPI.onerror.call(publicAPI,msg,script_url); } catch (err) { throw new Error(msg); } 29 | } 30 | 31 | function handleScriptLoad() { 32 | if ((this.readyState && this.readyState!=="complete" && this.readyState!=="loaded") || script_loaded) { return; } 33 | this.onload = this.onreadystatechange = null; // prevent memory leak 34 | script_loaded = true; 35 | if (publicAPI.readyState !== 4) ThrowError("Script failed to load ["+script_url+"]."); 36 | removeScript(); 37 | } 38 | 39 | function fireReadyStateChange(rs,args) { 40 | args = args || []; 41 | publicAPI.readyState = rs; 42 | if (typeof publicAPI.onreadystatechange === "function") publicAPI.onreadystatechange.apply(publicAPI,args); 43 | } 44 | 45 | publicAPI = { 46 | onerror:null, 47 | onreadystatechange:null, 48 | readyState:0, 49 | open:function(method,url){ 50 | reset(); 51 | internal_callback = "cb"+(callback_counter++); 52 | (function(icb){ 53 | global.jXHR[icb] = function() { 54 | try { fireReadyStateChange.call(publicAPI,4,arguments); } 55 | catch(err) { 56 | publicAPI.readyState = -1; 57 | ThrowError("Script failed to run ["+script_url+"]."); 58 | } 59 | global.jXHR[icb] = null; 60 | }; 61 | })(internal_callback); 62 | script_url = url.replace(/=\?/,"=jXHR."+internal_callback); 63 | fireReadyStateChange(1); 64 | }, 65 | send:function(){ 66 | SETTIMEOUT(function(){ 67 | scriptElem = doc.createElement("script"); 68 | scriptElem.setAttribute("type","text/javascript"); 69 | scriptElem.onload = scriptElem.onreadystatechange = function(){handleScriptLoad.call(scriptElem);}; 70 | scriptElem.setAttribute("src",script_url); 71 | doc.getElementsByTagName("head")[0].appendChild(scriptElem); 72 | },0); 73 | fireReadyStateChange(2); 74 | }, 75 | setRequestHeader:function(){}, // noop 76 | getResponseHeader:function(){return "";}, // basically noop 77 | getAllResponseHeaders:function(){return [];} // ditto 78 | }; 79 | 80 | reset(); 81 | 82 | return publicAPI; 83 | }; 84 | })(window); 85 | 86 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | ## What is Octopress? 2 | 3 | Octopress is [Jekyll](https://github.com/mojombo/jekyll) blogging at its finest. 4 | 5 | 1. **Octopress sports a clean responsive theme** written in semantic HTML5, focused on readability and friendliness toward mobile devices. 6 | 2. **Code blogging is easy and beautiful.** Embed code (with [Solarized](http://ethanschoonover.com/solarized) styling) in your posts from gists, jsFiddle or from your filesystem. 7 | 3. **Third party integration is simple** with built-in support for Pinboard, Delicious, GitHub Repositories, Disqus Comments and Google Analytics. 8 | 4. **It's easy to use.** A collection of rake tasks simplifies development and makes deploying a cinch. 9 | 5. **Ships with great plug-ins** some original and others from the Jekyll community — tested and improved. 10 | 11 | 12 | ## Documentation 13 | 14 | Check out [Octopress.org](http://octopress.org/docs) for guides and documentation. 15 | 16 | 17 | ## Contributing 18 | 19 | [![Build Status](https://travis-ci.org/imathis/octopress.png?branch=master)](https://travis-ci.org/imathis/octopress) 20 | 21 | We love to see people contributing to Octopress, whether it's a bug report, feature suggestion or a pull request. At the moment, we try to keep the core slick and lean, focusing on basic blogging needs, so some of your suggestions might not find their way into Octopress. For those ideas, we started a [list of 3rd party plug-ins](https://github.com/imathis/octopress/wiki/3rd-party-plugins), where you can link your own Octopress plug-in repositories. For the future, we're thinking about ways to easier add them them into our main releases. 22 | 23 | 24 | ## License 25 | (The MIT License) 26 | 27 | Copyright © 2009-2013 Brandon Mathis 28 | 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 30 | 31 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 32 | 33 | THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | 35 | 36 | #### If you want to be awesome. 37 | - Proudly display the 'Powered by Octopress' credit in the footer. 38 | - Add your site to the Wiki so we can watch the community grow. 39 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/sidebar/_base.scss: -------------------------------------------------------------------------------- 1 | .side-shadow-border { 2 | @include box-shadow(lighten($sidebar-bg, 5) 0 1px); 3 | } 4 | aside.sidebar { 5 | overflow: hidden; 6 | color: $sidebar-color; 7 | text-shadow: lighten($sidebar-bg, 8) 0 1px; 8 | a { @extend .force-wrap; } 9 | section { 10 | @extend .sans; 11 | font-size: .8em; 12 | line-height: 1.4em; 13 | margin-bottom: 1.5em; 14 | h1 { 15 | margin: 1.5em 0 0; 16 | padding-bottom: .2em; 17 | border-bottom: 1px solid $sidebar-border; 18 | @extend .side-shadow-border; 19 | + p { 20 | padding-top: .4em; 21 | } 22 | } 23 | } 24 | img { 25 | @extend .flex-content; 26 | @extend .basic-alignment; 27 | @include shadow-box($border: #fff .3em solid); 28 | } 29 | ul { 30 | margin-bottom: 0.5em; 31 | margin-left: 0; 32 | } 33 | li { 34 | list-style: none; 35 | padding: .5em 0; 36 | margin: 0; 37 | border-bottom: 1px solid $sidebar-border; 38 | @extend .side-shadow-border; 39 | p:last-child { 40 | margin-bottom: 0; 41 | } 42 | } 43 | a { 44 | color: inherit; 45 | @include transition(color .5s); 46 | } 47 | &:hover a { 48 | color: $sidebar-link-color; 49 | &:hover { color: $sidebar-link-color-hover; } 50 | } 51 | } 52 | .aside-alt-link { 53 | color: $sidebar-link-color-subdued; 54 | &:hover { 55 | color: $sidebar-link-color-subdued-hover; 56 | } 57 | } 58 | 59 | @media only screen and (min-width: 768px) { 60 | .toggle-sidebar { 61 | outline: none; 62 | position: absolute; right: -10px; top: 0; bottom: 0; 63 | display: inline-block; 64 | text-decoration: none; 65 | color: mix($text-color-light, $sidebar-bg); 66 | width: 9px; 67 | cursor: pointer; 68 | &:hover { 69 | background: mix($sidebar-border, $sidebar-bg); 70 | @include background(linear-gradient(left, rgba($sidebar-border, .5), rgba($sidebar-border, 0))); 71 | } 72 | &:after { 73 | position: absolute; right: -11px; top: 0; 74 | width: 20px; 75 | font-size: 1.2em; 76 | line-height: 1.1em; 77 | padding-bottom: .15em; 78 | @include border-bottom-right-radius(.3em); 79 | text-align: center; 80 | background: $main-bg $noise-bg; 81 | border-bottom: 1px solid $sidebar-border; 82 | border-right: 1px solid $sidebar-border; 83 | content: "\00BB"; 84 | text-indent: -1px; 85 | } 86 | .collapse-sidebar & { 87 | text-indent: 0px; 88 | right: -20px; 89 | width: 19px; 90 | &:hover { 91 | background: mix($sidebar-border, $sidebar-bg); 92 | } 93 | &:after { 94 | border-left: 1px solid $sidebar-border; 95 | text-shadow: #fff 0 1px; 96 | content: "\00AB"; 97 | left: 0px; right: 0; 98 | text-align: center; 99 | text-indent: 0; 100 | border: 0; 101 | border-right-width: 0; 102 | background: none; 103 | } 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /plugins/code_block.rb: -------------------------------------------------------------------------------- 1 | # Title: Simple Code Blocks for Jekyll 2 | # Author: Brandon Mathis http://brandonmathis.com 3 | # Description: Write codeblocks with semantic HTML5 <figure> and <figcaption> elements and optional syntax highlighting — all with a simple, intuitive interface. 4 | # 5 | # Syntax: 6 | # {% codeblock [title] [url] [link text] %} 7 | # code snippet 8 | # {% endcodeblock %} 9 | # 10 | # For syntax highlighting, put a file extension somewhere in the title. examples: 11 | # {% codeblock file.sh %} 12 | # code snippet 13 | # {% endcodeblock %} 14 | # 15 | # {% codeblock Time to be Awesome! (awesome.rb) %} 16 | # code snippet 17 | # {% endcodeblock %} 18 | # 19 | # Example: 20 | # 21 | # {% codeblock Got pain? painreleif.sh http://site.com/painreleief.sh Download it! %} 22 | # $ rm -rf ~/PAIN 23 | # {% endcodeblock %} 24 | # 25 | # Output: 26 | # 27 | # <figure class='code'> 28 | # <figcaption><span>Got pain? painrelief.sh</span> <a href="http://site.com/painrelief.sh">Download it!</a> 29 | # <div class="highlight"><pre><code class="sh"> 30 | # -- nicely escaped highlighted code -- 31 | # </code></pre></div> 32 | # </figure> 33 | # 34 | # Example 2 (no syntax highlighting): 35 | # 36 | # {% codeblock %} 37 | # <sarcasm>Ooooh, sarcasm... How original!</sarcasm> 38 | # {% endcodeblock %} 39 | # 40 | # <figure class='code'> 41 | # <pre><code><sarcasm> Ooooh, sarcasm... How original!</sarcasm></code></pre> 42 | # </figure> 43 | # 44 | require './plugins/pygments_code' 45 | require './plugins/raw' 46 | 47 | module Jekyll 48 | 49 | class CodeBlock < Liquid::Block 50 | include HighlightCode 51 | include TemplateWrapper 52 | CaptionUrlTitle = /(\S[\S\s]*)\s+(https?:\/\/\S+|\/\S+)\s*(.+)?/i 53 | Caption = /(\S[\S\s]*)/ 54 | def initialize(tag_name, markup, tokens) 55 | @title = nil 56 | @caption = nil 57 | @filetype = nil 58 | @highlight = true 59 | if markup =~ /\s*lang:(\S+)/i 60 | @filetype = $1 61 | markup = markup.sub(/\s*lang:(\S+)/i,'') 62 | end 63 | if markup =~ CaptionUrlTitle 64 | @file = $1 65 | @caption = "<figcaption><span>#{$1}</span><a href='#{$2}'>#{$3 || 'link'}</a></figcaption>" 66 | elsif markup =~ Caption 67 | @file = $1 68 | @caption = "<figcaption><span>#{$1}</span></figcaption>\n" 69 | end 70 | if @file =~ /\S[\S\s]*\w+\.(\w+)/ && @filetype.nil? 71 | @filetype = $1 72 | end 73 | super 74 | end 75 | 76 | def render(context) 77 | output = super 78 | code = super 79 | source = "<figure class='code'>" 80 | source += @caption if @caption 81 | if @filetype 82 | source += " #{highlight(code, @filetype)}</figure>" 83 | else 84 | source += "#{tableize_code(code.lstrip.rstrip.gsub(/</,'<'))}</figure>" 85 | end 86 | source = safe_wrap(source) 87 | source = context['pygments_prefix'] + source if context['pygments_prefix'] 88 | source = source + context['pygments_suffix'] if context['pygments_suffix'] 89 | source 90 | end 91 | end 92 | end 93 | 94 | Liquid::Template.register_tag('codeblock', Jekyll::CodeBlock) 95 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # ----------------------- # 2 | # Main Configs # 3 | # ----------------------- # 4 | 5 | url: http://yoursite.com 6 | title: My Octopress Blog 7 | subtitle: A blogging framework for hackers. 8 | author: Your Name 9 | simple_search: http://google.com/search 10 | description: 11 | 12 | # Default date format is "ordinal" (resulting in "July 22nd 2007") 13 | # You can customize the format as defined in 14 | # http://www.ruby-doc.org/core-1.9.2/Time.html#method-i-strftime 15 | # Additionally, %o will give you the ordinal representation of the day 16 | date_format: "ordinal" 17 | 18 | # RSS / Email (optional) subscription links (change if using something like Feedburner) 19 | subscribe_rss: /atom.xml 20 | subscribe_email: 21 | # RSS feeds can list your email address if you like 22 | email: 23 | 24 | # ----------------------- # 25 | # Jekyll & Plugins # 26 | # ----------------------- # 27 | 28 | # If publishing to a subdirectory as in http://site.com/project set 'root: /project' 29 | root: / 30 | permalink: /blog/:year/:month/:day/:title/ 31 | source: source 32 | destination: public 33 | plugins: plugins 34 | code_dir: downloads/code 35 | category_dir: blog/categories 36 | markdown: rdiscount 37 | rdiscount: 38 | extensions: 39 | - autolink 40 | - footnotes 41 | - smart 42 | pygments: false # default python pygments have been replaced by pygments.rb 43 | 44 | paginate: 10 # Posts per page on the blog index 45 | pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/ 46 | recent_posts: 5 # Posts in the sidebar Recent Posts section 47 | excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles 48 | 49 | titlecase: true # Converts page and post titles to titlecase 50 | 51 | # list each of the sidebar modules you want to include, in the order you want them to appear. 52 | # To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html' 53 | default_asides: [asides/recent_posts.html, asides/github.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html] 54 | 55 | # Each layout uses the default asides, but they can have their own asides instead. Simply uncomment the lines below 56 | # and add an array with the asides you want to use. 57 | # blog_index_asides: 58 | # post_asides: 59 | # page_asides: 60 | 61 | # ----------------------- # 62 | # 3rd Party Settings # 63 | # ----------------------- # 64 | 65 | # Github repositories 66 | github_user: 67 | github_repo_count: 0 68 | github_show_profile_link: true 69 | github_skip_forks: true 70 | 71 | # Twitter 72 | twitter_user: 73 | twitter_tweet_button: true 74 | 75 | # Google +1 76 | google_plus_one: false 77 | google_plus_one_size: medium 78 | 79 | # Google Plus Profile 80 | # Hidden: No visible button, just add author information to search results 81 | googleplus_user: 82 | googleplus_hidden: false 83 | 84 | # Pinboard 85 | pinboard_user: 86 | pinboard_count: 3 87 | 88 | # Delicious 89 | delicious_user: 90 | delicious_count: 3 91 | 92 | # Disqus Comments 93 | disqus_short_name: 94 | disqus_show_comment_count: false 95 | 96 | # Google Analytics 97 | google_analytics_tracking_id: 98 | 99 | # Facebook Like 100 | facebook_like: false 101 | -------------------------------------------------------------------------------- /plugins/date.rb: -------------------------------------------------------------------------------- 1 | module Octopress 2 | module Date 3 | 4 | # Returns a datetime if the input is a string 5 | def datetime(date) 6 | if date.class == String 7 | date = Time.parse(date) 8 | end 9 | date 10 | end 11 | 12 | # Returns an ordidinal date eg July 22 2007 -> July 22nd 2007 13 | def ordinalize(date) 14 | date = datetime(date) 15 | "#{date.strftime('%b')} #{ordinal(date.strftime('%e').to_i)}, #{date.strftime('%Y')}" 16 | end 17 | 18 | # Returns an ordinal number. 13 -> 13th, 21 -> 21st etc. 19 | def ordinal(number) 20 | if (11..13).include?(number.to_i % 100) 21 | "#{number}<span>th</span>" 22 | else 23 | case number.to_i % 10 24 | when 1; "#{number}<span>st</span>" 25 | when 2; "#{number}<span>nd</span>" 26 | when 3; "#{number}<span>rd</span>" 27 | else "#{number}<span>th</span>" 28 | end 29 | end 30 | end 31 | 32 | # Formats date either as ordinal or by given date format 33 | # Adds %o as ordinal representation of the day 34 | def format_date(date, format) 35 | date = datetime(date) 36 | if format.nil? || format.empty? || format == "ordinal" 37 | date_formatted = ordinalize(date) 38 | else 39 | date_formatted = date.strftime(format) 40 | date_formatted.gsub!(/%o/, ordinal(date.strftime('%e').to_i)) 41 | end 42 | date_formatted 43 | end 44 | 45 | end 46 | end 47 | 48 | 49 | module Jekyll 50 | 51 | class Post 52 | include Octopress::Date 53 | 54 | # Convert this post into a Hash for use in Liquid templates. 55 | # 56 | # Returns <Hash> 57 | def to_liquid 58 | date_format = self.site.config['date_format'] 59 | self.data.deep_merge({ 60 | "title" => self.data['title'] || self.slug.split('-').select {|w| w.capitalize! || w }.join(' '), 61 | "url" => self.url, 62 | "date" => self.date, 63 | # Monkey patch 64 | "date_formatted" => format_date(self.date, date_format), 65 | "updated_formatted" => self.data.has_key?('updated') ? format_date(self.data['updated'], date_format) : nil, 66 | "id" => self.id, 67 | "categories" => self.categories, 68 | "next" => self.next, 69 | "previous" => self.previous, 70 | "tags" => self.tags, 71 | "content" => self.content }) 72 | end 73 | end 74 | 75 | class Page 76 | include Octopress::Date 77 | 78 | # Initialize a new Page. 79 | # 80 | # site - The Site object. 81 | # base - The String path to the source. 82 | # dir - The String path between the source and the file. 83 | # name - The String filename of the file. 84 | def initialize(site, base, dir, name) 85 | @site = site 86 | @base = base 87 | @dir = dir 88 | @name = name 89 | 90 | self.process(name) 91 | self.read_yaml(File.join(base, dir), name) 92 | # Monkey patch 93 | date_format = self.site.config['date_format'] 94 | self.data['date_formatted'] = format_date(self.data['date'], date_format) if self.data.has_key?('date') 95 | self.data['updated_formatted'] = format_date(self.data['updated'], date_format) if self.data.has_key?('updated') 96 | end 97 | end 98 | end 99 | -------------------------------------------------------------------------------- /.themes/classic/source/javascripts/twitter.js: -------------------------------------------------------------------------------- 1 | // JSON-P Twitter fetcher for Octopress 2 | // (c) Brandon Mathis // MIT License 3 | 4 | /* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */ 5 | function prettyDate(time) { 6 | if (navigator.appName === 'Microsoft Internet Explorer') { 7 | return "<span>∞</span>"; // because IE date parsing isn't fun. 8 | } 9 | var say = { 10 | just_now: " now", 11 | minute_ago: "1m", 12 | minutes_ago: "m", 13 | hour_ago: "1h", 14 | hours_ago: "h", 15 | yesterday: "1d", 16 | days_ago: "d", 17 | last_week: "1w", 18 | weeks_ago: "w" 19 | }; 20 | 21 | var current_date = new Date(), 22 | current_date_time = current_date.getTime(), 23 | current_date_full = current_date_time + (1 * 60000), 24 | date = new Date(time), 25 | diff = ((current_date_full - date.getTime()) / 1000), 26 | day_diff = Math.floor(diff / 86400); 27 | 28 | if (isNaN(day_diff) || day_diff < 0) { return "<span>∞</span>"; } 29 | 30 | return day_diff === 0 && ( 31 | diff < 60 && say.just_now || 32 | diff < 120 && say.minute_ago || 33 | diff < 3600 && Math.floor(diff / 60) + say.minutes_ago || 34 | diff < 7200 && say.hour_ago || 35 | diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) || 36 | day_diff === 1 && say.yesterday || 37 | day_diff < 7 && day_diff + say.days_ago || 38 | day_diff === 7 && say.last_week || 39 | day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago; 40 | } 41 | 42 | function linkifyTweet(text, url) { 43 | // Linkify urls, usernames, hashtags 44 | text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>') 45 | .replace(/(^|\W)@(\w+)/g, '$1<a href="https://twitter.com/$2">@$2</a>') 46 | .replace(/(^|\W)#(\w+)/g, '$1<a href="https://search.twitter.com/search?q=%23$2">#$2</a>'); 47 | 48 | // Use twitter's api to replace t.co shortened urls with expanded ones. 49 | for (var u in url) { 50 | if(url[u].expanded_url != null){ 51 | var shortUrl = new RegExp(url[u].url, 'g'); 52 | text = text.replace(shortUrl, url[u].expanded_url); 53 | var shortUrl = new RegExp(">"+(url[u].url.replace(/https?:\/\//, '')), 'g'); 54 | text = text.replace(shortUrl, ">"+url[u].display_url); 55 | } 56 | } 57 | return text 58 | } 59 | 60 | function showTwitterFeed(tweets, twitter_user) { 61 | var timeline = document.getElementById('tweets'), 62 | content = ''; 63 | 64 | for (var t in tweets) { 65 | content += '<li>'+'<p>'+'<a href="https://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'), tweets[t].entities.urls)+'</p>'+'</li>'; 66 | } 67 | timeline.innerHTML = content; 68 | } 69 | 70 | function getTwitterFeed(user, count, replies) { 71 | count = parseInt(count, 10); 72 | $.ajax({ 73 | url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?" 74 | , type: 'jsonp' 75 | , error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); } 76 | , success: function(data) { showTwitterFeed(data.slice(0, count), user); } 77 | }) 78 | } 79 | -------------------------------------------------------------------------------- /.themes/classic/sass/base/_theme.scss: -------------------------------------------------------------------------------- 1 | $noise-bg: image-url('noise.png') top left !default; 2 | $img-border: inline-image('dotted-border.png'); 3 | 4 | // Main Link Colors 5 | $link-color: lighten(#165b94, 3) !default; 6 | $link-color-hover: adjust-color($link-color, $lightness: 10, $saturation: 25) !default; 7 | $link-color-visited: adjust-color($link-color, $hue: 80, $lightness: -4) !default; 8 | $link-color-active: adjust-color($link-color-hover, $lightness: -15) !default; 9 | 10 | // Main Section Colors 11 | $main-bg: #f8f8f8 !default; 12 | $page-bg: #252525 !default; 13 | $article-border: #eeeeee !default; 14 | 15 | $header-bg: #333 !default; 16 | $header-border: lighten($header-bg, 15) !default; 17 | $title-color: #f2f2f2 !default; 18 | $subtitle-color: #aaa !default; 19 | 20 | $text-color: #222 !default; 21 | $text-color-light: #aaa !default; 22 | $type-border: #ddd !default; 23 | 24 | /* Navigation */ 25 | $nav-bg: #ccc !default; 26 | $nav-bg-front: image-url('noise.png') !default; 27 | $nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)) !default; 28 | $nav-color: darken($nav-bg, 38) !default; 29 | $nav-color-hover: darken($nav-color, 25) !default; 30 | $nav-placeholder: desaturate(darken($nav-bg, 10), 15) !default; 31 | $nav-border: darken($nav-bg, 10) !default; 32 | $nav-border-top: lighten($nav-bg, 15) !default; 33 | $nav-border-bottom: darken($nav-bg, 25) !default; 34 | $nav-border-left: darken($nav-bg, 11) !default; 35 | $nav-border-right: lighten($nav-bg, 7) !default; 36 | 37 | /* Sidebar colors */ 38 | $sidebar-bg: #f2f2f2 !default; 39 | $sidebar-link-color: $link-color !default; 40 | $sidebar-link-color-hover: $link-color-hover !default; 41 | $sidebar-link-color-active: $link-color-active !default; 42 | $sidebar-color: change-color(mix($text-color, $sidebar-bg, 80), $hue: hue($sidebar-bg), $saturation: saturation($sidebar-bg)/2) !default; 43 | $sidebar-border: desaturate(darken($sidebar-bg, 7), 10) !default; 44 | $sidebar-border-hover: darken($sidebar-bg, 7) !default; 45 | $sidebar-link-color-subdued: lighten($sidebar-color, 20) !default; 46 | $sidebar-link-color-subdued-hover: $sidebar-link-color-hover !default; 47 | 48 | $footer-color: #888 !default; 49 | $footer-bg: #ccc !default; 50 | $footer-bg-front: image-url('noise.png') !default; 51 | $footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)) !default; 52 | $footer-color: darken($footer-bg, 38) !default; 53 | $footer-color-hover: darken($footer-color, 10) !default; 54 | $footer-border-top: lighten($footer-bg, 15) !default; 55 | $footer-border-bottom: darken($footer-bg, 15) !default; 56 | $footer-link-color: darken($footer-bg, 38) !default; 57 | $footer-link-color-hover: darken($footer-color, 25) !default; 58 | $page-border-bottom: darken($footer-bg, 5) !default; 59 | 60 | 61 | /* Core theme application */ 62 | 63 | a { 64 | @include link-colors($link-color, $hover: $link-color-hover, $focus: $link-color-hover, $visited: $link-color-visited, $active: $link-color-active); 65 | } 66 | aside.sidebar a { 67 | @include link-colors($sidebar-link-color, $hover: $sidebar-link-color-hover, $focus: $sidebar-link-color-hover, $active: $sidebar-link-color-active); 68 | } 69 | a { 70 | @include transition(color .3s); 71 | } 72 | 73 | html { 74 | background: $page-bg image-url('line-tile.png') top left; 75 | } 76 | body { 77 | > div { 78 | background: $sidebar-bg $noise-bg; 79 | border-bottom: 1px solid $page-border-bottom; 80 | > div { 81 | background: $main-bg $noise-bg; 82 | border-right: 1px solid $sidebar-border; 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /plugins/gist_tag.rb: -------------------------------------------------------------------------------- 1 | # A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers. 2 | # by: Brandon Tilly 3 | # Source URL: https://gist.github.com/1027674 4 | # Post http://brandontilley.com/2011/01/31/gist-tag-for-jekyll.html 5 | # 6 | # Example usage: {% gist 1027674 gist_tag.rb %} //embeds a gist for this plugin 7 | 8 | require 'cgi' 9 | require 'digest/md5' 10 | require 'net/https' 11 | require 'uri' 12 | 13 | module Jekyll 14 | class GistTag < Liquid::Tag 15 | def initialize(tag_name, text, token) 16 | super 17 | @text = text 18 | @cache_disabled = false 19 | @cache_folder = File.expand_path "../.gist-cache", File.dirname(__FILE__) 20 | FileUtils.mkdir_p @cache_folder 21 | end 22 | 23 | def render(context) 24 | if parts = @text.match(/([\d]*) (.*)/) 25 | gist, file = parts[1].strip, parts[2].strip 26 | script_url = script_url_for gist, file 27 | code = get_cached_gist(gist, file) || get_gist_from_web(gist, file) 28 | html_output_for script_url, code 29 | else 30 | "" 31 | end 32 | end 33 | 34 | def html_output_for(script_url, code) 35 | code = CGI.escapeHTML code 36 | <<-HTML 37 | <div><script src='#{script_url}'></script> 38 | <noscript><pre><code>#{code}</code></pre></noscript></div> 39 | HTML 40 | end 41 | 42 | def script_url_for(gist_id, filename) 43 | url = "https://gist.github.com/#{gist_id}.js" 44 | url = "#{url}?file=#{filename}" unless filename.nil? or filename.empty? 45 | url 46 | end 47 | 48 | def get_gist_url_for(gist, file) 49 | "https://raw.github.com/gist/#{gist}/#{file}" 50 | end 51 | 52 | def cache(gist, file, data) 53 | cache_file = get_cache_file_for gist, file 54 | File.open(cache_file, "w") do |io| 55 | io.write data 56 | end 57 | end 58 | 59 | def get_cached_gist(gist, file) 60 | return nil if @cache_disabled 61 | cache_file = get_cache_file_for gist, file 62 | File.read cache_file if File.exist? cache_file 63 | end 64 | 65 | def get_cache_file_for(gist, file) 66 | bad_chars = /[^a-zA-Z0-9\-_.]/ 67 | gist = gist.gsub bad_chars, '' 68 | file = file.gsub bad_chars, '' 69 | md5 = Digest::MD5.hexdigest "#{gist}-#{file}" 70 | File.join @cache_folder, "#{gist}-#{file}-#{md5}.cache" 71 | end 72 | 73 | def get_gist_from_web(gist, file) 74 | gist_url = get_gist_url_for gist, file 75 | raw_uri = URI.parse gist_url 76 | proxy = ENV['http_proxy'] 77 | if proxy 78 | proxy_uri = URI.parse(proxy) 79 | https = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port).new raw_uri.host, raw_uri.port 80 | else 81 | https = Net::HTTP.new raw_uri.host, raw_uri.port 82 | end 83 | https.use_ssl = true 84 | https.verify_mode = OpenSSL::SSL::VERIFY_NONE 85 | request = Net::HTTP::Get.new raw_uri.request_uri 86 | data = https.request request 87 | if data.code.to_i != 200 88 | raise RuntimeError, "Gist replied with #{data.code} for #{gist_url}" 89 | end 90 | data = data.body 91 | cache gist, file, data unless @cache_disabled 92 | data 93 | end 94 | end 95 | 96 | class GistTagNoCache < GistTag 97 | def initialize(tag_name, text, token) 98 | super 99 | @cache_disabled = true 100 | end 101 | end 102 | end 103 | 104 | Liquid::Template.register_tag('gist', Jekyll::GistTag) 105 | Liquid::Template.register_tag('gistnocache', Jekyll::GistTagNoCache) 106 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/_blog.scss: -------------------------------------------------------------------------------- 1 | article { 2 | padding-top: 1em; 3 | a { @extend .force-wrap; } 4 | header { 5 | position: relative; 6 | padding-top: 2em; 7 | padding-bottom: 1em; 8 | margin-bottom: 1em; 9 | background: $img-border bottom left repeat-x; 10 | h1 { 11 | margin: 0; 12 | a { text-decoration: none; 13 | &:hover { text-decoration: underline; } } 14 | } 15 | p { 16 | font-size: .9em; 17 | color: $text-color-light; 18 | margin: 0; 19 | &.meta { 20 | @extend .sans; 21 | text-transform: uppercase; 22 | position: absolute; top: 0; 23 | } 24 | } 25 | @media only screen and (min-width: 768px) { 26 | margin-bottom: 1.5em; 27 | padding-bottom: 1em; 28 | background: $img-border bottom left repeat-x; 29 | } 30 | } 31 | h2 { 32 | padding-top: 0.8em; 33 | background: $img-border top left repeat-x; 34 | } 35 | .entry-content & h2:first-child, header + h2 { padding-top: 0; } 36 | h2:first-child, header + h2 { background: none; } 37 | .feature { 38 | padding-top: .5em; 39 | margin-bottom: 1em; 40 | padding-bottom: 1em; 41 | background: $img-border bottom left repeat-x; 42 | font-size: 2.0em; font-style: italic; 43 | line-height: 1.3em; 44 | } 45 | img, video, .flash-video { 46 | @extend .flex-content; 47 | @extend .basic-alignment; 48 | @include shadow-box; 49 | } 50 | video, .flash-video { margin: 0 auto 1.5em; } 51 | video { display: block; width: 100%; } 52 | .flash-video { 53 | > div { 54 | position: relative; 55 | display: block; 56 | padding-bottom: 56.25%; 57 | padding-top: 1px; 58 | height: 0; 59 | overflow: hidden; 60 | iframe, object, embed { 61 | position: absolute; 62 | top: 0; 63 | left: 0; 64 | width: 100%; 65 | height: 100%; 66 | } 67 | } 68 | } 69 | > footer { 70 | padding-bottom: 2.5em; 71 | margin-top: 2em; 72 | @extend .sans; 73 | p.meta { 74 | margin-bottom: .8em; 75 | font-size: .85em; 76 | clear: both; 77 | overflow: hidden; 78 | } 79 | .byline + time:before, time +time:before, .comments:before, .byline ~ .categories:before { 80 | @extend .separator; 81 | } 82 | } 83 | 84 | } 85 | article + article { 86 | .blog-index & { 87 | background: $img-border top left repeat-x; 88 | } 89 | } 90 | #content .blog-index { 91 | padding: { top: 0; bottom: 0; } 92 | article { padding-top: 2em; } 93 | article header { background: none; padding-bottom: 0; } 94 | article h1 { 95 | font-size: 2.2em; 96 | a { color: inherit; &:hover { color: $link-color-hover; } } 97 | } 98 | a[rel=full-article] { 99 | background: darken($main-bg, 5); 100 | display: inline-block; 101 | padding: .4em .8em; 102 | margin-right: .5em; 103 | text-decoration: none; 104 | color: mix($text-color, $text-color-light); 105 | @extend .serif; 106 | @include transition(background-color .5s); 107 | &:hover { 108 | background: $link-color-hover; 109 | text-shadow: none; 110 | color: $main-bg; 111 | } 112 | } 113 | footer { 114 | @extend .sans; 115 | margin-top: 1em; 116 | } 117 | } 118 | 119 | .separator { 120 | content: "\2022 "; 121 | padding: 0 .4em 0 .2em; 122 | display: inline-block; 123 | } 124 | 125 | #content div.pagination { 126 | text-align: center; 127 | font-size: .95em; 128 | position: relative; 129 | background: $img-border top left repeat-x; 130 | padding: {top: 1.5em; bottom: 1.5em;} 131 | a { 132 | text-decoration: none; 133 | color: $text-color-light; 134 | &.prev { position: absolute; left: 0; } 135 | &.next { position: absolute; right: 0; } 136 | &:hover { color: $link-color-hover; } 137 | &[href*=archive] { 138 | &:before, &:after { content: '\2014'; padding: 0 .3em; } 139 | } 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /plugins/octopress_filters.rb: -------------------------------------------------------------------------------- 1 | #custom filters for Octopress 2 | require './plugins/backtick_code_block' 3 | require './plugins/post_filters' 4 | require './plugins/raw' 5 | require './plugins/date' 6 | require 'rubypants' 7 | 8 | module OctopressFilters 9 | include BacktickCodeBlock 10 | include TemplateWrapper 11 | def pre_filter(input) 12 | input = render_code_block(input) 13 | input.gsub /(<figure.+?>.+?<\/figure>)/m do 14 | safe_wrap($1) 15 | end 16 | end 17 | def post_filter(input) 18 | input = unwrap(input) 19 | RubyPants.new(input).to_html 20 | end 21 | end 22 | 23 | module Jekyll 24 | class ContentFilters < PostFilter 25 | include OctopressFilters 26 | def pre_render(post) 27 | if post.ext.match('html|textile|markdown|md|haml|slim|xml') 28 | post.content = pre_filter(post.content) 29 | end 30 | end 31 | def post_render(post) 32 | if post.ext.match('html|textile|markdown|md|haml|slim|xml') 33 | post.content = post_filter(post.content) 34 | end 35 | end 36 | end 37 | end 38 | 39 | 40 | module OctopressLiquidFilters 41 | include Octopress::Date 42 | 43 | # Used on the blog index to split posts on the <!--more--> marker 44 | def excerpt(input) 45 | if input.index(/<!--\s*more\s*-->/i) 46 | input.split(/<!--\s*more\s*-->/i)[0] 47 | else 48 | input 49 | end 50 | end 51 | 52 | # Checks for excerpts (helpful for template conditionals) 53 | def has_excerpt(input) 54 | input =~ /<!--\s*more\s*-->/i ? true : false 55 | end 56 | 57 | # Summary is used on the Archive pages to return the first block of content from a post. 58 | def summary(input) 59 | if input.index(/\n\n/) 60 | input.split(/\n\n/)[0] 61 | else 62 | input 63 | end 64 | end 65 | 66 | # Extracts raw content DIV from template, used for page description as {{ content }} 67 | # contains complete sub-template code on main page level 68 | def raw_content(input) 69 | /<div class="entry-content">(?<content>[\s\S]*?)<\/div>\s*<(footer|\/article)>/ =~ input 70 | return (content.nil?) ? input : content 71 | end 72 | 73 | # Escapes CDATA sections in post content 74 | def cdata_escape(input) 75 | input.gsub(/<!\[CDATA\[/, '<![CDATA[').gsub(/\]\]>/, ']]>') 76 | end 77 | 78 | # Replaces relative urls with full urls 79 | def expand_urls(input, url='') 80 | url ||= '/' 81 | input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]*)/ do 82 | $1+url+$3 83 | end 84 | end 85 | 86 | # Improved version of Liquid's truncate: 87 | # - Doesn't cut in the middle of a word. 88 | # - Uses typographically correct ellipsis (…) insted of '...' 89 | def truncate(input, length) 90 | if input.length > length && input[0..(length-1)] =~ /(.+)\b.+$/im 91 | $1.strip + ' …' 92 | else 93 | input 94 | end 95 | end 96 | 97 | # Improved version of Liquid's truncatewords: 98 | # - Uses typographically correct ellipsis (…) insted of '...' 99 | def truncatewords(input, length) 100 | truncate = input.split(' ') 101 | if truncate.length > length 102 | truncate[0..length-1].join(' ').strip + ' …' 103 | else 104 | input 105 | end 106 | end 107 | 108 | # Condenses multiple spaces and tabs into a single space 109 | def condense_spaces(input) 110 | input.gsub(/\s{2,}/, ' ') 111 | end 112 | 113 | # Removes trailing forward slash from a string for easily appending url segments 114 | def strip_slash(input) 115 | if input =~ /(.+)\/$|^\/$/ 116 | input = $1 117 | end 118 | input 119 | end 120 | 121 | # Returns a url without the protocol (http://) 122 | def shorthand_url(input) 123 | input.gsub /(https?:\/\/)(\S+)/ do 124 | $2 125 | end 126 | end 127 | 128 | # Returns a title cased string based on John Gruber's title case http://daringfireball.net/2008/08/title_case_update 129 | def titlecase(input) 130 | input.titlecase 131 | end 132 | 133 | end 134 | Liquid::Template.register_filter OctopressLiquidFilters 135 | 136 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/_navigation.scss: -------------------------------------------------------------------------------- 1 | body > nav { 2 | position: relative; 3 | background-color: $nav-bg; 4 | @include background($nav-bg-front, $nav-bg-back); 5 | border: { 6 | top: 1px solid $nav-border-top; 7 | bottom: 1px solid $nav-border-bottom; } 8 | padding-top: .35em; 9 | padding-bottom: .35em; 10 | form { 11 | @include background-clip(padding-box); 12 | margin: 0; padding: 0; 13 | .search { 14 | padding: .3em .5em 0; 15 | font-size: .85em; 16 | font-family: $sans; 17 | line-height: 1.1em; 18 | width: 95%; 19 | @include border-radius(.5em); 20 | @include background-clip(padding-box); 21 | @include box-shadow(lighten($nav-bg, 2) 0 1px); 22 | background-color: lighten($nav-bg, 15); 23 | border: 1px solid $nav-border; 24 | color: #888; 25 | &:focus { 26 | color: #444; 27 | border-color: #80b1df; 28 | @include box-shadow(#80b1df 0 0 4px, #80b1df 0 0 3px inset); 29 | background-color: #fff; 30 | outline: none; 31 | } 32 | } 33 | } 34 | fieldset[role=search]{ float: right; width: 48%; } 35 | fieldset.mobile-nav{ float: left; width: 48%; 36 | select{ width: 100%; font-size: .8em; border: 1px solid #888;} 37 | } 38 | ul { display: none; } 39 | @media only screen and (min-width: 550px) { 40 | font-size: .9em; 41 | ul { 42 | @include horizontal-list(0); 43 | float: left; 44 | display: block; 45 | padding-top: .15em; 46 | } 47 | ul.subscription { 48 | margin-left: .8em; 49 | float: right; 50 | li:last-child a { padding-right: 0; } 51 | } 52 | ul li { 53 | margin: 0; 54 | } 55 | a { 56 | @include link-colors($nav-color, $nav-color-hover, $visited: $nav-color); 57 | font-family: $sans; 58 | text-shadow: lighten($nav-bg, 12) 0 1px; 59 | float: left; 60 | text-decoration: none; 61 | font-size: 1.1em; 62 | padding: .1em 0; 63 | line-height: 1.5em; 64 | } 65 | li + li { 66 | border-left: 1px solid $nav-border-left; 67 | margin-left: .8em; 68 | a { 69 | padding-left: .8em; 70 | border-left: 1px solid $nav-border-right; 71 | } 72 | } 73 | form { 74 | float: right; 75 | text-align: left; 76 | padding-left: .8em; 77 | width: $sidebar-width-medium - $pad-medium*2 - $sidebar-pad-medium + 20px; 78 | .search { 79 | width: 93%; 80 | font-size: .95em; 81 | line-height: 1.2em; 82 | } 83 | } 84 | ul[data-subscription$=email] + form { 85 | width: $sidebar-width-medium - $pad-medium*2 - $sidebar-pad-medium - 58px; 86 | .search { width: 91%; } 87 | } 88 | fieldset.mobile-nav { display: none; } 89 | fieldset[role=search]{ width: 99%; } 90 | } 91 | @media only screen and (min-width: 992px) { 92 | form { 93 | width: $sidebar-width-wide - $pad-wide - $sidebar-pad-wide*2 + 10px; 94 | } 95 | ul[data-subscription$=email] + form { 96 | width: $sidebar-width-wide - $pad-wide - $sidebar-pad-wide*2 - 58px; 97 | } 98 | } 99 | } 100 | .no-placeholder { 101 | body > nav .search { 102 | background: lighten($nav-bg, 15) image-url('search.png') .3em .25em no-repeat; 103 | text-indent: 1.3em; 104 | } 105 | } 106 | @mixin mask-subscription-nav($feed: 'rss.png'){ 107 | position: relative; top: 0px; 108 | text-indent: -999999em; 109 | background-color: $nav-border-right; 110 | border: 0; 111 | padding: 0; 112 | &,&:after { @include mask-image($feed); } 113 | &:after { 114 | content: ""; 115 | position: absolute; top: -1px; left: 0; 116 | background-color: lighten($nav-color, 25); 117 | } 118 | &:hover:after { background-color: lighten($nav-color, 20); } 119 | } 120 | .maskImage { 121 | body > nav { 122 | @media only screen and (min-width: 550px) { 123 | ul[data-subscription$=email] + form { 124 | width: $sidebar-width-medium - $pad-medium*2 - $sidebar-pad-medium - 32px; 125 | } 126 | } 127 | @media only screen and (min-width: 992px) { 128 | ul[data-subscription$=email] + form { 129 | width: $sidebar-width-wide - $pad-wide - $sidebar-pad-wide*2 - 32px; 130 | } 131 | } 132 | } 133 | ul.subscription { position: relative; top: .2em; li, a { border: 0; padding: 0; }} 134 | a[rel=subscribe-rss]{ @include mask-subscription-nav('rss.png'); } 135 | a[rel=subscribe-email]{ @include mask-subscription-nav('email.png'); } 136 | } 137 | 138 | -------------------------------------------------------------------------------- /.themes/classic/source/assets/jwplayer/glow/glow.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0"?> 2 | <skin version="1.1" name="Glow" author="LongTail Video"> 3 | 4 | <settings> 5 | <setting name="backcolor" value="0x000000" /> 6 | <setting name="frontcolor" value="0xeeeeee" /> 7 | <setting name="lightcolor" value="0xeeeeee" /> 8 | <setting name="screencolor" value="0x000000" /> 9 | </settings> 10 | 11 | <components> 12 | <component name="controlbar"> 13 | <settings> 14 | <setting name="margin" value="0" /> 15 | <setting name="fontsize" value="11" /> 16 | <setting name="fontcolor" value="0xEEEEEE" /> 17 | <setting name="buttoncolor" value="0xEEEEEE" /> 18 | </settings> 19 | 20 | <layout> 21 | <group position="left"> 22 | <button name="play" /> 23 | <text name="elapsed" /> 24 | </group> 25 | <group position="center"> 26 | <slider name="time" /> 27 | </group> 28 | <group position="right"> 29 | <text name="duration" /> 30 | <button name="blank" /> 31 | <button name="mute" /> 32 | <button name="fullscreen" /> 33 | </group> 34 | </layout> 35 | 36 | <elements> 37 | <element name="background" src="background.png" /> 38 | <element name="capLeft" src="divider.png" /> 39 | <element name="capRight" src="divider.png" /> 40 | <element name="divider" src="divider.png" /> 41 | <element name="blankButton" src="blankButton.png" /> 42 | <element name="fullscreenButton" src="fullscreenButton.png" /> 43 | <element name="fullscreenButtonOver" src="fullscreenButtonOver.png" /> 44 | <element name="muteButton" src="muteButton.png" /> 45 | <element name="muteButtonOver" src="muteButtonOver.png" /> 46 | <element name="pauseButton" src="pauseButton.png" /> 47 | <element name="pauseButtonOver" src="pauseButtonOver.png" /> 48 | <element name="playButton" src="playButton.png" /> 49 | <element name="playButtonOver" src="playButtonOver.png" /> 50 | <element name="timeSliderBuffer" src="timeSliderBuffer.png" /> 51 | <element name="timeSliderCapLeft" src="timeSliderCapLeft.png" /> 52 | <element name="timeSliderCapRight" src="timeSliderCapRight.png" /> 53 | <element name="timeSliderProgress" src="timeSliderProgress.png" /> 54 | <element name="timeSliderRail" src="timeSliderRail.png" /> 55 | <element name="normalscreenButton" src="normalscreenButton.png" /> 56 | <element name="normalscreenButtonOver" src="normalscreenButtonOver.png" /> 57 | <element name="unmuteButton" src="unmuteButton.png" /> 58 | <element name="unmuteButtonOver" src="unmuteButtonOver.png" /> 59 | <element name="volumeSliderRail" src="divider.png" /> 60 | <element name="volumeSliderProgress" src="divider.png" /> 61 | </elements> 62 | </component> 63 | 64 | <component name="display"> 65 | <settings> 66 | <setting name="bufferinterval" value="250" /> 67 | <setting name="bufferrotation" value="90" /> 68 | </settings> 69 | <elements> 70 | <element name="background" src="background.png" /> 71 | <element name="playIcon" src="playIcon.png" /> 72 | <element name="muteIcon" src="muteIcon.png" /> 73 | <element name="errorIcon" src="bufferIcon.png" /> 74 | <element name="bufferIcon" src="bufferIcon.png" /> 75 | </elements> 76 | </component> 77 | 78 | <component name="dock"> 79 | <settings> 80 | <setting name="fontcolor" value="0xFFFFFF" /> 81 | </settings> 82 | <elements> 83 | <element name="button" src="button.png" /> 84 | </elements> 85 | </component> 86 | 87 | <component name="playlist"> 88 | <settings> 89 | <setting name="fontcolor" value="0xEEEEEE" /> 90 | <setting name="overcolor" value="0xFFFFFF" /> 91 | <setting name="activecolor" value="0xFFFFFF" /> 92 | <setting name="backgroundcolor" value="0x333333" /> 93 | </settings> 94 | <elements> 95 | <element name="item" src="item.png" /> 96 | <element name="itemOver" src="itemOver.png" /> 97 | <element name="sliderCapBottom" src="sliderCapBottom.png" /> 98 | <element name="sliderCapTop" src="sliderCapTop.png" /> 99 | <element name="sliderRail" src="sliderRail.png" /> 100 | <element name="sliderThumb" src="sliderThumb.png" /> 101 | </elements> 102 | </component> 103 | 104 | <component name="sharing"> 105 | <elements> 106 | <element name="embedIcon" src="embedIcon.png" /> 107 | <element name="embedScreen" src="embedScreen.png" /> 108 | <element name="shareIcon" src="shareIcon.png" /> 109 | <element name="shareScreen" src="shareScreen.png" /> 110 | </elements> 111 | </component> 112 | 113 | </components> 114 | 115 | </skin> -------------------------------------------------------------------------------- /plugins/pagination.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | 3 | class Pagination < Generator 4 | # This generator is safe from arbitrary code execution. 5 | safe true 6 | 7 | # Generate paginated pages if necessary. 8 | # 9 | # site - The Site. 10 | # 11 | # Returns nothing. 12 | def generate(site) 13 | site.pages.dup.each do |page| 14 | paginate(site, page) if Pager.pagination_enabled?(site.config, page) 15 | end 16 | end 17 | 18 | # Paginates the blog's posts. Renders the index.html file into paginated 19 | # directories, e.g.: page2/index.html, page3/index.html, etc and adds more 20 | # site-wide data. 21 | # 22 | # site - The Site. 23 | # page - The index.html Page that requires pagination. 24 | # 25 | # {"paginator" => { "page" => <Number>, 26 | # "per_page" => <Number>, 27 | # "posts" => [<Post>], 28 | # "total_posts" => <Number>, 29 | # "total_pages" => <Number>, 30 | # "previous_page" => <Number>, 31 | # "next_page" => <Number> }} 32 | def paginate(site, page) 33 | all_posts = site.site_payload['site']['posts'] 34 | pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i) 35 | page_dir = page.destination('').sub(/\/[^\/]+$/, '') 36 | page_dir_config = site.config['pagination_dir'] 37 | dir = ((page_dir_config || page_dir) + '/').sub(/^\/+/, '') 38 | 39 | (1..pages).each do |num_page| 40 | pager = Pager.new(site.config, num_page, all_posts, page_dir+'/', '/'+dir, pages) 41 | if num_page > 1 42 | newpage = Page.new(site, site.source, page_dir, page.name) 43 | newpage.pager = pager 44 | newpage.dir = File.join(page.dir, "#{dir}page/#{num_page}") 45 | site.pages << newpage 46 | else 47 | page.pager = pager 48 | end 49 | end 50 | end 51 | end 52 | 53 | class Pager 54 | attr_reader :page, :per_page, :posts, :total_posts, :total_pages, :previous_page, :next_page 55 | 56 | # Calculate the number of pages. 57 | # 58 | # all_posts - The Array of all Posts. 59 | # per_page - The Integer of entries per page. 60 | # 61 | # Returns the Integer number of pages. 62 | def self.calculate_pages(all_posts, per_page) 63 | (all_posts.size.to_f / per_page.to_i).ceil 64 | end 65 | 66 | # Determine if pagination is enabled for a given file. 67 | # 68 | # config - The configuration Hash. 69 | # file - The String filename of the file. 70 | # 71 | # Returns true if pagination is enabled, false otherwise. 72 | def self.pagination_enabled?(config, file) 73 | file.name == 'index.html' && !config['paginate'].nil? && file.content =~ /paginator\./ 74 | end 75 | 76 | # Initialize a new Pager. 77 | # 78 | # config - The Hash configuration of the site. 79 | # page - The Integer page number. 80 | # all_posts - The Array of all the site's Posts. 81 | # num_pages - The Integer number of pages or nil if you'd like the number 82 | # of pages calculated. 83 | def initialize(config, page, all_posts, index_dir, pagination_dir, num_pages = nil) 84 | @page = page 85 | @per_page = config['paginate'].to_i 86 | @page_dir = pagination_dir + 'page/' 87 | @total_pages = num_pages || Pager.calculate_pages(all_posts, @per_page) 88 | @previous_page = nil 89 | 90 | if @page > @total_pages 91 | raise RuntimeError, "page number can't be greater than total pages: #{@page} > #{@total_pages}" 92 | end 93 | 94 | init = (@page - 1) * @per_page 95 | offset = (init + @per_page - 1) >= all_posts.size ? all_posts.size : (init + @per_page - 1) 96 | 97 | @total_posts = all_posts.size 98 | @posts = all_posts[init..offset] 99 | @previous_page = @page != 1 ? @page_dir + (@page - 1).to_s + '/' : nil 100 | @previous_page = index_dir if @page - 1 == 1 101 | @next_page = @page != @total_pages ? @page_dir + (@page + 1).to_s + '/' : nil 102 | end 103 | 104 | # Convert this Pager's data to a Hash suitable for use by Liquid. 105 | # 106 | # Returns the Hash representation of this Pager. 107 | def to_liquid 108 | { 109 | 'page' => page, 110 | 'per_page' => per_page, 111 | 'posts' => posts, 112 | 'total_posts' => total_posts, 113 | 'total_pages' => total_pages, 114 | 'previous_page' => previous_page, 115 | 'next_page' => next_page 116 | } 117 | end 118 | end 119 | 120 | end 121 | 122 | -------------------------------------------------------------------------------- /.themes/classic/sass/base/_typography.scss: -------------------------------------------------------------------------------- 1 | $blockquote: $type-border !default; 2 | $sans: "PT Sans", "Helvetica Neue", Arial, sans-serif !default; 3 | $serif: "PT Serif", Georgia, Times, "Times New Roman", serif !default; 4 | $mono: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace !default; 5 | $heading-font-family: "PT Serif", "Georgia", "Helvetica Neue", Arial, sans-serif !default; 6 | $header-title-font-family: $heading-font-family !default; 7 | $header-subtitle-font-family: $heading-font-family !default; 8 | 9 | // Fonts 10 | .heading { 11 | font-family: $heading-font-family; 12 | } 13 | .sans { font-family: $sans; } 14 | .serif { font-family: $serif; } 15 | .mono { font-family: $mono; } 16 | 17 | body > header h1 { 18 | font-size: 2.2em; 19 | @extend .heading; 20 | font-family: $header-title-font-family; 21 | font-weight: normal; 22 | line-height: 1.2em; 23 | margin-bottom: 0.6667em; 24 | } 25 | body > header h2 { 26 | font-family: $header-subtitle-font-family; 27 | } 28 | 29 | body { 30 | line-height: 1.5em; 31 | color: $text-color; 32 | @extend .serif; 33 | } 34 | h1 { 35 | font-size: 2.2em; 36 | line-height: 1.2em; 37 | } 38 | 39 | @media only screen and (min-width: 992px) { 40 | body { font-size: 1.15em; } 41 | h1 { font-size: 2.6em; line-height: 1.2em; } 42 | } 43 | 44 | #{headings()}{ 45 | @extend .heading; 46 | text-rendering: optimizelegibility; 47 | margin-bottom: 1em; 48 | font-weight: bold; 49 | } 50 | h2, section h1 { 51 | font-size: 1.5em; 52 | } 53 | h3, section h2, section section h1 { 54 | font-size: 1.3em; 55 | } 56 | h4, section h3, section section h2, section section section h1 { 57 | font-size: 1em; 58 | } 59 | h5, section h4, section section h3 { 60 | font-size: .9em; 61 | } 62 | h6, section h5, section section h4, section section section h3 { 63 | font-size: .8em; 64 | } 65 | 66 | p, article blockquote, ul, ol { margin-bottom: 1.5em; } 67 | 68 | ul { list-style-type: disc; 69 | ul { list-style-type: circle; margin-bottom: 0px; 70 | ul { list-style-type: square; margin-bottom: 0px; }}} 71 | 72 | ol { list-style-type: decimal; 73 | ol { list-style-type: lower-alpha; margin-bottom: 0px; 74 | ol { list-style-type: lower-roman; margin-bottom: 0px; }}} 75 | 76 | ul, ol { &, ul, ol { margin-left: 1.3em; }} 77 | ul, ol { ul, ol { margin-bottom: 0em; }} 78 | 79 | strong { font-weight: bold; } 80 | 81 | em { font-style: italic; } 82 | 83 | sup, sub { font-size: 0.75em; position: relative; display: inline-block; padding: 0 .2em; line-height: .8em;} 84 | sup { top: -.5em; } 85 | sub { bottom: -.5em; } 86 | 87 | a[rev='footnote']{ font-size: .75em; padding: 0 .3em; line-height: 1; } 88 | 89 | q { font-style: italic; 90 | &:before { content: "\201C"; } 91 | &:after { content: "\201D"; } 92 | } 93 | 94 | em, dfn { font-style: italic; } 95 | 96 | strong, dfn { font-weight: bold; } 97 | 98 | del, s { text-decoration: line-through; } 99 | 100 | abbr, acronym { border-bottom: 1px dotted; cursor: help; } 101 | 102 | pre, code, tt { @extend .mono; } 103 | 104 | hr { margin-bottom: 0.2em; } 105 | 106 | small { font-size: .8em; } 107 | 108 | big { font-size: 1.2em; } 109 | 110 | article blockquote { 111 | $bq-margin: 1.2em; 112 | font-style: italic; 113 | position: relative; 114 | font-size: 1.2em; 115 | line-height: 1.5em; 116 | padding-left: 1em; 117 | border-left: 4px solid rgba($text-color-light, .5); 118 | cite { 119 | font-style: italic; 120 | a { color: $text-color-light !important; word-wrap: break-word; } 121 | &:before { content: '\2014'; padding:{right: .3em; left: .3em;} color: $text-color-light; } 122 | } 123 | @media only screen and (min-width: 992px) { 124 | padding-left: 1.5em; 125 | border-left-width: 4px; 126 | } 127 | } 128 | 129 | .pullquote-right:before, 130 | .pullquote-left:before { 131 | /* Reset metrics. */ 132 | padding: 0; 133 | border: none; 134 | 135 | /* Content */ 136 | content: attr(data-pullquote); 137 | 138 | /* Pull out to the right, modular scale based margins. */ 139 | float: right; 140 | width: 45%; 141 | margin: .5em 0 1em 1.5em; 142 | 143 | /* Baseline correction */ 144 | position: relative; 145 | top: 7px; 146 | font-size: 1.4em; 147 | line-height: 1.45em; 148 | } 149 | 150 | .pullquote-left:before { 151 | /* Make left pullquotes align properly. */ 152 | float: left; 153 | margin: .5em 1.5em 1em 0; 154 | } 155 | 156 | /* @extend this to force long lines of continuous text to wrap */ 157 | .force-wrap { 158 | white-space: -moz-pre-wrap; 159 | white-space: -pre-wrap; 160 | white-space: -o-pre-wrap; 161 | white-space: pre-wrap; 162 | word-wrap: break-word; 163 | } 164 | 165 | -------------------------------------------------------------------------------- /.themes/classic/sass/base/_layout.scss: -------------------------------------------------------------------------------- 1 | $max-width: 1200px !default; 2 | 3 | // Padding used for layout margins 4 | $pad-min: 18px !default; 5 | $pad-narrow: 25px !default; 6 | $pad-medium: 35px !default; 7 | $pad-wide: 55px !default; 8 | 9 | // Sidebar widths used in media queries 10 | $sidebar-width-medium: 240px !default; 11 | $sidebar-pad-medium: 15px !default; 12 | $sidebar-pad-wide: 20px !default; 13 | $sidebar-width-wide: 300px !default; 14 | 15 | $indented-lists: false !default; 16 | 17 | $header-font-size: 1em !default; 18 | $header-padding-top: 1.5em !default; 19 | $header-padding-bottom: 1.5em !default; 20 | 21 | .group { @include pie-clearfix; } 22 | 23 | @mixin collapse-sidebar { 24 | float: none; 25 | width: auto; 26 | clear: left; 27 | margin: 0; 28 | padding: 0 $pad-medium 1px; 29 | background-color: lighten($sidebar-bg, 2); 30 | border-top: 1px solid lighten($sidebar-border, 4); 31 | section { 32 | &.odd, &.even { float: left; width: 48%; } 33 | &.odd { margin-left: 0; } 34 | &.even { margin-left: 4%; } 35 | } 36 | &.thirds section { 37 | width: 30%; 38 | margin-left: 5%; 39 | &.first { 40 | margin-left: 0; 41 | clear: both; 42 | } 43 | } 44 | } 45 | 46 | body { 47 | -webkit-text-size-adjust: none; 48 | max-width: $max-width; 49 | position: relative; 50 | margin: 0 auto; 51 | > header, > nav, > footer, #content > article, #content > div > article, #content > div > section { 52 | @extend .group; 53 | padding-left: $pad-min; 54 | padding-right: $pad-min; 55 | @media only screen and (min-width: 480px) { 56 | padding-left: $pad-narrow; 57 | padding-right: $pad-narrow; 58 | } 59 | @media only screen and (min-width: 768px) { 60 | padding-left: $pad-medium; 61 | padding-right: $pad-medium; 62 | } 63 | @media only screen and (min-width: 992px) { 64 | padding-left: $pad-wide; 65 | padding-right: $pad-wide; 66 | } 67 | } 68 | div.pagination { 69 | @extend .group; 70 | margin-left: $pad-min; 71 | margin-right: $pad-min; 72 | @media only screen and (min-width: 480px) { 73 | margin-left: $pad-narrow; 74 | margin-right: $pad-narrow; 75 | } 76 | @media only screen and (min-width: 768px) { 77 | margin-left: $pad-medium; 78 | margin-right: $pad-medium; 79 | } 80 | @media only screen and (min-width: 992px) { 81 | margin-left: $pad-wide; 82 | margin-right: $pad-wide; 83 | } 84 | } 85 | > header { 86 | font-size: $header-font-size; 87 | padding-top: $header-padding-top; 88 | padding-bottom: $header-padding-bottom; 89 | } 90 | } 91 | 92 | #content { 93 | overflow: hidden; 94 | > div, > article { width: 100%; } 95 | } 96 | 97 | aside.sidebar { 98 | float: none; 99 | padding: 0 $pad-min 1px; 100 | background-color: lighten($sidebar-bg, 2); 101 | border-top: 1px solid $sidebar-border; 102 | @extend .group; 103 | } 104 | 105 | .flex-content { max-width: 100%; height: auto; } 106 | 107 | .basic-alignment { 108 | &.left { float: left; margin-right: 1.5em; } 109 | &.right { float: right; margin-left: 1.5em; } 110 | &.center { display:block; margin: 0 auto 1.5em; } 111 | &.left, &.right { margin-bottom: .8em; } 112 | } 113 | 114 | .toggle-sidebar { &, .no-sidebar & { display: none; }} 115 | 116 | body.sidebar-footer { 117 | @media only screen and (min-width: 750px) { 118 | aside.sidebar{ @include collapse-sidebar; } 119 | } 120 | #content { margin-right: 0px; } 121 | .toggle-sidebar { display: none; } 122 | } 123 | 124 | @media only screen and (min-width: 550px) { 125 | body > header { font-size: $header-font-size; } 126 | } 127 | @media only screen and (min-width: 750px) { 128 | aside.sidebar { @include collapse-sidebar; } 129 | } 130 | #main, #content, .sidebar { 131 | @extend .group; 132 | } 133 | @media only screen and (min-width: 768px) { 134 | body { -webkit-text-size-adjust: auto; } 135 | body > header { font-size: $header-font-size * 1.2; } 136 | #main { 137 | padding: 0; 138 | margin: 0 auto; 139 | } 140 | #content { 141 | overflow: visible; 142 | margin-right: $sidebar-width-medium; 143 | position: relative; 144 | .no-sidebar & { margin-right: 0; border-right: 0; } 145 | .collapse-sidebar & { margin-right: 20px; } 146 | > div, > article { 147 | padding-top: $pad-medium/2; 148 | padding-bottom: $pad-medium/2; 149 | float: left; 150 | } 151 | } 152 | aside.sidebar { 153 | width: $sidebar-width-medium - $sidebar-pad-medium*2; 154 | padding: 0 $sidebar-pad-medium $sidebar-pad-medium; 155 | background: none; 156 | clear: none; 157 | float: left; 158 | margin: 0 -100% 0 0; 159 | section { 160 | width: auto; margin-left: 0; 161 | &.odd, &.even { float: none; width: auto; margin-left: 0; } 162 | } 163 | .collapse-sidebar & { 164 | @include collapse-sidebar; 165 | } 166 | } 167 | } 168 | 169 | @media only screen and (min-width: 992px) { 170 | body > header { font-size: $header-font-size * 1.3; } 171 | #content { margin-right: $sidebar-width-wide; } 172 | #content { 173 | > div, > article { 174 | padding-top: $pad-wide/2; 175 | padding-bottom: $pad-wide/2; 176 | } 177 | } 178 | aside.sidebar { 179 | width: $sidebar-width-wide - $sidebar-pad-wide*2; 180 | padding: 1.2em $sidebar-pad-wide $sidebar-pad-wide; 181 | .collapse-sidebar & { 182 | padding: { left: $pad-wide; right: $pad-wide; } 183 | } 184 | } 185 | } 186 | 187 | @if $indented-lists == false { 188 | @media only screen and (min-width: 768px) { 189 | ul, ol { margin-left: 0; } 190 | } 191 | } 192 | 193 | -------------------------------------------------------------------------------- /plugins/post_filters.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | 3 | # Extended plugin type that allows the plugin 4 | # to be called on varous callback methods. 5 | # 6 | # Examples: 7 | # https://github.com/tedkulp/octopress/blob/master/plugins/post_metaweblog.rb 8 | # https://github.com/tedkulp/octopress/blob/master/plugins/post_twitter.rb 9 | class PostFilter < Plugin 10 | 11 | #Called before post is sent to the converter. Allows 12 | #you to modify the post object before the converter 13 | #does it's thing 14 | def pre_render(post) 15 | end 16 | 17 | #Called after the post is rendered with the converter. 18 | #Use the post object to modify it's contents before the 19 | #post is inserted into the template. 20 | def post_render(post) 21 | end 22 | 23 | #Called after the post is written to the disk. 24 | #Use the post object to read it's contents to do something 25 | #after the post is safely written. 26 | def post_write(post) 27 | end 28 | end 29 | 30 | # Monkey patch for the Jekyll Site class. For the original class, 31 | # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/site.rb 32 | class Site 33 | 34 | # Instance variable to store the various post_filter 35 | # plugins that are loaded. 36 | attr_accessor :post_filters 37 | 38 | # Instantiates all of the post_filter plugins. This is basically 39 | # a duplication of the other loaders in Site#setup. 40 | def load_post_filters 41 | self.post_filters = Jekyll::PostFilter.subclasses.select do |c| 42 | !self.safe || c.safe 43 | end.map do |c| 44 | c.new(self.config) 45 | end 46 | end 47 | end 48 | 49 | # Monkey patch for the Jekyll Post class. For the original class, 50 | # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/post.rb 51 | class Post 52 | 53 | # Copy the #write method to #old_write, so we can redefine #write 54 | # method. 55 | alias_method :old_write, :write 56 | 57 | # Write the generated post file to the destination directory. It 58 | # then calls any post_write methods that may exist. 59 | # +dest+ is the String path to the destination dir 60 | # 61 | # Returns nothing 62 | def write(dest) 63 | old_write(dest) 64 | post_write if respond_to?(:post_write) 65 | end 66 | end 67 | 68 | # Monkey patch for the Jekyll Page class. For the original class, 69 | # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/page.rb 70 | class Page 71 | 72 | # Copy the #write method to #old_write, so we can redefine #write 73 | # method. 74 | alias_method :old_write, :write 75 | 76 | # Write the generated post file to the destination directory. It 77 | # then calls any post_write methods that may exist. 78 | # +dest+ is the String path to the destination dir 79 | # 80 | # Returns nothing 81 | def write(dest) 82 | old_write(dest) 83 | post_write if respond_to?(:post_write) 84 | end 85 | end 86 | 87 | # Monkey patch for the Jekyll Convertible module. For the original class, 88 | # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/convertible.rb 89 | module Convertible 90 | 91 | def is_post? 92 | self.class.to_s == 'Jekyll::Post' 93 | end 94 | 95 | def is_page? 96 | self.class.to_s == 'Jekyll::Page' 97 | end 98 | 99 | def is_filterable? 100 | is_post? or is_page? 101 | end 102 | 103 | # Call the #pre_render methods on all of the loaded 104 | # post_filter plugins. 105 | # 106 | # Returns nothing 107 | def pre_render 108 | self.site.load_post_filters unless self.site.post_filters 109 | 110 | if self.site.post_filters and is_filterable? 111 | self.site.post_filters.each do |filter| 112 | filter.pre_render(self) 113 | end 114 | end 115 | end 116 | 117 | # Call the #post_render methods on all of the loaded 118 | # post_filter plugins. 119 | # 120 | # Returns nothing 121 | def post_render 122 | if self.site.post_filters and is_filterable? 123 | self.site.post_filters.each do |filter| 124 | filter.post_render(self) 125 | end 126 | end 127 | end 128 | 129 | # Call the #post_write methods on all of the loaded 130 | # post_filter plugins. 131 | # 132 | # Returns nothing 133 | def post_write 134 | if self.site.post_filters and is_filterable? 135 | self.site.post_filters.each do |filter| 136 | filter.post_write(self) 137 | end 138 | end 139 | end 140 | 141 | # Copy the #transform method to #old_transform, so we can 142 | # redefine #transform method. 143 | alias_method :old_transform, :transform 144 | 145 | # Transform the contents based on the content type. Then calls the 146 | # #post_render method if it exists 147 | # 148 | # Returns nothing. 149 | def transform 150 | old_transform 151 | post_render if respond_to?(:post_render) 152 | end 153 | 154 | # Copy the #do_layout method to #old_do_layout, so we can 155 | # redefine #do_layout method. 156 | alias_method :old_do_layout, :do_layout 157 | 158 | # Calls the pre_render method if it exists and then adds any necessary 159 | # layouts to this convertible document. 160 | # 161 | # payload - The site payload Hash. 162 | # layouts - A Hash of {"name" => "layout"}. 163 | # 164 | # Returns nothing. 165 | def do_layout(payload, layouts) 166 | pre_render if respond_to?(:pre_render) 167 | old_do_layout(payload, layouts) 168 | end 169 | 170 | # Returns the full url of the post, including the 171 | # configured url 172 | def full_url 173 | self.site.config['url'] + self.url 174 | end 175 | end 176 | end 177 | -------------------------------------------------------------------------------- /.themes/classic/source/javascripts/modernizr-2.0.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-video-mq-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function A(a){j.cssText=a}function B(a,b){return A(m.join(a+";")+(b||""))}function C(a,b){return typeof a===b}function D(a,b){return!!~(""+a).indexOf(b)}function E(a,b){for(var d in a){var e=a[d];if(!D(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function F(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:C(f,"function")?f.bind(d||b):f}return!1}function G(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return C(b,"string")||C(b,"undefined")?E(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),F(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return w("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},y={}.hasOwnProperty,z;!C(y,"undefined")&&!C(y.call,"undefined")?z=function(a,b){return y.call(a,b)}:z=function(a,b){return b in a&&C(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=u.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(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c};for(var H in q)z(q,H)&&(v=H.toLowerCase(),e[v]=q[H](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)z(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},A(""),i=k=null,e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.mq=x,e.testProp=function(a){return E([a])},e.testAllProps=G,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?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)){"img"!=a&&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=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?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),"img"!=a&&(r||2===y[c]?(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("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&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&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},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;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))}; 5 | 6 | -------------------------------------------------------------------------------- /plugins/category_generator.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | # 3 | # Jekyll category page generator. 4 | # http://recursive-design.com/projects/jekyll-plugins/ 5 | # 6 | # Version: 0.1.4 (201101061053) 7 | # 8 | # Copyright (c) 2010 Dave Perrett, http://recursive-design.com/ 9 | # Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) 10 | # 11 | # A generator that creates category pages for jekyll sites. 12 | # 13 | # Included filters : 14 | # - category_links: Outputs the list of categories as comma-separated <a> links. 15 | # - date_to_html_string: Outputs the post.date as formatted html, with hooks for CSS styling. 16 | # 17 | # Available _config.yml settings : 18 | # - category_dir: The subfolder to build category pages in (default is 'categories'). 19 | # - category_title_prefix: The string used before the category name in the page title (default is 20 | # 'Category: '). 21 | 22 | require 'stringex' 23 | 24 | module Jekyll 25 | 26 | # The CategoryIndex class creates a single category page for the specified category. 27 | class CategoryIndex < Page 28 | 29 | # Initializes a new CategoryIndex. 30 | # 31 | # +base+ is the String path to the <source>. 32 | # +category_dir+ is the String path between <source> and the category folder. 33 | # +category+ is the category currently being processed. 34 | def initialize(site, base, category_dir, category) 35 | @site = site 36 | @base = base 37 | @dir = category_dir 38 | @name = 'index.html' 39 | self.process(@name) 40 | # Read the YAML data from the layout page. 41 | self.read_yaml(File.join(base, '_layouts'), 'category_index.html') 42 | self.data['category'] = category 43 | # Set the title for this page. 44 | title_prefix = site.config['category_title_prefix'] || 'Category: ' 45 | self.data['title'] = "#{title_prefix}#{category}" 46 | # Set the meta-description for this page. 47 | meta_description_prefix = site.config['category_meta_description_prefix'] || 'Category: ' 48 | self.data['description'] = "#{meta_description_prefix}#{category}" 49 | end 50 | 51 | end 52 | 53 | # The CategoryFeed class creates an Atom feed for the specified category. 54 | class CategoryFeed < Page 55 | 56 | # Initializes a new CategoryFeed. 57 | # 58 | # +base+ is the String path to the <source>. 59 | # +category_dir+ is the String path between <source> and the category folder. 60 | # +category+ is the category currently being processed. 61 | def initialize(site, base, category_dir, category) 62 | @site = site 63 | @base = base 64 | @dir = category_dir 65 | @name = 'atom.xml' 66 | self.process(@name) 67 | # Read the YAML data from the layout page. 68 | self.read_yaml(File.join(base, '_includes/custom'), 'category_feed.xml') 69 | self.data['category'] = category 70 | # Set the title for this page. 71 | title_prefix = site.config['category_title_prefix'] || 'Category: ' 72 | self.data['title'] = "#{title_prefix}#{category}" 73 | # Set the meta-description for this page. 74 | meta_description_prefix = site.config['category_meta_description_prefix'] || 'Category: ' 75 | self.data['description'] = "#{meta_description_prefix}#{category}" 76 | 77 | # Set the correct feed URL. 78 | self.data['feed_url'] = "#{category_dir}/#{name}" 79 | end 80 | 81 | end 82 | 83 | # The Site class is a built-in Jekyll class with access to global site config information. 84 | class Site 85 | 86 | # Creates an instance of CategoryIndex for each category page, renders it, and 87 | # writes the output to a file. 88 | # 89 | # +category_dir+ is the String path to the category folder. 90 | # +category+ is the category currently being processed. 91 | def write_category_index(category_dir, category) 92 | index = CategoryIndex.new(self, self.source, category_dir, category) 93 | index.render(self.layouts, site_payload) 94 | index.write(self.dest) 95 | # Record the fact that this page has been added, otherwise Site::cleanup will remove it. 96 | self.pages << index 97 | 98 | # Create an Atom-feed for each index. 99 | feed = CategoryFeed.new(self, self.source, category_dir, category) 100 | feed.render(self.layouts, site_payload) 101 | feed.write(self.dest) 102 | # Record the fact that this page has been added, otherwise Site::cleanup will remove it. 103 | self.pages << feed 104 | end 105 | 106 | # Loops through the list of category pages and processes each one. 107 | def write_category_indexes 108 | if self.layouts.key? 'category_index' 109 | dir = self.config['category_dir'] || 'categories' 110 | self.categories.keys.each do |category| 111 | self.write_category_index(File.join(dir, category.to_url), category) 112 | end 113 | 114 | # Throw an exception if the layout couldn't be found. 115 | else 116 | raise <<-ERR 117 | 118 | 119 | =============================================== 120 | Error for category_generator.rb plugin 121 | ----------------------------------------------- 122 | No 'category_index.hmtl' in source/_layouts/ 123 | Perhaps you haven't installed a theme yet. 124 | =============================================== 125 | 126 | ERR 127 | end 128 | end 129 | 130 | end 131 | 132 | 133 | # Jekyll hook - the generate method is called by jekyll, and generates all of the category pages. 134 | class GenerateCategories < Generator 135 | safe true 136 | priority :low 137 | 138 | def generate(site) 139 | site.write_category_indexes 140 | end 141 | 142 | end 143 | 144 | 145 | # Adds some extra filters used during the category creation process. 146 | module Filters 147 | 148 | # Outputs a list of categories as comma-separated <a> links. This is used 149 | # to output the category list for each post on a category page. 150 | # 151 | # +categories+ is the list of categories to format. 152 | # 153 | # Returns string 154 | # 155 | def category_links(categories) 156 | categories = categories.sort!.map { |c| category_link c } 157 | 158 | case categories.length 159 | when 0 160 | "" 161 | when 1 162 | categories[0].to_s 163 | else 164 | "#{categories[0...-1].join(', ')}, #{categories[-1]}" 165 | end 166 | end 167 | 168 | # Outputs a single category as an <a> link. 169 | # 170 | # +category+ is a category string to format as an <a> link 171 | # 172 | # Returns string 173 | # 174 | def category_link(category) 175 | dir = @context.registers[:site].config['category_dir'] 176 | "<a class='category' href='/#{dir}/#{category.to_url}/'>#{category}</a>" 177 | end 178 | 179 | # Outputs the post.date as formatted html, with hooks for CSS styling. 180 | # 181 | # +date+ is the date object to format as HTML. 182 | # 183 | # Returns string 184 | def date_to_html_string(date) 185 | result = '<span class="month">' + date.strftime('%b').upcase + '</span> ' 186 | result += date.strftime('<span class="day">%d</span> ') 187 | result += date.strftime('<span class="year">%Y</span> ') 188 | result 189 | end 190 | 191 | end 192 | 193 | end 194 | 195 | -------------------------------------------------------------------------------- /.themes/classic/source/javascripts/octopress.js: -------------------------------------------------------------------------------- 1 | function getNav() { 2 | var mainNav = $('ul.main-navigation, ul[role=main-navigation]').before('<fieldset class="mobile-nav">') 3 | var mobileNav = $('fieldset.mobile-nav').append('<select>'); 4 | mobileNav.find('select').append('<option value="">Navigate…</option>'); 5 | var addOption = function(i, option) { 6 | mobileNav.find('select').append('<option value="' + this.href + '">» ' + $(this).text() + '</option>'); 7 | } 8 | mainNav.find('a').each(addOption); 9 | $('ul.subscription a').each(addOption); 10 | mobileNav.find('select').bind('change', function(event) { 11 | if (event.target.value) { window.location.href = event.target.value; } 12 | }); 13 | } 14 | 15 | function addSidebarToggler() { 16 | if(!$('body').hasClass('sidebar-footer')) { 17 | $('#content').append('<span class="toggle-sidebar"></span>'); 18 | $('.toggle-sidebar').bind('click', function(e) { 19 | e.preventDefault(); 20 | if ($('body').hasClass('collapse-sidebar')) { 21 | $('body').removeClass('collapse-sidebar'); 22 | } else { 23 | $('body').addClass('collapse-sidebar'); 24 | } 25 | }); 26 | } 27 | var sections = $('aside.sidebar > section'); 28 | if (sections.length > 1) { 29 | sections.each(function(index, section){ 30 | if ((sections.length >= 3) && index % 3 === 0) { 31 | $(section).addClass("first"); 32 | } 33 | var count = ((index +1) % 2) ? "odd" : "even"; 34 | $(section).addClass(count); 35 | }); 36 | } 37 | if (sections.length >= 3){ $('aside.sidebar').addClass('thirds'); } 38 | } 39 | 40 | function testFeatures() { 41 | var features = ['maskImage']; 42 | $(features).map(function(i, feature) { 43 | if (Modernizr.testAllProps(feature)) { 44 | $('html').addClass(feature); 45 | } else { 46 | $('html').addClass('no-'+feature); 47 | } 48 | }); 49 | if ("placeholder" in document.createElement("input")) { 50 | $('html').addClass('placeholder'); 51 | } else { 52 | $('html').addClass('no-placeholder'); 53 | } 54 | } 55 | 56 | function addCodeLineNumbers() { 57 | if (navigator.appName === 'Microsoft Internet Explorer') { return; } 58 | $('div.gist-highlight').each(function(code) { 59 | var tableStart = '<table><tbody><tr><td class="gutter">', 60 | lineNumbers = '<pre class="line-numbers">', 61 | tableMiddle = '</pre></td><td class="code">', 62 | tableEnd = '</td></tr></tbody></table>', 63 | count = $('.line', code).length; 64 | for (var i=1;i<=count; i++) { 65 | lineNumbers += '<span class="line-number">'+i+'</span>\n'; 66 | } 67 | var table = tableStart + lineNumbers + tableMiddle + '<pre>'+$('pre', code).html()+'</pre>' + tableEnd; 68 | $(code).html(table); 69 | }); 70 | } 71 | 72 | function flashVideoFallback(){ 73 | var flashplayerlocation = "/assets/jwplayer/player.swf", 74 | flashplayerskin = "/assets/jwplayer/glow/glow.xml"; 75 | $('video').each(function(i, video){ 76 | video = $(video); 77 | if (!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") !== -1){ 78 | video.children('source[src$=mp4]').first().map(i, function(source){ 79 | var src = $(source).attr('src'), 80 | id = 'video_'+Math.round(1 + Math.random()*(100000)), 81 | width = video.attr('width'), 82 | height = parseInt(video.attr('height'), 10) + 30; 83 | video.after('<div class="flash-video"><div><div id='+id+'>'); 84 | swfobject.embedSWF(flashplayerlocation, id, width, height + 30, "9.0.0", 85 | { file : src, image : video.attr('poster'), skin : flashplayerskin } , 86 | { movie : src, wmode : "opaque", allowfullscreen : "true" } 87 | ); 88 | }); 89 | video.remove(); 90 | } 91 | }); 92 | } 93 | 94 | function wrapFlashVideos() { 95 | $('object').each(function(i, object) { 96 | if( $(object).find('param[name=movie]').length ){ 97 | $(object).wrap('<div class="flash-video">') 98 | } 99 | }); 100 | $('iframe[src*=vimeo],iframe[src*=youtube]').wrap('<div class="flash-video">') 101 | } 102 | 103 | function renderDeliciousLinks(items) { 104 | var output = "<ul>"; 105 | for (var i=0,l=items.length; i<l; i++) { 106 | output += '<li><a href="' + items[i].u + '" title="Tags: ' + (items[i].t == "" ? "" : items[i].t.join(', ')) + '">' + items[i].d + '</a></li>'; 107 | } 108 | output += "</ul>"; 109 | $('#delicious').html(output); 110 | } 111 | 112 | $('document').ready(function() { 113 | testFeatures(); 114 | wrapFlashVideos(); 115 | flashVideoFallback(); 116 | addCodeLineNumbers(); 117 | getNav(); 118 | addSidebarToggler(); 119 | }); 120 | 121 | // iOS scaling bug fix 122 | // Rewritten version 123 | // By @mathias, @cheeaun and @jdalton 124 | // Source url: https://gist.github.com/901295 125 | (function(doc) { 126 | var addEvent = 'addEventListener', 127 | type = 'gesturestart', 128 | qsa = 'querySelectorAll', 129 | scales = [1, 1], 130 | meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; 131 | function fix() { 132 | meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; 133 | doc.removeEventListener(type, fix, true); 134 | } 135 | if ((meta = meta[meta.length - 1]) && addEvent in doc) { 136 | fix(); 137 | scales = [0.25, 1.6]; 138 | doc[addEvent](type, fix, true); 139 | } 140 | }(document)); 141 | 142 | /*! SWFObject v2.2 modified by Brandon Mathis to contain only what is necessary to dynamically embed flash objects 143 | * Uncompressed source in javascripts/libs/swfobject-dynamic.js 144 | * <http://code.google.com/p/swfobject/> 145 | released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 146 | */ 147 | var swfobject=function(){function s(a,b,d){var q,k=n(d);if(g.wk&&g.wk<312)return q;if(k){if(typeof a.id==l)a.id=d;if(g.ie&&g.win){var e="",c;for(c in a)if(a[c]!=Object.prototype[c])c.toLowerCase()=="data"?b.movie=a[c]:c.toLowerCase()=="styleclass"?e+=' class="'+a[c]+'"':c.toLowerCase()!="classid"&&(e+=" "+c+'="'+a[c]+'"');c="";for(var f in b)b[f]!=Object.prototype[f]&&(c+='<param name="'+f+'" value="'+b[f]+'" />');k.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+e+">"+c+ 148 | "</object>";q=n(a.id)}else{f=i.createElement(o);f.setAttribute("type",m);for(var h in a)a[h]!=Object.prototype[h]&&(h.toLowerCase()=="styleclass"?f.setAttribute("class",a[h]):h.toLowerCase()!="classid"&&f.setAttribute(h,a[h]));for(e in b)b[e]!=Object.prototype[e]&&e.toLowerCase()!="movie"&&(a=f,c=e,h=b[e],d=i.createElement("param"),d.setAttribute("name",c),d.setAttribute("value",h),a.appendChild(d));k.parentNode.replaceChild(f,k);q=f}}return q}function n(a){var b=null;try{b=i.getElementById(a)}catch(d){}return b} 149 | function t(a){var b=g.pv,a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:!1}function u(a){return/[\\\"<>\.;]/.exec(a)!=null&&typeof encodeURIComponent!=l?encodeURIComponent(a):a}var l="undefined",o="object",m="application/x-shockwave-flash",v=window,i=document,j=navigator,g=function(){var a=typeof i.getElementById!=l&&typeof i.getElementsByTagName!=l&&typeof i.createElement!=l, 150 | b=j.userAgent.toLowerCase(),d=j.platform.toLowerCase(),g=d?/win/.test(d):/win/.test(b),d=d?/mac/.test(d):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,k=!+"\u000b1",e=[0,0,0],c=null;if(typeof j.plugins!=l&&typeof j.plugins["Shockwave Flash"]==o){if((c=j.plugins["Shockwave Flash"].description)&&!(typeof j.mimeTypes!=l&&j.mimeTypes[m]&&!j.mimeTypes[m].enabledPlugin))k=!1,c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),e[0]=parseInt(c.replace(/^(.*)\..*$/,"$1"), 151 | 10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&& 152 | 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= 153 | 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""}}}(); 154 | 155 | 156 | -------------------------------------------------------------------------------- /plugins/sitemap_generator.rb: -------------------------------------------------------------------------------- 1 | # Sitemap.xml Generator is a Jekyll plugin that generates a sitemap.xml file by 2 | # traversing all of the available posts and pages. 3 | # 4 | # How To Use: 5 | # 1) Copy source file into your _plugins folder within your Jekyll project. 6 | # 2) Change modify the url variable in _config.yml to reflect your domain name. 7 | # 3) Run Jekyll: jekyll --server to re-generate your site. 8 | # 9 | # Variables: 10 | # * Change SITEMAP_FILE_NAME if you want your sitemap to be called something 11 | # other than sitemap.xml. 12 | # * Change the PAGES_INCLUDE_POSTS list to include any pages that are looping 13 | # through your posts (e.g. "index.html", "archive.html", etc.). This will 14 | # ensure that right after you make a new post, the last modified date will 15 | # be updated to reflect the new post. 16 | # * A sitemap.xml should be included in your _site folder. 17 | # * If there are any files you don't want included in the sitemap, add them 18 | # to the EXCLUDED_FILES list. The name should match the name of the source 19 | # file. 20 | # * If you want to include the optional changefreq and priority attributes, 21 | # simply include custom variables in the YAML Front Matter of that file. 22 | # The names of these custom variables are defined below in the 23 | # CHANGE_FREQUENCY_CUSTOM_VARIABLE_NAME and PRIORITY_CUSTOM_VARIABLE_NAME 24 | # constants. 25 | # 26 | # Notes: 27 | # * The last modified date is determined by the latest from the following: 28 | # system modified date of the page or post, system modified date of 29 | # included layout, system modified date of included layout within that 30 | # layout, ... 31 | # 32 | # Author: Michael Levin 33 | # Site: http://www.kinnetica.com 34 | # Distributed Under A Creative Commons License 35 | # - http://creativecommons.org/licenses/by/3.0/ 36 | # 37 | # Modified for Octopress by John W. Long 38 | # 39 | require 'rexml/document' 40 | require 'fileutils' 41 | 42 | module Jekyll 43 | 44 | # Change SITEMAP_FILE_NAME if you would like your sitemap file 45 | # to be called something else 46 | SITEMAP_FILE_NAME = "sitemap.xml" 47 | 48 | # Any files to exclude from being included in the sitemap.xml 49 | EXCLUDED_FILES = ["atom.xml"] 50 | 51 | # Any files that include posts, so that when a new post is added, the last 52 | # modified date of these pages should take that into account 53 | PAGES_INCLUDE_POSTS = ["index.html"] 54 | 55 | # Custom variable names for changefreq and priority elements 56 | # These names are used within the YAML Front Matter of pages or posts 57 | # for which you want to include these properties 58 | CHANGE_FREQUENCY_CUSTOM_VARIABLE_NAME = "change_frequency" 59 | PRIORITY_CUSTOM_VARIABLE_NAME = "priority" 60 | 61 | class Post 62 | attr_accessor :name 63 | 64 | def full_path_to_source 65 | File.join(@base, @name) 66 | end 67 | 68 | def location_on_server 69 | "#{site.config['url']}#{url}" 70 | end 71 | end 72 | 73 | class Page 74 | attr_accessor :name 75 | 76 | def full_path_to_source 77 | File.join(@base, @dir, @name) 78 | end 79 | 80 | def location_on_server 81 | location = "#{site.config['url']}#{@dir}#{url}" 82 | location.gsub(/index.html$/, "") 83 | end 84 | end 85 | 86 | class Layout 87 | def full_path_to_source 88 | File.join(@base, @name) 89 | end 90 | end 91 | 92 | # Recover from strange exception when starting server without --auto 93 | class SitemapFile < StaticFile 94 | def write(dest) 95 | begin 96 | super(dest) 97 | rescue 98 | end 99 | 100 | true 101 | end 102 | end 103 | 104 | class SitemapGenerator < Generator 105 | 106 | # Valid values allowed by sitemap.xml spec for change frequencies 107 | VALID_CHANGE_FREQUENCY_VALUES = ["always", "hourly", "daily", "weekly", 108 | "monthly", "yearly", "never"] 109 | 110 | # Goes through pages and posts and generates sitemap.xml file 111 | # 112 | # Returns nothing 113 | def generate(site) 114 | sitemap = REXML::Document.new << REXML::XMLDecl.new("1.0", "UTF-8") 115 | 116 | urlset = REXML::Element.new "urlset" 117 | urlset.add_attribute("xmlns", 118 | "http://www.sitemaps.org/schemas/sitemap/0.9") 119 | 120 | @last_modified_post_date = fill_posts(site, urlset) 121 | fill_pages(site, urlset) 122 | 123 | sitemap.add_element(urlset) 124 | 125 | # File I/O: create sitemap.xml file and write out pretty-printed XML 126 | unless File.exists?(site.dest) 127 | FileUtils.mkdir_p(site.dest) 128 | end 129 | file = File.new(File.join(site.dest, SITEMAP_FILE_NAME), "w") 130 | formatter = REXML::Formatters::Pretty.new(4) 131 | formatter.compact = true 132 | formatter.write(sitemap, file) 133 | file.close 134 | 135 | # Keep the sitemap.xml file from being cleaned by Jekyll 136 | site.static_files << Jekyll::SitemapFile.new(site, site.dest, "/", SITEMAP_FILE_NAME) 137 | end 138 | 139 | # Create url elements for all the posts and find the date of the latest one 140 | # 141 | # Returns last_modified_date of latest post 142 | def fill_posts(site, urlset) 143 | last_modified_date = nil 144 | site.posts.each do |post| 145 | if !excluded?(post.name) 146 | url = fill_url(site, post) 147 | urlset.add_element(url) 148 | end 149 | 150 | path = post.full_path_to_source 151 | date = File.mtime(path) 152 | last_modified_date = date if last_modified_date == nil or date > last_modified_date 153 | end 154 | 155 | last_modified_date 156 | end 157 | 158 | # Create url elements for all the normal pages and find the date of the 159 | # index to use with the pagination pages 160 | # 161 | # Returns last_modified_date of index page 162 | def fill_pages(site, urlset) 163 | site.pages.each do |page| 164 | if !excluded?(page.name) 165 | path = page.full_path_to_source 166 | if File.exists?(path) 167 | url = fill_url(site, page) 168 | urlset.add_element(url) 169 | end 170 | end 171 | end 172 | end 173 | 174 | # Fill data of each URL element: location, last modified, 175 | # change frequency (optional), and priority. 176 | # 177 | # Returns url REXML::Element 178 | def fill_url(site, page_or_post) 179 | url = REXML::Element.new "url" 180 | 181 | loc = fill_location(page_or_post) 182 | url.add_element(loc) 183 | 184 | lastmod = fill_last_modified(site, page_or_post) 185 | url.add_element(lastmod) if lastmod 186 | 187 | if (page_or_post.data[CHANGE_FREQUENCY_CUSTOM_VARIABLE_NAME]) 188 | change_frequency = 189 | page_or_post.data[CHANGE_FREQUENCY_CUSTOM_VARIABLE_NAME].downcase 190 | 191 | if (valid_change_frequency?(change_frequency)) 192 | changefreq = REXML::Element.new "changefreq" 193 | changefreq.text = change_frequency 194 | url.add_element(changefreq) 195 | else 196 | puts "ERROR: Invalid Change Frequency In #{page_or_post.name}" 197 | end 198 | end 199 | 200 | if (page_or_post.data[PRIORITY_CUSTOM_VARIABLE_NAME]) 201 | priority_value = page_or_post.data[PRIORITY_CUSTOM_VARIABLE_NAME] 202 | if valid_priority?(priority_value) 203 | priority = REXML::Element.new "priority" 204 | priority.text = page_or_post.data[PRIORITY_CUSTOM_VARIABLE_NAME] 205 | url.add_element(priority) 206 | else 207 | puts "ERROR: Invalid Priority In #{page_or_post.name}" 208 | end 209 | end 210 | 211 | url 212 | end 213 | 214 | # Get URL location of page or post 215 | # 216 | # Returns the location of the page or post 217 | def fill_location(page_or_post) 218 | loc = REXML::Element.new "loc" 219 | loc.text = page_or_post.location_on_server 220 | 221 | loc 222 | end 223 | 224 | # Fill lastmod XML element with the last modified date for the page or post. 225 | # 226 | # Returns lastmod REXML::Element or nil 227 | def fill_last_modified(site, page_or_post) 228 | path = page_or_post.full_path_to_source 229 | 230 | lastmod = REXML::Element.new "lastmod" 231 | date = File.mtime(path) 232 | latest_date = find_latest_date(date, site, page_or_post) 233 | 234 | if @last_modified_post_date == nil 235 | # This is a post 236 | lastmod.text = latest_date.iso8601 237 | else 238 | # This is a page 239 | if posts_included?(page_or_post.name) 240 | # We want to take into account the last post date 241 | final_date = greater_date(latest_date, @last_modified_post_date) 242 | lastmod.text = final_date.iso8601 243 | else 244 | lastmod.text = latest_date.iso8601 245 | end 246 | end 247 | lastmod 248 | end 249 | 250 | # Go through the page/post and any implemented layouts and get the latest 251 | # modified date 252 | # 253 | # Returns formatted output of latest date of page/post and any used layouts 254 | def find_latest_date(latest_date, site, page_or_post) 255 | layouts = site.layouts 256 | layout = layouts[page_or_post.data["layout"]] 257 | while layout 258 | path = layout.full_path_to_source 259 | date = File.mtime(path) 260 | 261 | latest_date = date if (date > latest_date) 262 | 263 | layout = layouts[layout.data["layout"]] 264 | end 265 | 266 | latest_date 267 | end 268 | 269 | # Which of the two dates is later 270 | # 271 | # Returns latest of two dates 272 | def greater_date(date1, date2) 273 | if (date1 >= date2) 274 | date1 275 | else 276 | date2 277 | end 278 | end 279 | 280 | # Is the page or post listed as something we want to exclude? 281 | # 282 | # Returns boolean 283 | def excluded?(name) 284 | EXCLUDED_FILES.include? name 285 | end 286 | 287 | def posts_included?(name) 288 | PAGES_INCLUDE_POSTS.include? name 289 | end 290 | 291 | # Is the change frequency value provided valid according to the spec 292 | # 293 | # Returns boolean 294 | def valid_change_frequency?(change_frequency) 295 | VALID_CHANGE_FREQUENCY_VALUES.include? change_frequency 296 | end 297 | 298 | # Is the priority value provided valid according to the spec 299 | # 300 | # Returns boolean 301 | def valid_priority?(priority) 302 | begin 303 | priority_val = Float(priority) 304 | return true if priority_val >= 0.0 and priority_val <= 1.0 305 | rescue ArgumentError 306 | end 307 | 308 | false 309 | end 310 | end 311 | end 312 | 313 | -------------------------------------------------------------------------------- /.themes/classic/source/javascripts/libs/swfobject-dynamic.js: -------------------------------------------------------------------------------- 1 | /*! SWFObject v2.2 <http://code.google.com/p/swfobject/> 2 | is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 3 | */ 4 | 5 | var swfobject = function() { 6 | 7 | var UNDEF = "undefined", 8 | OBJECT = "object", 9 | SHOCKWAVE_FLASH = "Shockwave Flash", 10 | SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash", 11 | FLASH_MIME_TYPE = "application/x-shockwave-flash", 12 | EXPRESS_INSTALL_ID = "SWFObjectExprInst", 13 | 14 | win = window, 15 | doc = document, 16 | nav = navigator, 17 | 18 | plugin = false, 19 | regObjArr = [], 20 | objIdArr = [], 21 | storedAltContent, 22 | storedAltContentId, 23 | storedCallbackFn, 24 | storedCallbackObj, 25 | autoHideShow = true, 26 | 27 | /* Centralized function for browser feature detection 28 | - User agent string detection is only used when no good alternative is possible 29 | - Is executed directly for optimal performance 30 | */ 31 | ua = function() { 32 | var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, 33 | u = nav.userAgent.toLowerCase(), 34 | p = nav.platform.toLowerCase(), 35 | windows = p ? /win/.test(p) : /win/.test(u), 36 | mac = p ? /mac/.test(p) : /mac/.test(u), 37 | webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit 38 | ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html 39 | playerVersion = [0,0,0], 40 | d = null; 41 | if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) { 42 | d = nav.plugins[SHOCKWAVE_FLASH].description; 43 | if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+ 44 | plugin = true; 45 | ie = false; // cascaded feature detection for Internet Explorer 46 | d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); 47 | playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10); 48 | playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10); 49 | playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0; 50 | } 51 | } 52 | else if (typeof win.ActiveXObject != UNDEF) { 53 | try { 54 | var a = new ActiveXObject(SHOCKWAVE_FLASH_AX); 55 | if (a) { // a will return null when ActiveX is disabled 56 | d = a.GetVariable("$version"); 57 | if (d) { 58 | ie = true; // cascaded feature detection for Internet Explorer 59 | d = d.split(" ")[1].split(","); 60 | playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; 61 | } 62 | } 63 | } 64 | catch(e) {} 65 | } 66 | return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac }; 67 | }() 68 | 69 | 70 | /* Main function 71 | - Will preferably execute onDomLoad, otherwise onload (as a fallback) 72 | */ 73 | function main() { 74 | if (plugin) { testPlayerVersion(); } 75 | else { matchVersions(); } 76 | } 77 | 78 | /* Detect the Flash Player version for non-Internet Explorer browsers 79 | - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description: 80 | a. Both release and build numbers can be detected 81 | b. Avoid wrong descriptions by corrupt installers provided by Adobe 82 | c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports 83 | - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available 84 | */ 85 | function testPlayerVersion() { 86 | var b = doc.getElementsByTagName("body")[0]; 87 | var o = createElement(OBJECT); 88 | o.setAttribute("type", FLASH_MIME_TYPE); 89 | var t = b.appendChild(o); 90 | if (t) { 91 | var counter = 0; 92 | (function(){ 93 | if (typeof t.GetVariable != UNDEF) { 94 | var d = t.GetVariable("$version"); 95 | if (d) { 96 | d = d.split(" ")[1].split(","); 97 | ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; 98 | } 99 | } 100 | else if (counter < 10) { 101 | counter++; 102 | setTimeout(arguments.callee, 10); 103 | return; 104 | } 105 | b.removeChild(o); 106 | t = null; 107 | matchVersions(); 108 | })(); 109 | } 110 | else { 111 | matchVersions(); 112 | } 113 | } 114 | 115 | 116 | /* Cross-browser dynamic SWF creation 117 | */ 118 | function createSWF(attObj, parObj, id) { 119 | var r, el = getElementById(id); 120 | if (ua.wk && ua.wk < 312) { return r; } 121 | if (el) { 122 | if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content 123 | attObj.id = id; 124 | } 125 | if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML 126 | var att = ""; 127 | for (var i in attObj) { 128 | if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries 129 | if (i.toLowerCase() == "data") { 130 | parObj.movie = attObj[i]; 131 | } 132 | else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword 133 | att += ' class="' + attObj[i] + '"'; 134 | } 135 | else if (i.toLowerCase() != "classid") { 136 | att += ' ' + i + '="' + attObj[i] + '"'; 137 | } 138 | } 139 | } 140 | var par = ""; 141 | for (var j in parObj) { 142 | if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries 143 | par += '<param name="' + j + '" value="' + parObj[j] + '" />'; 144 | } 145 | } 146 | el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>'; 147 | objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only) 148 | r = getElementById(attObj.id); 149 | } 150 | else { // well-behaving browsers 151 | var o = createElement(OBJECT); 152 | o.setAttribute("type", FLASH_MIME_TYPE); 153 | for (var m in attObj) { 154 | if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries 155 | if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword 156 | o.setAttribute("class", attObj[m]); 157 | } 158 | else if (m.toLowerCase() != "classid") { // filter out IE specific attribute 159 | o.setAttribute(m, attObj[m]); 160 | } 161 | } 162 | } 163 | for (var n in parObj) { 164 | if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element 165 | createObjParam(o, n, parObj[n]); 166 | } 167 | } 168 | el.parentNode.replaceChild(o, el); 169 | r = o; 170 | } 171 | } 172 | return r; 173 | } 174 | 175 | function createObjParam(el, pName, pValue) { 176 | var p = createElement("param"); 177 | p.setAttribute("name", pName); 178 | p.setAttribute("value", pValue); 179 | el.appendChild(p); 180 | } 181 | 182 | /* Cross-browser SWF removal 183 | - Especially needed to safely and completely remove a SWF in Internet Explorer 184 | */ 185 | /* Functions to optimize JavaScript compression 186 | */ 187 | function getElementById(id) { 188 | var el = null; 189 | try { 190 | el = doc.getElementById(id); 191 | } 192 | catch (e) {} 193 | return el; 194 | } 195 | 196 | function createElement(el) { 197 | return doc.createElement(el); 198 | } 199 | 200 | /* Flash Player and SWF content version matching 201 | */ 202 | function hasPlayerVersion(rv) { 203 | var pv = ua.pv, v = rv.split("."); 204 | v[0] = parseInt(v[0], 10); 205 | v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0" 206 | v[2] = parseInt(v[2], 10) || 0; 207 | return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false; 208 | } 209 | 210 | 211 | /* Filter to avoid XSS attacks 212 | */ 213 | function urlEncodeIfNecessary(s) { 214 | var regex = /[\\\"<>\.;]/; 215 | var hasBadChars = regex.exec(s) != null; 216 | return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s; 217 | } 218 | 219 | return { 220 | /* Public API 221 | - Reference: http://code.google.com/p/swfobject/wiki/documentation 222 | */ 223 | 224 | embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, flashvarsObj, parObj, attObj, callbackFn) { 225 | var callbackObj = {success:false, id:replaceElemIdStr}; 226 | if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) { 227 | widthStr += ""; // auto-convert to string 228 | heightStr += ""; 229 | var att = {}; 230 | if (attObj && typeof attObj === OBJECT) { 231 | for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs 232 | att[i] = attObj[i]; 233 | } 234 | } 235 | att.data = swfUrlStr; 236 | att.width = widthStr; 237 | att.height = heightStr; 238 | var par = {}; 239 | if (parObj && typeof parObj === OBJECT) { 240 | for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs 241 | par[j] = parObj[j]; 242 | } 243 | } 244 | if (flashvarsObj && typeof flashvarsObj === OBJECT) { 245 | for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs 246 | if (typeof par.flashvars != UNDEF) { 247 | par.flashvars += "&" + k + "=" + flashvarsObj[k]; 248 | } 249 | else { 250 | par.flashvars = k + "=" + flashvarsObj[k]; 251 | } 252 | } 253 | } 254 | if (hasPlayerVersion(swfVersionStr)) { // create SWF 255 | var obj = createSWF(att, par, replaceElemIdStr); 256 | callbackObj.success = true; 257 | callbackObj.ref = obj; 258 | } 259 | if (callbackFn) { callbackFn(callbackObj); } 260 | } 261 | else if (callbackFn) { callbackFn(callbackObj); } 262 | }, 263 | 264 | ua: ua, 265 | 266 | getFlashPlayerVersion: function() { 267 | return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] }; 268 | }, 269 | 270 | hasFlashPlayerVersion: hasPlayerVersion, 271 | 272 | createSWF: function(attObj, parObj, replaceElemIdStr) { 273 | if (ua.w3) { 274 | return createSWF(attObj, parObj, replaceElemIdStr); 275 | } 276 | else { 277 | return undefined; 278 | } 279 | }, 280 | 281 | getQueryParamValue: function(param) { 282 | var q = doc.location.search || doc.location.hash; 283 | if (q) { 284 | if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark 285 | if (param == null) { 286 | return urlEncodeIfNecessary(q); 287 | } 288 | var pairs = q.split("&"); 289 | for (var i = 0; i < pairs.length; i++) { 290 | if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { 291 | return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1))); 292 | } 293 | } 294 | } 295 | return ""; 296 | } 297 | }; 298 | }(); 299 | -------------------------------------------------------------------------------- /.themes/classic/sass/partials/_syntax.scss: -------------------------------------------------------------------------------- 1 | .highlight, html .gist .gist-file .gist-syntax .gist-highlight { 2 | table td.code { width: 100%; } 3 | border: 1px solid $pre-border !important; 4 | } 5 | .highlight .line-numbers, html .gist .gist-file .gist-syntax .highlight .line_numbers { 6 | text-align: right; 7 | font-size: 13px; 8 | line-height: 1.45em; 9 | @if $solarized == light { 10 | background: lighten($base03, 1) $noise-bg !important; 11 | border-right: 1px solid darken($base02, 2) !important; 12 | @include box-shadow(lighten($base03, 2) -1px 0 inset); 13 | text-shadow: lighten($base02, 2) 0 -1px; 14 | } @else { 15 | background: $base02 $noise-bg !important; 16 | border-right: 1px solid darken($base03, 2) !important; 17 | @include box-shadow(lighten($base02, 2) -1px 0 inset); 18 | text-shadow: darken($base02, 10) 0 -1px; 19 | } 20 | span { color: $base01 !important; } 21 | padding: .8em !important; 22 | @include border-radius(0); 23 | } 24 | 25 | figure.code, .gist-file, pre { 26 | @include box-shadow(rgba(#000, .06) 0 0 10px); 27 | .highlight pre { @include box-shadow(none); } 28 | } 29 | 30 | .gist .highlight, figure.code .highlight { 31 | @include selection(adjust-color($base03, $lightness: 23%, $saturation: -65%), $text-shadow: $base03 0 1px); 32 | } 33 | html .gist .gist-file { 34 | margin-bottom: 1.8em; 35 | position: relative; 36 | border: none; 37 | padding-top: image-height("code_bg.png") !important; 38 | .highlight { 39 | margin-bottom: 0; 40 | } 41 | .gist-syntax { 42 | border-bottom: 0 !important; 43 | background: none !important; 44 | .gist-highlight { 45 | background: $base03 !important; 46 | } 47 | .highlight pre { 48 | @extend .pre-code; 49 | padding: 0; 50 | } 51 | } 52 | .gist-meta { 53 | padding: .6em 0.8em; 54 | border: 1px solid lighten($base02, 2) !important; 55 | color: $base01; 56 | font-size: .7em !important; 57 | @if $solarized == light { 58 | background: lighten($base03, 2) $noise-bg; 59 | border: 1px solid $pre-border !important; 60 | border-top: 1px solid lighten($base03, 2) !important; 61 | } @else { 62 | background: $base02 $noise-bg; 63 | } 64 | @extend .sans; 65 | line-height: 1.5em; 66 | a { 67 | color: mix($base1, $base01) !important; 68 | @include hover-link; 69 | &:hover { color: $base1 !important; } 70 | } 71 | a[href*='#file'] { 72 | position: absolute; top: 0; left:0; right:-10px; 73 | color: #474747 !important; 74 | @extend .code-title; 75 | &:hover { color: $link-color !important; } 76 | } 77 | a[href*=raw]{ 78 | @extend .download-source; 79 | top: .4em; 80 | } 81 | } 82 | } 83 | pre { 84 | background: $pre-bg $noise-bg; 85 | @include border-radius(.4em); 86 | @extend .mono; 87 | border: 1px solid $pre-border; 88 | line-height: 1.45em; 89 | font-size: 13px; 90 | margin-bottom: 2.1em; 91 | padding: .8em 1em; 92 | color: $pre-color; 93 | overflow: auto; 94 | } 95 | h3.filename { 96 | @extend .code-title; 97 | + pre { @include border-top-radius(0px); } 98 | } 99 | 100 | p, li { 101 | code { 102 | @extend .mono; 103 | display: inline-block; 104 | white-space: no-wrap; 105 | background: #fff; 106 | font-size: .8em; 107 | line-height: 1.5em; 108 | color: #555; 109 | border: 1px solid #ddd; 110 | @include border-radius(.4em); 111 | padding: 0 .3em; 112 | margin: -1px 0; 113 | } 114 | pre code { font-size: 1em !important; background: none; border: none; } 115 | } 116 | 117 | .pre-code { 118 | font-family: $mono !important; 119 | overflow: scroll; 120 | overflow-y: hidden; 121 | display: block; 122 | padding: .8em; 123 | overflow-x: auto; 124 | line-height: 1.45em; 125 | background: $base03 $noise-bg !important; 126 | color: $base1 !important; 127 | span { color: $base1 !important; } 128 | span { font-style: normal !important; font-weight: normal !important; } 129 | 130 | .c { color: $base01 !important; font-style: italic !important; } /* Comment */ 131 | .cm { color: $base01 !important; font-style: italic !important; } /* Comment.Multiline */ 132 | .cp { color: $base01 !important; font-style: italic !important; } /* Comment.Preproc */ 133 | .c1 { color: $base01 !important; font-style: italic !important; } /* Comment.Single */ 134 | .cs { color: $base01 !important; font-weight: bold !important; font-style: italic !important; } /* Comment.Special */ 135 | .err { color: $solar-red !important; background: none !important; } /* Error */ 136 | .k { color: $solar-orange !important; } /* Keyword */ 137 | .o { color: $base1 !important; font-weight: bold !important; } /* Operator */ 138 | .p { color: $base1 !important; } /* Operator */ 139 | .ow { color: $solar-cyan !important; font-weight: bold !important; } /* Operator.Word */ 140 | .gd { color: $base1 !important; background-color: mix($solar-red, $base03, 25%) !important; display: inline-block; } /* Generic.Deleted */ 141 | .gd .x { color: $base1 !important; background-color: mix($solar-red, $base03, 35%) !important; display: inline-block; } /* Generic.Deleted.Specific */ 142 | .ge { color: $base1 !important; font-style: italic !important; } /* Generic.Emph */ 143 | //.gr { color: #aa0000 } /* Generic.Error */ 144 | .gh { color: $base01 !important; } /* Generic.Heading */ 145 | .gi { color: $base1 !important; background-color: mix($solar-green, $base03, 20%) !important; display: inline-block; } /* Generic.Inserted */ 146 | .gi .x { color: $base1 !important; background-color: mix($solar-green, $base03, 40%) !important; display: inline-block; } /* Generic.Inserted.Specific */ 147 | //.go { color: #888888 } /* Generic.Output */ 148 | //.gp { color: #555555 } /* Generic.Prompt */ 149 | .gs { color: $base1 !important; font-weight: bold !important; } /* Generic.Strong */ 150 | .gu { color: $solar-violet !important; } /* Generic.Subheading */ 151 | //.gt { color: #aa0000 } /* Generic.Traceback */ 152 | .kc { color: $solar-green !important; font-weight: bold !important; } /* Keyword.Constant */ 153 | .kd { color: $solar-blue !important; } /* Keyword.Declaration */ 154 | .kp { color: $solar-orange !important; font-weight: bold !important; } /* Keyword.Pseudo */ 155 | .kr { color: $solar-magenta !important; font-weight: bold !important; } /* Keyword.Reserved */ 156 | .kt { color: $solar-cyan !important; } /* Keyword.Type */ 157 | .n { color: $solar-blue !important; } 158 | .na { color: $solar-blue !important; } /* Name.Attribute */ 159 | .nb { color: $solar-green !important; } /* Name.Builtin */ 160 | .nc { color: $solar-magenta !important;} /* Name.Class */ 161 | .no { color: $solar-yellow !important; } /* Name.Constant */ 162 | //.ni { color: #800080 } /* Name.Entity */ 163 | .nl { color: $solar-green !important; } 164 | .ne { color: $solar-blue !important; font-weight: bold !important; } /* Name.Exception */ 165 | .nf { color: $solar-blue !important; font-weight: bold !important; } /* Name.Function */ 166 | .nn { color: $solar-yellow !important; } /* Name.Namespace */ 167 | .nt { color: $solar-blue !important; font-weight: bold !important; } /* Name.Tag */ 168 | .nx { color: $solar-yellow !Important; } 169 | //.bp { color: #999999 } /* Name.Builtin.Pseudo */ 170 | //.vc { color: #008080 } /* Name.Variable.Class */ 171 | .vg { color: $solar-blue !important; } /* Name.Variable.Global */ 172 | .vi { color: $solar-blue !important; } /* Name.Variable.Instance */ 173 | .nv { color: $solar-blue !important; } /* Name.Variable */ 174 | //.w { color: #bbbbbb } /* Text.Whitespace */ 175 | .mf { color: $solar-cyan !important; } /* Literal.Number.Float */ 176 | .m { color: $solar-cyan !important; } /* Literal.Number */ 177 | .mh { color: $solar-cyan !important; } /* Literal.Number.Hex */ 178 | .mi { color: $solar-cyan !important; } /* Literal.Number.Integer */ 179 | //.mo { color: #009999 } /* Literal.Number.Oct */ 180 | .s { color: $solar-cyan !important; } /* Literal.String */ 181 | //.sb { color: #d14 } /* Literal.String.Backtick */ 182 | //.sc { color: #d14 } /* Literal.String.Char */ 183 | .sd { color: $solar-cyan !important; } /* Literal.String.Doc */ 184 | .s2 { color: $solar-cyan !important; } /* Literal.String.Double */ 185 | .se { color: $solar-red !important; } /* Literal.String.Escape */ 186 | //.sh { color: #d14 } /* Literal.String.Heredoc */ 187 | .si { color: $solar-blue !important; } /* Literal.String.Interpol */ 188 | //.sx { color: #d14 } /* Literal.String.Other */ 189 | .sr { color: $solar-cyan !important; } /* Literal.String.Regex */ 190 | .s1 { color: $solar-cyan !important; } /* Literal.String.Single */ 191 | //.ss { color: #990073 } /* Literal.String.Symbol */ 192 | //.il { color: #009999 } /* Literal.Number.Integer.Long */ 193 | div { .gd, .gd .x, .gi, .gi .x { display: inline-block; width: 100%; }} 194 | } 195 | 196 | .highlight, .gist-highlight { 197 | pre { background: none; @include border-radius(0px); border: none; padding: 0; margin-bottom: 0; } 198 | margin-bottom: 1.8em; 199 | background: $base03; 200 | overflow-y: hidden; 201 | overflow-x: auto; 202 | } 203 | 204 | $solar-scroll-bg: rgba(#fff, .15); 205 | $solar-scroll-thumb: rgba(#fff, .2); 206 | @if $solarized == light { 207 | $solar-scroll-bg: rgba(#000, .15); 208 | $solar-scroll-thumb: rgba(#000, .15); 209 | } 210 | 211 | pre, .highlight, .gist-highlight { 212 | &::-webkit-scrollbar { height: .5em; background: $solar-scroll-bg; } 213 | &::-webkit-scrollbar-thumb:horizontal { background: $solar-scroll-thumb; -webkit-border-radius: 4px; border-radius: 4px } 214 | } 215 | 216 | .highlight code { 217 | @extend .pre-code; background: #000; 218 | } 219 | figure.code { 220 | background: none; 221 | padding: 0; 222 | border: 0; 223 | margin-bottom: 1.5em; 224 | pre { margin-bottom: 0; } 225 | figcaption { 226 | position: relative; 227 | @extend .code-title; 228 | a { @extend .download-source; } 229 | } 230 | .highlight { 231 | margin-bottom: 0; 232 | } 233 | } 234 | 235 | .code-title { 236 | text-align: center; 237 | font-size: 13px; 238 | line-height: 2em; 239 | text-shadow: #cbcccc 0 1px 0; 240 | color: #474747; 241 | font-weight: normal; 242 | margin-bottom: 0; 243 | @include border-top-radius(5px); 244 | font-family: "Helvetica Neue", Arial, "Lucida Grande", "Lucida Sans Unicode", Lucida, sans-serif; 245 | background: #aaaaaa image-url("code_bg.png") top repeat-x; 246 | border: 1px solid #565656; 247 | border-top-color: #cbcbcb; 248 | border-left-color: #a5a5a5; 249 | border-right-color: #a5a5a5; 250 | border-bottom: 0; 251 | } 252 | 253 | .download-source { 254 | position: absolute; right: .8em; 255 | @include hover-link; 256 | color: #666 !important; 257 | z-index: 1; 258 | font-size: 13px; 259 | text-shadow: #cbcccc 0 1px 0; 260 | padding-left: 3em; 261 | } 262 | --------------------------------------------------------------------------------