diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..68a6830 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +.bundle +.DS_Store +.sass-cache +.gist-cache +.pygments-cache +_deploy +public +sass.old +source.old +source/_stash +source/stylesheets/screen.css +vendor +node_modules diff --git a/.rbenv-version b/.rbenv-version new file mode 100644 index 0000000..0a95b9f --- /dev/null +++ b/.rbenv-version @@ -0,0 +1 @@ +1.9.2-p290 diff --git a/.rvmrc b/.rvmrc new file mode 100644 index 0000000..f73d5d7 --- /dev/null +++ b/.rvmrc @@ -0,0 +1 @@ +rvm 1.9.2 diff --git a/.slugignore b/.slugignore new file mode 100644 index 0000000..0a41d01 --- /dev/null +++ b/.slugignore @@ -0,0 +1,3 @@ +plugins +sass +source diff --git a/.themes/classic/sass/_base.scss b/.themes/classic/sass/_base.scss new file mode 100644 index 0000000..05fdd00 --- /dev/null +++ b/.themes/classic/sass/_base.scss @@ -0,0 +1,5 @@ +@import "http://github.com/base/utilities"; +@import "http://github.com/base/solarized"; +@import "http://github.com/base/theme"; +@import "http://github.com/base/typography"; +@import "http://github.com/base/layout"; diff --git a/.themes/classic/sass/_partials.scss b/.themes/classic/sass/_partials.scss new file mode 100644 index 0000000..99c28b6 --- /dev/null +++ b/.themes/classic/sass/_partials.scss @@ -0,0 +1,8 @@ +@import "http://github.com/partials/header"; +@import "http://github.com/partials/navigation"; +@import "http://github.com/partials/blog"; +@import "http://github.com/partials/sharing"; +@import "http://github.com/partials/syntax"; +@import "http://github.com/partials/archive"; +@import "http://github.com/partials/sidebar"; +@import "http://github.com/partials/footer"; diff --git a/.themes/classic/sass/base/_layout.scss b/.themes/classic/sass/base/_layout.scss new file mode 100644 index 0000000..f9f3a41 --- /dev/null +++ b/.themes/classic/sass/base/_layout.scss @@ -0,0 +1,188 @@ +$max-width: 1200px !default; + +// Padding used for layout margins +$pad-min: 18px !default; +$pad-narrow: 25px !default; +$pad-medium: 35px !default; +$pad-wide: 55px !default; + +// Sidebar widths used in media queries +$sidebar-width-medium: 240px !default; +$sidebar-pad-medium: 15px !default; +$sidebar-pad-wide: 20px !default; +$sidebar-width-wide: 300px !default; + +$indented-lists: false !default; + +$header-font-size: 1em !default; +$header-padding-top: 1.5em !default; +$header-padding-bottom: 1.5em !default; + +.group { @include pie-clearfix; } + +@mixin collapse-sidebar { + float: none; + width: auto; + clear: left; + margin: 0; + padding: 0 $pad-medium 1px; + background-color: lighten($sidebar-bg, 2); + border-top: 1px solid lighten($sidebar-border, 4); + section { + &.odd, &.even { float: left; width: 48%; } + &.odd { margin-left: 0; } + &.even { margin-left: 4%; } + } + &.thirds section { + width: 30%; + margin-left: 5%; + &.first { + margin-left: 0; + clear: both; + } + } +} + +body { + -webkit-text-size-adjust: none; + max-width: $max-width; + position: relative; + margin: 0 auto; + > header, > nav, > footer, #content > article, #content > div > article, #content > div > section { + @extend .group; + padding-left: $pad-min; + padding-right: $pad-min; + @media only screen and (min-width: 480px) { + padding-left: $pad-narrow; + padding-right: $pad-narrow; + } + @media only screen and (min-width: 768px) { + padding-left: $pad-medium; + padding-right: $pad-medium; + } + @media only screen and (min-width: 992px) { + padding-left: $pad-wide; + padding-right: $pad-wide; + } + } + div.pagination { + @extend .group; + margin-left: $pad-min; + margin-right: $pad-min; + @media only screen and (min-width: 480px) { + margin-left: $pad-narrow; + margin-right: $pad-narrow; + } + @media only screen and (min-width: 768px) { + margin-left: $pad-medium; + margin-right: $pad-medium; + } + @media only screen and (min-width: 992px) { + margin-left: $pad-wide; + margin-right: $pad-wide; + } + } + > header { + font-size: $header-font-size; + padding-top: $header-padding-top; + padding-bottom: $header-padding-bottom; + } +} + +#content { > div, > article { width: 100%; }} + +aside.sidebar { + float: none; + padding: 0 $pad-min 1px; + background-color: lighten($sidebar-bg, 2); + border-top: 1px solid $sidebar-border; + @extend .group; +} + +.flex-content { max-width: 100%; height: auto; } + +.basic-alignment { + &.left { float: left; margin-right: 1.5em; } + &.right { float: right; margin-left: 1.5em; } + &.center { display:block; margin: 0 auto 1.5em; } + &.left, &.right { margin-bottom: .8em; } +} + +.toggle-sidebar { &, .no-sidebar & { display: none; }} + +body.sidebar-footer { + @media only screen and (min-width: 750px) { + aside.sidebar{ @include collapse-sidebar; } + } + #content { margin-right: 0px; } + .toggle-sidebar { display: none; } +} + +@media only screen and (min-width: 550px) { + body > header { font-size: $header-font-size; } +} +@media only screen and (min-width: 750px) { + aside.sidebar { @include collapse-sidebar; } +} +@media only screen and (min-width: 768px) { + body { -webkit-text-size-adjust: auto; } + body > header { font-size: $header-font-size * 1.2; } + #main { + @extend .group; + padding: 0; + margin: 0 auto; + } + #content { + @extend .group; + margin-right: $sidebar-width-medium; + position: relative; + .no-sidebar & { margin-right: 0; border-right: 0; } + .collapse-sidebar & { margin-right: 20px; } + > div, > article { + padding-top: $pad-medium/2; + padding-bottom: $pad-medium/2; + float: left; + } + } + aside.sidebar { + @extend .group; + width: $sidebar-width-medium - $sidebar-pad-medium*2; + padding: 0 $sidebar-pad-medium $sidebar-pad-medium; + background: none; + clear: none; + float: left; + margin: 0 -100% 0 0; + section { + width: auto; margin-left: 0; + &.odd, &.even { float: none; width: auto; margin-left: 0; } + } + .collapse-sidebar & { + @include collapse-sidebar; + } + } +} + +@media only screen and (min-width: 992px) { + body > header { font-size: $header-font-size * 1.3; } + #content { margin-right: $sidebar-width-wide; } + #content { + > div, > article { + padding-top: $pad-wide/2; + padding-bottom: $pad-wide/2; + } + } + aside.sidebar { + width: $sidebar-width-wide - $sidebar-pad-wide*2; + padding: 1.2em $sidebar-pad-wide $sidebar-pad-wide; + .collapse-sidebar & { + padding: { left: $pad-wide; right: $pad-wide; } + @extend .group; + } + } +} + +@if $indented-lists == false { + @media only screen and (min-width: 768px) { + ul, ol { margin-left: 0; } + } +} diff --git a/.themes/classic/sass/base/_solarized.scss b/.themes/classic/sass/base/_solarized.scss new file mode 100644 index 0000000..45d8fc5 --- /dev/null +++ b/.themes/classic/sass/base/_solarized.scss @@ -0,0 +1,46 @@ +$base03: #002b36 !default; //darkest blue +$base02: #073642 !default; //dark blue +$base01: #586e75 !default; //darkest gray +$base00: #657b83 !default; //dark gray +$base0: #839496 !default; //medium gray +$base1: #93a1a1 !default; //medium light gray +$base2: #eee8d5 !default; //cream +$base3: #fdf6e3 !default; //white +$solar-yellow: #b58900 !default; +$solar-orange: #cb4b16 !default; +$solar-red: #dc322f !default; +$solar-magenta: #d33682 !default; +$solar-violet: #6c71c4 !default; +$solar-blue: #268bd2 !default; +$solar-cyan: #2aa198 !default; +$solar-green: #859900 !default; + +$solarized: dark !default; + +@if $solarized == light { + + $_base03: $base03; + $_base02: $base02; + $_base01: $base01; + $_base00: $base00; + $_base0: $base0; + $_base1: $base1; + $_base2: $base2; + $_base3: $base3; + + $base03: $_base3; + $base02: $_base2; + $base01: $_base1; + $base00: $_base0; + $base0: $_base00; + $base1: $_base01; + $base2: $_base02; + $base3: $_base03; +} + +/* non highlighted code colors */ +$pre-bg: $base03 !default; +$pre-border: darken($base02, 5) !default; +$pre-color: $base1 !default; + + diff --git a/.themes/classic/sass/base/_theme.scss b/.themes/classic/sass/base/_theme.scss new file mode 100644 index 0000000..f9c9530 --- /dev/null +++ b/.themes/classic/sass/base/_theme.scss @@ -0,0 +1,86 @@ +$noise-bg: image-url('http://github.com/noise.png') top left; +$img-border: inline-image('dotted-border.png'); + +// Main Link Colors +$link-color: lighten(#165b94, 3) !default; +$link-color-hover: adjust-color($link-color, $lightness: 10, $saturation: 25) !default; +$link-color-visited: adjust-color($link-color, $hue: 80, $lightness: -4) !default; +$link-color-active: adjust-color($link-color-hover, $lightness: -15) !default; + +// Main Section Colors +$main-bg: #f8f8f8 !default; +$page-bg: #252525 !default; +$article-border: #eeeeee !default; + +$header-bg: #333 !default; +$header-border: lighten($header-bg, 15) !default; +$title-color: #f2f2f2 !default; +$subtitle-color: #aaa !default; + +$text-color: #222 !default; +$text-color-light: #aaa !default; +$type-border: #ddd !default; + +/* Navigation */ +$nav-bg: #ccc !default; +$nav-bg-front: image-url('http://github.com/noise.png'); +$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)); +$nav-color: darken($nav-bg, 38) !default; +$nav-color-hover: darken($nav-color, 25) !default; +$nav-placeholder: desaturate(darken($nav-bg, 10), 15) !default; +$nav-border: darken($nav-bg, 10) !default; +$nav-border-top: lighten($nav-bg, 15) !default; +$nav-border-bottom: darken($nav-bg, 25) !default; +$nav-border-left: darken($nav-bg, 11) !default; +$nav-border-right: lighten($nav-bg, 7) !default; + +/* Sidebar colors */ +$sidebar-bg: #f2f2f2 !default; +$sidebar-link-color: $link-color !default; +$sidebar-link-color-hover: $link-color-hover !default; +$sidebar-link-color-active: $link-color-active !default; +$sidebar-color: change-color(mix($text-color, $sidebar-bg, 80), $hue: hue($sidebar-bg), $saturation: saturation($sidebar-bg)/2) !default; +$sidebar-border: desaturate(darken($sidebar-bg, 7), 10) !default; +$sidebar-border: darken($sidebar-bg, 7) !default; +$sidebar-link-color-subdued: lighten($sidebar-color, 20) !default; +$sidebar-link-color-subdued-hover: $sidebar-link-color-hover !default; +$twitter-status-link: lighten($sidebar-link-color-subdued, 15) !default; + +$footer-color: #888 !default; +$footer-bg: #ccc !default; +$footer-bg-front: image-url('http://github.com/noise.png'); +$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)); +$footer-color: darken($footer-bg, 38) !default; +$footer-color-hover: darken($footer-color, 10) !default; +$footer-border-top: lighten($footer-bg, 15) !default; +$footer-border-bottom: darken($footer-bg, 15) !default; +$footer-link-color: darken($footer-bg, 38) !default; +$footer-link-color-hover: darken($footer-color, 25) !default; +$page-border-bottom: darken($footer-bg, 5) !default; + + +/* Core theme application */ + +a { + @include link-colors($link-color, $hover: $link-color-hover, $focus: $link-color-hover, $visited: $link-color-visited, $active: $link-color-active); +} +aside.sidebar a { + @include link-colors($sidebar-link-color, $hover: $sidebar-link-color-hover, $focus: $sidebar-link-color-hover, $active: $sidebar-link-color-active); +} +a { + @include transition(color .3s); +} + +html { + background: $page-bg image-url('http://github.com/line-tile.png') top left; +} +body { + > div { + background: $sidebar-bg $noise-bg; + border-bottom: 1px solid $page-border-bottom; + > div { + background: $main-bg $noise-bg; + border-right: 1px solid $sidebar-border; + } + } +} diff --git a/.themes/classic/sass/base/_typography.scss b/.themes/classic/sass/base/_typography.scss new file mode 100644 index 0000000..d6cf852 --- /dev/null +++ b/.themes/classic/sass/base/_typography.scss @@ -0,0 +1,157 @@ +$blockquote: $type-border !default; +$sans: "PT Sans", "Helvetica Neue", Arial, sans-serif !default; +$serif: "PT Serif", Georgia, Times, "Times New Roman", serif !default; +$mono: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace !default; +$heading-font-family: "PT Serif", "Georgia", "Helvetica Neue", Arial, sans-serif !default; +$header-title-font-family: $heading-font-family !default; + +// Fonts +.heading { + font-family: $heading-font-family; +} +.sans { font-family: $sans; } +.serif { font-family: $serif; } +.mono { font-family: $mono; } + +body > header h1 { + font-size: 2.2em; + @extend .heading; + font-family: $header-title-font-family; + font-weight: normal; + line-height: 1.2em; + margin-bottom: 0.6667em; +} + +body { + line-height: 1.5em; + color: $text-color; + @extend .serif; +} +h1 { + font-size: 2.2em; + line-height: 1.2em; +} + +@media only screen and (min-width: 992px) { + body { font-size: 1.15em; } + h1 { font-size: 2.6em; line-height: 1.2em; } +} + +#{headings()}{ + @extend .heading; + text-rendering: optimizelegibility; + margin-bottom: 1em; + font-weight: bold; +} +h2, section h1 { + font-size: 1.5em; +} +h3, section h2, section section h1 { + font-size: 1.3em; +} +h4, section h3, section section h2, section section section h1 { + font-size: 1em; +} +h5, section h4, section section h3 { + font-size: .9em; +} +h6, section h5, section section h4, section section section h3 { + font-size: .8em; +} +p, blockquote, ul, ol { margin-bottom: 1.5em; } + +ul { list-style-type: disc; + ul { list-style-type: circle; margin-bottom: 0px; + ul { list-style-type: square; margin-bottom: 0px; }}} + +ol { list-style-type: decimal; + ol { list-style-type: lower-alpha; margin-bottom: 0px; + ol { list-style-type: lower-roman; margin-bottom: 0px; }}} + +ul, ol { &, ul, ol { margin-left: 1.3em; }} + +strong { font-weight: bold; } + +em { font-style: italic; } + +sup, sub { font-size: 0.8em; position: relative; display: inline-block; } +sup { top: -.5em; } +sub { bottom: -.5em; } + +q { font-style: italic; + &:before { content: "\201C"; } + &:after { content: "\201D"; } +} + +em, dfn { font-style: italic; } + +strong, dfn { font-weight: bold; } + +del, s { text-decoration: line-through; } + +abbr, acronym { border-bottom: 1px dotted; cursor: help; } + +pre, code, tt { @extend .mono; } + +sub, sup { line-height: 0; } + +hr { margin-bottom: 0.2em; } + +small { font-size: .8em; } + +big { font-size: 1.2em; } + +blockquote { + $bq-margin: 1.2em; + font-style: italic; + position: relative; + font-size: 1.2em; + line-height: 1.5em; + padding-left: 1em; + border-left: 4px solid rgba($text-color-light, .5); + cite { + font-style: italic; + a { color: $text-color-light !important; word-wrap: break-word; } + &:before { content: '\2014'; padding:{right: .3em; left: .3em;} color: $text-color-light; } + } + @media only screen and (min-width: 992px) { + padding-left: 1.5em; + border-left-width: 4px; + } +} + +.pullquote-right:before, +.pullquote-left:before { + /* Reset metrics. */ + padding: 0; + border: none; + + /* Content */ + content: attr(data-pullquote); + + /* Pull out to the right, modular scale based margins. */ + float: right; + width: 45%; + margin: .5em 0 1em 1.5em; + + /* Baseline correction */ + position: relative; + top: 7px; + font-size: 1.4em; + line-height: 1.45em; +} + +.pullquote-left:before { + /* Make left pullquotes align properly. */ + float: left; + margin: .5em 1.5em 1em 0; +} + +/* @extend this to force long lines of continuous text to wrap */ +.force-wrap { + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + white-space: pre-wrap; + word-wrap: break-word; +} diff --git a/.themes/classic/sass/base/_utilities.scss b/.themes/classic/sass/base/_utilities.scss new file mode 100644 index 0000000..2d49e65 --- /dev/null +++ b/.themes/classic/sass/base/_utilities.scss @@ -0,0 +1,28 @@ +@mixin mask-image($img, $repeat: no-repeat){ + @include experimental(mask-image, image-url(http://github.com/$img), -webkit, -moz, -o, -ms); + @include experimental(mask-repeat, $repeat, -webkit, -moz, -o, -ms); + width: image-width($img); + height: image-height($img); +} + +@mixin shadow-box($border: #fff .5em solid, $shadow: rgba(#000, .15) 0 1px 4px, $border-radius: .3em) { + @include border-radius($border-radius); + @include box-shadow($shadow); + @include box-sizing(border-box); + border: $border; +} + +@mixin selection($bg, $color: inherit, $text-shadow: none){ + * { + &::-moz-selection { background: $bg; color: $color; text-shadow: $text-shadow; } + &::-webkit-selection { background: $bg; color: $color; text-shadow: $text-shadow; } + &::selection { background: $bg; color: $color; text-shadow: $text-shadow; } + } +} + +@function text-color($color, $dark: dark, $light: light){ + $text-color: ( (red($color)*299) + (green($color)*587) + (blue($color)*114) ) / 1000; + $text-color: if($text-color >= 150, $dark, $light); + @return $text-color; +} + diff --git a/.themes/classic/sass/custom/_colors.scss b/.themes/classic/sass/custom/_colors.scss new file mode 100644 index 0000000..740266a --- /dev/null +++ b/.themes/classic/sass/custom/_colors.scss @@ -0,0 +1,43 @@ +// Here you can easily change your sites's color scheme. +// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works. +// If you need a handy color picker try http://hslpicker.com + +//$header-bg: #263347; +//$subtitle-color: lighten($header-bg, 58); +//$nav-bg: desaturate(lighten(#8fc17a, 18), 5); +//$nav-bg-front: image-url('http://github.com/noise.png'); +//$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)); +//$sidebar-bg: desaturate(#eceff5, 8); +//$sidebar-link-color: saturate(#526f9a, 10); +//$sidebar-link-color-hover: darken(#7ab662, 9); +//$footer-bg: #ccc !default; +//$footer-bg-front: image-url('http://github.com/noise.png'); +//$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)); + + +/* To use the light Solarized highlighting theme uncomment the following line */ +//$solarized: light; + +/* If you want to tweak the Solarized colors you can do that here */ +//$base03: #002b36; //darkest blue +//$base02: #073642; //dark blue +//$base01: #586e75; //darkest gray +//$base00: #657b83; //dark gray +//$base0: #839496; //medium gray +//$base1: #93a1a1; //medium light gray +//$base2: #eee8d5; //cream +//$base3: #fdf6e3; //white +//$solar-yellow: #b58900; +//$solar-orange: #cb4b16; +//$solar-red: #dc322f; +//$solar-magenta: #d33682; +//$solar-violet: #6c71c4; +//$solar-blue: #268bd2; +//$solar-cyan: #2aa198; +//$solar-green: #859900; + + +/* Non highlighted code colors */ +//$pre-bg: $base03; +//$pre-border: darken($base02, 5); +//$pre-color: $base1; diff --git a/.themes/classic/sass/custom/_fonts.scss b/.themes/classic/sass/custom/_fonts.scss new file mode 100644 index 0000000..073c2be --- /dev/null +++ b/.themes/classic/sass/custom/_fonts.scss @@ -0,0 +1,9 @@ +// Here you can easily change font faces which are used in your site. +// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works. your sites's. +// If you love to use Web Fonts, you also need to add some lines to source/_includes/custom/head.html + +//$sans: "Optima", sans-serif; +//$serif: "Baskerville", serif; +//$mono: "Courier", monospace; +//$heading-font-family: "Verdana", sans-serif; +//$header-title-font-family: "Futura", sans-serif; diff --git a/.themes/classic/sass/custom/_layout.scss b/.themes/classic/sass/custom/_layout.scss new file mode 100644 index 0000000..74c7de9 --- /dev/null +++ b/.themes/classic/sass/custom/_layout.scss @@ -0,0 +1,21 @@ +// Here you can easily change your sites's layout. +// To give it a try, uncomment some of the lines below, make changes, rebuild your blog, and see how it works. + +//$header-font-size: 1em; +//$header-padding-top: 1.5em; +//$header-padding-bottom: 1.5em; + +//$max-width: 1350px; +//$indented-lists: true; + +// Padding used for layout margins +//$pad-min: 18px; +//$pad-narrow: 25px; +//$pad-medium: 35px; +//$pad-wide: 55px; + +// Sidebar widths used in media queries +//$sidebar-width-medium: 240px; +//$sidebar-pad-medium: 15px; +//$sidebar-pad-wide: 20px; +//$sidebar-width-wide: 300px; diff --git a/.themes/classic/sass/custom/_styles.scss b/.themes/classic/sass/custom/_styles.scss new file mode 100644 index 0000000..91ffccc --- /dev/null +++ b/.themes/classic/sass/custom/_styles.scss @@ -0,0 +1,2 @@ +// This File is imported last, and will override other styles in the cascade +// Add styles here to make changes without digging in too much diff --git a/.themes/classic/sass/partials/_archive.scss b/.themes/classic/sass/partials/_archive.scss new file mode 100644 index 0000000..9ef1e82 --- /dev/null +++ b/.themes/classic/sass/partials/_archive.scss @@ -0,0 +1,72 @@ +#archive { + #content > div { &, > article { padding-top: 0; } } +} +#blog-archives { + article { + padding: 1em 0 1em; + position: relative; + background: $img-border bottom left repeat-x; + &:last-child { + background: none; + } + footer { padding: 0; margin: 0;} + } + h1 { color: $text-color; margin-bottom: .3em; } + h2 { display: none; } + h1 { + font-size: 1.5em; + a { + @include hover-link; + color: inherit; + &:hover { color: $link-color-hover; } + font-weight: normal; + display: inline-block; + } + } + a.category, time { + @extend .sans; + color: $text-color-light; + } + color: $text-color-light; + .entry-content { display: none; } + time { + font-size: .9em; + line-height: 1.2em; + .month, .day { display: inline-block; } + .month { text-transform: uppercase; } + } + p { margin-bottom: 1em; } + &, .entry-content { a { @include link-colors(inherit, $link-color-hover); }} + a:hover { color: $link-color-hover; } + @media only screen and (min-width: 550px) { + article { margin-left: 5em; } + h2 { + margin-bottom: .3em; + font-weight: normal; + display: inline-block; + position: relative; top: -1px; + float: left; + &:first-child { padding-top: .75em; } + } + time { + position: absolute; + text-align: right; + left: 0em; + top: 1.8em; + } + .year { display: none; } + article { + padding:{left: 4.5em; bottom: .7em;} + } + a.category { + line-height: 1.1em; + } + } +} +#content > .category { + article { + margin-left: 0; + padding-left: 6.8em; + } + .year { display: inline; } +} diff --git a/.themes/classic/sass/partials/_blog.scss b/.themes/classic/sass/partials/_blog.scss new file mode 100644 index 0000000..d3ba48a --- /dev/null +++ b/.themes/classic/sass/partials/_blog.scss @@ -0,0 +1,142 @@ +article { + overflow: hidden; + padding-top: 1em; + a { @extend .force-wrap; } + header { + position: relative; + padding-top: 2em; + padding-bottom: 1em; + margin-bottom: 1em; + background: $img-border bottom left repeat-x; + h1 { + margin: 0; + a { text-decoration: none; + &:hover { text-decoration: underline; } } + } + p { + font-size: .9em; + color: $text-color-light; + margin: 0; + &.meta { + @extend .sans; + text-transform: uppercase; + position: absolute; top: 0; + } + } + @media only screen and (min-width: 768px) { + margin-bottom: 1.5em; + padding-bottom: 1em; + background: $img-border bottom left repeat-x; + } + } + h2 { + padding-top: 0.8em; + background: $img-border top left repeat-x; + } + .entry-content & h2:first-child, header + h2 { padding-top: 0; } + h2:first-child, header + h2 { background: none; } + .feature { + padding-top: .5em; + margin-bottom: 1em; + padding-bottom: 1em; + background: $img-border bottom left repeat-x; + font-size: 2.0em; font-style: italic; + line-height: 1.3em; + } + img, video, .flash-video { + @extend .flex-content; + @extend .basic-alignment; + @include shadow-box; + } + video, .flash-video { margin: 0 auto 1.5em; } + video { display: block; width: 100%; } + .flash-video { + > div { + position: relative; + display: block; + padding-bottom: 56.25%; + padding-top: 1px; + height: 0; + overflow: hidden; + iframe, object, embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + } + } + > footer { + padding-bottom: 2.5em; + margin-top: 2em; + @extend .sans; + p.meta { + margin-bottom: .8em; + font-size: .85em; + clear: both; + overflow: hidden; + } + .byline + time:before, time +time:before, .comments:before, .byline ~ .categories:before { + @extend .separator; + } + } + +} +article + article { + .blog-index & { + background: $img-border top left repeat-x; + } +} +#content .blog-index { + padding: { top: 0; bottom: 0; } + article { padding-top: 2em; } + article header { background: none; padding-bottom: 0; } + article h1 { + font-size: 2.2em; + a { color: inherit; &:hover { color: $link-color-hover; } } + } + a[rel=full-article] { + background: darken($main-bg, 5); + display: inline-block; + padding: .4em .8em; + margin-right: .5em; + text-decoration: none; + color: mix($text-color, $text-color-light); + @extend .serif; + @include transition(background-color .5s); + &:hover { + background: $link-color-hover; + text-shadow: none; + color: $main-bg; + } + } + footer { + @extend .sans; + margin-top: 1em; + } +} + +.separator { + content: "\2022 "; + padding: 0 .4em 0 .2em; + display: inline-block; +} + +#content div.pagination { + text-align: center; + font-size: .95em; + position: relative; + background: $img-border top left repeat-x; + padding: {top: 1.5em; bottom: 1.5em;} + a { + text-decoration: none; + color: $text-color-light; + &.prev { position: absolute; left: 0; } + &.next { position: absolute; right: 0; } + &:hover { color: $link-color-hover; } + &[href*=archive] { + &:before, &:after { content: '\2014'; padding: 0 .3em; } + } + } +} diff --git a/.themes/classic/sass/partials/_footer.scss b/.themes/classic/sass/partials/_footer.scss new file mode 100644 index 0000000..3741122 --- /dev/null +++ b/.themes/classic/sass/partials/_footer.scss @@ -0,0 +1,19 @@ +body > footer { + @extend .sans; + font-size: .8em; + color: $footer-color; + text-shadow: lighten($footer-bg, 5) 0 1px; + background-color: $footer-bg; + @include background($footer-bg-front, $footer-bg-back); + border-top: 1px solid $footer-border-top; + position: relative; + padding-top: 1em; + padding-bottom: 1em; + margin-bottom: 3em; + @include border-bottom-radius(.4em); + z-index: 1; + a { + @include link-colors($footer-link-color, $footer-link-color-hover, $visited: $footer-link-color); + } + p:last-child { margin-bottom: 0; } +} diff --git a/.themes/classic/sass/partials/_header.scss b/.themes/classic/sass/partials/_header.scss new file mode 100644 index 0000000..e3c6c02 --- /dev/null +++ b/.themes/classic/sass/partials/_header.scss @@ -0,0 +1,18 @@ +body > header { + background: $header-bg; + h1 { + display: inline-block; + margin: 0; + a, a:visited, a:hover { + color: $title_color; + text-decoration: none; + } + } + h2 { + margin: .2em 0 0; + @extend .sans; + font-size: 1em; + color: $subtitle-color; + font-weight: normal; + } +} diff --git a/.themes/classic/sass/partials/_navigation.scss b/.themes/classic/sass/partials/_navigation.scss new file mode 100644 index 0000000..68a15ce --- /dev/null +++ b/.themes/classic/sass/partials/_navigation.scss @@ -0,0 +1,136 @@ +body > nav { + position: relative; + background-color: $nav-bg; + @include background($nav-bg-front, $nav-bg-back); + border: { + top: 1px solid $nav-border-top; + bottom: 1px solid $nav-border-bottom; } + padding-top: .35em; + padding-bottom: .35em; + form { + @include background-clip(padding-box); + margin: 0; padding: 0; + .search { + padding: .3em .5em 0; + font-size: .85em; + @extend .sans; + line-height: 1.1em; + width: 95%; + @include border-radius(.5em); + @include background-clip(padding-box); + @include box-shadow(lighten($nav-bg, 2) 0 1px); + background-color: lighten($nav-bg, 15); + border: 1px solid $nav-border; + color: #888; + &:focus { + color: #444; + border-color: #80b1df; + @include box-shadow(#80b1df 0 0 4px, #80b1df 0 0 3px inset); + background-color: #fff; + outline: none; + } + } + } + fieldset[role=search]{ float: right; width: 48%; } + fieldset.mobile-nav{ float: left; width: 48%; + select{ width: 100%; font-size: .8em; border: 1px solid #888;} + } + ul { display: none; } + @media only screen and (min-width: 550px) { + font-size: .9em; + ul { + @include horizontal-list(0); + float: left; + display: block; + padding-top: .15em; + } + ul.subscription { + margin-left: .8em; + float: right; + li:last-child a { padding-right: 0; } + } + ul li { + margin: 0; + } + a { + @include link-colors($nav-color, $nav-color-hover, $visited: $nav-color); + @extend .sans; + text-shadow: lighten($nav-bg, 12) 0 1px; + float: left; + text-decoration: none; + font-size: 1.1em; + padding: .1em 0; + line-height: 1.5em; + } + li + li { + border-left: 1px solid $nav-border-left; + margin-left: .8em; + a { + padding-left: .8em; + border-left: 1px solid $nav-border-right; + } + } + form { + float: right; + text-align: left; + padding-left: .8em; + width: $sidebar-width-medium - $pad-medium*2 - $sidebar-pad-medium + 20px; + .search { + width: 93%; + font-size: .95em; + line-height: 1.2em; + } + } + ul[data-subscription$=email] + form { + width: $sidebar-width-medium - $pad-medium*2 - $sidebar-pad-medium - 58px; + .search { width: 91%; } + } + fieldset.mobile-nav { display: none; } + fieldset[role=search]{ width: 99%; } + } + @media only screen and (min-width: 992px) { + form { + width: $sidebar-width-wide - $pad-wide - $sidebar-pad-wide*2 + 10px; + } + ul[data-subscription$=email] + form { + width: $sidebar-width-wide - $pad-wide - $sidebar-pad-wide*2 - 58px; + } + } +} +.no-placeholder { + body > nav .search { + background: lighten($nav-bg, 15) image-url('http://github.com/search.png') .3em .25em no-repeat; + text-indent: 1.3em; + } +} +@mixin mask-subscription-nav($feed: 'rss.png'){ + position: relative; top: 0px; + text-indent: -999999em; + background-color: $nav-border-right; + border: 0; + padding: 0; + &,&:after { @include mask-image($feed); } + &:after { + content: ""; + position: absolute; top: -1px; left: 0; + background-color: lighten($nav-color, 25); + } + &:hover:after { background-color: lighten($nav-color, 20); } +} +.maskImage { + body > nav { + @media only screen and (min-width: 550px) { + ul[data-subscription$=email] + form { + width: $sidebar-width-medium - $pad-medium*2 - $sidebar-pad-medium - 32px; + } + } + @media only screen and (min-width: 992px) { + ul[data-subscription$=email] + form { + width: $sidebar-width-wide - $pad-wide - $sidebar-pad-wide*2 - 32px; + } + } + } + ul.subscription { position: relative; top: .2em; li, a { border: 0; padding: 0; }} + a[rel=subscribe-rss]{ @include mask-subscription-nav('rss.png'); } + a[rel=subscribe-email]{ @include mask-subscription-nav('email.png'); } +} diff --git a/.themes/classic/sass/partials/_sharing.scss b/.themes/classic/sass/partials/_sharing.scss new file mode 100644 index 0000000..1fa9775 --- /dev/null +++ b/.themes/classic/sass/partials/_sharing.scss @@ -0,0 +1,6 @@ +.sharing { + p.meta + & { + padding: { top: 1em; left: 0; } + background: $img-border top left repeat-x; + } +} diff --git a/.themes/classic/sass/partials/_sidebar.scss b/.themes/classic/sass/partials/_sidebar.scss new file mode 100644 index 0000000..eec540b --- /dev/null +++ b/.themes/classic/sass/partials/_sidebar.scss @@ -0,0 +1,5 @@ +@import "http://github.com/sidebar/base"; +@import "http://github.com/sidebar/twitter"; +@import "http://github.com/sidebar/googleplus"; +@import "http://github.com/sidebar/pinboard"; +@import "http://github.com/sidebar/delicious"; diff --git a/.themes/classic/sass/partials/_syntax.scss b/.themes/classic/sass/partials/_syntax.scss new file mode 100644 index 0000000..77ac8d7 --- /dev/null +++ b/.themes/classic/sass/partials/_syntax.scss @@ -0,0 +1,253 @@ +.highlight, html .gist .gist-file .gist-syntax .gist-highlight { + table td.code { width: 100%; } + .line-numbers { + text-align: right; + font-size: 13px; + line-height: 1.45em; + @if $solarized == light { + background: lighten($base03, 1) $noise-bg !important; + border-right: 1px solid darken($base02, 2) !important; + @include box-shadow(lighten($base03, 2) -1px 0 inset); + text-shadow: lighten($base02, 2) 0 -1px; + } @else { + background: $base02 $noise-bg !important; + border-right: 1px solid darken($base03, 2) !important; + @include box-shadow(lighten($base02, 2) -1px 0 inset); + text-shadow: darken($base02, 10) 0 -1px; + } + span { color: $base01 !important; } + padding: .8em !important; + @include border-radius(0); + } + border: 1px solid $pre-border !important; +} +figure.code, .gist-file, pre { + @include box-shadow(rgba(#000, .06) 0 0 10px); + .highlight pre { @include box-shadow(none); } +} + +html .gist .gist-file { + margin-bottom: 1.8em; + position: relative; + border: none; + padding-top: image-height("code_bg.png") !important; + .gist-syntax { + border-bottom: 0 !important; + background: none !important; + .gist-highlight{ + background: $base03 !important; + pre { + @extend .pre-code; + } + } + } + .gist-meta { + padding: .6em 0.8em; + border: 1px solid lighten($base02, 2) !important; + color: $base01; + font-size: .7em !important; + @if $solarized == light { + background: lighten($base03, 2) $noise-bg; + border: 1px solid $pre-border !important; + border-top: 1px solid lighten($base03, 2) !important; + } @else { + background: $base02 $noise-bg; + } + @extend .sans; + line-height: 1.5em; + a { + color: mix($base1, $base01) !important; + @include hover-link; + &:hover { color: $base1 !important; } + } + a[href*='#file'] { + position: absolute; top: 0; left:0; right:-10px; + color: #474747 !important; + @extend .code-title; + &:hover { color: $link-color !important; } + } + a[href*=raw]{ + @extend .download-source; + top: .4em; + } + } +} +pre { + background: $pre-bg $noise-bg; + @include border-radius(.4em); + @extend .mono; + border: 1px solid $pre-border; + line-height: 1.45em; + font-size: 13px; + margin-bottom: 2.1em; + padding: .8em 1em; + color: $pre-color; + overflow: auto; +} +h3.filename { + @extend .code-title; + + pre { @include border-top-radius(0px); } +} + +p, li { + code { + @extend .mono; + display: inline-block; + white-space: no-wrap; + background: #fff; + font-size: .8em; + line-height: 1.5em; + color: #555; + border: 1px solid #ddd; + @include border-radius(.4em); + padding: 0 .3em; + margin: -1px 0; + } + pre code { font-size: 1em !important; background: none; border: none; } +} + +.pre-code { + @include selection(adjust-color($base03, $lightness: 23%, $saturation: -65%), $text-shadow: $base03 0 1px); + font-family: $mono !important; + overflow: scroll; + overflow-y: hidden; + display: block; + padding: .8em !important; + overflow-x: auto; + line-height: 1.45em; + background: $base03 $noise-bg !important; + color: $base1 !important; + span { color: $base1 !important; } + span { font-style: normal !important; font-weight: normal !important; } + + .c { color: $base01 !important; font-style: italic !important; } /* Comment */ + .cm { color: $base01 !important; font-style: italic !important; } /* Comment.Multiline */ + .cp { color: $base01 !important; font-style: italic !important; } /* Comment.Preproc */ + .c1 { color: $base01 !important; font-style: italic !important; } /* Comment.Single */ + .cs { color: $base01 !important; font-weight: bold !important; font-style: italic !important; } /* Comment.Special */ + .err { color: $solar-red !important; background: none !important; } /* Error */ + .k { color: $solar-orange !important; } /* Keyword */ + .o { color: $base1 !important; font-weight: bold !important; } /* Operator */ + .p { color: $base1 !important; } /* Operator */ + .ow { color: $solar-cyan !important; font-weight: bold !important; } /* Operator.Word */ + .gd { color: $base1 !important; background-color: mix($solar-red, $base03, 25%) !important; display: inline-block; } /* Generic.Deleted */ + .gd .x { color: $base1 !important; background-color: mix($solar-red, $base03, 35%) !important; display: inline-block; } /* Generic.Deleted.Specific */ + .ge { color: $base1 !important; font-style: italic !important; } /* Generic.Emph */ + //.gr { color: #aa0000 } /* Generic.Error */ + .gh { color: $base01 !important; } /* Generic.Heading */ + .gi { color: $base1 !important; background-color: mix($solar-green, $base03, 20%) !important; display: inline-block; } /* Generic.Inserted */ + .gi .x { color: $base1 !important; background-color: mix($solar-green, $base03, 40%) !important; display: inline-block; } /* Generic.Inserted.Specific */ + //.go { color: #888888 } /* Generic.Output */ + //.gp { color: #555555 } /* Generic.Prompt */ + .gs { color: $base1 !important; font-weight: bold !important; } /* Generic.Strong */ + .gu { color: $solar-violet !important; } /* Generic.Subheading */ + //.gt { color: #aa0000 } /* Generic.Traceback */ + .kc { color: $solar-green !important; font-weight: bold !important; } /* Keyword.Constant */ + .kd { color: $solar-blue !important; } /* Keyword.Declaration */ + .kp { color: $solar-orange !important; font-weight: bold !important; } /* Keyword.Pseudo */ + .kr { color: $solar-magenta !important; font-weight: bold !important; } /* Keyword.Reserved */ + .kt { color: $solar-cyan !important; } /* Keyword.Type */ + .n { color: $solar-blue !important; } + .na { color: $solar-blue !important; } /* Name.Attribute */ + .nb { color: $solar-green !important; } /* Name.Builtin */ + .nc { color: $solar-magenta !important;} /* Name.Class */ + .no { color: $solar-yellow !important; } /* Name.Constant */ + //.ni { color: #800080 } /* Name.Entity */ + .nl { color: $solar-green !important; } + .ne { color: $solar-blue !important; font-weight: bold !important; } /* Name.Exception */ + .nf { color: $solar-blue !important; font-weight: bold !important; } /* Name.Function */ + .nn { color: $solar-yellow !important; } /* Name.Namespace */ + .nt { color: $solar-blue !important; font-weight: bold !important; } /* Name.Tag */ + .nx { color: $solar-yellow !Important; } + //.bp { color: #999999 } /* Name.Builtin.Pseudo */ + //.vc { color: #008080 } /* Name.Variable.Class */ + .vg { color: $solar-blue !important; } /* Name.Variable.Global */ + .vi { color: $solar-blue !important; } /* Name.Variable.Instance */ + .nv { color: $solar-blue !important; } /* Name.Variable */ + //.w { color: #bbbbbb } /* Text.Whitespace */ + .mf { color: $solar-cyan !important; } /* Literal.Number.Float */ + .m { color: $solar-cyan !important; } /* Literal.Number */ + .mh { color: $solar-cyan !important; } /* Literal.Number.Hex */ + .mi { color: $solar-cyan !important; } /* Literal.Number.Integer */ + //.mo { color: #009999 } /* Literal.Number.Oct */ + .s { color: $solar-cyan !important; } /* Literal.String */ + //.sb { color: #d14 } /* Literal.String.Backtick */ + //.sc { color: #d14 } /* Literal.String.Char */ + .sd { color: $solar-cyan !important; } /* Literal.String.Doc */ + .s2 { color: $solar-cyan !important; } /* Literal.String.Double */ + .se { color: $solar-red !important; } /* Literal.String.Escape */ + //.sh { color: #d14 } /* Literal.String.Heredoc */ + .si { color: $solar-blue !important; } /* Literal.String.Interpol */ + //.sx { color: #d14 } /* Literal.String.Other */ + .sr { color: $solar-cyan !important; } /* Literal.String.Regex */ + .s1 { color: $solar-cyan !important; } /* Literal.String.Single */ + //.ss { color: #990073 } /* Literal.String.Symbol */ + //.il { color: #009999 } /* Literal.Number.Integer.Long */ + div { .gd, .gd .x, .gi, .gi .x { display: inline-block; width: 100%; }} +} + +.highlight, .gist-highlight { + pre { background: none; @include border-radius(none); border: none; padding: 0; margin-bottom: 0; } + margin-bottom: 1.8em; + background: $base03; + overflow-y: hidden; + overflow-x: auto; +} + +$solar-scroll-bg: rgba(#fff, .15); +$solar-scroll-thumb: rgba(#fff, .2); +@if $solarized == light { + $solar-scroll-bg: rgba(#000, .15); + $solar-scroll-thumb: rgba(#000, .15); +} + +pre, .highlight, .gist-highlight { + &::-webkit-scrollbar { height: .5em; background: $solar-scroll-bg; } + &::-webkit-scrollbar-thumb:horizontal { background: $solar-scroll-thumb; -webkit-border-radius: 4px; border-radius: 4px } +} + +.highlight code { @extend .pre-code; background: #000;} +figure.code { + background: none; + padding: 0; + border: 0; + margin-bottom: 1.5em; + pre { margin-bottom: 0; } + figcaption { + position: relative; + @extend .code-title; + a { @extend .download-source; } + } + .highlight { + margin-bottom: 0; + } +} + +.code-title { + text-align: center; + font-size: 13px; + line-height: 2em; + text-shadow: #cbcccc 0 1px 0; + color: #474747; + font-weight: normal; + margin-bottom: 0; + @include border-top-radius(5px); + font-family: "Helvetica Neue", Arial, "Lucida Grande", "Lucida Sans Unicode", Lucida, sans-serif; + background: #aaaaaa image-url("http://github.com/code_bg.png") top repeat-x; + border: 1px solid #565656; + border-top-color: #cbcbcb; + border-left-color: #a5a5a5; + border-right-color: #a5a5a5; + border-bottom: 0; +} + +.download-source { + position: absolute; right: .8em; + @include hover-link; + color: #666 !important; + z-index: 1; + font-size: 13px; + text-shadow: #cbcccc 0 1px 0; + padding-left: 3em; +} + diff --git a/.themes/classic/sass/partials/sidebar/_base.scss b/.themes/classic/sass/partials/sidebar/_base.scss new file mode 100644 index 0000000..afda01c --- /dev/null +++ b/.themes/classic/sass/partials/sidebar/_base.scss @@ -0,0 +1,105 @@ +.side-shadow-border { + @include box-shadow(lighten($sidebar-bg, 5) 0 1px); +} +aside.sidebar { + color: $sidebar-color; + text-shadow: lighten($sidebar-bg, 8) 0 1px; + a { @extend .force-wrap; } + section { + @extend .sans; + font-size: .8em; + line-height: 1.4em; + margin-bottom: 1.5em; + h1 { + margin: 1.5em 0 0; + padding-bottom: .2em; + border-bottom: 1px solid $sidebar-border; + @extend .side-shadow-border; + + p { + padding-top: .4em; + } + } + } + img { + @extend .flex-content; + @extend .basic-alignment; + @include shadow-box($border: #fff .3em solid); + } + ul { + margin-bottom: 0.5em; + margin-left: 0; + } + li { + list-style: none; + padding: .5em 0; + margin: 0; + border-bottom: 1px solid $sidebar-border; + @extend .side-shadow-border; + p:last-child { + margin-bottom: 0; + } + } + a { + color: inherit; + @include transition(color .5s); + } + &:hover a { + color: $sidebar-link-color; + &:hover { color: $sidebar-link-color-hover; } + } +} +.aside-alt-link { + color: $sidebar-link-color-subdued; + &:hover { + color: $sidebar-link-color-subdued-hover; + } +} + +@media only screen and (min-width: 768px) { + .toggle-sidebar { + outline: none; + position: absolute; right: -10px; top: 0; bottom: 0; + display: inline-block; + text-decoration: none; + color: mix($text-color-light, $sidebar-bg); + width: 9px; + cursor: pointer; + &:hover { + background: mix($sidebar-border, $sidebar-bg); + @include background(linear-gradient(left, rgba($sidebar-border, .5), rgba($sidebar-border, 0))); + } + &:after { + position: absolute; right: -11px; top: 0; + width: 20px; + font-size: 1.2em; + line-height: 1.1em; + padding-bottom: .15em; + @include border-bottom-right-radius(.3em); + text-align: center; + background: $main-bg $noise-bg; + border-bottom: 1px solid $sidebar-border; + border-right: 1px solid $sidebar-border; + content: "\00BB"; + text-indent: -1px; + } + .collapse-sidebar & { + text-indent: 0px; + right: -20px; + width: 19px; + &:hover { + background: mix($sidebar-border, $sidebar-bg); + } + &:after { + border-left: 1px solid $sidebar-border; + text-shadow: #fff 0 1px; + content: "\00AB"; + left: 0px; right: 0; + text-align: center; + text-indent: 0; + border: 0; + border-right-width: 0; + background: none; + } + } + } +} diff --git a/.themes/classic/sass/partials/sidebar/_delicious.scss b/.themes/classic/sass/partials/sidebar/_delicious.scss new file mode 100644 index 0000000..e962702 --- /dev/null +++ b/.themes/classic/sass/partials/sidebar/_delicious.scss @@ -0,0 +1,4 @@ +.delicious-posts { + a.delicious-link { margin-bottom: .5em; display: block; } + p { font-size: 1em; } +} diff --git a/.themes/classic/sass/partials/sidebar/_googleplus.scss b/.themes/classic/sass/partials/sidebar/_googleplus.scss new file mode 100644 index 0000000..c2a693e --- /dev/null +++ b/.themes/classic/sass/partials/sidebar/_googleplus.scss @@ -0,0 +1,26 @@ +.googleplus { + h1 { + -moz-box-shadow: none !important; + -webkit-box-shadow: none !important; + -o-box-shadow: none !important; + box-shadow: none !important; + border-bottom: 0px none !important; + } + a { + text-decoration: none; + white-space: normal !important; + line-height: 32px; + + img { + float: left; + margin-right: 0.5em; + border: 0 none; + } + } +} + +.googleplus-hidden { + position: absolute; + top: -1000em; + left: -1000em; +} diff --git a/.themes/classic/sass/partials/sidebar/_pinboard.scss b/.themes/classic/sass/partials/sidebar/_pinboard.scss new file mode 100644 index 0000000..9f9ab46 --- /dev/null +++ b/.themes/classic/sass/partials/sidebar/_pinboard.scss @@ -0,0 +1,12 @@ +#pinboard_linkroll { + .pin-title, .pin-description { + display: block; + margin-bottom: .5em; + } + .pin-tag { + @include hover-link; + @extend .aside-alt-link; + &:after { content: ','; } + &:last-child:after { content: ''; } + } +} diff --git a/.themes/classic/sass/partials/sidebar/_twitter.scss b/.themes/classic/sass/partials/sidebar/_twitter.scss new file mode 100644 index 0000000..ccc9b53 --- /dev/null +++ b/.themes/classic/sass/partials/sidebar/_twitter.scss @@ -0,0 +1,34 @@ +#tweets { + .loading { + background: inline-image('bird_32_gray.png') no-repeat center .5em; + color: darken($sidebar-bg, 18); + text-shadow: $main-bg 0 1px; + text-align: center; + padding: 2.5em 0 .5em; + &.error { + background: inline-image('bird_32_gray_fail.png') no-repeat center .5em; + } + } + p { + position: relative; + padding-right: 1em; + } + a[href*=status]{ + color: $twitter-status-link; + float: right; + padding: 0 0 .1em 1em; + position: relative; right: -1.3em; + text-shadow: #fff 0 1px; + font-size: .7em; + span { font-size: 1.5em; } + text-decoration: none; + &:hover { + color: $sidebar-link-color-subdued-hover; + text-decoration: none; + } + } + a[href*='twitter.com/search']{ + @extend .aside-alt-link; + @include hover-link; + } +} diff --git a/.themes/classic/sass/screen.scss b/.themes/classic/sass/screen.scss new file mode 100644 index 0000000..1899f60 --- /dev/null +++ b/.themes/classic/sass/screen.scss @@ -0,0 +1,10 @@ +@import "http://github.com/compass"; +@include global-reset; +@include reset-html5; + +@import "http://github.com/custom/colors"; +@import "http://github.com/custom/fonts"; +@import "http://github.com/custom/layout"; +@import "http://github.com/base"; +@import "http://github.com/partials"; +@import "http://github.com/custom/styles"; diff --git a/.themes/classic/source/_includes/after_footer.html b/.themes/classic/source/_includes/after_footer.html new file mode 100644 index 0000000..08b8e34 --- /dev/null +++ b/.themes/classic/source/_includes/after_footer.html @@ -0,0 +1,5 @@ +{% include disqus.html %} +{% include facebook_like.html %} +{% include google_plus_one.html %} +{% include twitter_sharing.html %} +{% include custom/after_footer.html %} diff --git a/.themes/classic/source/_includes/archive_post.html b/.themes/classic/source/_includes/archive_post.html new file mode 100644 index 0000000..fef3328 --- /dev/null +++ b/.themes/classic/source/_includes/archive_post.html @@ -0,0 +1,8 @@ +{% capture category %}{{ post.categories | size }}{% endcapture %} +

{{post.title}}

+ +{% if category != '0' %} + +{% endif %} diff --git a/.themes/classic/source/_includes/article.html b/.themes/classic/source/_includes/article.html new file mode 100644 index 0000000..9db0745 --- /dev/null +++ b/.themes/classic/source/_includes/article.html @@ -0,0 +1,28 @@ +{% unless page.no_header %} +
+ {% if index %} +

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

+ {% else %} +

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

+ {% endif %} + {% unless page.meta == false %} +

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

+ {% endunless %} +
+{% endunless %} +{% if index %} +
{{ content | excerpt }}
+ {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %} + {% if excerpted == 'true' %} + + {% endif %} +{% else %} +
{{ content }}
+{% endif %} diff --git a/.themes/classic/source/_includes/asides/delicious.html b/.themes/classic/source/_includes/asides/delicious.html new file mode 100644 index 0000000..115cdcb --- /dev/null +++ b/.themes/classic/source/_includes/asides/delicious.html @@ -0,0 +1,8 @@ +{% if site.delicious_user %} +
+

On Delicious

+
+ +

My Delicious Bookmarks »

+
+{% endif %} \ No newline at end of file diff --git a/.themes/classic/source/_includes/asides/github.html b/.themes/classic/source/_includes/asides/github.html new file mode 100644 index 0000000..935ccff --- /dev/null +++ b/.themes/classic/source/_includes/asides/github.html @@ -0,0 +1,30 @@ +{% if site.github_user %} +
+

Github Repos

+ + {% if site.github_show_profile_link %} + @{{site.github_user}} on Github + {% endif %} + + +
+{% endif %} diff --git a/.themes/classic/source/_includes/asides/googleplus.html b/.themes/classic/source/_includes/asides/googleplus.html new file mode 100644 index 0000000..00a0aa8 --- /dev/null +++ b/.themes/classic/source/_includes/asides/googleplus.html @@ -0,0 +1,11 @@ +{% if site.googleplus_user %} +
+

+ + + Google+ + +

+
+{% endif %} + diff --git a/.themes/classic/source/_includes/asides/pinboard.html b/.themes/classic/source/_includes/asides/pinboard.html new file mode 100644 index 0000000..c89c3e7 --- /dev/null +++ b/.themes/classic/source/_includes/asides/pinboard.html @@ -0,0 +1,19 @@ +{% if site.pinboard_user %} +
+

My Pinboard

+ +

My Pinboard Bookmarks »

+
+ +{% endif %} diff --git a/.themes/classic/source/_includes/asides/recent_posts.html b/.themes/classic/source/_includes/asides/recent_posts.html new file mode 100644 index 0000000..cc62814 --- /dev/null +++ b/.themes/classic/source/_includes/asides/recent_posts.html @@ -0,0 +1,10 @@ +
+

Recent Posts

+ +
diff --git a/.themes/classic/source/_includes/asides/twitter.html b/.themes/classic/source/_includes/asides/twitter.html new file mode 100644 index 0000000..fe4eda6 --- /dev/null +++ b/.themes/classic/source/_includes/asides/twitter.html @@ -0,0 +1,19 @@ +{% if site.twitter_user %} +
+

Latest Tweets

+ + + + {% if site.twitter_follow_button %} + Follow @{{ site.twitter_user }} + {% else %} +

Follow @{{ site.twitter_user }}

+ {% endif %} +
+{% endif %} diff --git a/.themes/classic/source/_includes/custom/after_footer.html b/.themes/classic/source/_includes/custom/after_footer.html new file mode 100644 index 0000000..bce25dd --- /dev/null +++ b/.themes/classic/source/_includes/custom/after_footer.html @@ -0,0 +1,3 @@ +{% comment %} + Add content to be output at the bottom of each page. (You might use this for analytics scripts, for example) +{% endcomment %} diff --git a/.themes/classic/source/_includes/custom/asides/about.html b/.themes/classic/source/_includes/custom/asides/about.html new file mode 100644 index 0000000..59d309e --- /dev/null +++ b/.themes/classic/source/_includes/custom/asides/about.html @@ -0,0 +1,4 @@ +
+

About Me

+

A little something about me.

+
diff --git a/.themes/classic/source/_includes/custom/category_feed.xml b/.themes/classic/source/_includes/custom/category_feed.xml new file mode 100644 index 0000000..f47c553 --- /dev/null +++ b/.themes/classic/source/_includes/custom/category_feed.xml @@ -0,0 +1,27 @@ +--- +layout: nil +--- + + + + <![CDATA[{{ page.title }} | {{ site.title }}]]> + + + {{ site.time | date_to_xmlschema }} + {{ site.url }}/ + + + {% if site.email %}{% endif %} + + Octopress + + {% for post in site.categories[page.category] limit: 5 %} + + <![CDATA[{{ post.title | cdata_escape }}]]> + + {{ post.date | date_to_xmlschema }} + {{ site.url }}{{ post.id }} + + + {% endfor %} + diff --git a/.themes/classic/source/_includes/custom/footer.html b/.themes/classic/source/_includes/custom/footer.html new file mode 100644 index 0000000..e12f067 --- /dev/null +++ b/.themes/classic/source/_includes/custom/footer.html @@ -0,0 +1,4 @@ +

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

diff --git a/.themes/classic/source/_includes/custom/head.html b/.themes/classic/source/_includes/custom/head.html new file mode 100644 index 0000000..85879f4 --- /dev/null +++ b/.themes/classic/source/_includes/custom/head.html @@ -0,0 +1,3 @@ + + + diff --git a/.themes/classic/source/_includes/custom/header.html b/.themes/classic/source/_includes/custom/header.html new file mode 100644 index 0000000..35f9c05 --- /dev/null +++ b/.themes/classic/source/_includes/custom/header.html @@ -0,0 +1,6 @@ +
+

{{ site.title }}

+ {% if site.subtitle %} +

{{ site.subtitle }}

+ {% endif %} +
diff --git a/.themes/classic/source/_includes/custom/navigation.html b/.themes/classic/source/_includes/custom/navigation.html new file mode 100644 index 0000000..d6bd424 --- /dev/null +++ b/.themes/classic/source/_includes/custom/navigation.html @@ -0,0 +1,4 @@ + diff --git a/.themes/classic/source/_includes/disqus.html b/.themes/classic/source/_includes/disqus.html new file mode 100644 index 0000000..eb30877 --- /dev/null +++ b/.themes/classic/source/_includes/disqus.html @@ -0,0 +1,21 @@ +{% comment %} Load script if disquss comments are enabled and `page.comments` is either empty (index) or set to true {% endcomment %} +{% if site.disqus_short_name and page.comments != false %} + +{% endif %} diff --git a/.themes/classic/source/_includes/facebook_like.html b/.themes/classic/source/_includes/facebook_like.html new file mode 100644 index 0000000..74f9130 --- /dev/null +++ b/.themes/classic/source/_includes/facebook_like.html @@ -0,0 +1,10 @@ +{% if site.facebook_like %} +
+ +{% endif %} diff --git a/.themes/classic/source/_includes/footer.html b/.themes/classic/source/_includes/footer.html new file mode 100644 index 0000000..3a8c768 --- /dev/null +++ b/.themes/classic/source/_includes/footer.html @@ -0,0 +1 @@ +{% include custom/footer.html %} diff --git a/.themes/classic/source/_includes/google_analytics.html b/.themes/classic/source/_includes/google_analytics.html new file mode 100644 index 0000000..4d4d596 --- /dev/null +++ b/.themes/classic/source/_includes/google_analytics.html @@ -0,0 +1,13 @@ +{% if site.google_analytics_tracking_id %} + +{% endif %} diff --git a/.themes/classic/source/_includes/google_plus_one.html b/.themes/classic/source/_includes/google_plus_one.html new file mode 100644 index 0000000..b69ddae --- /dev/null +++ b/.themes/classic/source/_includes/google_plus_one.html @@ -0,0 +1,9 @@ +{% if site.google_plus_one %} + +{% endif %} diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html new file mode 100644 index 0000000..0fdc401 --- /dev/null +++ b/.themes/classic/source/_includes/head.html @@ -0,0 +1,29 @@ + + + + + + + {% if page.title %}{{ page.title }} - {% endif %}{{ site.title }} + + + {% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %} + + {% if page.keywords %}{% endif %} + + + + + + + {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} + + + + + + + + {% include custom/head.html %} + {% include google_analytics.html %} + diff --git a/.themes/classic/source/_includes/header.html b/.themes/classic/source/_includes/header.html new file mode 100644 index 0000000..524de65 --- /dev/null +++ b/.themes/classic/source/_includes/header.html @@ -0,0 +1 @@ +{% include custom/header.html %} diff --git a/.themes/classic/source/_includes/navigation.html b/.themes/classic/source/_includes/navigation.html new file mode 100644 index 0000000..9b87017 --- /dev/null +++ b/.themes/classic/source/_includes/navigation.html @@ -0,0 +1,13 @@ + +
+
+ + +
+
+{% include custom/navigation.html %} diff --git a/.themes/classic/source/_includes/post/author.html b/.themes/classic/source/_includes/post/author.html new file mode 100644 index 0000000..83dd6a8 --- /dev/null +++ b/.themes/classic/source/_includes/post/author.html @@ -0,0 +1,8 @@ +{% if post.author %} + {% assign author = post.author %} +{% elsif page.author %} + {% assign author = page.author %} +{% else %} + {% assign author = site.author %} +{% endif %} +{% if author %}Posted by {{ author }}{% endif %} diff --git a/.themes/classic/source/_includes/post/categories.html b/.themes/classic/source/_includes/post/categories.html new file mode 100644 index 0000000..4a98b29 --- /dev/null +++ b/.themes/classic/source/_includes/post/categories.html @@ -0,0 +1,10 @@ +{% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %} +{% unless category == '0' %} + + {% if post %} + {{ post.categories | category_links }} + {% else %} + {{ page.categories | category_links }} + {% endif %} + +{% endunless %} diff --git a/.themes/classic/source/_includes/post/date.html b/.themes/classic/source/_includes/post/date.html new file mode 100644 index 0000000..ecf1ad7 --- /dev/null +++ b/.themes/classic/source/_includes/post/date.html @@ -0,0 +1,15 @@ +{% capture date %}{{ page.date }}{{ post.date }}{% endcapture %} +{% capture date_formatted %}{{ page.date_formatted }}{{ post.date_formatted }}{% endcapture %} +{% capture has_date %}{{ date | size }}{% endcapture %} + +{% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %} +{% capture updated_formatted %}{{ page.updated_formatted }}{{ post.updated_formatted }}{% endcapture %} +{% capture was_updated %}{{ updated | size }}{% endcapture %} + +{% if has_date != '0' %} + {% capture time %}{% endcapture %} +{% endif %} + +{% if was_updated != '0' %} + {% capture updated %}{% endcapture %} +{% else %}{% assign updated = false %}{% endif %} \ No newline at end of file diff --git a/.themes/classic/source/_includes/post/disqus_thread.html b/.themes/classic/source/_includes/post/disqus_thread.html new file mode 100644 index 0000000..b1acd8c --- /dev/null +++ b/.themes/classic/source/_includes/post/disqus_thread.html @@ -0,0 +1 @@ + diff --git a/.themes/classic/source/_includes/post/sharing.html b/.themes/classic/source/_includes/post/sharing.html new file mode 100644 index 0000000..e32500d --- /dev/null +++ b/.themes/classic/source/_includes/post/sharing.html @@ -0,0 +1,11 @@ +
+ {% if site.twitter_tweet_button %} + Tweet + {% endif %} + {% if site.google_plus_one %} +
+ {% endif %} + {% if site.facebook_like %} +
+ {% endif %} +
diff --git a/.themes/classic/source/_includes/twitter_sharing.html b/.themes/classic/source/_includes/twitter_sharing.html new file mode 100644 index 0000000..687e77d --- /dev/null +++ b/.themes/classic/source/_includes/twitter_sharing.html @@ -0,0 +1,11 @@ +{% if site.twitter_follow_button or site.twitter_tweet_button %} + +{% endif %} diff --git a/.themes/classic/source/_layouts/category_index.html b/.themes/classic/source/_layouts/category_index.html new file mode 100644 index 0000000..85a6307 --- /dev/null +++ b/.themes/classic/source/_layouts/category_index.html @@ -0,0 +1,17 @@ +--- +layout: page +footer: false +--- + +
+{% for post in site.categories[page.category] %} +{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} +{% unless year == this_year %} + {% assign year = this_year %} +

{{ year }}

+{% endunless %} +
+ {% include archive_post.html %} +
+{% endfor %} +
diff --git a/.themes/classic/source/_layouts/default.html b/.themes/classic/source/_layouts/default.html new file mode 100644 index 0000000..f23b07b --- /dev/null +++ b/.themes/classic/source/_layouts/default.html @@ -0,0 +1,14 @@ +{% capture root_url %}{{ site.root | strip_slash }}{% endcapture %} +{% include head.html %} + +
{% include header.html %}
+ +
+
+ {{ content | expand_urls: root_url }} +
+
+ + {% include after_footer.html %} + + diff --git a/.themes/classic/source/_layouts/page.html b/.themes/classic/source/_layouts/page.html new file mode 100644 index 0000000..8ba6ec9 --- /dev/null +++ b/.themes/classic/source/_layouts/page.html @@ -0,0 +1,42 @@ +--- +layout: default +--- + +
+
+ {% if page.title %} +
+

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

+ {% if page.date %}

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

{% endif %} +
+ {% endif %} + {{ content }} + {% unless page.footer == false %} +
+ {% if page.date or page.author %}

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

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

Comments

+
{% include post/disqus_thread.html %}
+
+{% endif %} +
+{% unless page.sidebar == false %} + +{% endunless %} diff --git a/.themes/classic/source/_layouts/post.html b/.themes/classic/source/_layouts/post.html new file mode 100644 index 0000000..d3c42e3 --- /dev/null +++ b/.themes/classic/source/_layouts/post.html @@ -0,0 +1,43 @@ +--- +layout: default +single: true +--- + +
+
+ {% include article.html %} +
+

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

+ {% unless page.sharing == false %} + {% include post/sharing.html %} + {% endunless %} +

+ {% if page.previous.url %} + « {{page.previous.title}} + {% endif %} + {% if page.next.url %} + {{page.next.title}} » + {% endif %} +

+
+
+{% if site.disqus_short_name and page.comments == true %} +
+

Comments

+
{% include post/disqus_thread.html %}
+
+{% endif %} +
+{% unless page.sidebar == false %} + +{% endunless %} diff --git a/assets/jwplayer/glow/controlbar/background.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/background.png similarity index 100% rename from assets/jwplayer/glow/controlbar/background.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/background.png diff --git a/assets/jwplayer/glow/controlbar/blankButton.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/blankButton.png similarity index 100% rename from assets/jwplayer/glow/controlbar/blankButton.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/blankButton.png diff --git a/assets/jwplayer/glow/controlbar/divider.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/divider.png similarity index 100% rename from assets/jwplayer/glow/controlbar/divider.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/divider.png diff --git a/assets/jwplayer/glow/controlbar/fullscreenButton.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButton.png similarity index 100% rename from assets/jwplayer/glow/controlbar/fullscreenButton.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButton.png diff --git a/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png similarity index 100% rename from assets/jwplayer/glow/controlbar/fullscreenButtonOver.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png diff --git a/assets/jwplayer/glow/controlbar/muteButton.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButton.png similarity index 100% rename from assets/jwplayer/glow/controlbar/muteButton.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/muteButton.png diff --git a/assets/jwplayer/glow/controlbar/muteButtonOver.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/muteButtonOver.png similarity index 100% rename from assets/jwplayer/glow/controlbar/muteButtonOver.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/muteButtonOver.png diff --git a/assets/jwplayer/glow/controlbar/normalscreenButton.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButton.png similarity index 100% rename from assets/jwplayer/glow/controlbar/normalscreenButton.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButton.png diff --git a/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png similarity index 100% rename from assets/jwplayer/glow/controlbar/normalscreenButtonOver.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png diff --git a/assets/jwplayer/glow/controlbar/pauseButton.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButton.png similarity index 100% rename from assets/jwplayer/glow/controlbar/pauseButton.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/pauseButton.png diff --git a/assets/jwplayer/glow/controlbar/pauseButtonOver.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png similarity index 100% rename from assets/jwplayer/glow/controlbar/pauseButtonOver.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png diff --git a/assets/jwplayer/glow/controlbar/playButton.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/playButton.png similarity index 100% rename from assets/jwplayer/glow/controlbar/playButton.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/playButton.png diff --git a/assets/jwplayer/glow/controlbar/playButtonOver.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/playButtonOver.png similarity index 100% rename from assets/jwplayer/glow/controlbar/playButtonOver.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/playButtonOver.png diff --git a/assets/jwplayer/glow/controlbar/timeSliderBuffer.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png similarity index 100% rename from assets/jwplayer/glow/controlbar/timeSliderBuffer.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png diff --git a/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png similarity index 100% rename from assets/jwplayer/glow/controlbar/timeSliderCapLeft.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png diff --git a/assets/jwplayer/glow/controlbar/timeSliderCapRight.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png similarity index 100% rename from assets/jwplayer/glow/controlbar/timeSliderCapRight.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png diff --git a/assets/jwplayer/glow/controlbar/timeSliderProgress.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png similarity index 100% rename from assets/jwplayer/glow/controlbar/timeSliderProgress.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png diff --git a/assets/jwplayer/glow/controlbar/timeSliderRail.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderRail.png similarity index 100% rename from assets/jwplayer/glow/controlbar/timeSliderRail.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/timeSliderRail.png diff --git a/assets/jwplayer/glow/controlbar/unmuteButton.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButton.png similarity index 100% rename from assets/jwplayer/glow/controlbar/unmuteButton.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButton.png diff --git a/assets/jwplayer/glow/controlbar/unmuteButtonOver.png b/.themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png similarity index 100% rename from assets/jwplayer/glow/controlbar/unmuteButtonOver.png rename to .themes/classic/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png diff --git a/assets/jwplayer/glow/display/background.png b/.themes/classic/source/assets/jwplayer/glow/display/background.png similarity index 100% rename from assets/jwplayer/glow/display/background.png rename to .themes/classic/source/assets/jwplayer/glow/display/background.png diff --git a/assets/jwplayer/glow/display/bufferIcon.png b/.themes/classic/source/assets/jwplayer/glow/display/bufferIcon.png similarity index 100% rename from assets/jwplayer/glow/display/bufferIcon.png rename to .themes/classic/source/assets/jwplayer/glow/display/bufferIcon.png diff --git a/assets/jwplayer/glow/display/muteIcon.png b/.themes/classic/source/assets/jwplayer/glow/display/muteIcon.png similarity index 100% rename from assets/jwplayer/glow/display/muteIcon.png rename to .themes/classic/source/assets/jwplayer/glow/display/muteIcon.png diff --git a/assets/jwplayer/glow/display/playIcon.png b/.themes/classic/source/assets/jwplayer/glow/display/playIcon.png similarity index 100% rename from assets/jwplayer/glow/display/playIcon.png rename to .themes/classic/source/assets/jwplayer/glow/display/playIcon.png diff --git a/assets/jwplayer/glow/dock/button.png b/.themes/classic/source/assets/jwplayer/glow/dock/button.png similarity index 100% rename from assets/jwplayer/glow/dock/button.png rename to .themes/classic/source/assets/jwplayer/glow/dock/button.png diff --git a/assets/jwplayer/glow/glow.xml b/.themes/classic/source/assets/jwplayer/glow/glow.xml similarity index 100% rename from assets/jwplayer/glow/glow.xml rename to .themes/classic/source/assets/jwplayer/glow/glow.xml diff --git a/assets/jwplayer/glow/playlist/item.png b/.themes/classic/source/assets/jwplayer/glow/playlist/item.png similarity index 100% rename from assets/jwplayer/glow/playlist/item.png rename to .themes/classic/source/assets/jwplayer/glow/playlist/item.png diff --git a/assets/jwplayer/glow/playlist/itemOver.png b/.themes/classic/source/assets/jwplayer/glow/playlist/itemOver.png similarity index 100% rename from assets/jwplayer/glow/playlist/itemOver.png rename to .themes/classic/source/assets/jwplayer/glow/playlist/itemOver.png diff --git a/assets/jwplayer/glow/playlist/sliderCapBottom.png b/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapBottom.png similarity index 100% rename from assets/jwplayer/glow/playlist/sliderCapBottom.png rename to .themes/classic/source/assets/jwplayer/glow/playlist/sliderCapBottom.png diff --git a/assets/jwplayer/glow/playlist/sliderCapTop.png b/.themes/classic/source/assets/jwplayer/glow/playlist/sliderCapTop.png similarity index 100% rename from assets/jwplayer/glow/playlist/sliderCapTop.png rename to .themes/classic/source/assets/jwplayer/glow/playlist/sliderCapTop.png diff --git a/assets/jwplayer/glow/playlist/sliderRail.png b/.themes/classic/source/assets/jwplayer/glow/playlist/sliderRail.png similarity index 100% rename from assets/jwplayer/glow/playlist/sliderRail.png rename to .themes/classic/source/assets/jwplayer/glow/playlist/sliderRail.png diff --git a/assets/jwplayer/glow/playlist/sliderThumb.png b/.themes/classic/source/assets/jwplayer/glow/playlist/sliderThumb.png similarity index 100% rename from assets/jwplayer/glow/playlist/sliderThumb.png rename to .themes/classic/source/assets/jwplayer/glow/playlist/sliderThumb.png diff --git a/assets/jwplayer/glow/sharing/embedIcon.png b/.themes/classic/source/assets/jwplayer/glow/sharing/embedIcon.png similarity index 100% rename from assets/jwplayer/glow/sharing/embedIcon.png rename to .themes/classic/source/assets/jwplayer/glow/sharing/embedIcon.png diff --git a/assets/jwplayer/glow/sharing/embedScreen.png b/.themes/classic/source/assets/jwplayer/glow/sharing/embedScreen.png similarity index 100% rename from assets/jwplayer/glow/sharing/embedScreen.png rename to .themes/classic/source/assets/jwplayer/glow/sharing/embedScreen.png diff --git a/assets/jwplayer/glow/sharing/shareIcon.png b/.themes/classic/source/assets/jwplayer/glow/sharing/shareIcon.png similarity index 100% rename from assets/jwplayer/glow/sharing/shareIcon.png rename to .themes/classic/source/assets/jwplayer/glow/sharing/shareIcon.png diff --git a/assets/jwplayer/glow/sharing/shareScreen.png b/.themes/classic/source/assets/jwplayer/glow/sharing/shareScreen.png similarity index 100% rename from assets/jwplayer/glow/sharing/shareScreen.png rename to .themes/classic/source/assets/jwplayer/glow/sharing/shareScreen.png diff --git a/assets/jwplayer/player.swf b/.themes/classic/source/assets/jwplayer/player.swf similarity index 100% rename from assets/jwplayer/player.swf rename to .themes/classic/source/assets/jwplayer/player.swf diff --git a/.themes/classic/source/atom.xml b/.themes/classic/source/atom.xml new file mode 100644 index 0000000..83af3f8 --- /dev/null +++ b/.themes/classic/source/atom.xml @@ -0,0 +1,27 @@ +--- +layout: nil +--- + + + + <![CDATA[{{ site.title }}]]> + + + {{ site.time | date_to_xmlschema }} + {{ site.url }}/ + + + {% if site.email %}{% endif %} + + Octopress + + {% for post in site.posts limit: 20 %} + + <![CDATA[{{ post.title | cdata_escape }}]]> + + {{ post.date | date_to_xmlschema }} + {{ site.url }}{{ post.id }} + + + {% endfor %} + diff --git a/.themes/classic/source/blog/archives/index.html b/.themes/classic/source/blog/archives/index.html new file mode 100644 index 0000000..f1d9cee --- /dev/null +++ b/.themes/classic/source/blog/archives/index.html @@ -0,0 +1,18 @@ +--- +layout: page +title: Blog Archive +footer: false +--- + +
+{% for post in site.posts reverse %} +{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} +{% unless year == this_year %} + {% assign year = this_year %} +

{{ year }}

+{% endunless %} +
+ {% include archive_post.html %} +
+{% endfor %} +
diff --git a/favicon.png b/.themes/classic/source/favicon.png similarity index 100% rename from favicon.png rename to .themes/classic/source/favicon.png diff --git a/images/bird_32_gray.png b/.themes/classic/source/images/bird_32_gray.png similarity index 100% rename from images/bird_32_gray.png rename to .themes/classic/source/images/bird_32_gray.png diff --git a/images/bird_32_gray_fail.png b/.themes/classic/source/images/bird_32_gray_fail.png similarity index 100% rename from images/bird_32_gray_fail.png rename to .themes/classic/source/images/bird_32_gray_fail.png diff --git a/images/code_bg.png b/.themes/classic/source/images/code_bg.png similarity index 100% rename from images/code_bg.png rename to .themes/classic/source/images/code_bg.png diff --git a/images/dotted-border.png b/.themes/classic/source/images/dotted-border.png similarity index 100% rename from images/dotted-border.png rename to .themes/classic/source/images/dotted-border.png diff --git a/images/email.png b/.themes/classic/source/images/email.png similarity index 100% rename from images/email.png rename to .themes/classic/source/images/email.png diff --git a/images/line-tile.png b/.themes/classic/source/images/line-tile.png similarity index 100% rename from images/line-tile.png rename to .themes/classic/source/images/line-tile.png diff --git a/images/noise.png b/.themes/classic/source/images/noise.png similarity index 100% rename from images/noise.png rename to .themes/classic/source/images/noise.png diff --git a/images/rss.png b/.themes/classic/source/images/rss.png similarity index 100% rename from images/rss.png rename to .themes/classic/source/images/rss.png diff --git a/images/search.png b/.themes/classic/source/images/search.png similarity index 100% rename from images/search.png rename to .themes/classic/source/images/search.png diff --git a/.themes/classic/source/index.html b/.themes/classic/source/index.html new file mode 100644 index 0000000..a114e5a --- /dev/null +++ b/.themes/classic/source/index.html @@ -0,0 +1,29 @@ +--- +layout: default +--- + +
+ {% assign index = true %} + {% for post in paginator.posts %} + {% assign content = post.content %} +
+ {% include article.html %} +
+ {% endfor %} + +
+ diff --git a/javascripts/ender.js b/.themes/classic/source/javascripts/ender.js similarity index 100% rename from javascripts/ender.js rename to .themes/classic/source/javascripts/ender.js diff --git a/javascripts/github.js b/.themes/classic/source/javascripts/github.js similarity index 100% rename from javascripts/github.js rename to .themes/classic/source/javascripts/github.js diff --git a/javascripts/libs/ender.js b/.themes/classic/source/javascripts/libs/ender.js similarity index 100% rename from javascripts/libs/ender.js rename to .themes/classic/source/javascripts/libs/ender.js diff --git a/javascripts/libs/jXHR.js b/.themes/classic/source/javascripts/libs/jXHR.js similarity index 100% rename from javascripts/libs/jXHR.js rename to .themes/classic/source/javascripts/libs/jXHR.js diff --git a/javascripts/libs/swfobject-dynamic.js b/.themes/classic/source/javascripts/libs/swfobject-dynamic.js similarity index 100% rename from javascripts/libs/swfobject-dynamic.js rename to .themes/classic/source/javascripts/libs/swfobject-dynamic.js diff --git a/javascripts/modernizr-2.0.js b/.themes/classic/source/javascripts/modernizr-2.0.js similarity index 100% rename from javascripts/modernizr-2.0.js rename to .themes/classic/source/javascripts/modernizr-2.0.js diff --git a/javascripts/octopress.js b/.themes/classic/source/javascripts/octopress.js similarity index 100% rename from javascripts/octopress.js rename to .themes/classic/source/javascripts/octopress.js diff --git a/javascripts/pinboard.js b/.themes/classic/source/javascripts/pinboard.js similarity index 100% rename from javascripts/pinboard.js rename to .themes/classic/source/javascripts/pinboard.js diff --git a/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js similarity index 100% rename from javascripts/twitter.js rename to .themes/classic/source/javascripts/twitter.js diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown new file mode 100644 index 0000000..0da6ecb --- /dev/null +++ b/CHANGELOG.markdown @@ -0,0 +1,29 @@ +# Octopress Changelog + +## 2.0 + +- Now based on [mojombo/jekyll](http://github.com/mojombo/jekyll) +- Sports a semantic HTML5 template +- Easy theming with Compass and Sass +- A Mobile friendly responsive (320 and up) layout +- Built in 3rd party support for Twitter, Google Plus One, Disqus Comments, Pinboard, Delicious, and Google Analytics +- Deploy to Github pages or use Rsync +- Built in support for POW and Rack servers +- Beautiful [Solarized](http://ethanschoonover.com/solarized) syntax highlighting +- Super easy setup and configuration + +**New Plugins, Filters, & Generators** + +- **Gist Tag** for easily embedding gists in your posts +- **Pygments Cache** makes subsequent compiling much faster +- **Include Code Tag** lets you embed external code snippets from your file system and adds a download link +- **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/) +- **Blockquote Tag** makes it easy to semantically format blockquotes +- **Category Generator** gives you archive pages for each category +- **Sitemap.xml Generator** for search engines + +## 1.0 + +- **No longer supported.** +- Jekyll Matured, but Henrik's Jekyll fork did not. +- Thanks for all your pull requests, I learned a lot. diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..6160f94 --- /dev/null +++ b/Gemfile @@ -0,0 +1,18 @@ +source "http://rubygems.org/" + +group :development do + gem 'rake' + gem 'rack' + gem 'jekyll' + gem 'rdiscount' + gem 'pygments.rb' + gem 'RedCloth' + gem 'haml', '>= 3.1' + gem 'compass', '>= 0.11' + gem 'rubypants' + gem 'rb-fsevent' + gem 'stringex' + gem 'liquid', '2.2.2' +end + +gem 'sinatra', '1.2.6' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..6350698 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,66 @@ +GEM + remote: http://rubygems.org/ + specs: + RedCloth (4.2.8) + albino (1.3.3) + posix-spawn (>= 0.3.6) + blankslate (2.1.2.4) + chunky_png (1.2.1) + classifier (1.3.3) + fast-stemmer (>= 1.0.0) + compass (0.11.5) + chunky_png (~> 1.2) + fssm (>= 0.2.7) + sass (~> 3.1) + directory_watcher (1.4.0) + fast-stemmer (1.0.0) + ffi (1.0.9) + fssm (0.2.7) + haml (3.1.2) + jekyll (0.11.0) + albino (>= 1.3.2) + classifier (>= 1.3.1) + directory_watcher (>= 1.1.1) + kramdown (>= 0.13.2) + liquid (>= 1.9.0) + maruku (>= 0.5.9) + kramdown (0.13.3) + liquid (2.2.2) + maruku (0.6.0) + syntax (>= 1.0.0) + posix-spawn (0.3.6) + pygments.rb (0.1.3) + rubypython (>= 0.5.1) + rack (1.3.2) + rake (0.9.2) + rb-fsevent (0.4.3.1) + rdiscount (1.6.8) + rubypants (0.2.0) + rubypython (0.5.1) + blankslate (>= 2.1.2.3) + ffi (~> 1.0.7) + sass (3.1.5) + sinatra (1.2.6) + rack (~> 1.1) + tilt (>= 1.2.2, < 2.0) + stringex (1.3.0) + syntax (1.0.0) + tilt (1.3.2) + +PLATFORMS + ruby + +DEPENDENCIES + RedCloth + compass (>= 0.11) + haml (>= 3.1) + jekyll + liquid (= 2.2.2) + pygments.rb + rack + rake + rb-fsevent + rdiscount + rubypants + sinatra (= 1.2.6) + stringex diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..c181401 --- /dev/null +++ b/README.markdown @@ -0,0 +1,36 @@ +## What is Octopress? + +Octopress is [Jekyll](https://github.com/mojombo/jekyll) blogging at its finest. + +1. **Octopress sports a clean responsive theme** written in semantic HTML5, focused on readability and friendliness toward mobile devices. +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. +3. **Third party integration is simple** with built-in support for Twitter, Pinboard, Delicious, GitHub Repositories, Disqus Comments and Google Analytics. +4. **It's easy to use.** A collection of rake tasks simplifies development and makes deploying a cinch. +5. **Ships with great plug-ins** some original and others from the Jekyll community — tested and improved. + + +## Documentation + +Check out [Octopress.org](http://octopress.org/docs) for guides and documentation. + + +## Contributing + +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-plug-ins), 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. + + +## License +(The MIT License) + +Copyright © 2009-2011 Brandon Mathis + +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: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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. + + +#### If you want to be awesome. +- Proudly display the 'Powered by Octopress' credit in the footer. +- Add your site to the Wiki so we can watch the community grow. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..3d2b385 --- /dev/null +++ b/Rakefile @@ -0,0 +1,357 @@ +require "rubygems" +require "bundler/setup" +require "stringex" + +## -- Rsync Deploy config -- ## +# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file +ssh_user = "user@domain.com" +ssh_port = "22" +document_root = "~/website.com/" +deploy_default = "push" + +# This will be configured for you when you run config_deploy +deploy_branch = "master" + +## -- Misc Configs -- ## + +public_dir = "public" # compiled site directory +source_dir = "source" # source file directory +blog_index_dir = 'source' # directory for your blog's index page (if you put your index in source/blog/index.html, set this to 'source/blog') +deploy_dir = "_deploy" # deploy directory (for Github pages deployment) +stash_dir = "_stash" # directory to stash posts for speedy generation +posts_dir = "_posts" # directory for blog files +themes_dir = ".themes" # directory for blog files +new_post_ext = "markdown" # default new post file extension when using the new_post task +new_page_ext = "markdown" # default new page file extension when using the new_page task +server_port = "4000" # port for preview server eg. localhost:4000 + + +desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]" +task :install, :theme do |t, args| + if File.directory?(source_dir) || File.directory?("sass") + abort("rake aborted!") if ask("A theme is already installed, proceeding will overwrite existing files. Are you sure?", ['y', 'n']) == 'n' + end + # copy theme into working Jekyll directories + theme = args.theme || 'classic' + puts "## Copying "+theme+" theme into ./#{source_dir} and ./sass" + mkdir_p source_dir + cp_r "#{themes_dir}/#{theme}/source/.", source_dir + mkdir_p "sass" + cp_r "#{themes_dir}/#{theme}/sass/.", "sass" + mkdir_p "#{source_dir}/#{posts_dir}" + mkdir_p public_dir +end + +####################### +# Working with Jekyll # +####################### + +desc "Generate jekyll site" +task :generate do + raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) + puts "## Generating Site with Jekyll" + system "compass compile --css-dir #{source_dir}/stylesheets" + system "jekyll" +end + +desc "Watch the site and regenerate when it changes" +task :watch do + raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) + puts "Starting to watch source with Jekyll and Compass." + system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css") + jekyllPid = Process.spawn("jekyll --auto") + compassPid = Process.spawn("compass watch") + + trap("INT") { + [jekyllPid, compassPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH } + exit 0 + } + + [jekyllPid, compassPid].each { |pid| Process.wait(pid) } +end + +desc "preview the site in a web browser" +task :preview do + raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) + puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}" + system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css") + jekyllPid = Process.spawn("jekyll --auto") + compassPid = Process.spawn("compass watch") + rackupPid = Process.spawn("rackup --port #{server_port}") + + trap("INT") { + [jekyllPid, compassPid, rackupPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH } + exit 0 + } + + [jekyllPid, compassPid, rackupPid].each { |pid| Process.wait(pid) } +end + +# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post") +desc "Begin a new post in #{source_dir}/#{posts_dir}" +task :new_post, :title do |t, args| + raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) + mkdir_p "#{source_dir}/#{posts_dir}" + args.with_defaults(:title => 'new-post') + title = args.title + filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}" + if File.exist?(filename) + abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' + end + puts "Creating new post: #{filename}" + open(filename, 'w') do |post| + post.puts "---" + post.puts "layout: post" + post.puts "title: \"#{title.gsub(/&/,'&')}\"" + post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}" + post.puts "comments: true" + post.puts "categories: " + post.puts "---" + end +end + +# usage rake new_page[my-new-page] or rake new_page[my-new-page.html] or rake new_page (defaults to "new-page.markdown") +desc "Create a new page in #{source_dir}/(filename)/index.#{new_page_ext}" +task :new_page, :filename do |t, args| + raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) + args.with_defaults(:filename => 'new-page') + page_dir = source_dir + if args.filename =~ /(^.+\/)?([\w_-]+)(\.)?(.+)?/ + page_dir += $4 ? "/#{$1}" : "/#{$1}#{$2}/" + name = $4 ? $2 : "index" + extension = $4 || "#{new_page_ext}" + filename = "#{name}.#{extension}" + mkdir_p page_dir + file = page_dir + filename + if File.exist?(file) + abort("rake aborted!") if ask("#{file} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' + end + puts "Creating new page: #{file}" + open(file, 'w') do |page| + page.puts "---" + page.puts "layout: page" + page.puts "title: \"#{$2.gsub(/[-_]/, ' ')}\"" + page.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}" + page.puts "comments: true" + page.puts "sharing: true" + page.puts "footer: true" + page.puts "---" + end + else + puts "Syntax error: #{args.filename} contains unsupported characters" + end +end + +# usage rake isolate[my-post] +desc "Move all other posts than the one currently being worked on to a temporary stash location (stash) so regenerating the site happens much quicker." +task :isolate, :filename do |t, args| + stash_dir = "#{source_dir}/#{stash_dir}" + FileUtils.mkdir(stash_dir) unless File.exist?(stash_dir) + Dir.glob("#{source_dir}/#{posts_dir}/*.*") do |post| + FileUtils.mv post, stash_dir unless post.include?(args.filename) + end +end + +desc "Move all stashed posts back into the posts directory, ready for site generation." +task :integrate do + FileUtils.mv Dir.glob("#{source_dir}/#{stash_dir}/*.*"), "#{source_dir}/#{posts_dir}/" +end + +desc "Clean out caches: .pygments-cache, .gist-cache, .sass-cache" +task :clean do + rm_rf [".pygments-cache/**", ".gist-cache/**", ".sass-cache/**", "source/stylesheets/screen.css"] +end + +desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom" +task :update_style, :theme do |t, args| + theme = args.theme || 'classic' + if File.directory?("sass.old") + puts "removed existing sass.old directory" + rm_r "sass.old", :secure=>true + end + mv "sass", "sass.old" + puts "## Moved styles into sass.old/" + cp_r "#{themes_dir}/"+theme+"/sass/", "sass" + cp_r "sass.old/custom/.", "sass/custom" + puts "## Updated Sass ##" +end + +desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation" +task :update_source, :theme do |t, args| + theme = args.theme || 'classic' + if File.directory?("#{source_dir}.old") + puts "## Removed existing #{source_dir}.old directory" + rm_r "#{source_dir}.old", :secure=>true + end + mkdir "#{source_dir}.old" + cp_r "#{source_dir}/.", "#{source_dir}.old" + puts "## Copied #{source_dir} into #{source_dir}.old/" + cp_r "#{themes_dir}/"+theme+"/source/.", source_dir, :remove_destination=>true + cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/", :remove_destination=>true + cp "#{source_dir}.old/favicon.png", source_dir + mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir + cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir && File.exists?("#{source_dir}.old/index.html") + puts "## Updated #{source_dir} ##" +end + +############## +# Deploying # +############## + +desc "Default deploy task" +task :deploy do + Rake::Task[:copydot].invoke(source_dir, public_dir) + Rake::Task["#{deploy_default}"].execute +end + +desc "Generate website and deploy" +task :gen_deploy => [:integrate, :generate, :deploy] do +end + +desc "copy dot files for deployment" +task :copydot, :source, :dest do |t, args| + exclusions = [".", "..", ".DS_Store"] + Dir["#{args.source}/**/.*"].each do |file| + if !File.directory?(file) && !exclusions.include?(File.basename(file)) + cp(file, file.gsub(/#{args.source}/, "#{args.dest}")); + end + end +end + +desc "Deploy website via rsync" +task :rsync do + puts "## Deploying website via Rsync" + ok_failed system("rsync -avze 'ssh -p #{ssh_port}' --delete #{public_dir}/ #{ssh_user}:#{document_root}") +end + +desc "deploy public directory to github pages" +multitask :push do + puts "## Deploying branch to Github Pages " + (Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) } + Rake::Task[:copydot].invoke(public_dir, deploy_dir) + puts "\n## copying #{public_dir} to #{deploy_dir}" + cp_r "#{public_dir}/.", deploy_dir + cd "#{deploy_dir}" do + system "git add ." + system "git add -u" + puts "\n## Commiting: Site updated at #{Time.now.utc}" + message = "Site updated at #{Time.now.utc}" + system "git commit -m \"#{message}\"" + puts "\n## Pushing generated #{deploy_dir} website" + system "git push origin #{deploy_branch} --force" + puts "\n## Github Pages deploy complete" + end +end + +desc "Update configurations to support publishing to root or sub directory" +task :set_root_dir, :dir do |t, args| + puts ">>> !! Please provide a directory, eg. rake config_dir[publishing/subdirectory]" unless args.dir + if args.dir + if args.dir == "/" + dir = "" + else + dir = "/" + args.dir.sub(/(\/*)(.+)/, "\\2").sub(/\/$/, ''); + end + rakefile = IO.read(__FILE__) + rakefile.sub!(/public_dir(\s*)=(\s*)(["'])[\w\-\/]*["']/, "public_dir\\1=\\2\\3public#{dir}\\3") + File.open(__FILE__, 'w') do |f| + f.write rakefile + end + compass_config = IO.read('config.rb') + compass_config.sub!(/http_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_path\\1=\\2\\3#{dir}/\\3") + compass_config.sub!(/http_images_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_images_path\\1=\\2\\3#{dir}/images\\3") + compass_config.sub!(/http_fonts_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_fonts_path\\1=\\2\\3#{dir}/fonts\\3") + compass_config.sub!(/css_dir(\s*)=(\s*)(["'])[\w\-\/]*["']/, "css_dir\\1=\\2\\3public#{dir}/stylesheets\\3") + File.open('config.rb', 'w') do |f| + f.write compass_config + end + jekyll_config = IO.read('_config.yml') + jekyll_config.sub!(/^destination:.+$/, "destination: public#{dir}") + jekyll_config.sub!(/^subscribe_rss:\s*\/.+$/, "subscribe_rss: #{dir}/atom.xml") + jekyll_config.sub!(/^root:.*$/, "root: /#{dir.sub(/^\//, '')}") + File.open('_config.yml', 'w') do |f| + f.write jekyll_config + end + rm_rf public_dir + mkdir_p "#{public_dir}#{dir}" + puts "## Site's root directory is now '/#{dir.sub(/^\//, '')}' ##" + end +end + +desc "Set up _deploy folder and deploy branch for Github Pages deployment" +task :setup_github_pages do + repo_url = get_stdin("Enter the read/write url for your repository: ") + user = repo_url.match(/:([^\/]+)/)[1] + branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master' + project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : '' + unless `git remote -v`.match(/origin.+?octopress.git/).nil? + # If octopress is still the origin remote (from cloning) rename it to octopress + system "git remote rename origin octopress" + if branch == 'master' + # If this is a user/organization pages repository, add the correct origin remote + # and checkout the source branch for committing changes to the blog source. + system "git remote add origin #{repo_url}" + puts "Added remote #{repo_url} as origin" + system "git config branch.master.remote origin" + puts "Set origin as default remote" + system "git branch -m master source" + puts "Master branch renamed to 'source' for committing your blog source files" + else + unless !public_dir.match("#{project}").nil? + system "rake set_root_dir[#{project}]" + end + end + end + url = "http://#{user}.github.com" + url += "/#{project}" unless project == '' + jekyll_config = IO.read('_config.yml') + jekyll_config.sub!(/^url:.*$/, "url: #{url}") + File.open('_config.yml', 'w') do |f| + f.write jekyll_config + end + rm_rf deploy_dir + mkdir deploy_dir + cd "#{deploy_dir}" do + system "git init" + system "echo 'My Octopress Page is coming soon …' > index.html" + system "git add ." + system "git commit -m \"Octopress init\"" + system "git branch -m gh-pages" unless branch == 'master' + system "git remote add origin #{repo_url}" + rakefile = IO.read(__FILE__) + rakefile.sub!(/deploy_branch(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_branch\\1=\\2\\3#{branch}\\3") + rakefile.sub!(/deploy_default(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_default\\1=\\2\\3push\\3") + File.open(__FILE__, 'w') do |f| + f.write rakefile + end + end + puts "\n---\n## Now you can deploy to #{url} with `rake deploy` ##" +end + +def ok_failed(condition) + if (condition) + puts "OK" + else + puts "FAILED" + end +end + +def get_stdin(message) + print message + STDIN.gets.chomp +end + +def ask(message, valid_options) + if valid_options + answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer) + else + answer = get_stdin(message) + end + answer +end + +desc "list tasks" +task :list do + puts "Tasks: #{(Rake::Task.tasks - [Rake::Task[:list]]).join(', ')}" + puts "(type rake -T for more detail)\n\n" +end diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..dd841e2 --- /dev/null +++ b/_config.yml @@ -0,0 +1,98 @@ +# ----------------------- # +# Main Configs # +# ----------------------- # + +url: http://XMLSDK.github.com +title: My Octopress Blog 八爪博 +subtitle: A blogging framework for hackers. +author: XMLSDK (Simon Chow) +simple_search: http://google.com/search + +# Default date format is "ordinal" (resulting in "July 22nd 2007") +# You can customize the format as defined in +# http://www.ruby-doc.org/core-1.9.2/Time.html#method-i-strftime +# Additionally, %o will give you the ordinal representation of the day +date_format: "ordinal" + +# RSS / Email (optional) subscription links (change if using something like Feedburner) +subscribe_rss: /atom.xml +subscribe_email: +# RSS feeds can list your email address if you like +email: + +# ----------------------- # +# Jekyll & Plugins # +# ----------------------- # + +# If publishing to a subdirectory as in http://site.com/project set 'root: /project' +root: / +permalink: /blog/:year/:month/:day/:title/ +source: source +destination: public +plugins: plugins +code_dir: downloads/code +category_dir: blog/categories +markdown: rdiscount +pygments: false # default python pygments have been replaced by pygments.rb + +paginate: 10 # Posts per page on the blog index +pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/ +recent_posts: 5 # Posts in the sidebar Recent Posts section +excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles + +titlecase: true # Converts page and post titles to tilecase + +# list each of the sidebar modules you want to include, in the order you want them to appear. +# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html' +default_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html] + +# Each layout uses the default asides, but they can have their own asides instead. Simply uncomment the lines below +# and add an array with the asides you want to use. +# blog_index_asides: +# post_asides: +# page_asides: + +# ----------------------- # +# 3rd Party Settings # +# ----------------------- # + +# Github repositories +github_user: +github_repo_count: 0 +github_show_profile_link: true +github_skip_forks: true + +# Twitter +twitter_user: +twitter_tweet_count: 4 +twitter_show_replies: false +twitter_follow_button: true +twitter_show_follower_count: false +twitter_tweet_button: true + +# Google +1 +google_plus_one: false +google_plus_one_size: medium + +# Google Plus Profile +# Hidden: No visible button, just add author information to search results +googleplus_user: +googleplus_hidden: false + +# Pinboard +pinboard_user: +pinboard_count: 3 + +# Delicious +delicious_user: +delicious_count: 3 + +# Disqus Comments +disqus_short_name: +disqus_show_comment_count: false + +# Google Analytics +google_analytics_tracking_id: + +# Facebook Like +facebook_like: false diff --git a/about/index.html b/about/index.html deleted file mode 100644 index 3f8e53e..0000000 --- a/about/index.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - index - My Octopress Blog 八爪博 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

My Octopress Blog 八爪博

- -

A blogging framework for hackers.

- -
- -
- -
-
-
-
- -
-

Index

-

- - - - - - - - - - - -

-
- -

關於我

- - -
-

- - - - - - - - - - - - - - - -

- - - - -
- -
- -
- - - - -
-
- - - - - - - - - - - - - - - - - diff --git a/atom.xml b/atom.xml deleted file mode 100644 index b80abdb..0000000 --- a/atom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - <![CDATA[My Octopress Blog 八爪博]]> - - - 2011-12-06T14:40:54+08:00 - http://XMLSDK.github.com/ - - - - - Octopress - - - - <![CDATA[Hello World]]> - - 2011-12-06T14:32:00+08:00 - http://XMLSDK.github.com/blog/2011/12/06/hello-world - 首次發文!Yeah!

-]]>
-
- -
diff --git a/blog/2011/12/06/hello-world/index.html b/blog/2011/12/06/hello-world/index.html deleted file mode 100644 index 572d5a4..0000000 --- a/blog/2011/12/06/hello-world/index.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - Hello World - My Octopress Blog 八爪博 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

My Octopress Blog 八爪博

- -

A blogging framework for hackers.

- -
- -
- -
-
-
-
- -
- -

Hello World

- - -

- - - - - - - - - - - - - - -

- -
- - -

首次發文!Yeah!

-
- - -
-

- - - - - - - - - - - - - - - - - - - - - - - selfchat - - - - -

- - - - -

- - -

-
-
- -
- - - - -
-
- - - - - - - - - - - - - - - - - diff --git a/blog/archives/index.html b/blog/archives/index.html deleted file mode 100644 index b096c9e..0000000 --- a/blog/archives/index.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - Blog Archive - My Octopress Blog 八爪博 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

My Octopress Blog 八爪博

- -

A blogging framework for hackers.

- -
- -
- -
-
-
-
- -
-

Blog Archive

- -
- -
- - - - -

2011

- - - -
- - -
- -
- - - - -
-
- - - - - - - - - - - - - - - - - diff --git a/blog/categories/selfchat/atom.xml b/blog/categories/selfchat/atom.xml deleted file mode 100644 index 2645870..0000000 --- a/blog/categories/selfchat/atom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - <![CDATA[Category: selfchat | My Octopress Blog 八爪博]]> - - - 2011-12-06T14:40:54+08:00 - http://XMLSDK.github.com/ - - - - - Octopress - - - - <![CDATA[Hello World]]> - - 2011-12-06T14:32:00+08:00 - http://XMLSDK.github.com/blog/2011/12/06/hello-world - 首次發文!Yeah!

-]]>
-
- -
diff --git a/blog/categories/selfchat/index.html b/blog/categories/selfchat/index.html deleted file mode 100644 index 1dc2786..0000000 --- a/blog/categories/selfchat/index.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - Category: selfchat - My Octopress Blog 八爪博 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

My Octopress Blog 八爪博

- -

A blogging framework for hackers.

- -
- -
- -
-
-
-
- -
-

Category: Selfchat

- -
- -
- - - - -

2011

- - - -
- - -
- -
- - - - -
-
- - - - - - - - - - - - - - - - - diff --git a/config.rb b/config.rb new file mode 100644 index 0000000..066427e --- /dev/null +++ b/config.rb @@ -0,0 +1,16 @@ +# Require any additional compass plugins here. +project_type = :stand_alone + +# Publishing paths +http_path = "/" +http_images_path = "/images" +http_fonts_path = "/fonts" +css_dir = "public/stylesheets" + +# Local development paths +sass_dir = "sass" +images_dir = "source/images" +fonts_dir = "source/fonts" + +line_comments = false +output_style = :compressed diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..b1b746b --- /dev/null +++ b/config.ru @@ -0,0 +1,25 @@ +require 'bundler/setup' +require 'sinatra/base' + +# The project root directory +$root = ::File.dirname(__FILE__) + +class SinatraStaticServer < Sinatra::Base + + get(/.+/) do + send_sinatra_file(request.path) {404} + end + + not_found do + send_sinatra_file('404.html') {"Sorry, I cannot find #{request.path}"} + end + + def send_sinatra_file(path, &missing_file_block) + file_path = File.join(File.dirname(__FILE__), 'public', path) + file_path = File.join(file_path, 'index.html') unless file_path =~ /\.[a-z]+$/i + File.exist?(file_path) ? send_file(file_path) : missing_file_block.call + end + +end + +run SinatraStaticServer \ No newline at end of file diff --git a/index.html b/index.html deleted file mode 100644 index 4bf9f27..0000000 --- a/index.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - My Octopress Blog 八爪博 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

My Octopress Blog 八爪博

- -

A blogging framework for hackers.

- -
- -
- -
-
-
- - - -
- -
- -

Hello World

- - -

- - - - - - - - - - - - - - -

- -
- - -

首次發文!Yeah!

-
- - - - -
- - -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/plugins/backtick_code_block.rb b/plugins/backtick_code_block.rb new file mode 100644 index 0000000..40e7900 --- /dev/null +++ b/plugins/backtick_code_block.rb @@ -0,0 +1,43 @@ +require './plugins/pygments_code' + +module BacktickCodeBlock + include HighlightCode + AllOptions = /([^\s]+)\s+(.+?)(https?:\/\/\S+)\s*(.+)?/i + LangCaption = /([^\s]+)\s*(.+)?/i + def render_code_block(input) + @options = nil + @caption = nil + @lang = nil + @url = nil + @title = nil + input.gsub(/^`{3} *([^\n]+)?\n(.+?)\n`{3}/m) do + @options = $1 || '' + str = $2 + + if @options =~ AllOptions + @lang = $1 + @caption = "
#{$2}#{$4 || 'link'}
" + elsif @options =~ LangCaption + @lang = $1 + @caption = "
#{$2}
" + end + + if str.match(/\A( {4}|\t)/) + str = str.gsub(/^( {4}|\t)/, '') + end + if @lang.nil? || @lang == 'plain' + code = tableize_code(str.gsub('<','<').gsub('>','>')) + "
#{@caption}#{code}
" + else + if @lang.include? "-raw" + raw = "``` #{@options.sub('-raw', '')}\n" + raw += str + raw += "\n```\n" + else + code = highlight(str, @lang) + "
#{@caption}#{code}
" + end + end + end + end +end diff --git a/plugins/blockquote.rb b/plugins/blockquote.rb new file mode 100644 index 0000000..a0bf12c --- /dev/null +++ b/plugins/blockquote.rb @@ -0,0 +1,83 @@ +# +# Author: Brandon Mathis +# A full rewrite based on the work of: Josediaz Gonzalez - https://github.com/josegonzalez/josediazgonzalez.com/blob/master/_plugins/blockquote.rb +# +# Outputs a string with a given attribution as a quote +# +# {% blockquote Bobby Willis http://google.com/search?q=pants the search for bobby's pants %} +# Wheeee! +# {% endblockquote %} +# ... +#
+#

Wheeee!

+#
+# +require './plugins/titlecase.rb' + +module Jekyll + + class Blockquote < Liquid::Block + FullCiteWithTitle = /(\S.*)\s+(https?:\/\/)(\S+)\s+(.+)/i + FullCite = /(\S.*)\s+(https?:\/\/)(\S+)/i + Author = /(.+)/ + + def initialize(tag_name, markup, tokens) + @by = nil + @source = nil + @title = nil + if markup =~ FullCiteWithTitle + @by = $1 + @source = $2 + $3 + @title = $4.titlecase + elsif markup =~ FullCite + @by = $1 + @source = $2 + $3 + elsif markup =~ Author + if $1 =~ /([^,]+),([^,]+)/ + @by = $1 + @title = $2.titlecase + else + @by = $1 + end + end + super + end + + def render(context) + quote = paragraphize(super.map(&:strip).join) + author = "#{@by.strip}" if @by + if @source + url = @source.match(/https?:\/\/(.+)/)[1].split('/') + parts = [] + url.each do |part| + if (parts + [part]).join('/').length < 32 + parts << part + end + end + source = parts.join('/') + source << '/…' unless source == @source + end + if !@source.nil? + cite = "#{(@title || source)}" + elsif !@title.nil? + cite = "#{@title}" + end + blockquote = if @by.nil? + quote + elsif cite + "#{quote}" + else + "#{quote}" + end + "
#{blockquote}
" + end + + def paragraphize(input) + "

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

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

" + end + end +end + +Liquid::Template.register_tag('blockquote', Jekyll::Blockquote) diff --git a/plugins/category_generator.rb b/plugins/category_generator.rb new file mode 100644 index 0000000..bb5fd32 --- /dev/null +++ b/plugins/category_generator.rb @@ -0,0 +1,174 @@ +# encoding: utf-8 +# +# Jekyll category page generator. +# http://recursive-design.com/projects/jekyll-plugins/ +# +# Version: 0.1.4 (201101061053) +# +# Copyright (c) 2010 Dave Perrett, http://recursive-design.com/ +# Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) +# +# A generator that creates category pages for jekyll sites. +# +# Included filters : +# - category_links: Outputs the list of categories as comma-separated links. +# - date_to_html_string: Outputs the post.date as formatted html, with hooks for CSS styling. +# +# Available _config.yml settings : +# - category_dir: The subfolder to build category pages in (default is 'categories'). +# - category_title_prefix: The string used before the category name in the page title (default is +# 'Category: '). + +module Jekyll + + # The CategoryIndex class creates a single category page for the specified category. + class CategoryIndex < Page + + # Initializes a new CategoryIndex. + # + # +base+ is the String path to the . + # +category_dir+ is the String path between and the category folder. + # +category+ is the category currently being processed. + def initialize(site, base, category_dir, category) + @site = site + @base = base + @dir = category_dir + @name = 'index.html' + self.process(@name) + # Read the YAML data from the layout page. + self.read_yaml(File.join(base, '_layouts'), 'category_index.html') + self.data['category'] = category + # Set the title for this page. + title_prefix = site.config['category_title_prefix'] || 'Category: ' + self.data['title'] = "#{title_prefix}#{category}" + # Set the meta-description for this page. + meta_description_prefix = site.config['category_meta_description_prefix'] || 'Category: ' + self.data['description'] = "#{meta_description_prefix}#{category}" + end + + end + + # The CategoryFeed class creates an Atom feed for the specified category. + class CategoryFeed < Page + + # Initializes a new CategoryFeed. + # + # +base+ is the String path to the . + # +category_dir+ is the String path between and the category folder. + # +category+ is the category currently being processed. + def initialize(site, base, category_dir, category) + @site = site + @base = base + @dir = category_dir + @name = 'atom.xml' + self.process(@name) + # Read the YAML data from the layout page. + self.read_yaml(File.join(base, '_includes/custom'), 'category_feed.xml') + self.data['category'] = category + # Set the title for this page. + title_prefix = site.config['category_title_prefix'] || 'Category: ' + self.data['title'] = "#{title_prefix}#{category}" + # Set the meta-description for this page. + meta_description_prefix = site.config['category_meta_description_prefix'] || 'Category: ' + self.data['description'] = "#{meta_description_prefix}#{category}" + + # Set the correct feed URL. + self.data['feed_url'] = "#{category_dir}/#{name}" + end + + end + + # The Site class is a built-in Jekyll class with access to global site config information. + class Site + + # Creates an instance of CategoryIndex for each category page, renders it, and + # writes the output to a file. + # + # +category_dir+ is the String path to the category folder. + # +category+ is the category currently being processed. + def write_category_index(category_dir, category) + index = CategoryIndex.new(self, self.source, category_dir, category) + index.render(self.layouts, site_payload) + index.write(self.dest) + # Record the fact that this page has been added, otherwise Site::cleanup will remove it. + self.pages << index + + # Create an Atom-feed for each index. + feed = CategoryFeed.new(self, self.source, category_dir, category) + feed.render(self.layouts, site_payload) + feed.write(self.dest) + # Record the fact that this page has been added, otherwise Site::cleanup will remove it. + self.pages << feed + end + + # Loops through the list of category pages and processes each one. + def write_category_indexes + if self.layouts.key? 'category_index' + dir = self.config['category_dir'] || 'categories' + self.categories.keys.each do |category| + self.write_category_index(File.join(dir, category.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-').downcase), category) + end + + # Throw an exception if the layout couldn't be found. + else + throw "No 'category_index' layout found." + end + end + + end + + + # Jekyll hook - the generate method is called by jekyll, and generates all of the category pages. + class GenerateCategories < Generator + safe true + priority :low + + def generate(site) + site.write_category_indexes + end + + end + + + # Adds some extra filters used during the category creation process. + module Filters + + # Outputs a list of categories as comma-separated links. This is used + # to output the category list for each post on a category page. + # + # +categories+ is the list of categories to format. + # + # Returns string + # + def category_links(categories) + dir = @context.registers[:site].config['category_dir'] + categories = categories.sort!.map do |item| + "#{item}" + end + + case categories.length + when 0 + "" + when 1 + categories[0].to_s + else + "#{categories[0...-1].join(', ')}, #{categories[-1]}" + end + end + + # Outputs the post.date as formatted html, with hooks for CSS styling. + # + # +date+ is the date object to format as HTML. + # + # Returns string + def date_to_html_string(date) + result = '' + date.strftime('%b').upcase + ' ' + result += date.strftime('%d ') + result += date.strftime('%Y ') + result + end + + end + +end + diff --git a/plugins/code_block.rb b/plugins/code_block.rb new file mode 100644 index 0000000..e175d44 --- /dev/null +++ b/plugins/code_block.rb @@ -0,0 +1,98 @@ +# Title: Simple Code Blocks for Jekyll +# Author: Brandon Mathis http://brandonmathis.com +# Description: Write codeblocks with semantic HTML5
and
elements and optional syntax highlighting — all with a simple, intuitive interface. +# +# Syntax: +# {% codeblock [title] [url] [link text] %} +# code snippet +# {% endcodeblock %} +# +# For syntax highlighting, put a file extension somewhere in the title. examples: +# {% codeblock file.sh %} +# code snippet +# {% endcodeblock %} +# +# {% codeblock Time to be Awesome! (awesome.rb) %} +# code snippet +# {% endcodeblock %} +# +# Example: +# +# {% codeblock Got pain? painreleif.sh http://site.com/painreleief.sh Download it! %} +# $ rm -rf ~/PAIN +# {% endcodeblock %} +# +# Output: +# +#
+#
Got pain? painrelief.sh Download it! +#

+# -- nicely escaped highlighted code --
+# 
+#
+# +# Example 2 (no syntax highlighting): +# +# {% codeblock %} +# Ooooh, sarcasm... How original! +# {% endcodeblock %} +# +#
+#
<sarcasm> Ooooh, sarcasm... How original!</sarcasm>
+#
+# +require './plugins/pygments_code' +require './plugins/raw' + +module Jekyll + + class CodeBlock < Liquid::Block + include HighlightCode + include TemplateWrapper + CaptionUrlTitle = /(\S[\S\s]*)\s+(https?:\/\/)(\S+)\s+(.+)/i + CaptionUrl = /(\S[\S\s]*)\s+(https?:\/\/)(\S+)/i + Caption = /(\S[\S\s]*)/ + def initialize(tag_name, markup, tokens) + @title = nil + @caption = nil + @filetype = nil + @highlight = true + if markup =~ /\s*lang:(\w+)/i + @filetype = $1 + markup = markup.sub(/lang:\w+/i,'') + end + if markup =~ CaptionUrlTitle + @file = $1 + @caption = "
#{$1}#{$4}
" + elsif markup =~ CaptionUrl + @file = $1 + @caption = "
#{$1}link
" + elsif markup =~ Caption + @file = $1 + @caption = "
#{$1}
\n" + end + if @file =~ /\S[\S\s]*\w+\.(\w+)/ && @filetype.nil? + @filetype = $1 + end + super + end + + def render(context) + output = super + code = super.join + source = "
" + source += @caption if @caption + if @filetype + source += " #{highlight(code, @filetype)}
" + else + source += "#{tableize_code(code.lstrip.rstrip.gsub(/" + end + source = safe_wrap(source) + source = context['pygments_prefix'] + source if context['pygments_prefix'] + source = source + context['pygments_suffix'] if context['pygments_suffix'] + source + end + end +end + +Liquid::Template.register_tag('codeblock', Jekyll::CodeBlock) diff --git a/plugins/date.rb b/plugins/date.rb new file mode 100644 index 0000000..b864f3e --- /dev/null +++ b/plugins/date.rb @@ -0,0 +1,98 @@ +module Octopress + module Date + + # Returns a datetime if the input is a string + def datetime(date) + if date.class == String + date = Time.parse(date) + end + date + end + + # Returns an ordidinal date eg July 22 2007 -> July 22nd 2007 + def ordinalize(date) + date = datetime(date) + "#{date.strftime('%b')} #{ordinal(date.strftime('%e').to_i)}, #{date.strftime('%Y')}" + end + + # Returns an ordinal number. 13 -> 13th, 21 -> 21st etc. + def ordinal(number) + if (11..13).include?(number.to_i % 100) + "#{number}th" + else + case number.to_i % 10 + when 1; "#{number}st" + when 2; "#{number}nd" + when 3; "#{number}rd" + else "#{number}th" + end + end + end + + # Formats date either as ordinal or by given date format + # Adds %o as ordinal representation of the day + def format_date(date, format) + date = datetime(date) + if format.nil? || format.empty? || format == "ordinal" + date_formatted = ordinalize(date) + else + date_formatted = date.strftime(format) + date_formatted.gsub!(/%o/, ordinal(date.strftime('%e').to_i)) + end + date_formatted + end + + end +end + + +module Jekyll + + class Post + include Octopress::Date + + # Convert this post into a Hash for use in Liquid templates. + # + # Returns + def to_liquid + date_format = self.site.config['date_format'] + self.data.deep_merge({ + "title" => self.data['title'] || self.slug.split('-').select {|w| w.capitalize! || w }.join(' '), + "url" => self.url, + "date" => self.date, + # Monkey patch + "date_formatted" => format_date(self.date, date_format), + "updated_formatted" => self.data.has_key?('updated') ? format_date(self.data['updated'], date_format) : nil, + "id" => self.id, + "categories" => self.categories, + "next" => self.next, + "previous" => self.previous, + "tags" => self.tags, + "content" => self.content }) + end + end + + class Page + include Octopress::Date + + # Initialize a new Page. + # + # site - The Site object. + # base - The String path to the source. + # dir - The String path between the source and the file. + # name - The String filename of the file. + def initialize(site, base, dir, name) + @site = site + @base = base + @dir = dir + @name = name + + self.process(name) + self.read_yaml(File.join(base, dir), name) + # Monkey patch + date_format = self.site.config['date_format'] + self.data['date_formatted'] = format_date(self.data['date'], date_format) if self.data.has_key?('date') + self.data['updated_formatted'] = format_date(self.data['updated'], date_format) if self.data.has_key?('updated') + end + end +end \ No newline at end of file diff --git a/plugins/gist_tag.rb b/plugins/gist_tag.rb new file mode 100644 index 0000000..74dd3b3 --- /dev/null +++ b/plugins/gist_tag.rb @@ -0,0 +1,100 @@ +# A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers. +# by: Brandon Tilly +# Source URL: https://gist.github.com/1027674 +# Post http://brandontilley.com/2011/01/31/gist-tag-for-jekyll.html +# +# Example usage: {% gist 1027674 gist_tag.rb %} //embeds a gist for this plugin + +require 'cgi' +require 'digest/md5' +require 'net/https' +require 'uri' + +module Jekyll + class GistTag < Liquid::Tag + def initialize(tag_name, text, token) + super + @text = text + @cache_disabled = false + @cache_folder = File.expand_path "../.gist-cache", File.dirname(__FILE__) + FileUtils.mkdir_p @cache_folder + end + + def render(context) + if parts = @text.match(/([\d]*) (.*)/) + gist, file = parts[1].strip, parts[2].strip + script_url = script_url_for gist, file + code = get_cached_gist(gist, file) || get_gist_from_web(gist, file) + html_output_for script_url, code + else + "" + end + end + + def html_output_for(script_url, code) + code = CGI.escapeHTML code + <<-HTML +
+
+ HTML + end + + def script_url_for(gist_id, filename) + "https://gist.github.com/#{gist_id}.js?file=#{filename}" + end + + def get_gist_url_for(gist, file) + "https://raw.github.com/gist/#{gist}/#{file}" + end + + def cache(gist, file, data) + cache_file = get_cache_file_for gist, file + File.open(cache_file, "w") do |io| + io.write data + end + end + + def get_cached_gist(gist, file) + return nil if @cache_disabled + cache_file = get_cache_file_for gist, file + File.read cache_file if File.exist? cache_file + end + + def get_cache_file_for(gist, file) + bad_chars = /[^a-zA-Z0-9\-_.]/ + gist = gist.gsub bad_chars, '' + file = file.gsub bad_chars, '' + md5 = Digest::MD5.hexdigest "#{gist}-#{file}" + File.join @cache_folder, "#{gist}-#{file}-#{md5}.cache" + end + + def get_gist_from_web(gist, file) + gist_url = get_gist_url_for gist, file + raw_uri = URI.parse gist_url + proxy = ENV['http_proxy'] + if proxy + proxy_uri = URI.parse(proxy) + https = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port).new raw_uri.host, raw_uri.port + else + https = Net::HTTP.new raw_uri.host, raw_uri.port + end + https.use_ssl = true + https.verify_mode = OpenSSL::SSL::VERIFY_NONE + request = Net::HTTP::Get.new raw_uri.request_uri + data = https.request request + data = data.body + cache gist, file, data unless @cache_disabled + data + end + end + + class GistTagNoCache < GistTag + def initialize(tag_name, text, token) + super + @cache_disabled = true + end + end +end + +Liquid::Template.register_tag('gist', Jekyll::GistTag) +Liquid::Template.register_tag('gistnocache', Jekyll::GistTagNoCache) diff --git a/plugins/haml.rb b/plugins/haml.rb new file mode 100644 index 0000000..7e548de --- /dev/null +++ b/plugins/haml.rb @@ -0,0 +1,24 @@ +module Jekyll + require 'haml' + class HamlConverter < Converter + safe true + priority :low + + def matches(ext) + ext =~ /haml/i + end + + def output_ext(ext) + ".html" + end + + def convert(content) + begin + engine = Haml::Engine.new(content) + engine.render + rescue StandardError => e + puts "!!! HAML Error: " + e.message + end + end + end +end diff --git a/plugins/image_tag.rb b/plugins/image_tag.rb new file mode 100644 index 0000000..4567000 --- /dev/null +++ b/plugins/image_tag.rb @@ -0,0 +1,50 @@ +# Title: Simple Image tag for Jekyll +# Authors: Brandon Mathis http://brandonmathis.com +# Felix Schäfer, Frederic Hemberger +# Description: Easily output images with optional class names, width, height, title and alt attributes +# +# Syntax {% img [class name(s)] [http[s]:/]/path/to/image [width [height]] [title text | "title text" ["alt text"]] %} +# +# Examples: +# {% img /images/ninja.png Ninja Attack! %} +# {% img left half http://site.com/images/ninja.png Ninja Attack! %} +# {% img left half http://site.com/images/ninja.png 150 150 "Ninja Attack!" "Ninja in attack posture" %} +# +# Output: +# +# Ninja Attack! +# Ninja in attack posture +# + +module Jekyll + + class ImageTag < Liquid::Tag + @img = nil + + def initialize(tag_name, markup, tokens) + attributes = ['class', 'src', 'width', 'height', 'title'] + + if markup =~ /(?\S.*\s+)?(?(?:https?:\/\/|\/|\S+\/)\S+)(?:\s+(?\d+))?(?:\s+(?\d+))?(?\s+.+)?/i + @img = attributes.reduce({}) { |img, attr| img[attr] = $~[attr].strip if $~[attr]; img } + if /(?:"|')(?<title>[^"']+)?(?:"|')\s+(?:"|')(?<alt>[^"']+)?(?:"|')/ =~ @img['title'] + @img['title'] = title + @img['alt'] = alt + else + @img['alt'] = @img['title'].gsub!(/"/, '"') if @img['title'] + end + @img['class'].gsub!(/"/, '') if @img['class'] + end + super + end + + def render(context) + if @img + "<img #{@img.collect {|k,v| "#{k}=\"#{v}\"" if v}.join(" ")}>" + else + "Error processing input, expected syntax: {% img [class name(s)] [http[s]:/]/path/to/image [width [height]] [title text | \"title text\" [\"alt text\"]] %}" + end + end + end +end + +Liquid::Template.register_tag('img', Jekyll::ImageTag) diff --git a/plugins/include_array.rb b/plugins/include_array.rb new file mode 100644 index 0000000..000040f --- /dev/null +++ b/plugins/include_array.rb @@ -0,0 +1,58 @@ +# Title: Include Array Tag for Jekyll +# Author: Jason Woodward http://www.woodwardjd.com +# Description: Import files on your filesystem as specified in a configuration variable in _config.yml. Mostly cribbed from Jekyll's include tag. +# Syntax: {% include_array variable_name_from_config.yml %} +# +# Example 1: +# {% include_array asides %} +# +# _config.yml snippet: +# asides: [asides/twitter.html, asides/custom/my_picture.html] +# +module Jekyll + + class IncludeArrayTag < Liquid::Tag + Syntax = /(#{Liquid::QuotedFragment}+)/ + def initialize(tag_name, markup, tokens) + if markup =~ Syntax + @array_name = $1 + else + raise SyntaxError.new("Error in tag 'include_array' - Valid syntax: include_array [array from _config.yml]") + end + + super + end + + def render(context) + includes_dir = File.join(context.registers[:site].source, '_includes') + + if File.symlink?(includes_dir) + return "Includes directory '#{includes_dir}' cannot be a symlink" + end + + rtn = '' + (context.environments.first['site'][@array_name] || []).each do |file| + if file !~ /^[a-zA-Z0-9_\/\.-]+$/ || file =~ /\.\// || file =~ /\/\./ + rtn = rtn + "Include file '#{file}' contains invalid characters or sequences" + end + + Dir.chdir(includes_dir) do + choices = Dir['**/*'].reject { |x| File.symlink?(x) } + if choices.include?(file) + source = File.read(file) + partial = Liquid::Template.parse(source) + context.stack do + rtn = rtn + partial.render(context) + end + else + rtn = rtn + "Included file '#{file}' not found in _includes directory" + end + end + end + rtn + end + end + +end + +Liquid::Template.register_tag('include_array', Jekyll::IncludeArrayTag) diff --git a/plugins/include_code.rb b/plugins/include_code.rb new file mode 100644 index 0000000..fc6daa3 --- /dev/null +++ b/plugins/include_code.rb @@ -0,0 +1,73 @@ +# Title: Include Code Tag for Jekyll +# Author: Brandon Mathis http://brandonmathis.com +# Description: Import files on your filesystem into any blog post as embedded code snippets with syntax highlighting and a download link. +# Configuration: You can set default import path in _config.yml (defaults to code_dir: downloads/code) +# +# Syntax {% include_code path/to/file %} +# +# Example 1: +# {% include_code javascripts/test.js %} +# +# This will import test.js from source/downloads/code/javascripts/test.js +# and output the contents in a syntax highlighted code block inside a figure, +# with a figcaption listing the file name and download link +# +# Example 2: +# You can also include an optional title for the <figcaption> +# +# {% include_code Example 2 javascripts/test.js %} +# +# will output a figcaption with the title: Example 2 (test.js) +# + +require './plugins/pygments_code' +require './plugins/raw' +require 'pathname' + +module Jekyll + + class IncludeCodeTag < Liquid::Tag + include HighlightCode + include TemplateWrapper + def initialize(tag_name, markup, tokens) + @title = nil + @file = nil + if markup.strip =~ /\s*lang:(\w+)/i + @filetype = $1 + markup = markup.strip.sub(/lang:\w+/i,'') + end + if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i + @title = $1 || nil + @file = $3 + end + super + end + + def render(context) + code_dir = (context.registers[:site].config['code_dir'].sub(/^\//,'') || 'downloads/code') + code_path = (Pathname.new(context.registers[:site].source) + code_dir).expand_path + file = code_path + @file + + if File.symlink?(code_path) + return "Code directory '#{code_path}' cannot be a symlink" + end + + unless file.file? + return "File #{file} could not be found" + end + + Dir.chdir(code_path) do + code = file.read + @filetype = file.extname.sub('.','') if @filetype.nil? + title = @title ? "#{@title} (#{file.basename})" : file.basename + url = "/#{code_dir}/#{@file}" + source = "<figure class='code'><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n" + source += " #{highlight(code, @filetype)}</figure>" + safe_wrap(source) + end + end + end + +end + +Liquid::Template.register_tag('include_code', Jekyll::IncludeCodeTag) diff --git a/plugins/jsfiddle.rb b/plugins/jsfiddle.rb new file mode 100644 index 0000000..3ae173e --- /dev/null +++ b/plugins/jsfiddle.rb @@ -0,0 +1,40 @@ +# Title: jsFiddle tag for Jekyll +# Author: Brian Arnold (@brianarn) +# Description: +# Given a jsFiddle shortcode, outputs the jsFiddle iframe code. +# Using 'default' will preserve defaults as specified by jsFiddle. +# +# Syntax: {% jsfiddle shorttag [tabs] [skin] [height] [width] %} +# +# Examples: +# +# Input: {% jsfiddle ccWP7 %} +# Output: <iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/ccWP7/embedded/js,resources,html,css,result/light/"></iframe> +# +# Input: {% jsfiddle ccWP7 js,html,result %} +# Output: <iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/ccWP7/embedded/js,html,result/light/"></iframe> +# + +module Jekyll + class JsFiddle < Liquid::Tag + def initialize(tag_name, markup, tokens) + if /(?<fiddle>\w+)(?:\s+(?<sequence>[\w,]+))?(?:\s+(?<skin>\w+))?(?:\s+(?<height>\w+))?(?:\s+(?<width>\w+))?/ =~ markup + @fiddle = fiddle + @sequence = (sequence unless sequence == 'default') || 'js,resources,html,css,result' + @skin = (skin unless skin == 'default') || 'light' + @width = width || '100%' + @height = height || '300px' + end + end + + def render(context) + if @fiddle + "<iframe style=\"width: #{@width}; height: #{@height}\" src=\"http://jsfiddle.net/#{@fiddle}/embedded/#{@sequence}/#{@skin}/\"></iframe>" + else + "Error processing input, expected syntax: {% jsfiddle shorttag [tabs] [skin] [height] [width] %}" + end + end + end +end + +Liquid::Template.register_tag('jsfiddle', Jekyll::JsFiddle) \ No newline at end of file diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb new file mode 100644 index 0000000..a5bb235 --- /dev/null +++ b/plugins/octopress_filters.rb @@ -0,0 +1,131 @@ +#custom filters for Octopress +require './plugins/backtick_code_block' +require './plugins/post_filters' +require './plugins/raw' +require './plugins/date' +require 'rubypants' + +module OctopressFilters + include BacktickCodeBlock + include TemplateWrapper + def pre_filter(input) + input = render_code_block(input) + input.gsub /(<figure.+?>.+?<\/figure>)/m do + safe_wrap($1) + end + end + def post_filter(input) + input = unwrap(input) + RubyPants.new(input).to_html + end +end + +module Jekyll + class ContentFilters < PostFilter + include OctopressFilters + def pre_render(post) + post.content = pre_filter(post.content) + end + def post_render(post) + post.content = post_filter(post.content) + end + end +end + + +module OctopressLiquidFilters + include Octopress::Date + + # Used on the blog index to split posts on the <!--more--> marker + def excerpt(input) + if input.index(/<!--\s*more\s*-->/i) + input.split(/<!--\s*more\s*-->/i)[0] + else + input + end + end + + # Checks for excerpts (helpful for template conditionals) + def has_excerpt(input) + input =~ /<!--\s*more\s*-->/i ? true : false + end + + # Summary is used on the Archive pages to return the first block of content from a post. + def summary(input) + if input.index(/\n\n/) + input.split(/\n\n/)[0] + else + input + end + end + + # Extracts raw content DIV from template, used for page description as {{ content }} + # contains complete sub-template code on main page level + def raw_content(input) + /<div class="entry-content">(?<content>[\s\S]*?)<\/div>\s*<(footer|\/article)>/ =~ input + return (content.nil?) ? input : content + end + + # Escapes CDATA sections in post content + def cdata_escape(input) + input.gsub(/<!\[CDATA\[/, '<![CDATA[').gsub(/\]\]>/, ']]>') + end + + # Replaces relative urls with full urls + def expand_urls(input, url='') + url ||= '/' + input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]*)/ do + $1+url+$3 + end + end + + # Improved version of Liquid's truncate: + # - Doesn't cut in the middle of a word. + # - Uses typographically correct ellipsis (…) insted of '...' + def truncate(input, length) + if input.length > length && input[0..(length-1)] =~ /(.+)\b.+$/im + $1.strip + ' …' + else + input + end + end + + # Improved version of Liquid's truncatewords: + # - Uses typographically correct ellipsis (…) insted of '...' + def truncatewords(input, length) + truncate = input.split(' ') + if truncate.length > length + truncate[0..length-1].join(' ').strip + ' …' + else + input + end + end + + # Condenses multiple spaces and tabs into a single space + def condense_spaces(input) + input.gsub(/\s{2,}/, ' ') + end + + # Removes trailing forward slash from a string for easily appending url segments + def strip_slash(input) + if input =~ /(.+)\/$|^\/$/ + input = $1 + end + input + end + + # Returns a url without the protocol (http://) + def shorthand_url(http://github.com/input) + input.gsub /(https?:\/\/)(\S+)/ do + $2 + end + end + + # Returns a title cased string based on John Gruber's title case http://daringfireball.net/2008/08/title_case_update + def titlecase(input) + input.titlecase + end + +end +Liquid::Template.register_filter OctopressLiquidFilters + diff --git a/plugins/pagination.rb b/plugins/pagination.rb new file mode 100644 index 0000000..a318754 --- /dev/null +++ b/plugins/pagination.rb @@ -0,0 +1,121 @@ +module Jekyll + + class Pagination < Generator + # This generator is safe from arbitrary code execution. + safe true + + # Generate paginated pages if necessary. + # + # site - The Site. + # + # Returns nothing. + def generate(site) + site.pages.dup.each do |page| + paginate(site, page) if Pager.pagination_enabled?(site.config, page) + end + end + + # Paginates the blog's posts. Renders the index.html file into paginated + # directories, e.g.: page2/index.html, page3/index.html, etc and adds more + # site-wide data. + # + # site - The Site. + # page - The index.html Page that requires pagination. + # + # {"paginator" => { "page" => <Number>, + # "per_page" => <Number>, + # "posts" => [<Post>], + # "total_posts" => <Number>, + # "total_pages" => <Number>, + # "previous_page" => <Number>, + # "next_page" => <Number> }} + def paginate(site, page) + all_posts = site.site_payload['site']['posts'] + pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i) + page_dir = page.destination('').sub(/\/[^\/]+$/, '') + page_dir_config = site.config['pagination_dir'] + dir = ((page_dir_config || page_dir) + '/').sub(/^\/+/, '') + + (1..pages).each do |num_page| + pager = Pager.new(site.config, num_page, all_posts, page_dir+'/', '/'+dir, pages) + if num_page > 1 + newpage = Page.new(site, site.source, page_dir, page.name) + newpage.pager = pager + newpage.dir = File.join(page.dir, "#{dir}page/#{num_page}") + site.pages << newpage + else + page.pager = pager + end + end + end + end + + class Pager + attr_reader :page, :per_page, :posts, :total_posts, :total_pages, :previous_page, :next_page + + # Calculate the number of pages. + # + # all_posts - The Array of all Posts. + # per_page - The Integer of entries per page. + # + # Returns the Integer number of pages. + def self.calculate_pages(all_posts, per_page) + (all_posts.size.to_f / per_page.to_i).ceil + end + + # Determine if pagination is enabled for a given file. + # + # config - The configuration Hash. + # file - The String filename of the file. + # + # Returns true if pagination is enabled, false otherwise. + def self.pagination_enabled?(config, file) + file.name == 'index.html' && !config['paginate'].nil? && file.content =~ /paginator\./ + end + + # Initialize a new Pager. + # + # config - The Hash configuration of the site. + # page - The Integer page number. + # all_posts - The Array of all the site's Posts. + # num_pages - The Integer number of pages or nil if you'd like the number + # of pages calculated. + def initialize(config, page, all_posts, index_dir, pagination_dir, num_pages = nil) + @page = page + @per_page = config['paginate'].to_i + @page_dir = pagination_dir + 'page/' + @total_pages = num_pages || Pager.calculate_pages(all_posts, @per_page) + @previous_page = nil + + if @page > @total_pages + raise RuntimeError, "page number can't be greater than total pages: #{@page} > #{@total_pages}" + end + + init = (@page - 1) * @per_page + offset = (init + @per_page - 1) >= all_posts.size ? all_posts.size : (init + @per_page - 1) + + @total_posts = all_posts.size + @posts = all_posts[init..offset] + @previous_page = @page != 1 ? @page_dir + (@page - 1).to_s + '/' : nil + @previous_page = index_dir if @page - 1 == 1 + @next_page = @page != @total_pages ? @page_dir + (@page + 1).to_s + '/' : nil + end + + # Convert this Pager's data to a Hash suitable for use by Liquid. + # + # Returns the Hash representation of this Pager. + def to_liquid + { + 'page' => page, + 'per_page' => per_page, + 'posts' => posts, + 'total_posts' => total_posts, + 'total_pages' => total_pages, + 'previous_page' => previous_page, + 'next_page' => next_page + } + end + end + +end + diff --git a/plugins/post_filters.rb b/plugins/post_filters.rb new file mode 100644 index 0000000..0862680 --- /dev/null +++ b/plugins/post_filters.rb @@ -0,0 +1,176 @@ +module Jekyll + + # Extended plugin type that allows the plugin + # to be called on varous callback methods. + # + # Examples: + # https://github.com/tedkulp/octopress/blob/master/plugins/post_metaweblog.rb + # https://github.com/tedkulp/octopress/blob/master/plugins/post_twitter.rb + class PostFilter < Plugin + + #Called before post is sent to the converter. Allows + #you to modify the post object before the converter + #does it's thing + def pre_render(post) + end + + #Called after the post is rendered with the converter. + #Use the post object to modify it's contents before the + #post is inserted into the template. + def post_render(post) + end + + #Called after the post is written to the disk. + #Use the post object to read it's contents to do something + #after the post is safely written. + def post_write(post) + end + end + + # Monkey patch for the Jekyll Site class. For the original class, + # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/site.rb + class Site + + # Instance variable to store the various post_filter + # plugins that are loaded. + attr_accessor :post_filters + + # Instantiates all of the post_filter plugins. This is basically + # a duplication of the other loaders in Site#setup. + def load_post_filters + self.post_filters = Jekyll::PostFilter.subclasses.select do |c| + !self.safe || c.safe + end.map do |c| + c.new(self.config) + end + end + end + + # Monkey patch for the Jekyll Post class. For the original class, + # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/post.rb + class Post + + # Copy the #write method to #old_write, so we can redefine #write + # method. + alias_method :old_write, :write + + # Write the generated post file to the destination directory. It + # then calls any post_write methods that may exist. + # +dest+ is the String path to the destination dir + # + # Returns nothing + def write(dest) + old_write(dest) + post_write if respond_to?(:post_write) + end + end + + # Monkey patch for the Jekyll Page class. For the original class, + # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/page.rb + class Page + + # Copy the #write method to #old_write, so we can redefine #write + # method. + alias_method :old_write, :write + + # Write the generated post file to the destination directory. It + # then calls any post_write methods that may exist. + # +dest+ is the String path to the destination dir + # + # Returns nothing + def write(dest) + old_write(dest) + post_write if respond_to?(:post_write) + end + end + + # Monkey patch for the Jekyll Convertible module. For the original class, + # see: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/convertible.rb + module Convertible + + def is_post? + self.class.to_s == 'Jekyll::Post' + end + + def is_page? + self.class.to_s == 'Jekyll::Page' + end + + def is_filterable? + is_post? or is_page? + end + + # Call the #pre_render methods on all of the loaded + # post_filter plugins. + # + # Returns nothing + def pre_render + self.site.load_post_filters unless self.site.post_filters + + if self.site.post_filters and is_filterable? + self.site.post_filters.each do |filter| + filter.pre_render(self) + end + end + end + + # Call the #post_render methods on all of the loaded + # post_filter plugins. + # + # Returns nothing + def post_render + if self.site.post_filters and is_filterable? + self.site.post_filters.each do |filter| + filter.post_render(self) + end + end + end + + # Call the #post_write methods on all of the loaded + # post_filter plugins. + # + # Returns nothing + def post_write + if self.site.post_filters and is_filterable? + self.site.post_filters.each do |filter| + filter.post_write(self) + end + end + end + + # Copy the #transform method to #old_transform, so we can + # redefine #transform method. + alias_method :old_transform, :transform + + # Transform the contents based on the content type. Then calls the + # #post_render method if it exists + # + # Returns nothing. + def transform + old_transform + post_render if respond_to?(:post_render) + end + + # Copy the #do_layout method to #old_do_layout, so we can + # redefine #do_layout method. + alias_method :old_do_layout, :do_layout + + # Calls the pre_render method if it exists and then adds any necessary + # layouts to this convertible document. + # + # payload - The site payload Hash. + # layouts - A Hash of {"name" => "layout"}. + # + # Returns nothing. + def do_layout(payload, layouts) + pre_render if respond_to?(:pre_render) + old_do_layout(payload, layouts) + end + + # Returns the full url of the post, including the + # configured url + def full_url + self.site.config['url'] + self.url + end + end +end diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb new file mode 100644 index 0000000..cf8d22f --- /dev/null +++ b/plugins/pullquote.rb @@ -0,0 +1,45 @@ +# +# Author: Brandon Mathis +# Based on the semantic pullquote technique by Maykel Loomans at http://miekd.com/articles/pull-quotes-with-html5-and-css/ +# +# Outputs a span with a data-pullquote attribute set from the marked pullquote. Example: +# +# {% pullquote %} +# 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. +# 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 +# to use a CSS only technique for styling pullquotes. +# {% endpullquote %} +# ...will output... +# <p> +# <span data-pullquote="pullquotes are merely visual in presentation and should not appear twice in the text."> +# 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. +# 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 +# for styling pullquotes is prefered. +# </span> +# </p> +# +# {% pullquote left %} will create a left-aligned pullquote instead. +# +# Note: this plugin now creates pullquotes with the class of pullquote-right by default + +module Jekyll + + class PullquoteTag < Liquid::Block + def initialize(tag_name, markup, tokens) + @align = (markup =~ /left/i) ? "left" : "right" + super + end + + def render(context) + output = super + if output.join =~ /\{"\s*(.+)\s*"\}/ + @quote = $1 + "<span class='pullquote-#{@align}' data-pullquote='#{@quote}'>#{output.join.gsub(/\{"\s*|\s*"\}/, '')}</span>" + else + return "Surround your pullquote like this {\" text to be quoted \"}" + end + end + end +end + +Liquid::Template.register_tag('pullquote', Jekyll::PullquoteTag) diff --git a/plugins/pygments_code.rb b/plugins/pygments_code.rb new file mode 100644 index 0000000..1676a3e --- /dev/null +++ b/plugins/pygments_code.rb @@ -0,0 +1,41 @@ +require 'pygments' +require 'fileutils' +require 'digest/md5' + +PYGMENTS_CACHE_DIR = File.expand_path('../../.pygments-cache', __FILE__) +FileUtils.mkdir_p(PYGMENTS_CACHE_DIR) + +module HighlightCode + def highlight(str, lang) + lang = 'ruby' if lang == 'ru' + lang = 'objc' if lang == 'm' + lang = 'perl' if lang == 'pl' + lang = 'yaml' if lang == 'yml' + str = pygments(str, lang).match(/<pre>(.+)<\/pre>/m)[1].to_s.gsub(/ *$/, '') #strip out divs <div class="highlight"> + tableize_code(str, lang) + end + + def pygments(code, lang) + if defined?(PYGMENTS_CACHE_DIR) + path = File.join(PYGMENTS_CACHE_DIR, "#{lang}-#{Digest::MD5.hexdigest(code)}.html") + if File.exist?(path) + highlighted_code = File.read(path) + else + highlighted_code = Pygments.highlight(code, :lexer => lang, :formatter => 'html', :options => {:encoding => 'utf-8'}) + File.open(path, 'w') {|f| f.print(highlighted_code) } + end + else + highlighted_code = Pygments.highlight(code, :lexer => lang, :formatter => 'html', :options => {:encoding => 'utf-8'}) + end + highlighted_code + end + def tableize_code (str, lang = '') + table = '<div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers">' + code = '' + str.lines.each_with_index do |line,index| + table += "<span class='line-number'>#{index+1}</span>\n" + code += "<span class='line'>#{line}</span>" + end + table += "</pre></td><td class='code'><pre><code class='#{lang}'>#{code}</code></pre></td></tr></table></div>" + end +end diff --git a/plugins/raw.rb b/plugins/raw.rb new file mode 100644 index 0000000..4b00262 --- /dev/null +++ b/plugins/raw.rb @@ -0,0 +1,40 @@ +# Author: Brandon Mathis +# Description: Provides plugins with a method for wrapping and unwrapping input to prevent Markdown and Textile from parsing it. +# Purpose: This is useful for preventing Markdown and Textile from being too aggressive and incorrectly parsing in-line HTML. +module TemplateWrapper + # Wrap input with a <div> + def safe_wrap(input) + "<div class='bogus-wrapper'><notextile>#{input}</notextile></div>" + end + # This must be applied after the + def unwrap(input) + input.gsub /<div class='bogus-wrapper'><notextile>(.+?)<\/notextile><\/div>/m do + $1 + end + end +end + +# Author: phaer, https://github.com/phaer +# Source: https://gist.github.com/1020852 +# Description: Raw tag for jekyll. Keeps liquid from parsing text betweeen {% raw %} and {% endraw %} + +module Jekyll + class RawTag < Liquid::Block + def parse(tokens) + @nodelist ||= [] + @nodelist.clear + + while token = tokens.shift + if token =~ FullToken + if block_delimiter == $1 + end_tag + return + end + end + @nodelist << token if not token.empty? + end + end + end +end + +Liquid::Template.register_tag('raw', Jekyll::RawTag) diff --git a/plugins/render_partial.rb b/plugins/render_partial.rb new file mode 100644 index 0000000..b6ebfe8 --- /dev/null +++ b/plugins/render_partial.rb @@ -0,0 +1,69 @@ +# Title: Render Partial Tag for Jekyll +# Author: Brandon Mathis http://brandonmathis.com +# Description: Import files on your filesystem into any blog post and render them inline. +# Note: Paths are relative to the source directory, if you import a file with yaml front matter, the yaml will be stripped out. +# +# Syntax {% render_partial path/to/file %} +# +# Example 1: +# {% render_partial about/_bio.markdown %} +# +# This will import source/about/_bio.markdown and render it inline. +# In this example I used an underscore at the beginning of the filename to prevent Jekyll +# from generating an about/bio.html (Jekyll doesn't convert files beginning with underscores) +# +# Example 2: +# {% render_partial ../README.markdown %} +# +# You can use relative pathnames, to include files outside of the source directory. +# This might be useful if you want to have a page for a project's README without having +# to duplicated the contents +# +# + +require 'pathname' +require './plugins/octopress_filters' + +module Jekyll + + class RenderPartialTag < Liquid::Tag + include OctopressFilters + def initialize(tag_name, markup, tokens) + @file = nil + @raw = false + if markup =~ /^(\S+)\s?(\w+)?/ + @file = $1.strip + @raw = $2 == 'raw' + end + super + end + + def render(context) + file_dir = (context.registers[:site].source || 'source') + file_path = Pathname.new(file_dir).expand_path + file = file_path + @file + + unless file.file? + return "File #{file} could not be found" + end + + Dir.chdir(file_path) do + contents = file.read + if contents =~ /\A-{3}.+[^\A]-{3}\n(.+)/m + contents = $1.lstrip + end + contents = pre_filter(contents) + if @raw + contents + else + partial = Liquid::Template.parse(contents) + context.stack do + partial.render(context) + end + end + end + end + end +end + +Liquid::Template.register_tag('render_partial', Jekyll::RenderPartialTag) diff --git a/plugins/sitemap_generator.rb b/plugins/sitemap_generator.rb new file mode 100644 index 0000000..b63e942 --- /dev/null +++ b/plugins/sitemap_generator.rb @@ -0,0 +1,312 @@ +# Sitemap.xml Generator is a Jekyll plugin that generates a sitemap.xml file by +# traversing all of the available posts and pages. +# +# How To Use: +# 1) Copy source file into your _plugins folder within your Jekyll project. +# 2) Change modify the url variable in _config.yml to reflect your domain name. +# 3) Run Jekyll: jekyll --server to re-generate your site. +# +# Variables: +# * Change SITEMAP_FILE_NAME if you want your sitemap to be called something +# other than sitemap.xml. +# * Change the PAGES_INCLUDE_POSTS list to include any pages that are looping +# through your posts (e.g. "index.html", "archive.html", etc.). This will +# ensure that right after you make a new post, the last modified date will +# be updated to reflect the new post. +# * A sitemap.xml should be included in your _site folder. +# * If there are any files you don't want included in the sitemap, add them +# to the EXCLUDED_FILES list. The name should match the name of the source +# file. +# * If you want to include the optional changefreq and priority attributes, +# simply include custom variables in the YAML Front Matter of that file. +# The names of these custom variables are defined below in the +# CHANGE_FREQUENCY_CUSTOM_VARIABLE_NAME and PRIORITY_CUSTOM_VARIABLE_NAME +# constants. +# +# Notes: +# * The last modified date is determined by the latest from the following: +# system modified date of the page or post, system modified date of +# included layout, system modified date of included layout within that +# layout, ... +# +# Author: Michael Levin +# Site: http://www.kinnetica.com +# Distributed Under A Creative Commons License +# - http://creativecommons.org/licenses/by/3.0/ +# +# Modified for Octopress by John W. Long +# +require 'rexml/document' +require 'fileutils' + +module Jekyll + + # Change SITEMAP_FILE_NAME if you would like your sitemap file + # to be called something else + SITEMAP_FILE_NAME = "sitemap.xml" + + # Any files to exclude from being included in the sitemap.xml + EXCLUDED_FILES = ["atom.xml"] + + # Any files that include posts, so that when a new post is added, the last + # modified date of these pages should take that into account + PAGES_INCLUDE_POSTS = ["index.html"] + + # Custom variable names for changefreq and priority elements + # These names are used within the YAML Front Matter of pages or posts + # for which you want to include these properties + CHANGE_FREQUENCY_CUSTOM_VARIABLE_NAME = "change_frequency" + PRIORITY_CUSTOM_VARIABLE_NAME = "priority" + + class Post + attr_accessor :name + + def full_path_to_source + File.join(@base, @name) + end + + def location_on_server + "#{site.config['url']}#{url}" + end + end + + class Page + attr_accessor :name + + def full_path_to_source + File.join(@base, @dir, @name) + end + + def location_on_server + location = "#{site.config['url']}#{@dir}#{url}" + location.gsub(/index.html$/, "") + end + end + + class Layout + def full_path_to_source + File.join(@base, @name) + end + end + + # Recover from strange exception when starting server without --auto + class SitemapFile < StaticFile + def write(dest) + begin + super(dest) + rescue + end + + true + end + end + + class SitemapGenerator < Generator + + # Valid values allowed by sitemap.xml spec for change frequencies + VALID_CHANGE_FREQUENCY_VALUES = ["always", "hourly", "daily", "weekly", + "monthly", "yearly", "never"] + + # Goes through pages and posts and generates sitemap.xml file + # + # Returns nothing + def generate(site) + sitemap = REXML::Document.new << REXML::XMLDecl.new("1.0", "UTF-8") + + urlset = REXML::Element.new "urlset" + urlset.add_attribute("xmlns", + "http://www.sitemaps.org/schemas/sitemap/0.9") + + @last_modified_post_date = fill_posts(site, urlset) + fill_pages(site, urlset) + + sitemap.add_element(urlset) + + # File I/O: create sitemap.xml file and write out pretty-printed XML + unless File.exists?(site.dest) + FileUtils.mkdir_p(site.dest) + end + file = File.new(File.join(site.dest, SITEMAP_FILE_NAME), "w") + formatter = REXML::Formatters::Pretty.new(4) + formatter.compact = true + formatter.write(sitemap, file) + file.close + + # Keep the sitemap.xml file from being cleaned by Jekyll + site.static_files << Jekyll::SitemapFile.new(site, site.dest, "/", SITEMAP_FILE_NAME) + end + + # Create url elements for all the posts and find the date of the latest one + # + # Returns last_modified_date of latest post + def fill_posts(site, urlset) + last_modified_date = nil + site.posts.each do |post| + if !excluded?(post.name) + url = fill_url(http://github.com/site,%20post) + urlset.add_element(url) + end + + path = post.full_path_to_source + date = File.mtime(path) + last_modified_date = date if last_modified_date == nil or date > last_modified_date + end + + last_modified_date + end + + # Create url elements for all the normal pages and find the date of the + # index to use with the pagination pages + # + # Returns last_modified_date of index page + def fill_pages(site, urlset) + site.pages.each do |page| + if !excluded?(page.name) + path = page.full_path_to_source + if File.exists?(path) + url = fill_url(http://github.com/site,%20page) + urlset.add_element(url) + end + end + end + end + + # Fill data of each URL element: location, last modified, + # change frequency (optional), and priority. + # + # Returns url REXML::Element + def fill_url(http://github.com/site,%20page_or_post) + url = REXML::Element.new "url" + + loc = fill_location(page_or_post) + url.add_element(loc) + + lastmod = fill_last_modified(site, page_or_post) + url.add_element(lastmod) if lastmod + + if (page_or_post.data[CHANGE_FREQUENCY_CUSTOM_VARIABLE_NAME]) + change_frequency = + page_or_post.data[CHANGE_FREQUENCY_CUSTOM_VARIABLE_NAME].downcase + + if (valid_change_frequency?(change_frequency)) + changefreq = REXML::Element.new "changefreq" + changefreq.text = change_frequency + url.add_element(changefreq) + else + puts "ERROR: Invalid Change Frequency In #{page_or_post.name}" + end + end + + if (page_or_post.data[PRIORITY_CUSTOM_VARIABLE_NAME]) + priority_value = page_or_post.data[PRIORITY_CUSTOM_VARIABLE_NAME] + if valid_priority?(priority_value) + priority = REXML::Element.new "priority" + priority.text = page_or_post.data[PRIORITY_CUSTOM_VARIABLE_NAME] + url.add_element(priority) + else + puts "ERROR: Invalid Priority In #{page_or_post.name}" + end + end + + url + end + + # Get URL location of page or post + # + # Returns the location of the page or post + def fill_location(page_or_post) + loc = REXML::Element.new "loc" + loc.text = page_or_post.location_on_server + + loc + end + + # Fill lastmod XML element with the last modified date for the page or post. + # + # Returns lastmod REXML::Element or nil + def fill_last_modified(site, page_or_post) + path = page_or_post.full_path_to_source + + lastmod = REXML::Element.new "lastmod" + date = File.mtime(path) + latest_date = find_latest_date(date, site, page_or_post) + + if @last_modified_post_date == nil + # This is a post + lastmod.text = latest_date.iso8601 + else + # This is a page + if posts_included?(page_or_post.name) + # We want to take into account the last post date + final_date = greater_date(latest_date, @last_modified_post_date) + lastmod.text = final_date.iso8601 + else + lastmod.text = latest_date.iso8601 + end + end + lastmod + end + + # Go through the page/post and any implemented layouts and get the latest + # modified date + # + # Returns formatted output of latest date of page/post and any used layouts + def find_latest_date(latest_date, site, page_or_post) + layouts = site.layouts + layout = layouts[page_or_post.data["layout"]] + while layout + path = layout.full_path_to_source + date = File.mtime(path) + + latest_date = date if (date > latest_date) + + layout = layouts[layout.data["layout"]] + end + + latest_date + end + + # Which of the two dates is later + # + # Returns latest of two dates + def greater_date(date1, date2) + if (date1 >= date2) + date1 + else + date2 + end + end + + # Is the page or post listed as something we want to exclude? + # + # Returns boolean + def excluded?(name) + EXCLUDED_FILES.include? name + end + + def posts_included?(name) + PAGES_INCLUDE_POSTS.include? name + end + + # Is the change frequency value provided valid according to the spec + # + # Returns boolean + def valid_change_frequency?(change_frequency) + VALID_CHANGE_FREQUENCY_VALUES.include? change_frequency + end + + # Is the priority value provided valid according to the spec + # + # Returns boolean + def valid_priority?(priority) + begin + priority_val = Float(priority) + return true if priority_val >= 0.0 and priority_val <= 1.0 + rescue ArgumentError + end + + false + end + end +end + diff --git a/plugins/titlecase.rb b/plugins/titlecase.rb new file mode 100644 index 0000000..3ad39b1 --- /dev/null +++ b/plugins/titlecase.rb @@ -0,0 +1,36 @@ +class String + def titlecase + small_words = %w(a an and as at but by en for if in of on or the to v v. via vs vs.) + + x = split(" ").map do |word| + # note: word could contain non-word characters! + # downcase all small_words, capitalize the rest + small_words.include?(word.gsub(/\W/, "").downcase) ? word.downcase! : word.smart_capitalize! + word + end + # capitalize first and last words + x.first.to_s.smart_capitalize! + x.last.to_s.smart_capitalize! + # small words after colons or periods are capitalized + x.join(" ").gsub(/(:|\.)\s?(\W*#{small_words.join("|")}\W*)\s/) { "#{$1} #{$2.smart_capitalize} " } + end + + def titlecase! + replace(titlecase) + end + + def smart_capitalize + # ignore any leading crazy characters and capitalize the first real character + if self =~ /^['"\(\[']*([a-z])/ + i = index($1) + x = self[i,self.length] + # word with capitals and periods mid-word are left alone + self[i,1] = self[i,1].upcase unless x =~ /[A-Z]/ or x =~ /\.\w+/ + end + self + end + + def smart_capitalize! + replace(smart_capitalize) + end +end diff --git a/plugins/video_tag.rb b/plugins/video_tag.rb new file mode 100644 index 0000000..6b93be8 --- /dev/null +++ b/plugins/video_tag.rb @@ -0,0 +1,47 @@ +# Title: Simple Video tag for Jekyll +# Author: Brandon Mathis http://brandonmathis.com +# Description: Easily output MPEG4 HTML5 video with a flash backup. +# +# Syntax {% video url/to/video [width height] [url/to/poster] %} +# +# Example: +# {% video http://site.com/video.mp4 720 480 http://site.com/poster-frame.jpg %} +# +# Output: +# <video width='720' height='480' preload='none' controls poster='http://site.com/poster-frame.jpg'> +# <source src='http://site.com/video.mp4' type='video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"'/> +# </video> +# + +module Jekyll + + class VideoTag < Liquid::Tag + @video = nil + @poster = '' + @height = '' + @width = '' + + def initialize(tag_name, markup, tokens) + if markup =~ /((https?:\/\/|\/)(\S+))(\s+(\d+)\s(\d+))?(\s+(https?:\/\/|\/)(\S+))?/i + @video = $1 + @width = $5 + @height = $6 + @poster = $7 + end + super + end + + def render(context) + output = super + if @video + video = "<video width='#{@width}' height='#{@height}' preload='none' controls poster='#{@poster}'>" + video += "<source src='#{@video}' type='video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"'/></video>" + else + "Error processing input, expected syntax: {% video url/to/video [width height] [url/to/poster] %}" + end + end + end +end + +Liquid::Template.register_tag('video', Jekyll::VideoTag) + diff --git a/sass/_base.scss b/sass/_base.scss new file mode 100644 index 0000000..05fdd00 --- /dev/null +++ b/sass/_base.scss @@ -0,0 +1,5 @@ +@import "http://github.com/base/utilities"; +@import "http://github.com/base/solarized"; +@import "http://github.com/base/theme"; +@import "http://github.com/base/typography"; +@import "http://github.com/base/layout"; diff --git a/sass/_partials.scss b/sass/_partials.scss new file mode 100644 index 0000000..99c28b6 --- /dev/null +++ b/sass/_partials.scss @@ -0,0 +1,8 @@ +@import "http://github.com/partials/header"; +@import "http://github.com/partials/navigation"; +@import "http://github.com/partials/blog"; +@import "http://github.com/partials/sharing"; +@import "http://github.com/partials/syntax"; +@import "http://github.com/partials/archive"; +@import "http://github.com/partials/sidebar"; +@import "http://github.com/partials/footer"; diff --git a/sass/base/_layout.scss b/sass/base/_layout.scss new file mode 100644 index 0000000..f9f3a41 --- /dev/null +++ b/sass/base/_layout.scss @@ -0,0 +1,188 @@ +$max-width: 1200px !default; + +// Padding used for layout margins +$pad-min: 18px !default; +$pad-narrow: 25px !default; +$pad-medium: 35px !default; +$pad-wide: 55px !default; + +// Sidebar widths used in media queries +$sidebar-width-medium: 240px !default; +$sidebar-pad-medium: 15px !default; +$sidebar-pad-wide: 20px !default; +$sidebar-width-wide: 300px !default; + +$indented-lists: false !default; + +$header-font-size: 1em !default; +$header-padding-top: 1.5em !default; +$header-padding-bottom: 1.5em !default; + +.group { @include pie-clearfix; } + +@mixin collapse-sidebar { + float: none; + width: auto; + clear: left; + margin: 0; + padding: 0 $pad-medium 1px; + background-color: lighten($sidebar-bg, 2); + border-top: 1px solid lighten($sidebar-border, 4); + section { + &.odd, &.even { float: left; width: 48%; } + &.odd { margin-left: 0; } + &.even { margin-left: 4%; } + } + &.thirds section { + width: 30%; + margin-left: 5%; + &.first { + margin-left: 0; + clear: both; + } + } +} + +body { + -webkit-text-size-adjust: none; + max-width: $max-width; + position: relative; + margin: 0 auto; + > header, > nav, > footer, #content > article, #content > div > article, #content > div > section { + @extend .group; + padding-left: $pad-min; + padding-right: $pad-min; + @media only screen and (min-width: 480px) { + padding-left: $pad-narrow; + padding-right: $pad-narrow; + } + @media only screen and (min-width: 768px) { + padding-left: $pad-medium; + padding-right: $pad-medium; + } + @media only screen and (min-width: 992px) { + padding-left: $pad-wide; + padding-right: $pad-wide; + } + } + div.pagination { + @extend .group; + margin-left: $pad-min; + margin-right: $pad-min; + @media only screen and (min-width: 480px) { + margin-left: $pad-narrow; + margin-right: $pad-narrow; + } + @media only screen and (min-width: 768px) { + margin-left: $pad-medium; + margin-right: $pad-medium; + } + @media only screen and (min-width: 992px) { + margin-left: $pad-wide; + margin-right: $pad-wide; + } + } + > header { + font-size: $header-font-size; + padding-top: $header-padding-top; + padding-bottom: $header-padding-bottom; + } +} + +#content { > div, > article { width: 100%; }} + +aside.sidebar { + float: none; + padding: 0 $pad-min 1px; + background-color: lighten($sidebar-bg, 2); + border-top: 1px solid $sidebar-border; + @extend .group; +} + +.flex-content { max-width: 100%; height: auto; } + +.basic-alignment { + &.left { float: left; margin-right: 1.5em; } + &.right { float: right; margin-left: 1.5em; } + &.center { display:block; margin: 0 auto 1.5em; } + &.left, &.right { margin-bottom: .8em; } +} + +.toggle-sidebar { &, .no-sidebar & { display: none; }} + +body.sidebar-footer { + @media only screen and (min-width: 750px) { + aside.sidebar{ @include collapse-sidebar; } + } + #content { margin-right: 0px; } + .toggle-sidebar { display: none; } +} + +@media only screen and (min-width: 550px) { + body > header { font-size: $header-font-size; } +} +@media only screen and (min-width: 750px) { + aside.sidebar { @include collapse-sidebar; } +} +@media only screen and (min-width: 768px) { + body { -webkit-text-size-adjust: auto; } + body > header { font-size: $header-font-size * 1.2; } + #main { + @extend .group; + padding: 0; + margin: 0 auto; + } + #content { + @extend .group; + margin-right: $sidebar-width-medium; + position: relative; + .no-sidebar & { margin-right: 0; border-right: 0; } + .collapse-sidebar & { margin-right: 20px; } + > div, > article { + padding-top: $pad-medium/2; + padding-bottom: $pad-medium/2; + float: left; + } + } + aside.sidebar { + @extend .group; + width: $sidebar-width-medium - $sidebar-pad-medium*2; + padding: 0 $sidebar-pad-medium $sidebar-pad-medium; + background: none; + clear: none; + float: left; + margin: 0 -100% 0 0; + section { + width: auto; margin-left: 0; + &.odd, &.even { float: none; width: auto; margin-left: 0; } + } + .collapse-sidebar & { + @include collapse-sidebar; + } + } +} + +@media only screen and (min-width: 992px) { + body > header { font-size: $header-font-size * 1.3; } + #content { margin-right: $sidebar-width-wide; } + #content { + > div, > article { + padding-top: $pad-wide/2; + padding-bottom: $pad-wide/2; + } + } + aside.sidebar { + width: $sidebar-width-wide - $sidebar-pad-wide*2; + padding: 1.2em $sidebar-pad-wide $sidebar-pad-wide; + .collapse-sidebar & { + padding: { left: $pad-wide; right: $pad-wide; } + @extend .group; + } + } +} + +@if $indented-lists == false { + @media only screen and (min-width: 768px) { + ul, ol { margin-left: 0; } + } +} diff --git a/sass/base/_solarized.scss b/sass/base/_solarized.scss new file mode 100644 index 0000000..45d8fc5 --- /dev/null +++ b/sass/base/_solarized.scss @@ -0,0 +1,46 @@ +$base03: #002b36 !default; //darkest blue +$base02: #073642 !default; //dark blue +$base01: #586e75 !default; //darkest gray +$base00: #657b83 !default; //dark gray +$base0: #839496 !default; //medium gray +$base1: #93a1a1 !default; //medium light gray +$base2: #eee8d5 !default; //cream +$base3: #fdf6e3 !default; //white +$solar-yellow: #b58900 !default; +$solar-orange: #cb4b16 !default; +$solar-red: #dc322f !default; +$solar-magenta: #d33682 !default; +$solar-violet: #6c71c4 !default; +$solar-blue: #268bd2 !default; +$solar-cyan: #2aa198 !default; +$solar-green: #859900 !default; + +$solarized: dark !default; + +@if $solarized == light { + + $_base03: $base03; + $_base02: $base02; + $_base01: $base01; + $_base00: $base00; + $_base0: $base0; + $_base1: $base1; + $_base2: $base2; + $_base3: $base3; + + $base03: $_base3; + $base02: $_base2; + $base01: $_base1; + $base00: $_base0; + $base0: $_base00; + $base1: $_base01; + $base2: $_base02; + $base3: $_base03; +} + +/* non highlighted code colors */ +$pre-bg: $base03 !default; +$pre-border: darken($base02, 5) !default; +$pre-color: $base1 !default; + + diff --git a/sass/base/_theme.scss b/sass/base/_theme.scss new file mode 100644 index 0000000..f9c9530 --- /dev/null +++ b/sass/base/_theme.scss @@ -0,0 +1,86 @@ +$noise-bg: image-url('http://github.com/noise.png') top left; +$img-border: inline-image('dotted-border.png'); + +// Main Link Colors +$link-color: lighten(#165b94, 3) !default; +$link-color-hover: adjust-color($link-color, $lightness: 10, $saturation: 25) !default; +$link-color-visited: adjust-color($link-color, $hue: 80, $lightness: -4) !default; +$link-color-active: adjust-color($link-color-hover, $lightness: -15) !default; + +// Main Section Colors +$main-bg: #f8f8f8 !default; +$page-bg: #252525 !default; +$article-border: #eeeeee !default; + +$header-bg: #333 !default; +$header-border: lighten($header-bg, 15) !default; +$title-color: #f2f2f2 !default; +$subtitle-color: #aaa !default; + +$text-color: #222 !default; +$text-color-light: #aaa !default; +$type-border: #ddd !default; + +/* Navigation */ +$nav-bg: #ccc !default; +$nav-bg-front: image-url('http://github.com/noise.png'); +$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)); +$nav-color: darken($nav-bg, 38) !default; +$nav-color-hover: darken($nav-color, 25) !default; +$nav-placeholder: desaturate(darken($nav-bg, 10), 15) !default; +$nav-border: darken($nav-bg, 10) !default; +$nav-border-top: lighten($nav-bg, 15) !default; +$nav-border-bottom: darken($nav-bg, 25) !default; +$nav-border-left: darken($nav-bg, 11) !default; +$nav-border-right: lighten($nav-bg, 7) !default; + +/* Sidebar colors */ +$sidebar-bg: #f2f2f2 !default; +$sidebar-link-color: $link-color !default; +$sidebar-link-color-hover: $link-color-hover !default; +$sidebar-link-color-active: $link-color-active !default; +$sidebar-color: change-color(mix($text-color, $sidebar-bg, 80), $hue: hue($sidebar-bg), $saturation: saturation($sidebar-bg)/2) !default; +$sidebar-border: desaturate(darken($sidebar-bg, 7), 10) !default; +$sidebar-border: darken($sidebar-bg, 7) !default; +$sidebar-link-color-subdued: lighten($sidebar-color, 20) !default; +$sidebar-link-color-subdued-hover: $sidebar-link-color-hover !default; +$twitter-status-link: lighten($sidebar-link-color-subdued, 15) !default; + +$footer-color: #888 !default; +$footer-bg: #ccc !default; +$footer-bg-front: image-url('http://github.com/noise.png'); +$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)); +$footer-color: darken($footer-bg, 38) !default; +$footer-color-hover: darken($footer-color, 10) !default; +$footer-border-top: lighten($footer-bg, 15) !default; +$footer-border-bottom: darken($footer-bg, 15) !default; +$footer-link-color: darken($footer-bg, 38) !default; +$footer-link-color-hover: darken($footer-color, 25) !default; +$page-border-bottom: darken($footer-bg, 5) !default; + + +/* Core theme application */ + +a { + @include link-colors($link-color, $hover: $link-color-hover, $focus: $link-color-hover, $visited: $link-color-visited, $active: $link-color-active); +} +aside.sidebar a { + @include link-colors($sidebar-link-color, $hover: $sidebar-link-color-hover, $focus: $sidebar-link-color-hover, $active: $sidebar-link-color-active); +} +a { + @include transition(color .3s); +} + +html { + background: $page-bg image-url('http://github.com/line-tile.png') top left; +} +body { + > div { + background: $sidebar-bg $noise-bg; + border-bottom: 1px solid $page-border-bottom; + > div { + background: $main-bg $noise-bg; + border-right: 1px solid $sidebar-border; + } + } +} diff --git a/sass/base/_typography.scss b/sass/base/_typography.scss new file mode 100644 index 0000000..d6cf852 --- /dev/null +++ b/sass/base/_typography.scss @@ -0,0 +1,157 @@ +$blockquote: $type-border !default; +$sans: "PT Sans", "Helvetica Neue", Arial, sans-serif !default; +$serif: "PT Serif", Georgia, Times, "Times New Roman", serif !default; +$mono: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace !default; +$heading-font-family: "PT Serif", "Georgia", "Helvetica Neue", Arial, sans-serif !default; +$header-title-font-family: $heading-font-family !default; + +// Fonts +.heading { + font-family: $heading-font-family; +} +.sans { font-family: $sans; } +.serif { font-family: $serif; } +.mono { font-family: $mono; } + +body > header h1 { + font-size: 2.2em; + @extend .heading; + font-family: $header-title-font-family; + font-weight: normal; + line-height: 1.2em; + margin-bottom: 0.6667em; +} + +body { + line-height: 1.5em; + color: $text-color; + @extend .serif; +} +h1 { + font-size: 2.2em; + line-height: 1.2em; +} + +@media only screen and (min-width: 992px) { + body { font-size: 1.15em; } + h1 { font-size: 2.6em; line-height: 1.2em; } +} + +#{headings()}{ + @extend .heading; + text-rendering: optimizelegibility; + margin-bottom: 1em; + font-weight: bold; +} +h2, section h1 { + font-size: 1.5em; +} +h3, section h2, section section h1 { + font-size: 1.3em; +} +h4, section h3, section section h2, section section section h1 { + font-size: 1em; +} +h5, section h4, section section h3 { + font-size: .9em; +} +h6, section h5, section section h4, section section section h3 { + font-size: .8em; +} +p, blockquote, ul, ol { margin-bottom: 1.5em; } + +ul { list-style-type: disc; + ul { list-style-type: circle; margin-bottom: 0px; + ul { list-style-type: square; margin-bottom: 0px; }}} + +ol { list-style-type: decimal; + ol { list-style-type: lower-alpha; margin-bottom: 0px; + ol { list-style-type: lower-roman; margin-bottom: 0px; }}} + +ul, ol { &, ul, ol { margin-left: 1.3em; }} + +strong { font-weight: bold; } + +em { font-style: italic; } + +sup, sub { font-size: 0.8em; position: relative; display: inline-block; } +sup { top: -.5em; } +sub { bottom: -.5em; } + +q { font-style: italic; + &:before { content: "\201C"; } + &:after { content: "\201D"; } +} + +em, dfn { font-style: italic; } + +strong, dfn { font-weight: bold; } + +del, s { text-decoration: line-through; } + +abbr, acronym { border-bottom: 1px dotted; cursor: help; } + +pre, code, tt { @extend .mono; } + +sub, sup { line-height: 0; } + +hr { margin-bottom: 0.2em; } + +small { font-size: .8em; } + +big { font-size: 1.2em; } + +blockquote { + $bq-margin: 1.2em; + font-style: italic; + position: relative; + font-size: 1.2em; + line-height: 1.5em; + padding-left: 1em; + border-left: 4px solid rgba($text-color-light, .5); + cite { + font-style: italic; + a { color: $text-color-light !important; word-wrap: break-word; } + &:before { content: '\2014'; padding:{right: .3em; left: .3em;} color: $text-color-light; } + } + @media only screen and (min-width: 992px) { + padding-left: 1.5em; + border-left-width: 4px; + } +} + +.pullquote-right:before, +.pullquote-left:before { + /* Reset metrics. */ + padding: 0; + border: none; + + /* Content */ + content: attr(data-pullquote); + + /* Pull out to the right, modular scale based margins. */ + float: right; + width: 45%; + margin: .5em 0 1em 1.5em; + + /* Baseline correction */ + position: relative; + top: 7px; + font-size: 1.4em; + line-height: 1.45em; +} + +.pullquote-left:before { + /* Make left pullquotes align properly. */ + float: left; + margin: .5em 1.5em 1em 0; +} + +/* @extend this to force long lines of continuous text to wrap */ +.force-wrap { + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + white-space: pre-wrap; + word-wrap: break-word; +} diff --git a/sass/base/_utilities.scss b/sass/base/_utilities.scss new file mode 100644 index 0000000..2d49e65 --- /dev/null +++ b/sass/base/_utilities.scss @@ -0,0 +1,28 @@ +@mixin mask-image($img, $repeat: no-repeat){ + @include experimental(mask-image, image-url(http://github.com/$img), -webkit, -moz, -o, -ms); + @include experimental(mask-repeat, $repeat, -webkit, -moz, -o, -ms); + width: image-width($img); + height: image-height($img); +} + +@mixin shadow-box($border: #fff .5em solid, $shadow: rgba(#000, .15) 0 1px 4px, $border-radius: .3em) { + @include border-radius($border-radius); + @include box-shadow($shadow); + @include box-sizing(border-box); + border: $border; +} + +@mixin selection($bg, $color: inherit, $text-shadow: none){ + * { + &::-moz-selection { background: $bg; color: $color; text-shadow: $text-shadow; } + &::-webkit-selection { background: $bg; color: $color; text-shadow: $text-shadow; } + &::selection { background: $bg; color: $color; text-shadow: $text-shadow; } + } +} + +@function text-color($color, $dark: dark, $light: light){ + $text-color: ( (red($color)*299) + (green($color)*587) + (blue($color)*114) ) / 1000; + $text-color: if($text-color >= 150, $dark, $light); + @return $text-color; +} + diff --git a/sass/custom/_colors.scss b/sass/custom/_colors.scss new file mode 100644 index 0000000..740266a --- /dev/null +++ b/sass/custom/_colors.scss @@ -0,0 +1,43 @@ +// Here you can easily change your sites's color scheme. +// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works. +// If you need a handy color picker try http://hslpicker.com + +//$header-bg: #263347; +//$subtitle-color: lighten($header-bg, 58); +//$nav-bg: desaturate(lighten(#8fc17a, 18), 5); +//$nav-bg-front: image-url('http://github.com/noise.png'); +//$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)); +//$sidebar-bg: desaturate(#eceff5, 8); +//$sidebar-link-color: saturate(#526f9a, 10); +//$sidebar-link-color-hover: darken(#7ab662, 9); +//$footer-bg: #ccc !default; +//$footer-bg-front: image-url('http://github.com/noise.png'); +//$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)); + + +/* To use the light Solarized highlighting theme uncomment the following line */ +//$solarized: light; + +/* If you want to tweak the Solarized colors you can do that here */ +//$base03: #002b36; //darkest blue +//$base02: #073642; //dark blue +//$base01: #586e75; //darkest gray +//$base00: #657b83; //dark gray +//$base0: #839496; //medium gray +//$base1: #93a1a1; //medium light gray +//$base2: #eee8d5; //cream +//$base3: #fdf6e3; //white +//$solar-yellow: #b58900; +//$solar-orange: #cb4b16; +//$solar-red: #dc322f; +//$solar-magenta: #d33682; +//$solar-violet: #6c71c4; +//$solar-blue: #268bd2; +//$solar-cyan: #2aa198; +//$solar-green: #859900; + + +/* Non highlighted code colors */ +//$pre-bg: $base03; +//$pre-border: darken($base02, 5); +//$pre-color: $base1; diff --git a/sass/custom/_fonts.scss b/sass/custom/_fonts.scss new file mode 100644 index 0000000..073c2be --- /dev/null +++ b/sass/custom/_fonts.scss @@ -0,0 +1,9 @@ +// Here you can easily change font faces which are used in your site. +// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works. your sites's. +// If you love to use Web Fonts, you also need to add some lines to source/_includes/custom/head.html + +//$sans: "Optima", sans-serif; +//$serif: "Baskerville", serif; +//$mono: "Courier", monospace; +//$heading-font-family: "Verdana", sans-serif; +//$header-title-font-family: "Futura", sans-serif; diff --git a/sass/custom/_layout.scss b/sass/custom/_layout.scss new file mode 100644 index 0000000..74c7de9 --- /dev/null +++ b/sass/custom/_layout.scss @@ -0,0 +1,21 @@ +// Here you can easily change your sites's layout. +// To give it a try, uncomment some of the lines below, make changes, rebuild your blog, and see how it works. + +//$header-font-size: 1em; +//$header-padding-top: 1.5em; +//$header-padding-bottom: 1.5em; + +//$max-width: 1350px; +//$indented-lists: true; + +// Padding used for layout margins +//$pad-min: 18px; +//$pad-narrow: 25px; +//$pad-medium: 35px; +//$pad-wide: 55px; + +// Sidebar widths used in media queries +//$sidebar-width-medium: 240px; +//$sidebar-pad-medium: 15px; +//$sidebar-pad-wide: 20px; +//$sidebar-width-wide: 300px; diff --git a/sass/custom/_styles.scss b/sass/custom/_styles.scss new file mode 100644 index 0000000..91ffccc --- /dev/null +++ b/sass/custom/_styles.scss @@ -0,0 +1,2 @@ +// This File is imported last, and will override other styles in the cascade +// Add styles here to make changes without digging in too much diff --git a/sass/partials/_archive.scss b/sass/partials/_archive.scss new file mode 100644 index 0000000..9ef1e82 --- /dev/null +++ b/sass/partials/_archive.scss @@ -0,0 +1,72 @@ +#archive { + #content > div { &, > article { padding-top: 0; } } +} +#blog-archives { + article { + padding: 1em 0 1em; + position: relative; + background: $img-border bottom left repeat-x; + &:last-child { + background: none; + } + footer { padding: 0; margin: 0;} + } + h1 { color: $text-color; margin-bottom: .3em; } + h2 { display: none; } + h1 { + font-size: 1.5em; + a { + @include hover-link; + color: inherit; + &:hover { color: $link-color-hover; } + font-weight: normal; + display: inline-block; + } + } + a.category, time { + @extend .sans; + color: $text-color-light; + } + color: $text-color-light; + .entry-content { display: none; } + time { + font-size: .9em; + line-height: 1.2em; + .month, .day { display: inline-block; } + .month { text-transform: uppercase; } + } + p { margin-bottom: 1em; } + &, .entry-content { a { @include link-colors(inherit, $link-color-hover); }} + a:hover { color: $link-color-hover; } + @media only screen and (min-width: 550px) { + article { margin-left: 5em; } + h2 { + margin-bottom: .3em; + font-weight: normal; + display: inline-block; + position: relative; top: -1px; + float: left; + &:first-child { padding-top: .75em; } + } + time { + position: absolute; + text-align: right; + left: 0em; + top: 1.8em; + } + .year { display: none; } + article { + padding:{left: 4.5em; bottom: .7em;} + } + a.category { + line-height: 1.1em; + } + } +} +#content > .category { + article { + margin-left: 0; + padding-left: 6.8em; + } + .year { display: inline; } +} diff --git a/sass/partials/_blog.scss b/sass/partials/_blog.scss new file mode 100644 index 0000000..d3ba48a --- /dev/null +++ b/sass/partials/_blog.scss @@ -0,0 +1,142 @@ +article { + overflow: hidden; + padding-top: 1em; + a { @extend .force-wrap; } + header { + position: relative; + padding-top: 2em; + padding-bottom: 1em; + margin-bottom: 1em; + background: $img-border bottom left repeat-x; + h1 { + margin: 0; + a { text-decoration: none; + &:hover { text-decoration: underline; } } + } + p { + font-size: .9em; + color: $text-color-light; + margin: 0; + &.meta { + @extend .sans; + text-transform: uppercase; + position: absolute; top: 0; + } + } + @media only screen and (min-width: 768px) { + margin-bottom: 1.5em; + padding-bottom: 1em; + background: $img-border bottom left repeat-x; + } + } + h2 { + padding-top: 0.8em; + background: $img-border top left repeat-x; + } + .entry-content & h2:first-child, header + h2 { padding-top: 0; } + h2:first-child, header + h2 { background: none; } + .feature { + padding-top: .5em; + margin-bottom: 1em; + padding-bottom: 1em; + background: $img-border bottom left repeat-x; + font-size: 2.0em; font-style: italic; + line-height: 1.3em; + } + img, video, .flash-video { + @extend .flex-content; + @extend .basic-alignment; + @include shadow-box; + } + video, .flash-video { margin: 0 auto 1.5em; } + video { display: block; width: 100%; } + .flash-video { + > div { + position: relative; + display: block; + padding-bottom: 56.25%; + padding-top: 1px; + height: 0; + overflow: hidden; + iframe, object, embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + } + } + > footer { + padding-bottom: 2.5em; + margin-top: 2em; + @extend .sans; + p.meta { + margin-bottom: .8em; + font-size: .85em; + clear: both; + overflow: hidden; + } + .byline + time:before, time +time:before, .comments:before, .byline ~ .categories:before { + @extend .separator; + } + } + +} +article + article { + .blog-index & { + background: $img-border top left repeat-x; + } +} +#content .blog-index { + padding: { top: 0; bottom: 0; } + article { padding-top: 2em; } + article header { background: none; padding-bottom: 0; } + article h1 { + font-size: 2.2em; + a { color: inherit; &:hover { color: $link-color-hover; } } + } + a[rel=full-article] { + background: darken($main-bg, 5); + display: inline-block; + padding: .4em .8em; + margin-right: .5em; + text-decoration: none; + color: mix($text-color, $text-color-light); + @extend .serif; + @include transition(background-color .5s); + &:hover { + background: $link-color-hover; + text-shadow: none; + color: $main-bg; + } + } + footer { + @extend .sans; + margin-top: 1em; + } +} + +.separator { + content: "\2022 "; + padding: 0 .4em 0 .2em; + display: inline-block; +} + +#content div.pagination { + text-align: center; + font-size: .95em; + position: relative; + background: $img-border top left repeat-x; + padding: {top: 1.5em; bottom: 1.5em;} + a { + text-decoration: none; + color: $text-color-light; + &.prev { position: absolute; left: 0; } + &.next { position: absolute; right: 0; } + &:hover { color: $link-color-hover; } + &[href*=archive] { + &:before, &:after { content: '\2014'; padding: 0 .3em; } + } + } +} diff --git a/sass/partials/_footer.scss b/sass/partials/_footer.scss new file mode 100644 index 0000000..3741122 --- /dev/null +++ b/sass/partials/_footer.scss @@ -0,0 +1,19 @@ +body > footer { + @extend .sans; + font-size: .8em; + color: $footer-color; + text-shadow: lighten($footer-bg, 5) 0 1px; + background-color: $footer-bg; + @include background($footer-bg-front, $footer-bg-back); + border-top: 1px solid $footer-border-top; + position: relative; + padding-top: 1em; + padding-bottom: 1em; + margin-bottom: 3em; + @include border-bottom-radius(.4em); + z-index: 1; + a { + @include link-colors($footer-link-color, $footer-link-color-hover, $visited: $footer-link-color); + } + p:last-child { margin-bottom: 0; } +} diff --git a/sass/partials/_header.scss b/sass/partials/_header.scss new file mode 100644 index 0000000..e3c6c02 --- /dev/null +++ b/sass/partials/_header.scss @@ -0,0 +1,18 @@ +body > header { + background: $header-bg; + h1 { + display: inline-block; + margin: 0; + a, a:visited, a:hover { + color: $title_color; + text-decoration: none; + } + } + h2 { + margin: .2em 0 0; + @extend .sans; + font-size: 1em; + color: $subtitle-color; + font-weight: normal; + } +} diff --git a/sass/partials/_navigation.scss b/sass/partials/_navigation.scss new file mode 100644 index 0000000..68a15ce --- /dev/null +++ b/sass/partials/_navigation.scss @@ -0,0 +1,136 @@ +body > nav { + position: relative; + background-color: $nav-bg; + @include background($nav-bg-front, $nav-bg-back); + border: { + top: 1px solid $nav-border-top; + bottom: 1px solid $nav-border-bottom; } + padding-top: .35em; + padding-bottom: .35em; + form { + @include background-clip(padding-box); + margin: 0; padding: 0; + .search { + padding: .3em .5em 0; + font-size: .85em; + @extend .sans; + line-height: 1.1em; + width: 95%; + @include border-radius(.5em); + @include background-clip(padding-box); + @include box-shadow(lighten($nav-bg, 2) 0 1px); + background-color: lighten($nav-bg, 15); + border: 1px solid $nav-border; + color: #888; + &:focus { + color: #444; + border-color: #80b1df; + @include box-shadow(#80b1df 0 0 4px, #80b1df 0 0 3px inset); + background-color: #fff; + outline: none; + } + } + } + fieldset[role=search]{ float: right; width: 48%; } + fieldset.mobile-nav{ float: left; width: 48%; + select{ width: 100%; font-size: .8em; border: 1px solid #888;} + } + ul { display: none; } + @media only screen and (min-width: 550px) { + font-size: .9em; + ul { + @include horizontal-list(0); + float: left; + display: block; + padding-top: .15em; + } + ul.subscription { + margin-left: .8em; + float: right; + li:last-child a { padding-right: 0; } + } + ul li { + margin: 0; + } + a { + @include link-colors($nav-color, $nav-color-hover, $visited: $nav-color); + @extend .sans; + text-shadow: lighten($nav-bg, 12) 0 1px; + float: left; + text-decoration: none; + font-size: 1.1em; + padding: .1em 0; + line-height: 1.5em; + } + li + li { + border-left: 1px solid $nav-border-left; + margin-left: .8em; + a { + padding-left: .8em; + border-left: 1px solid $nav-border-right; + } + } + form { + float: right; + text-align: left; + padding-left: .8em; + width: $sidebar-width-medium - $pad-medium*2 - $sidebar-pad-medium + 20px; + .search { + width: 93%; + font-size: .95em; + line-height: 1.2em; + } + } + ul[data-subscription$=email] + form { + width: $sidebar-width-medium - $pad-medium*2 - $sidebar-pad-medium - 58px; + .search { width: 91%; } + } + fieldset.mobile-nav { display: none; } + fieldset[role=search]{ width: 99%; } + } + @media only screen and (min-width: 992px) { + form { + width: $sidebar-width-wide - $pad-wide - $sidebar-pad-wide*2 + 10px; + } + ul[data-subscription$=email] + form { + width: $sidebar-width-wide - $pad-wide - $sidebar-pad-wide*2 - 58px; + } + } +} +.no-placeholder { + body > nav .search { + background: lighten($nav-bg, 15) image-url('http://github.com/search.png') .3em .25em no-repeat; + text-indent: 1.3em; + } +} +@mixin mask-subscription-nav($feed: 'rss.png'){ + position: relative; top: 0px; + text-indent: -999999em; + background-color: $nav-border-right; + border: 0; + padding: 0; + &,&:after { @include mask-image($feed); } + &:after { + content: ""; + position: absolute; top: -1px; left: 0; + background-color: lighten($nav-color, 25); + } + &:hover:after { background-color: lighten($nav-color, 20); } +} +.maskImage { + body > nav { + @media only screen and (min-width: 550px) { + ul[data-subscription$=email] + form { + width: $sidebar-width-medium - $pad-medium*2 - $sidebar-pad-medium - 32px; + } + } + @media only screen and (min-width: 992px) { + ul[data-subscription$=email] + form { + width: $sidebar-width-wide - $pad-wide - $sidebar-pad-wide*2 - 32px; + } + } + } + ul.subscription { position: relative; top: .2em; li, a { border: 0; padding: 0; }} + a[rel=subscribe-rss]{ @include mask-subscription-nav('rss.png'); } + a[rel=subscribe-email]{ @include mask-subscription-nav('email.png'); } +} diff --git a/sass/partials/_sharing.scss b/sass/partials/_sharing.scss new file mode 100644 index 0000000..1fa9775 --- /dev/null +++ b/sass/partials/_sharing.scss @@ -0,0 +1,6 @@ +.sharing { + p.meta + & { + padding: { top: 1em; left: 0; } + background: $img-border top left repeat-x; + } +} diff --git a/sass/partials/_sidebar.scss b/sass/partials/_sidebar.scss new file mode 100644 index 0000000..eec540b --- /dev/null +++ b/sass/partials/_sidebar.scss @@ -0,0 +1,5 @@ +@import "http://github.com/sidebar/base"; +@import "http://github.com/sidebar/twitter"; +@import "http://github.com/sidebar/googleplus"; +@import "http://github.com/sidebar/pinboard"; +@import "http://github.com/sidebar/delicious"; diff --git a/sass/partials/_syntax.scss b/sass/partials/_syntax.scss new file mode 100644 index 0000000..77ac8d7 --- /dev/null +++ b/sass/partials/_syntax.scss @@ -0,0 +1,253 @@ +.highlight, html .gist .gist-file .gist-syntax .gist-highlight { + table td.code { width: 100%; } + .line-numbers { + text-align: right; + font-size: 13px; + line-height: 1.45em; + @if $solarized == light { + background: lighten($base03, 1) $noise-bg !important; + border-right: 1px solid darken($base02, 2) !important; + @include box-shadow(lighten($base03, 2) -1px 0 inset); + text-shadow: lighten($base02, 2) 0 -1px; + } @else { + background: $base02 $noise-bg !important; + border-right: 1px solid darken($base03, 2) !important; + @include box-shadow(lighten($base02, 2) -1px 0 inset); + text-shadow: darken($base02, 10) 0 -1px; + } + span { color: $base01 !important; } + padding: .8em !important; + @include border-radius(0); + } + border: 1px solid $pre-border !important; +} +figure.code, .gist-file, pre { + @include box-shadow(rgba(#000, .06) 0 0 10px); + .highlight pre { @include box-shadow(none); } +} + +html .gist .gist-file { + margin-bottom: 1.8em; + position: relative; + border: none; + padding-top: image-height("code_bg.png") !important; + .gist-syntax { + border-bottom: 0 !important; + background: none !important; + .gist-highlight{ + background: $base03 !important; + pre { + @extend .pre-code; + } + } + } + .gist-meta { + padding: .6em 0.8em; + border: 1px solid lighten($base02, 2) !important; + color: $base01; + font-size: .7em !important; + @if $solarized == light { + background: lighten($base03, 2) $noise-bg; + border: 1px solid $pre-border !important; + border-top: 1px solid lighten($base03, 2) !important; + } @else { + background: $base02 $noise-bg; + } + @extend .sans; + line-height: 1.5em; + a { + color: mix($base1, $base01) !important; + @include hover-link; + &:hover { color: $base1 !important; } + } + a[href*='#file'] { + position: absolute; top: 0; left:0; right:-10px; + color: #474747 !important; + @extend .code-title; + &:hover { color: $link-color !important; } + } + a[href*=raw]{ + @extend .download-source; + top: .4em; + } + } +} +pre { + background: $pre-bg $noise-bg; + @include border-radius(.4em); + @extend .mono; + border: 1px solid $pre-border; + line-height: 1.45em; + font-size: 13px; + margin-bottom: 2.1em; + padding: .8em 1em; + color: $pre-color; + overflow: auto; +} +h3.filename { + @extend .code-title; + + pre { @include border-top-radius(0px); } +} + +p, li { + code { + @extend .mono; + display: inline-block; + white-space: no-wrap; + background: #fff; + font-size: .8em; + line-height: 1.5em; + color: #555; + border: 1px solid #ddd; + @include border-radius(.4em); + padding: 0 .3em; + margin: -1px 0; + } + pre code { font-size: 1em !important; background: none; border: none; } +} + +.pre-code { + @include selection(adjust-color($base03, $lightness: 23%, $saturation: -65%), $text-shadow: $base03 0 1px); + font-family: $mono !important; + overflow: scroll; + overflow-y: hidden; + display: block; + padding: .8em !important; + overflow-x: auto; + line-height: 1.45em; + background: $base03 $noise-bg !important; + color: $base1 !important; + span { color: $base1 !important; } + span { font-style: normal !important; font-weight: normal !important; } + + .c { color: $base01 !important; font-style: italic !important; } /* Comment */ + .cm { color: $base01 !important; font-style: italic !important; } /* Comment.Multiline */ + .cp { color: $base01 !important; font-style: italic !important; } /* Comment.Preproc */ + .c1 { color: $base01 !important; font-style: italic !important; } /* Comment.Single */ + .cs { color: $base01 !important; font-weight: bold !important; font-style: italic !important; } /* Comment.Special */ + .err { color: $solar-red !important; background: none !important; } /* Error */ + .k { color: $solar-orange !important; } /* Keyword */ + .o { color: $base1 !important; font-weight: bold !important; } /* Operator */ + .p { color: $base1 !important; } /* Operator */ + .ow { color: $solar-cyan !important; font-weight: bold !important; } /* Operator.Word */ + .gd { color: $base1 !important; background-color: mix($solar-red, $base03, 25%) !important; display: inline-block; } /* Generic.Deleted */ + .gd .x { color: $base1 !important; background-color: mix($solar-red, $base03, 35%) !important; display: inline-block; } /* Generic.Deleted.Specific */ + .ge { color: $base1 !important; font-style: italic !important; } /* Generic.Emph */ + //.gr { color: #aa0000 } /* Generic.Error */ + .gh { color: $base01 !important; } /* Generic.Heading */ + .gi { color: $base1 !important; background-color: mix($solar-green, $base03, 20%) !important; display: inline-block; } /* Generic.Inserted */ + .gi .x { color: $base1 !important; background-color: mix($solar-green, $base03, 40%) !important; display: inline-block; } /* Generic.Inserted.Specific */ + //.go { color: #888888 } /* Generic.Output */ + //.gp { color: #555555 } /* Generic.Prompt */ + .gs { color: $base1 !important; font-weight: bold !important; } /* Generic.Strong */ + .gu { color: $solar-violet !important; } /* Generic.Subheading */ + //.gt { color: #aa0000 } /* Generic.Traceback */ + .kc { color: $solar-green !important; font-weight: bold !important; } /* Keyword.Constant */ + .kd { color: $solar-blue !important; } /* Keyword.Declaration */ + .kp { color: $solar-orange !important; font-weight: bold !important; } /* Keyword.Pseudo */ + .kr { color: $solar-magenta !important; font-weight: bold !important; } /* Keyword.Reserved */ + .kt { color: $solar-cyan !important; } /* Keyword.Type */ + .n { color: $solar-blue !important; } + .na { color: $solar-blue !important; } /* Name.Attribute */ + .nb { color: $solar-green !important; } /* Name.Builtin */ + .nc { color: $solar-magenta !important;} /* Name.Class */ + .no { color: $solar-yellow !important; } /* Name.Constant */ + //.ni { color: #800080 } /* Name.Entity */ + .nl { color: $solar-green !important; } + .ne { color: $solar-blue !important; font-weight: bold !important; } /* Name.Exception */ + .nf { color: $solar-blue !important; font-weight: bold !important; } /* Name.Function */ + .nn { color: $solar-yellow !important; } /* Name.Namespace */ + .nt { color: $solar-blue !important; font-weight: bold !important; } /* Name.Tag */ + .nx { color: $solar-yellow !Important; } + //.bp { color: #999999 } /* Name.Builtin.Pseudo */ + //.vc { color: #008080 } /* Name.Variable.Class */ + .vg { color: $solar-blue !important; } /* Name.Variable.Global */ + .vi { color: $solar-blue !important; } /* Name.Variable.Instance */ + .nv { color: $solar-blue !important; } /* Name.Variable */ + //.w { color: #bbbbbb } /* Text.Whitespace */ + .mf { color: $solar-cyan !important; } /* Literal.Number.Float */ + .m { color: $solar-cyan !important; } /* Literal.Number */ + .mh { color: $solar-cyan !important; } /* Literal.Number.Hex */ + .mi { color: $solar-cyan !important; } /* Literal.Number.Integer */ + //.mo { color: #009999 } /* Literal.Number.Oct */ + .s { color: $solar-cyan !important; } /* Literal.String */ + //.sb { color: #d14 } /* Literal.String.Backtick */ + //.sc { color: #d14 } /* Literal.String.Char */ + .sd { color: $solar-cyan !important; } /* Literal.String.Doc */ + .s2 { color: $solar-cyan !important; } /* Literal.String.Double */ + .se { color: $solar-red !important; } /* Literal.String.Escape */ + //.sh { color: #d14 } /* Literal.String.Heredoc */ + .si { color: $solar-blue !important; } /* Literal.String.Interpol */ + //.sx { color: #d14 } /* Literal.String.Other */ + .sr { color: $solar-cyan !important; } /* Literal.String.Regex */ + .s1 { color: $solar-cyan !important; } /* Literal.String.Single */ + //.ss { color: #990073 } /* Literal.String.Symbol */ + //.il { color: #009999 } /* Literal.Number.Integer.Long */ + div { .gd, .gd .x, .gi, .gi .x { display: inline-block; width: 100%; }} +} + +.highlight, .gist-highlight { + pre { background: none; @include border-radius(none); border: none; padding: 0; margin-bottom: 0; } + margin-bottom: 1.8em; + background: $base03; + overflow-y: hidden; + overflow-x: auto; +} + +$solar-scroll-bg: rgba(#fff, .15); +$solar-scroll-thumb: rgba(#fff, .2); +@if $solarized == light { + $solar-scroll-bg: rgba(#000, .15); + $solar-scroll-thumb: rgba(#000, .15); +} + +pre, .highlight, .gist-highlight { + &::-webkit-scrollbar { height: .5em; background: $solar-scroll-bg; } + &::-webkit-scrollbar-thumb:horizontal { background: $solar-scroll-thumb; -webkit-border-radius: 4px; border-radius: 4px } +} + +.highlight code { @extend .pre-code; background: #000;} +figure.code { + background: none; + padding: 0; + border: 0; + margin-bottom: 1.5em; + pre { margin-bottom: 0; } + figcaption { + position: relative; + @extend .code-title; + a { @extend .download-source; } + } + .highlight { + margin-bottom: 0; + } +} + +.code-title { + text-align: center; + font-size: 13px; + line-height: 2em; + text-shadow: #cbcccc 0 1px 0; + color: #474747; + font-weight: normal; + margin-bottom: 0; + @include border-top-radius(5px); + font-family: "Helvetica Neue", Arial, "Lucida Grande", "Lucida Sans Unicode", Lucida, sans-serif; + background: #aaaaaa image-url("http://github.com/code_bg.png") top repeat-x; + border: 1px solid #565656; + border-top-color: #cbcbcb; + border-left-color: #a5a5a5; + border-right-color: #a5a5a5; + border-bottom: 0; +} + +.download-source { + position: absolute; right: .8em; + @include hover-link; + color: #666 !important; + z-index: 1; + font-size: 13px; + text-shadow: #cbcccc 0 1px 0; + padding-left: 3em; +} + diff --git a/sass/partials/sidebar/_base.scss b/sass/partials/sidebar/_base.scss new file mode 100644 index 0000000..afda01c --- /dev/null +++ b/sass/partials/sidebar/_base.scss @@ -0,0 +1,105 @@ +.side-shadow-border { + @include box-shadow(lighten($sidebar-bg, 5) 0 1px); +} +aside.sidebar { + color: $sidebar-color; + text-shadow: lighten($sidebar-bg, 8) 0 1px; + a { @extend .force-wrap; } + section { + @extend .sans; + font-size: .8em; + line-height: 1.4em; + margin-bottom: 1.5em; + h1 { + margin: 1.5em 0 0; + padding-bottom: .2em; + border-bottom: 1px solid $sidebar-border; + @extend .side-shadow-border; + + p { + padding-top: .4em; + } + } + } + img { + @extend .flex-content; + @extend .basic-alignment; + @include shadow-box($border: #fff .3em solid); + } + ul { + margin-bottom: 0.5em; + margin-left: 0; + } + li { + list-style: none; + padding: .5em 0; + margin: 0; + border-bottom: 1px solid $sidebar-border; + @extend .side-shadow-border; + p:last-child { + margin-bottom: 0; + } + } + a { + color: inherit; + @include transition(color .5s); + } + &:hover a { + color: $sidebar-link-color; + &:hover { color: $sidebar-link-color-hover; } + } +} +.aside-alt-link { + color: $sidebar-link-color-subdued; + &:hover { + color: $sidebar-link-color-subdued-hover; + } +} + +@media only screen and (min-width: 768px) { + .toggle-sidebar { + outline: none; + position: absolute; right: -10px; top: 0; bottom: 0; + display: inline-block; + text-decoration: none; + color: mix($text-color-light, $sidebar-bg); + width: 9px; + cursor: pointer; + &:hover { + background: mix($sidebar-border, $sidebar-bg); + @include background(linear-gradient(left, rgba($sidebar-border, .5), rgba($sidebar-border, 0))); + } + &:after { + position: absolute; right: -11px; top: 0; + width: 20px; + font-size: 1.2em; + line-height: 1.1em; + padding-bottom: .15em; + @include border-bottom-right-radius(.3em); + text-align: center; + background: $main-bg $noise-bg; + border-bottom: 1px solid $sidebar-border; + border-right: 1px solid $sidebar-border; + content: "\00BB"; + text-indent: -1px; + } + .collapse-sidebar & { + text-indent: 0px; + right: -20px; + width: 19px; + &:hover { + background: mix($sidebar-border, $sidebar-bg); + } + &:after { + border-left: 1px solid $sidebar-border; + text-shadow: #fff 0 1px; + content: "\00AB"; + left: 0px; right: 0; + text-align: center; + text-indent: 0; + border: 0; + border-right-width: 0; + background: none; + } + } + } +} diff --git a/sass/partials/sidebar/_delicious.scss b/sass/partials/sidebar/_delicious.scss new file mode 100644 index 0000000..e962702 --- /dev/null +++ b/sass/partials/sidebar/_delicious.scss @@ -0,0 +1,4 @@ +.delicious-posts { + a.delicious-link { margin-bottom: .5em; display: block; } + p { font-size: 1em; } +} diff --git a/sass/partials/sidebar/_googleplus.scss b/sass/partials/sidebar/_googleplus.scss new file mode 100644 index 0000000..c2a693e --- /dev/null +++ b/sass/partials/sidebar/_googleplus.scss @@ -0,0 +1,26 @@ +.googleplus { + h1 { + -moz-box-shadow: none !important; + -webkit-box-shadow: none !important; + -o-box-shadow: none !important; + box-shadow: none !important; + border-bottom: 0px none !important; + } + a { + text-decoration: none; + white-space: normal !important; + line-height: 32px; + + img { + float: left; + margin-right: 0.5em; + border: 0 none; + } + } +} + +.googleplus-hidden { + position: absolute; + top: -1000em; + left: -1000em; +} diff --git a/sass/partials/sidebar/_pinboard.scss b/sass/partials/sidebar/_pinboard.scss new file mode 100644 index 0000000..9f9ab46 --- /dev/null +++ b/sass/partials/sidebar/_pinboard.scss @@ -0,0 +1,12 @@ +#pinboard_linkroll { + .pin-title, .pin-description { + display: block; + margin-bottom: .5em; + } + .pin-tag { + @include hover-link; + @extend .aside-alt-link; + &:after { content: ','; } + &:last-child:after { content: ''; } + } +} diff --git a/sass/partials/sidebar/_twitter.scss b/sass/partials/sidebar/_twitter.scss new file mode 100644 index 0000000..ccc9b53 --- /dev/null +++ b/sass/partials/sidebar/_twitter.scss @@ -0,0 +1,34 @@ +#tweets { + .loading { + background: inline-image('bird_32_gray.png') no-repeat center .5em; + color: darken($sidebar-bg, 18); + text-shadow: $main-bg 0 1px; + text-align: center; + padding: 2.5em 0 .5em; + &.error { + background: inline-image('bird_32_gray_fail.png') no-repeat center .5em; + } + } + p { + position: relative; + padding-right: 1em; + } + a[href*=status]{ + color: $twitter-status-link; + float: right; + padding: 0 0 .1em 1em; + position: relative; right: -1.3em; + text-shadow: #fff 0 1px; + font-size: .7em; + span { font-size: 1.5em; } + text-decoration: none; + &:hover { + color: $sidebar-link-color-subdued-hover; + text-decoration: none; + } + } + a[href*='twitter.com/search']{ + @extend .aside-alt-link; + @include hover-link; + } +} diff --git a/sass/screen.scss b/sass/screen.scss new file mode 100644 index 0000000..1899f60 --- /dev/null +++ b/sass/screen.scss @@ -0,0 +1,10 @@ +@import "http://github.com/compass"; +@include global-reset; +@include reset-html5; + +@import "http://github.com/custom/colors"; +@import "http://github.com/custom/fonts"; +@import "http://github.com/custom/layout"; +@import "http://github.com/base"; +@import "http://github.com/partials"; +@import "http://github.com/custom/styles"; diff --git a/sitemap.xml b/sitemap.xml deleted file mode 100644 index 13f69b0..0000000 --- a/sitemap.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'> - <url> - <loc>http://XMLSDK.github.com/blog/2011/12/06/hello-world/</loc> - <lastmod>2011-12-06T14:32:34+08:00</lastmod> - </url> - <url> - <loc>http://XMLSDK.github.com/about/</loc> - <lastmod>2011-12-06T14:40:41+08:00</lastmod> - </url> - <url> - <loc>http://XMLSDK.github.com/blog/archives/</loc> - <lastmod>2011-12-06T14:32:34+08:00</lastmod> - </url> - <url> - <loc>http://XMLSDK.github.com/</loc> - <lastmod>2011-12-06T14:32:34+08:00</lastmod> - </url> -</urlset> \ No newline at end of file diff --git a/source/_includes/after_footer.html b/source/_includes/after_footer.html new file mode 100644 index 0000000..08b8e34 --- /dev/null +++ b/source/_includes/after_footer.html @@ -0,0 +1,5 @@ +{% include disqus.html %} +{% include facebook_like.html %} +{% include google_plus_one.html %} +{% include twitter_sharing.html %} +{% include custom/after_footer.html %} diff --git a/source/_includes/archive_post.html b/source/_includes/archive_post.html new file mode 100644 index 0000000..fef3328 --- /dev/null +++ b/source/_includes/archive_post.html @@ -0,0 +1,8 @@ +{% capture category %}{{ post.categories | size }}{% endcapture %} +<h1><a href="http://github.com/%7B%7B%20root_url%20%7D%7D%7B%7B%20post.url%20%7D%7D">{{post.title}}</a></h1> +<time datetime="{{ post.date | datetime | date_to_xmlschema }}" pubdate>{{ post.date | date: "<span class='month'>%b</span> <span class='day'>%d</span> <span class='year'>%Y</span>"}}</time> +{% if category != '0' %} +<footer> + <span class="categories">posted in {{ post.categories | category_links }}</span> +</footer> +{% endif %} diff --git a/source/_includes/article.html b/source/_includes/article.html new file mode 100644 index 0000000..9db0745 --- /dev/null +++ b/source/_includes/article.html @@ -0,0 +1,28 @@ +{% unless page.no_header %} + <header> + {% if index %} + <h1 class="entry-title"><a href="http://github.com/%7B%7B%20root_url%20%7D%7D%7B%7B%20post.url%20%7D%7D">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a></h1> + {% else %} + <h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1> + {% endif %} + {% unless page.meta == false %} + <p class="meta"> + {% include post/date.html %}{{ time }} + {% if site.disqus_short_name and page.comments != false and site.disqus_show_comment_count == true %} + | <a href="http://github.com/%7B%%20if%20index%20%%7D%7B%7B%20root_url%20%7D%7D%7B%7B%20post.url%20%7D%7D%7B%%20endif%20%%7D#disqus_thread">Comments</a> + {% endif %} + </p> + {% endunless %} + </header> +{% endunless %} +{% if index %} + <div class="entry-content">{{ content | excerpt }}</div> + {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %} + {% if excerpted == 'true' %} + <footer> + <a rel="full-article" href="http://github.com/%7B%7B%20root_url%20%7D%7D%7B%7B%20post.url%20%7D%7D">{{ site.excerpt_link }}</a> + </footer> + {% endif %} +{% else %} +<div class="entry-content">{{ content }}</div> +{% endif %} diff --git a/source/_includes/asides/delicious.html b/source/_includes/asides/delicious.html new file mode 100644 index 0000000..115cdcb --- /dev/null +++ b/source/_includes/asides/delicious.html @@ -0,0 +1,8 @@ +{% if site.delicious_user %} +<section> + <h1>On Delicious</h1> + <div id="delicious"></div> + <script type="text/javascript" src="http://feeds.delicious.com/v2/json/%7B%7B%20site.delicious_user%20%7D%7D?count={{%20site.delicious_count%20}}&sort=date&callback=renderDeliciousLinks"></script> + <p><a href="http://delicious.com/%7B%7B%20site.delicious_user%20%7D%7D">My Delicious Bookmarks »</a></p> +</section> +{% endif %} \ No newline at end of file diff --git a/source/_includes/asides/github.html b/source/_includes/asides/github.html new file mode 100644 index 0000000..935ccff --- /dev/null +++ b/source/_includes/asides/github.html @@ -0,0 +1,30 @@ +{% if site.github_user %} +<section> + <h1>Github Repos</h1> + <ul id="gh_repos"> + <li class="loading">Status updating...</li> + </ul> + {% if site.github_show_profile_link %} + <a href="https://github.com/%7B%7Bsite.github_user%7D%7D">@{{site.github_user}}</a> on Github + {% endif %} + <script type="text/javascript"> + $.domReady(function(){ + if (!window.jXHR){ + var jxhr = document.createElement('script'); + jxhr.type = 'text/javascript'; + jxhr.src = '{{ root_url}}/javascripts/libs/jXHR.js'; + var s = document.getElementsByTagName('script')[0]; + s.parentNode.insertBefore(jxhr, s); + } + + github.showRepos({ + user: '{{site.github_user}}', + count: {{site.github_repo_count}}, + skip_forks: {{site.github_skip_forks}}, + target: '#gh_repos' + }); + }); + </script> + <script src="http://github.com/%7B%7B%20root_url%20%7D%7D/javascripts/github.js" type="text/javascript"> </script> +</section> +{% endif %} diff --git a/source/_includes/asides/googleplus.html b/source/_includes/asides/googleplus.html new file mode 100644 index 0000000..00a0aa8 --- /dev/null +++ b/source/_includes/asides/googleplus.html @@ -0,0 +1,11 @@ +{% if site.googleplus_user %} +<section class="googleplus{% if site.googleplus_hidden %} googleplus-hidden{% endif %}"> + <h1> + <a href="https://plus.google.com/%7B%7B%20site.googleplus_user%20%7D%7D?rel=author"> + <img src="http://www.google.com/images/icons/ui/gprofile_button-32.png" width="32" height="32"> + Google+ + </a> + </h1> +</section> +{% endif %} + diff --git a/source/_includes/asides/pinboard.html b/source/_includes/asides/pinboard.html new file mode 100644 index 0000000..c89c3e7 --- /dev/null +++ b/source/_includes/asides/pinboard.html @@ -0,0 +1,19 @@ +{% if site.pinboard_user %} +<section> + <h1>My Pinboard</h1> + <ul id="pinboard_linkroll">Fetching linkroll...</ul> + <p><a href="http://pinboard.in/u:%7B%7B%20site.pinboard_user%20%7D%7D">My Pinboard Bookmarks »</a></p> +</section> +<script type="text/javascript"> + var linkroll = 'pinboard_linkroll'; //id target for pinboard list + var pinboard_user = "{{ site.pinboard_user }}"; //id target for pinboard list + var pinboard_count = {{ site.pinboard_count }}; //id target for pinboard list + (function(){ + var pinboardInit = document.createElement('script'); + pinboardInit.type = 'text/javascript'; + pinboardInit.async = true; + pinboardInit.src = '{{ root_url }}/javascripts/pinboard.js'; + document.getElementsByTagName('head')[0].appendChild(pinboardInit); + })(); +</script> +{% endif %} diff --git a/source/_includes/asides/recent_posts.html b/source/_includes/asides/recent_posts.html new file mode 100644 index 0000000..cc62814 --- /dev/null +++ b/source/_includes/asides/recent_posts.html @@ -0,0 +1,10 @@ +<section> + <h1>Recent Posts</h1> + <ul id="recent_posts"> + {% for post in site.posts limit: site.recent_posts %} + <li class="post"> + <a href="http://github.com/%7B%7B%20root_url%20%7D%7D%7B%7B%20post.url%20%7D%7D">{{ post.title }}</a> + </li> + {% endfor %} + </ul> +</section> diff --git a/source/_includes/asides/twitter.html b/source/_includes/asides/twitter.html new file mode 100644 index 0000000..fe4eda6 --- /dev/null +++ b/source/_includes/asides/twitter.html @@ -0,0 +1,19 @@ +{% if site.twitter_user %} +<section> + <h1>Latest Tweets</h1> + <ul id="tweets"> + <li class="loading">Status updating...</li> + </ul> + <script type="text/javascript"> + $.domReady(function(){ + getTwitterFeed("{{site.twitter_user}}", {{site.twitter_tweet_count}}, {{site.twitter_show_replies}}); + }); + </script> + <script src="http://github.com/%7B%7B%20root_url%20%7D%7D/javascripts/twitter.js" type="text/javascript"> </script> + {% if site.twitter_follow_button %} + <a href="http://twitter.com/%7B%7B%20site.twitter_user%20%7D%7D" class="twitter-follow-button" data-width="208px" data-show-count="{{ site.twitter_show_follower_count }}">Follow @{{ site.twitter_user }}</a> + {% else %} + <p>Follow <a href="http://twitter.com/%7B%7Bsite.twitter_user%7D%7D">@{{ site.twitter_user }}</a></p> + {% endif %} +</section> +{% endif %} diff --git a/source/_includes/custom/after_footer.html b/source/_includes/custom/after_footer.html new file mode 100644 index 0000000..bce25dd --- /dev/null +++ b/source/_includes/custom/after_footer.html @@ -0,0 +1,3 @@ +{% comment %} + Add content to be output at the bottom of each page. (You might use this for analytics scripts, for example) +{% endcomment %} diff --git a/source/_includes/custom/asides/about.html b/source/_includes/custom/asides/about.html new file mode 100644 index 0000000..59d309e --- /dev/null +++ b/source/_includes/custom/asides/about.html @@ -0,0 +1,4 @@ +<section> + <h1>About Me</h1> + <p>A little something about me.</p> +</section> diff --git a/source/_includes/custom/category_feed.xml b/source/_includes/custom/category_feed.xml new file mode 100644 index 0000000..f47c553 --- /dev/null +++ b/source/_includes/custom/category_feed.xml @@ -0,0 +1,27 @@ +--- +layout: nil +--- +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + + <title><![CDATA[{{ page.title }} | {{ site.title }}]]> + + + {{ site.time | date_to_xmlschema }} + {{ site.url }}/ + + + {% if site.email %}{% endif %} + + Octopress + + {% for post in site.categories[page.category] limit: 5 %} + + <![CDATA[{{ post.title | cdata_escape }}]]> + + {{ post.date | date_to_xmlschema }} + {{ site.url }}{{ post.id }} + + + {% endfor %} + diff --git a/source/_includes/custom/footer.html b/source/_includes/custom/footer.html new file mode 100644 index 0000000..e12f067 --- /dev/null +++ b/source/_includes/custom/footer.html @@ -0,0 +1,4 @@ +

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

diff --git a/source/_includes/custom/head.html b/source/_includes/custom/head.html new file mode 100644 index 0000000..85879f4 --- /dev/null +++ b/source/_includes/custom/head.html @@ -0,0 +1,3 @@ + + + diff --git a/source/_includes/custom/header.html b/source/_includes/custom/header.html new file mode 100644 index 0000000..35f9c05 --- /dev/null +++ b/source/_includes/custom/header.html @@ -0,0 +1,6 @@ +
+

{{ site.title }}

+ {% if site.subtitle %} +

{{ site.subtitle }}

+ {% endif %} +
diff --git a/source/_includes/custom/navigation.html b/source/_includes/custom/navigation.html new file mode 100644 index 0000000..d6bd424 --- /dev/null +++ b/source/_includes/custom/navigation.html @@ -0,0 +1,4 @@ + diff --git a/source/_includes/disqus.html b/source/_includes/disqus.html new file mode 100644 index 0000000..eb30877 --- /dev/null +++ b/source/_includes/disqus.html @@ -0,0 +1,21 @@ +{% comment %} Load script if disquss comments are enabled and `page.comments` is either empty (index) or set to true {% endcomment %} +{% if site.disqus_short_name and page.comments != false %} + +{% endif %} diff --git a/source/_includes/facebook_like.html b/source/_includes/facebook_like.html new file mode 100644 index 0000000..74f9130 --- /dev/null +++ b/source/_includes/facebook_like.html @@ -0,0 +1,10 @@ +{% if site.facebook_like %} +
+ +{% endif %} diff --git a/source/_includes/footer.html b/source/_includes/footer.html new file mode 100644 index 0000000..3a8c768 --- /dev/null +++ b/source/_includes/footer.html @@ -0,0 +1 @@ +{% include custom/footer.html %} diff --git a/source/_includes/google_analytics.html b/source/_includes/google_analytics.html new file mode 100644 index 0000000..4d4d596 --- /dev/null +++ b/source/_includes/google_analytics.html @@ -0,0 +1,13 @@ +{% if site.google_analytics_tracking_id %} + +{% endif %} diff --git a/source/_includes/google_plus_one.html b/source/_includes/google_plus_one.html new file mode 100644 index 0000000..b69ddae --- /dev/null +++ b/source/_includes/google_plus_one.html @@ -0,0 +1,9 @@ +{% if site.google_plus_one %} + +{% endif %} diff --git a/source/_includes/head.html b/source/_includes/head.html new file mode 100644 index 0000000..0fdc401 --- /dev/null +++ b/source/_includes/head.html @@ -0,0 +1,29 @@ + + + + + + + {% if page.title %}{{ page.title }} - {% endif %}{{ site.title }} + + + {% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %} + + {% if page.keywords %}{% endif %} + + + + + + + {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} + + + + + + + + {% include custom/head.html %} + {% include google_analytics.html %} + diff --git a/source/_includes/header.html b/source/_includes/header.html new file mode 100644 index 0000000..524de65 --- /dev/null +++ b/source/_includes/header.html @@ -0,0 +1 @@ +{% include custom/header.html %} diff --git a/source/_includes/navigation.html b/source/_includes/navigation.html new file mode 100644 index 0000000..9b87017 --- /dev/null +++ b/source/_includes/navigation.html @@ -0,0 +1,13 @@ +
    +
  • RSS
  • + {% if site.subscribe_email %} +
  • Email
  • + {% endif %} +
+
+
+ + +
+
+{% include custom/navigation.html %} diff --git a/source/_includes/post/author.html b/source/_includes/post/author.html new file mode 100644 index 0000000..83dd6a8 --- /dev/null +++ b/source/_includes/post/author.html @@ -0,0 +1,8 @@ +{% if post.author %} + {% assign author = post.author %} +{% elsif page.author %} + {% assign author = page.author %} +{% else %} + {% assign author = site.author %} +{% endif %} +{% if author %}{% endif %} diff --git a/source/_includes/post/categories.html b/source/_includes/post/categories.html new file mode 100644 index 0000000..4a98b29 --- /dev/null +++ b/source/_includes/post/categories.html @@ -0,0 +1,10 @@ +{% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %} +{% unless category == '0' %} + + {% if post %} + {{ post.categories | category_links }} + {% else %} + {{ page.categories | category_links }} + {% endif %} + +{% endunless %} diff --git a/source/_includes/post/date.html b/source/_includes/post/date.html new file mode 100644 index 0000000..ecf1ad7 --- /dev/null +++ b/source/_includes/post/date.html @@ -0,0 +1,15 @@ +{% capture date %}{{ page.date }}{{ post.date }}{% endcapture %} +{% capture date_formatted %}{{ page.date_formatted }}{{ post.date_formatted }}{% endcapture %} +{% capture has_date %}{{ date | size }}{% endcapture %} + +{% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %} +{% capture updated_formatted %}{{ page.updated_formatted }}{{ post.updated_formatted }}{% endcapture %} +{% capture was_updated %}{{ updated | size }}{% endcapture %} + +{% if has_date != '0' %} + {% capture time %}{% endcapture %} +{% endif %} + +{% if was_updated != '0' %} + {% capture updated %}{% endcapture %} +{% else %}{% assign updated = false %}{% endif %} \ No newline at end of file diff --git a/source/_includes/post/disqus_thread.html b/source/_includes/post/disqus_thread.html new file mode 100644 index 0000000..b1acd8c --- /dev/null +++ b/source/_includes/post/disqus_thread.html @@ -0,0 +1 @@ + diff --git a/source/_includes/post/sharing.html b/source/_includes/post/sharing.html new file mode 100644 index 0000000..e32500d --- /dev/null +++ b/source/_includes/post/sharing.html @@ -0,0 +1,11 @@ + diff --git a/source/_includes/twitter_sharing.html b/source/_includes/twitter_sharing.html new file mode 100644 index 0000000..687e77d --- /dev/null +++ b/source/_includes/twitter_sharing.html @@ -0,0 +1,11 @@ +{% if site.twitter_follow_button or site.twitter_tweet_button %} + +{% endif %} diff --git a/source/_layouts/category_index.html b/source/_layouts/category_index.html new file mode 100644 index 0000000..85a6307 --- /dev/null +++ b/source/_layouts/category_index.html @@ -0,0 +1,17 @@ +--- +layout: page +footer: false +--- + +
+{% for post in site.categories[page.category] %} +{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} +{% unless year == this_year %} + {% assign year = this_year %} +

{{ year }}

+{% endunless %} +
+ {% include archive_post.html %} +
+{% endfor %} +
diff --git a/source/_layouts/default.html b/source/_layouts/default.html new file mode 100644 index 0000000..f23b07b --- /dev/null +++ b/source/_layouts/default.html @@ -0,0 +1,14 @@ +{% capture root_url %}{{ site.root | strip_slash }}{% endcapture %} +{% include head.html %} + +
{% include header.html %}
+ +
+
+ {{ content | expand_urls: root_url }} +
+
+
{% include footer.html %}
+ {% include after_footer.html %} + + diff --git a/source/_layouts/page.html b/source/_layouts/page.html new file mode 100644 index 0000000..8ba6ec9 --- /dev/null +++ b/source/_layouts/page.html @@ -0,0 +1,42 @@ +--- +layout: default +--- + +
+
+ {% if page.title %} +
+

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

+ {% if page.date %}

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

{% endif %} +
+ {% endif %} + {{ content }} + {% unless page.footer == false %} +
+ {% if page.date or page.author %}

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

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

Comments

+
{% include post/disqus_thread.html %}
+
+{% endif %} +
+{% unless page.sidebar == false %} + +{% endunless %} diff --git a/source/_layouts/post.html b/source/_layouts/post.html new file mode 100644 index 0000000..d3c42e3 --- /dev/null +++ b/source/_layouts/post.html @@ -0,0 +1,43 @@ +--- +layout: default +single: true +--- + +
+
+ {% include article.html %} +
+

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

+ {% unless page.sharing == false %} + {% include post/sharing.html %} + {% endunless %} +

+ {% if page.previous.url %} + « {{page.previous.title}} + {% endif %} + {% if page.next.url %} + {{page.next.title}} » + {% endif %} +

+
+
+{% if site.disqus_short_name and page.comments == true %} +
+

Comments

+
{% include post/disqus_thread.html %}
+
+{% endif %} +
+{% unless page.sidebar == false %} + +{% endunless %} diff --git a/source/_posts/2011-12-06-hello-world.markdown b/source/_posts/2011-12-06-hello-world.markdown new file mode 100644 index 0000000..9fce602 --- /dev/null +++ b/source/_posts/2011-12-06-hello-world.markdown @@ -0,0 +1,8 @@ +--- +layout: post +title: "Hello World" +date: 2011-12-06 14:32 +comments: true +categories: selfchat +--- +首次發文!Yeah! diff --git a/source/about/index.markdown b/source/about/index.markdown new file mode 100644 index 0000000..a79e2db --- /dev/null +++ b/source/about/index.markdown @@ -0,0 +1,9 @@ +--- +layout: page +title: "index" +date: 2011-12-06 14:40 +comments: true +sharing: true +footer: true +--- +關於我 \ No newline at end of file diff --git a/source/assets/jwplayer/glow/controlbar/background.png b/source/assets/jwplayer/glow/controlbar/background.png new file mode 100644 index 0000000..c2824cc Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/background.png differ diff --git a/source/assets/jwplayer/glow/controlbar/blankButton.png b/source/assets/jwplayer/glow/controlbar/blankButton.png new file mode 100644 index 0000000..010159f Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/blankButton.png differ diff --git a/source/assets/jwplayer/glow/controlbar/divider.png b/source/assets/jwplayer/glow/controlbar/divider.png new file mode 100644 index 0000000..77cd829 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/divider.png differ diff --git a/source/assets/jwplayer/glow/controlbar/fullscreenButton.png b/source/assets/jwplayer/glow/controlbar/fullscreenButton.png new file mode 100644 index 0000000..e06aa50 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/fullscreenButton.png differ diff --git a/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png b/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png new file mode 100644 index 0000000..d2bc4fc Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png differ diff --git a/source/assets/jwplayer/glow/controlbar/muteButton.png b/source/assets/jwplayer/glow/controlbar/muteButton.png new file mode 100644 index 0000000..40c40ab Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/muteButton.png differ diff --git a/source/assets/jwplayer/glow/controlbar/muteButtonOver.png b/source/assets/jwplayer/glow/controlbar/muteButtonOver.png new file mode 100644 index 0000000..96fe7bb Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/muteButtonOver.png differ diff --git a/source/assets/jwplayer/glow/controlbar/normalscreenButton.png b/source/assets/jwplayer/glow/controlbar/normalscreenButton.png new file mode 100644 index 0000000..2229507 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/normalscreenButton.png differ diff --git a/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png b/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png new file mode 100644 index 0000000..15db44d Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png differ diff --git a/source/assets/jwplayer/glow/controlbar/pauseButton.png b/source/assets/jwplayer/glow/controlbar/pauseButton.png new file mode 100644 index 0000000..e399bf3 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/pauseButton.png differ diff --git a/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png b/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png new file mode 100644 index 0000000..409d89d Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png differ diff --git a/source/assets/jwplayer/glow/controlbar/playButton.png b/source/assets/jwplayer/glow/controlbar/playButton.png new file mode 100644 index 0000000..f8d9a00 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/playButton.png differ diff --git a/source/assets/jwplayer/glow/controlbar/playButtonOver.png b/source/assets/jwplayer/glow/controlbar/playButtonOver.png new file mode 100644 index 0000000..3fe2848 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/playButtonOver.png differ diff --git a/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png b/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png new file mode 100644 index 0000000..73b371a Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png differ diff --git a/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png b/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png new file mode 100644 index 0000000..7232217 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png differ diff --git a/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png b/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png new file mode 100644 index 0000000..626444a Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png differ diff --git a/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png b/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png new file mode 100644 index 0000000..132a8e7 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png differ diff --git a/source/assets/jwplayer/glow/controlbar/timeSliderRail.png b/source/assets/jwplayer/glow/controlbar/timeSliderRail.png new file mode 100644 index 0000000..27851df Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/timeSliderRail.png differ diff --git a/source/assets/jwplayer/glow/controlbar/unmuteButton.png b/source/assets/jwplayer/glow/controlbar/unmuteButton.png new file mode 100644 index 0000000..3658453 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/unmuteButton.png differ diff --git a/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png b/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png new file mode 100644 index 0000000..138ebb3 Binary files /dev/null and b/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png differ diff --git a/source/assets/jwplayer/glow/display/background.png b/source/assets/jwplayer/glow/display/background.png new file mode 100644 index 0000000..391152f Binary files /dev/null and b/source/assets/jwplayer/glow/display/background.png differ diff --git a/source/assets/jwplayer/glow/display/bufferIcon.png b/source/assets/jwplayer/glow/display/bufferIcon.png new file mode 100644 index 0000000..a3819c1 Binary files /dev/null and b/source/assets/jwplayer/glow/display/bufferIcon.png differ diff --git a/source/assets/jwplayer/glow/display/muteIcon.png b/source/assets/jwplayer/glow/display/muteIcon.png new file mode 100644 index 0000000..e0408bb Binary files /dev/null and b/source/assets/jwplayer/glow/display/muteIcon.png differ diff --git a/source/assets/jwplayer/glow/display/playIcon.png b/source/assets/jwplayer/glow/display/playIcon.png new file mode 100644 index 0000000..cb38427 Binary files /dev/null and b/source/assets/jwplayer/glow/display/playIcon.png differ diff --git a/source/assets/jwplayer/glow/dock/button.png b/source/assets/jwplayer/glow/dock/button.png new file mode 100644 index 0000000..391152f Binary files /dev/null and b/source/assets/jwplayer/glow/dock/button.png differ diff --git a/source/assets/jwplayer/glow/glow.xml b/source/assets/jwplayer/glow/glow.xml new file mode 100644 index 0000000..7d5ba03 --- /dev/null +++ b/source/assets/jwplayer/glow/glow.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + +