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..35845a2 --- /dev/null +++ b/.rvmrc @@ -0,0 +1 @@ +rvm use 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 "base/utilities"; +@import "base/solarized"; +@import "base/theme"; +@import "base/typography"; +@import "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 "partials/header"; +@import "partials/navigation"; +@import "partials/blog"; +@import "partials/sharing"; +@import "partials/syntax"; +@import "partials/archive"; +@import "partials/sidebar"; +@import "partials/footer"; diff --git a/.themes/classic/sass/base/_layout.scss b/.themes/classic/sass/base/_layout.scss new file mode 100644 index 0000000..ad99c6a --- /dev/null +++ b/.themes/classic/sass/base/_layout.scss @@ -0,0 +1,192 @@ +$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 { + overflow: hidden; + > 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; + overflow: visible; + 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..9a50a8b --- /dev/null +++ b/.themes/classic/sass/base/_theme.scss @@ -0,0 +1,86 @@ +$noise-bg: image-url('noise.png') top left !default; +$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('noise.png') !default; +$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)) !default; +$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-hover: darken($sidebar-bg, 7) !default; +$sidebar-link-color-subdued: lighten($sidebar-color, 20) !default; +$sidebar-link-color-subdued-hover: $sidebar-link-color-hover !default; +$twitter-status-link: lighten($sidebar-link-color-subdued, 15) !default; + +$footer-color: #888 !default; +$footer-bg: #ccc !default; +$footer-bg-front: image-url('noise.png') !default; +$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)) !default; +$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('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..b68753f --- /dev/null +++ b/.themes/classic/sass/base/_typography.scss @@ -0,0 +1,161 @@ +$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; +$header-subtitle-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 > header h2 { + font-family: $header-subtitle-font-family; +} + +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($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('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('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..1a6b2a0 --- /dev/null +++ b/.themes/classic/sass/custom/_fonts.scss @@ -0,0 +1,10 @@ +// 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; +//$header-subtitle-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..57fe7a8 --- /dev/null +++ b/.themes/classic/sass/partials/_blog.scss @@ -0,0 +1,141 @@ +article { + 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('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..3eecb48 --- /dev/null +++ b/.themes/classic/sass/partials/_sharing.scss @@ -0,0 +1,8 @@ +.sharing { + p.meta + & { + padding: { top: 1em; left: 0; } + background: $img-border top left repeat-x; + } +} + +#fb-root { display: none; } 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 "sidebar/base"; +@import "sidebar/twitter"; +@import "sidebar/googleplus"; +@import "sidebar/pinboard"; +@import "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("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..5441304 --- /dev/null +++ b/.themes/classic/sass/partials/sidebar/_base.scss @@ -0,0 +1,106 @@ +.side-shadow-border { + @include box-shadow(lighten($sidebar-bg, 5) 0 1px); +} +aside.sidebar { + overflow: hidden; + 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..dfd49b5 --- /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]:first-child { + 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 "compass"; +@include global-reset; +@include reset-html5; + +@import "custom/colors"; +@import "custom/fonts"; +@import "custom/layout"; +@import "base"; +@import "partials"; +@import "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..cb267f0 --- /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..bab5de4 --- /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..2f0e628 --- /dev/null +++ b/.themes/classic/source/_includes/navigation.html @@ -0,0 +1,15 @@ + + {% if site.simple_search %} +
+
+ + +
+
+ {% endif %} +{% 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..4091168 --- /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..fdc544e --- /dev/null +++ b/Rakefile @@ -0,0 +1,377 @@ +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/" +rsync_delete = true +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({"OCTOPRESS_ENV"=>"preview"}, "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({"OCTOPRESS_ENV"=>"preview"}, "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.downcase =~ /(^.+\/)?(.+)/ + filename, dot, extension = $2.rpartition('.').reject(&:empty?) # Get filename and extension + title = filename + page_dir.concat($1.downcase.sub(/^\//, '').split('/')) unless $1.nil? # Add path to page_dir Array + if extension.nil? + page_dir << filename + filename = "index" + end + extension ||= new_page_ext + page_dir = page_dir.map! { |d| d = d.to_url }.join('/') # Sanitize path + filename = filename.downcase.to_url + + mkdir_p page_dir + file = "#{page_dir}/#{filename}.#{extension}" + 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: \"#{title}\"" + 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 + # Check if preview posts exist, which should not be published + if File.exists?(".preview-mode") + puts "## Found posts in preview mode, regenerating files ..." + File.delete(".preview-mode") + Rake::Task[:generate].execute + end + + 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| + FileList["#{args.source}/**/.*"].exclude("**/.", "**/..", "**/.DS_Store", "**/._*").each do |file| + cp_r file, file.gsub(/#{args.source}/, "#{args.dest}") unless File.directory?(file) + end +end + +desc "Deploy website via rsync" +task :rsync do + exclude = "" + if File.exists?('./rsync-exclude') + exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'" + end + puts "## Deploying website via Rsync" + ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{"--delete" unless rsync_delete == false} #{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, :repo do |t, args| + if args.repo + repo_url = args.repo + else + repo_url = get_stdin("Enter the read/write url for your repository: ") + end + 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..315f1cf --- /dev/null +++ b/_config.yml @@ -0,0 +1,99 @@ +# ----------------------- # +# Main Configs # +# ----------------------- # + +url: http://EngForDev.github.com +title: engfordev Blog +subtitle: English For Developers +author: engfordev +simple_search: http://google.com/search +description: + +# 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 titlecase + +# 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: engfordev +github_repo_count: 0 +github_show_profile_link: true +github_skip_forks: true + +# Twitter +twitter_user: engfordev +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/atom.xml b/atom.xml deleted file mode 100644 index 5e414bd..0000000 --- a/atom.xml +++ /dev/null @@ -1,254 +0,0 @@ - - - - <![CDATA[engfordev Blog]]> - - - 2012-04-12T14:48:25+09:00 - http://EngForDev.github.com/ - - - - - Octopress - - - - <![CDATA[뚜둥! 너드, 얼간이, 긱의 차이요? 그림으로 확인하시죠.]]> - - 2012-03-26T21:02:00+09:00 - http://EngForDev.github.com/blog/2012/03/26/nerd-dork-geek-dweeb - Great White Snark 지음 | 2010년 3월 25일

- -

번역 프로젝트에 관한 글을 보시려면

- -
    -
  • 너드 Nerd
  • -
  • 얼간이 Dork
  • -
  • 긱 Geek
  • -
  • 샌님, 꽁생원 Dweeb
  • -
- - -

저처럼,

- -

부당하게도, 그리고 적절치 못하게도,

- -

“얼간이” 딱지가 붙었던

- -

너드와 긱 여러분께

- -

이 셋을 구분하는게 정말 가능할까?

- -

못 미더워하시는 분들께

- -

이 셋 사이의 차이를

- -

제대로 설명해 보이겠습니다.

- -

자~ 보시죠!

- -

이 그림을 보시면, -너드,얼간이,긱,샌님의 차이를 -확실하게 알게 되실 겁니다.

- -

앞으로 헷갈리실 일이 없을 거에요.

- -

긱,너드,얼간이,샌님

- -

‘샌님’소리 들으시는 분들께는 -이렇게 말씀드리고 싶네요:

- -

50년대 사람들하고는 -어울리지를 마세요.

- -

Via 매튜 (at Sed Contra)

- -

p.s : 이베이에서 “긱을 위한 빈티지 안경”을 쳐보세요.

- -

긱을 위한 빈티지 안경

-]]>
-
- - - <![CDATA[3월 22일, 개발자영어에서는...]]> - - 2012-03-22T23:59:00+09:00 - http://EngForDev.github.com/blog/2012/03/22/what-we-did-today - 개발자’s Diary - - - - -

번역..

- - - - -

번역하며 오간 이야기

- - - -]]>
-
- - - <![CDATA[사람들은 프로그래밍 자체를 배우고 싶은게 아니에요!]]> - - 2012-03-21T23:46:00+09:00 - http://EngForDev.github.com/blog/2012/03/21/no-body-wants-to-learn-how-to-program-korean-translation - ※ 원문 및 번역에 관해 궁금하시면~ http://opentutorials.org/course/167/1388

- -

사람들은 프로그래밍하는 법 자체를 배우고 싶어하는게 아니에요. 제 생각에는 프로그래밍을 잘 하는 사람들이 프로그래밍을 가르칠 때 몇 가지 문제점이 있는 것 같아요. 프로그래밍 튜토리얼에 보면 보통 앞부분에 프로그래밍 관련 개념들이 나오죠. 변수나 루프, 데이터형 등등이요. 이런 내용을 가지고 가르치기 시작하는 것이 당연하게 보이겠지만, 사실은 프로그래밍을 가르치기에는 적절하지 않은 방법이에요. 왜냐고요? 사람들은 프로그래밍을 배우고 싶어하질 않거든요.

- -

돈을 내고 프로그래밍 교육을 받으려는 사람들에게는 이런 방법이 적절할 수도 있어요. 하지만 대부분의 사람들은 다릅니다.

- -

프로그래밍에 흥미가 별로 없는 사람들이나, 호기심 많은 어린 학생들에게는 변수나 루프 같은 개념이 별로 재미없어요. 이들은 알고리즘이나 자동으로 형을 변환해주는 게 어떤 건지에 대해 관심이 없어요. 이들은 슈퍼마리오나 트위터, 앵그리버드 같은 것을 만들고 싶어할 뿐이죠. 라이언 노쓰의 공룡 만화에는 이런 점이 잘 나타나 있습니다. (여기 누르면 확대)

- -

프로그래밍을 가르치는 분들, 프로그래밍 튜토리얼을 만드는 분들에게 다섯 가지 조언을 드리겠습니다.

- -

1. 자동화된 개발 도구(Kit)로는 프로그래밍을 할 수 없습니다.

- -

시중에는 소프트웨어를 만드는 자동화된 개발 도구 같은 것들이 많이 나와 있죠. 마우스로 드래그앤 드랍을 하면서 프로그램을 만드는 거죠.

- -

하지만 사람들은 이런 프로그램에 한계를 느낍니다. 이런 개발도구로는 간단한 어플이나 게임을 만들 수는 있지만 유연성이 부족해서 만들 수 있는 것에는 한계가 있습니다. 우리에게 필요한 것은 이미 완성된 장난감이 아니라 레고 블럭입니다.

- -

(십대들이 Scratch라는 개발도구 프로그램을 사용하는 것은 열렬히 지지합니다. 그 나이대에는 타자로 코드를 치는 것이 큰 장벽이 되거든요. 하지만 다른 개발도구 프로그램의 경우에는 지지하지 않습니다.)

- -

2. 작은 프로그램을 만드는 예제를 사용해보세요. 만들었다고 자랑할 만한 것으로 말이죠.

- -

프로그래밍 책이나 튜토리얼에는 대부분 예제가 들어있기는 합니다. 하지만 보통은 하나의 함수나 개념을 설명하는 파편적인 내용이죠. 프로그래밍을 가르치려면 이렇게 해야 하기는 하지만, 문제는 아무도 프로그래밍을 배우고 싶어하지 않는다는 거에요.

- -

저는 “파이썬으로 컴퓨터 게임 만들기”라는 책을 썼는데요, 이 책에는 “숫자 맞추기”나 “틱택토” 같은 간단한 게임의 전체 소스 코드를 제공합니다. 그리고 이 프로그램이 어떻게 작동하는지 설명하죠. 처음에는 프로그래밍 개념을 몇 개 익힌 후에, 개념 몇 개에 대한 예제를 다룹니다. 각 장의 내용은 잘 동작하는 게임을 중심으로 합니다.

- -

(“파이썬으로 컴퓨터 게임 만들기”는 http://inventwithpython.com에서 무료로 읽을 수 있습니다.

- -

처음에 나오는 프로그램의 길이는 50줄 이하입니다. 그러나 나름대로 완성된 프로그램이라서 괜찮습니다. 이걸 앱스토어에다 팔 수는 없어요. 하지만 사람들에게 보여주고 자랑할 정도는 되죠. 완성된 프로그램을 다루면서 프로그래밍에 관한 개념을 설명하고, 개념을 깊게 파고들면, 학습자에게 학습을 계속할 동기를 부여할 수 있어요.

- -

이 책에서는 게임 프로그램에 나오는 코드를 가지고 설명하다보니, 기존의 프로그래밍 책과는 다른 순서로 개념을 소개하기도 합니다. 하지만 괜찮아요. 초보 프로그래머들은 개념을 어떤 순서로 배우는 지에 대해 신경쓰지 않습니다. 그리고 독학용 튜토리얼을 쓰는 경우라면, 어차피 보는 사람은 순서대로 보지 않고 이곳저곳 넘기면서 봅니다. 그러니 개념을 다루는 순서가 섞여도 별 문제가 안됩니다.

- -

3. 초보 프로그래머는 따라쟁이입니다. ( 그러니 따라할 것을 많이 주세요)

- -

저는 초등학교 3학년 때 베이직을 배우기 시작했습니다. 특별한 사람들이나 프로그래밍을 배운다고 생각하는 사람들이 이 얘기를 들으면 ‘우와~’ 할지도 모릅니다. 근데 말이죠, 프로그래밍을 배운 후 몇 년 동안 제가 만든 프로그램은요, 그 전에 본 프로그램을 약간만 변경해서 만든 것들이었어요. 이 프로그램 안에 들어있는 것이라고는 아무 숫자를 집어넣은 print, if문이 대부분이었죠.

- -

초보자들은 자기가 본 프로그램과 비슷한 프로그램들을 만듭니다. 왜냐하면 초보자일 때에는 독창적인 것을 만들어내는데 필요한 충분한 경험이 부족하기 때문입니다. 그래서 프로그래밍을 가르칠 때에는, 학습자에게 다양한 예제를 주고, 따라해보게 도와주는 것이 좋습니다.

- -

(“파이썬으로 뭔가 만들기”에는 여러가지 프로그램들이 들어 있습니다. ‘동전 던지기’ 게임, 문자열을 다루는 행맨 게임, Bagles, 2D 데카르트 좌표를 사용하는 게임, 간단한 암호화 프로그램 등 ) 학습자들이 프로그램 작동 방법을 완전히 이해하지 못해도 괜찮습니다. 학습자가 따라할 수 있도록 여러 가지 예제를 주면, 학습자는 이 소재로 다양한 프로그램을 만들 것입니다.

- -

4. 제가 만든 프로그램을 보여드리죠.

- -

MIT에서 운영하는 Scratch 프로그래밍 환경에는 좋은 점이 있는데요, 학생들이 만든 프로그램을 직접 공유할 수 있게 해 놓았다는 거에요. 프로그래밍 자체를 하고 싶어하는 사람은 없어요. 사람들은 멋진 프로그램을 만들고 싶어하죠. MIT에서 하는 것처럼, 자기가 만든 프로그램을 커뮤니티와 쉽게 공유할 수 있으면, 프로그램을 만들고 싶다는 동기부여가 될 겁니다. 뿐만 아니라, 여러가지 사례 프로그램들이 공유되면, 다른 사람들이 보고선, ‘나도 나만의 프로그램을 만들어야지’하는 영감을 받을 것입니다.

- -

Pygame.org 웹사이트에는 사이드바가 있는데요, 여기에는 사람들이 올린 게임들이 소스와 함께 계속 업데이트됩니다. 이 게임은 다른 학습자를 위한 예제 역할을 하죠. 결국 사람들은 이 프로그램을 보고 배우기도 합니다. 바로 이런 점 때문에 Pygame이 Pyglet이나 다른 파이썬 게임 프레임워크보다 더 인기가 있다고 생각합니다.

- -

5. 초보 프로그래머에게 ‘객체지향’ 등의 개념을 들이대며, 혼란스럽게 하지 마세요.

- -

이미 충분히 말했습니다. ‘재귀, 정규식 표현, MVC, 네트워킹, 파일 입출력 같은 것들’ 이런 것들은 훨씬 나중에 가르쳐도 늦지 않습니다. 학습자가 자기 프로그램을 몇 가지 만들어본 후에 이런 개념을 배워도 늦지 않습니다.

- -

코드의 끝에 세미콜론을 찍는 걸 기억해야 한다는 걸 재밌다고 느낄 사람은 없어요. 사람들은 프로그래밍하는 법을 알고 싶은게 아니에요. 그들은 프로그램을 만들고 싶어할 뿐이죠.

- -

추가:

- -

“파이썬 어렵게 공부하기”라는 훌륭한 책의 저자인 제드 쇼가 해커 뉴스에 다음과 같은 코멘트를 남겼습니다.

- -

“아니죠. 제가 말하고 싶은건, 아무도 “어려운 것”을 공부하고 싶어하지 않는다는 말은 신화일 뿐입니다. 제대로 가르치기만 한다면, 사람들은 어려운 걸 공부하고 싶어 합니다. 이 기사에 나온대로 한다면 나중에는 프로그래밍에 완전히 흥미를 잃은 사람들만 남게 될 거에요. 그래픽, 게임, 귀여운 만화 등을 총동원한다고 해서 사람들이 공부하고 싶게 만들 순 없습니다. 사람들을 깨우치게 하기 위해 억지로 하게 만들거나 속임수를 사용하지 마세요.

- -

하지만 더 중요한건 저는 제 신념을 뒷받침하는 증거를 갖고 있어요. 그러나 이 기사에는 증거가 전혀 없어요.”

- -

제드 쇼가 좋은 지적을 해주었습니다. 저는 이렇게 답변했어요.

- -

“안녕하세요 제드. 저는 알이고, 이 기사의 저자입니다. 제목이 좀 과장되었다는건 인정합니다. 물론 프로그래밍 자체만을 위해 프로그래밍을 배우고 싶어하는 사람도 있어요. 심지어 즉시 쓸모가 없다 하더라도 수학을 배우는걸 좋아하는 사람들 처럼요.

- -

저는 토요일 아침마다 10대 초반 어린이들로 구성된 소규모 수업에서 프로그래밍을 가르치고 있고, 10 여명의 학생을 대상으로 스탠포드 스플래시 프로그램에서 두어번 특강을 진행하기도 했습니다. 단순히 루프나 각 언어의 고유한 성질이 뭔지 설명하는것보다, 학습자들이 만들고 싶어하는게 무엇인지 최종 목적을 염두에 두는 것이 그들을 더 잘 이끌어 갈 수 있다는걸 알게 됐어요. 파이썬과 루비는 학습 단계에서 언어의 고유한 성질을 언급하는걸 최소화할 수 있기 때문에 학습용으론 최적입니다.

- -

그리고 저역시 프로그래밍에 흥미를 갖게하는데 그래픽이나 귀여운 만화가 도움이 될거라고 생각하지 않아요. 제 책 “파이썬으로 프로그램 만들기”는 마지막 몇 개의 장을 제외하면 아스키 텍스트 형식의 게임으로 만들었습니다. 이러한 것들은 자기 게임/프로그램을 다른 사람에게 자랑하기에는 꽤 낮은 수준인데요. 그러나 아직 아무도 자신의 코드 조각들을 보여주진 않았잖아요.

- -

오라일리에서 나온 “파이썬 공부하기”와 같은 책보다 “파이썬 어렵게 공부하기”의 최대 장점은 책의 내용을 최소한의 개념으로 줄였다는데 있다고 전 생각합니다. “이렇게 입력하세요. 이렇게 보여야 해요. 이런 일이 일어난 거에요.” 반면에 대부분의 다른 컴퓨터책에서는 한 문장으로 줄여서 표현하거나 통째로 들어내도 될 문단들을 나열하곤 하는데, 이에 비하면 최고죠. “파이썬 어렵게 공부하기” 책은 기껏해야 200 페이지 정도밖에 되지 않아요. 600 페이지에 달하는 다른 책들에 비하면 훨씬 이해하기 쉬워요.

- -

컴퓨터 과학을 전공하지 않았거나 프로그램을 배우는데 전념할 필요가 없는 학생들로 구성된 수업을 할 때에는, 학생들이 공부하고 싶어 하는 것이 개념 자체가 아니라 그러한 개념을 이용해서 뭔가 만들고 싶어 한다는 것이라는 것을 잊어버리곤 해요. 작은 게임이나 웹 애플리케이션은 거기엔 최적이에요. 당신의 책 22번 예제에서 말한 것처럼, “생각할 필요없이 단순하게 외우기만 하는 이와 같은 예제를 공부할 때에는, 왜 그렇게 해야 하는지 이유를 아는게 중요합니다. 그렇게 함으로써 목표에 집중하고 당신이 노력해야 하는 목적을 깨닫게 하는데 도움이 됩니다.

-]]>
-
- - - <![CDATA[English for Developers]]> - - 2012-03-19T22:08:00+09:00 - http://EngForDev.github.com/blog/2012/03/19/english-for-developers - 요즘 개발자영어에서는… - -

1.플레이 프레임워크 소개문서를 번역하고 있습니다. - NEW

- - - - -

2. 아치리눅스 설치방법 번역을 마치고 다듬고 있습니다.

- -
    -
  • 번역하게 된 계기 등이 궁금하시면 이곳으로..
  • -
  • 바로 번역에 참여하시려면 이곳으로~ <- 100개의 찜 중에 30>51>74개 완료하였습니다!
  • -
- - -

3. ‘깃허브 페이지 만드는 법’을 번역하고 있습니다.

- -
    -
  • 번역에 참여하시려면 이곳으로 ~ 8개의 찜 중에 5개 남았어요~
  • -
- - -

4. 영어로 짤막한 일기를 쓰고 있습니다. <- NEW

- - - - -

5. Dijkstra의 “Go To 문은 해롭다”라는 글을 번역하고 있습니다.

- - - - -

오프 모임을 준비하고 있습니다. - Coming Soon

- - - - -

최근에 마무리 한 것들

- -
    -
  • 프로그래밍 자체를 배우고 싶어하는게 아니에요! 자세히
  • -
  • 자바 스크립트 코딩 스타일에 대한 글, 번역한 것을 이쁘게 정리했습니다~~ 자세히 - NEW
  • -
  • Ruby 튜토리얼 번역한 것을 정리해서 공개했습니다~ (>>자세히) - NEW
  • -
  • 박준태님이 번역하신 글에 공동으로 피드백을 드렸습니다. (>>자세히)
  • -
  • 많은 분들이 읽을 수 있도록 많이많이 퍼뜨려주세요~ (글 링크)
  • -
  • 프로트 엔드 개발자 면접볼 때 나오는 질문을 번역했고요. (>>자세히)
  • -
- - -

페이스북 그룹에서 진행되니, 그룹을 방문하세요. ^^ -이전에 진행했던 내용을 보시려면, 이곳을 눌러주세요. -engfordev 사이트에는 http://engfordev.com/ 로 들어올 수 있습니다.

-]]>
-
- -
diff --git a/blog/2012/03/19/english-for-developers/index.html b/blog/2012/03/19/english-for-developers/index.html deleted file mode 100644 index e67f633..0000000 --- a/blog/2012/03/19/english-for-developers/index.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - English for Developers - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

English for Developers

- - -

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

- -
- - -

요즘 개발자영어에서는…

- -

1.플레이 프레임워크 소개문서를 번역하고 있습니다. - NEW

- - - - -

2. 아치리눅스 설치방법 번역을 마치고 다듬고 있습니다.

- -
    -
  • 번역하게 된 계기 등이 궁금하시면 이곳으로..
  • -
  • 바로 번역에 참여하시려면 이곳으로~ <- 100개의 찜 중에 30>51>74개 완료하였습니다!
  • -
- - -

3. ‘깃허브 페이지 만드는 법’을 번역하고 있습니다.

- -
    -
  • 번역에 참여하시려면 이곳으로 ~ 8개의 찜 중에 5개 남았어요~
  • -
- - -

4. 영어로 짤막한 일기를 쓰고 있습니다. <- NEW

- - - - -

5. Dijkstra의 “Go To 문은 해롭다”라는 글을 번역하고 있습니다.

- - - - -

오프 모임을 준비하고 있습니다. - Coming Soon

- - - - -

최근에 마무리 한 것들

- -
    -
  • 프로그래밍 자체를 배우고 싶어하는게 아니에요! 자세히
  • -
  • 자바 스크립트 코딩 스타일에 대한 글, 번역한 것을 이쁘게 정리했습니다~~ 자세히 - NEW
  • -
  • Ruby 튜토리얼 번역한 것을 정리해서 공개했습니다~ (>>자세히) - NEW
  • -
  • 박준태님이 번역하신 글에 공동으로 피드백을 드렸습니다. (>>자세히)
  • -
  • 많은 분들이 읽을 수 있도록 많이많이 퍼뜨려주세요~ (글 링크)
  • -
  • 프로트 엔드 개발자 면접볼 때 나오는 질문을 번역했고요. (>>자세히)
  • -
- - -

페이스북 그룹에서 진행되니, 그룹을 방문하세요. ^^ -이전에 진행했던 내용을 보시려면, 이곳을 눌러주세요. -engfordev 사이트에는 http://engfordev.com/ 로 들어올 수 있습니다.

-
- - - -
- -
- - - - -
-
- - - - - - - - - - - - - - - - - diff --git a/blog/2012/03/21/no-body-wants-to-learn-how-to-program-korean-translation/index.html b/blog/2012/03/21/no-body-wants-to-learn-how-to-program-korean-translation/index.html deleted file mode 100644 index 4965c09..0000000 --- a/blog/2012/03/21/no-body-wants-to-learn-how-to-program-korean-translation/index.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - 사람들은 프로그래밍 자체를 배우고 싶은게 아니에요! - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

사람들은 프로그래밍 자체를 배우고 싶은게 아니에요!

- - -

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

- -
- - -

※ 원문 및 번역에 관해 궁금하시면~ http://opentutorials.org/course/167/1388

- -

사람들은 프로그래밍하는 법 자체를 배우고 싶어하는게 아니에요. 제 생각에는 프로그래밍을 잘 하는 사람들이 프로그래밍을 가르칠 때 몇 가지 문제점이 있는 것 같아요. 프로그래밍 튜토리얼에 보면 보통 앞부분에 프로그래밍 관련 개념들이 나오죠. 변수나 루프, 데이터형 등등이요. 이런 내용을 가지고 가르치기 시작하는 것이 당연하게 보이겠지만, 사실은 프로그래밍을 가르치기에는 적절하지 않은 방법이에요. 왜냐고요? 사람들은 프로그래밍을 배우고 싶어하질 않거든요.

- -

돈을 내고 프로그래밍 교육을 받으려는 사람들에게는 이런 방법이 적절할 수도 있어요. 하지만 대부분의 사람들은 다릅니다.

- -

프로그래밍에 흥미가 별로 없는 사람들이나, 호기심 많은 어린 학생들에게는 변수나 루프 같은 개념이 별로 재미없어요. 이들은 알고리즘이나 자동으로 형을 변환해주는 게 어떤 건지에 대해 관심이 없어요. 이들은 슈퍼마리오나 트위터, 앵그리버드 같은 것을 만들고 싶어할 뿐이죠. 라이언 노쓰의 공룡 만화에는 이런 점이 잘 나타나 있습니다. (여기 누르면 확대)

- -

프로그래밍을 가르치는 분들, 프로그래밍 튜토리얼을 만드는 분들에게 다섯 가지 조언을 드리겠습니다.

- -

1. 자동화된 개발 도구(Kit)로는 프로그래밍을 할 수 없습니다.

- -

시중에는 소프트웨어를 만드는 자동화된 개발 도구 같은 것들이 많이 나와 있죠. 마우스로 드래그앤 드랍을 하면서 프로그램을 만드는 거죠.

- -

하지만 사람들은 이런 프로그램에 한계를 느낍니다. 이런 개발도구로는 간단한 어플이나 게임을 만들 수는 있지만 유연성이 부족해서 만들 수 있는 것에는 한계가 있습니다. 우리에게 필요한 것은 이미 완성된 장난감이 아니라 레고 블럭입니다.

- -

(십대들이 Scratch라는 개발도구 프로그램을 사용하는 것은 열렬히 지지합니다. 그 나이대에는 타자로 코드를 치는 것이 큰 장벽이 되거든요. 하지만 다른 개발도구 프로그램의 경우에는 지지하지 않습니다.)

- -

2. 작은 프로그램을 만드는 예제를 사용해보세요. 만들었다고 자랑할 만한 것으로 말이죠.

- -

프로그래밍 책이나 튜토리얼에는 대부분 예제가 들어있기는 합니다. 하지만 보통은 하나의 함수나 개념을 설명하는 파편적인 내용이죠. 프로그래밍을 가르치려면 이렇게 해야 하기는 하지만, 문제는 아무도 프로그래밍을 배우고 싶어하지 않는다는 거에요.

- -

저는 “파이썬으로 컴퓨터 게임 만들기”라는 책을 썼는데요, 이 책에는 “숫자 맞추기”나 “틱택토” 같은 간단한 게임의 전체 소스 코드를 제공합니다. 그리고 이 프로그램이 어떻게 작동하는지 설명하죠. 처음에는 프로그래밍 개념을 몇 개 익힌 후에, 개념 몇 개에 대한 예제를 다룹니다. 각 장의 내용은 잘 동작하는 게임을 중심으로 합니다.

- -

(“파이썬으로 컴퓨터 게임 만들기”는 http://inventwithpython.com에서 무료로 읽을 수 있습니다.

- -

처음에 나오는 프로그램의 길이는 50줄 이하입니다. 그러나 나름대로 완성된 프로그램이라서 괜찮습니다. 이걸 앱스토어에다 팔 수는 없어요. 하지만 사람들에게 보여주고 자랑할 정도는 되죠. 완성된 프로그램을 다루면서 프로그래밍에 관한 개념을 설명하고, 개념을 깊게 파고들면, 학습자에게 학습을 계속할 동기를 부여할 수 있어요.

- -

이 책에서는 게임 프로그램에 나오는 코드를 가지고 설명하다보니, 기존의 프로그래밍 책과는 다른 순서로 개념을 소개하기도 합니다. 하지만 괜찮아요. 초보 프로그래머들은 개념을 어떤 순서로 배우는 지에 대해 신경쓰지 않습니다. 그리고 독학용 튜토리얼을 쓰는 경우라면, 어차피 보는 사람은 순서대로 보지 않고 이곳저곳 넘기면서 봅니다. 그러니 개념을 다루는 순서가 섞여도 별 문제가 안됩니다.

- -

3. 초보 프로그래머는 따라쟁이입니다. ( 그러니 따라할 것을 많이 주세요)

- -

저는 초등학교 3학년 때 베이직을 배우기 시작했습니다. 특별한 사람들이나 프로그래밍을 배운다고 생각하는 사람들이 이 얘기를 들으면 ‘우와~’ 할지도 모릅니다. 근데 말이죠, 프로그래밍을 배운 후 몇 년 동안 제가 만든 프로그램은요, 그 전에 본 프로그램을 약간만 변경해서 만든 것들이었어요. 이 프로그램 안에 들어있는 것이라고는 아무 숫자를 집어넣은 print, if문이 대부분이었죠.

- -

초보자들은 자기가 본 프로그램과 비슷한 프로그램들을 만듭니다. 왜냐하면 초보자일 때에는 독창적인 것을 만들어내는데 필요한 충분한 경험이 부족하기 때문입니다. 그래서 프로그래밍을 가르칠 때에는, 학습자에게 다양한 예제를 주고, 따라해보게 도와주는 것이 좋습니다.

- -

(“파이썬으로 뭔가 만들기”에는 여러가지 프로그램들이 들어 있습니다. ‘동전 던지기’ 게임, 문자열을 다루는 행맨 게임, Bagles, 2D 데카르트 좌표를 사용하는 게임, 간단한 암호화 프로그램 등 ) 학습자들이 프로그램 작동 방법을 완전히 이해하지 못해도 괜찮습니다. 학습자가 따라할 수 있도록 여러 가지 예제를 주면, 학습자는 이 소재로 다양한 프로그램을 만들 것입니다.

- -

4. 제가 만든 프로그램을 보여드리죠.

- -

MIT에서 운영하는 Scratch 프로그래밍 환경에는 좋은 점이 있는데요, 학생들이 만든 프로그램을 직접 공유할 수 있게 해 놓았다는 거에요. 프로그래밍 자체를 하고 싶어하는 사람은 없어요. 사람들은 멋진 프로그램을 만들고 싶어하죠. MIT에서 하는 것처럼, 자기가 만든 프로그램을 커뮤니티와 쉽게 공유할 수 있으면, 프로그램을 만들고 싶다는 동기부여가 될 겁니다. 뿐만 아니라, 여러가지 사례 프로그램들이 공유되면, 다른 사람들이 보고선, ‘나도 나만의 프로그램을 만들어야지’하는 영감을 받을 것입니다.

- -

Pygame.org 웹사이트에는 사이드바가 있는데요, 여기에는 사람들이 올린 게임들이 소스와 함께 계속 업데이트됩니다. 이 게임은 다른 학습자를 위한 예제 역할을 하죠. 결국 사람들은 이 프로그램을 보고 배우기도 합니다. 바로 이런 점 때문에 Pygame이 Pyglet이나 다른 파이썬 게임 프레임워크보다 더 인기가 있다고 생각합니다.

- -

5. 초보 프로그래머에게 ‘객체지향’ 등의 개념을 들이대며, 혼란스럽게 하지 마세요.

- -

이미 충분히 말했습니다. ‘재귀, 정규식 표현, MVC, 네트워킹, 파일 입출력 같은 것들’ 이런 것들은 훨씬 나중에 가르쳐도 늦지 않습니다. 학습자가 자기 프로그램을 몇 가지 만들어본 후에 이런 개념을 배워도 늦지 않습니다.

- -

코드의 끝에 세미콜론을 찍는 걸 기억해야 한다는 걸 재밌다고 느낄 사람은 없어요. 사람들은 프로그래밍하는 법을 알고 싶은게 아니에요. 그들은 프로그램을 만들고 싶어할 뿐이죠.

- -

추가:

- -

“파이썬 어렵게 공부하기”라는 훌륭한 책의 저자인 제드 쇼가 해커 뉴스에 다음과 같은 코멘트를 남겼습니다.

- -

“아니죠. 제가 말하고 싶은건, 아무도 “어려운 것”을 공부하고 싶어하지 않는다는 말은 신화일 뿐입니다. 제대로 가르치기만 한다면, 사람들은 어려운 걸 공부하고 싶어 합니다. 이 기사에 나온대로 한다면 나중에는 프로그래밍에 완전히 흥미를 잃은 사람들만 남게 될 거에요. 그래픽, 게임, 귀여운 만화 등을 총동원한다고 해서 사람들이 공부하고 싶게 만들 순 없습니다. 사람들을 깨우치게 하기 위해 억지로 하게 만들거나 속임수를 사용하지 마세요.

- -

하지만 더 중요한건 저는 제 신념을 뒷받침하는 증거를 갖고 있어요. 그러나 이 기사에는 증거가 전혀 없어요.”

- -

제드 쇼가 좋은 지적을 해주었습니다. 저는 이렇게 답변했어요.

- -

“안녕하세요 제드. 저는 알이고, 이 기사의 저자입니다. 제목이 좀 과장되었다는건 인정합니다. 물론 프로그래밍 자체만을 위해 프로그래밍을 배우고 싶어하는 사람도 있어요. 심지어 즉시 쓸모가 없다 하더라도 수학을 배우는걸 좋아하는 사람들 처럼요.

- -

저는 토요일 아침마다 10대 초반 어린이들로 구성된 소규모 수업에서 프로그래밍을 가르치고 있고, 10 여명의 학생을 대상으로 스탠포드 스플래시 프로그램에서 두어번 특강을 진행하기도 했습니다. 단순히 루프나 각 언어의 고유한 성질이 뭔지 설명하는것보다, 학습자들이 만들고 싶어하는게 무엇인지 최종 목적을 염두에 두는 것이 그들을 더 잘 이끌어 갈 수 있다는걸 알게 됐어요. 파이썬과 루비는 학습 단계에서 언어의 고유한 성질을 언급하는걸 최소화할 수 있기 때문에 학습용으론 최적입니다.

- -

그리고 저역시 프로그래밍에 흥미를 갖게하는데 그래픽이나 귀여운 만화가 도움이 될거라고 생각하지 않아요. 제 책 “파이썬으로 프로그램 만들기”는 마지막 몇 개의 장을 제외하면 아스키 텍스트 형식의 게임으로 만들었습니다. 이러한 것들은 자기 게임/프로그램을 다른 사람에게 자랑하기에는 꽤 낮은 수준인데요. 그러나 아직 아무도 자신의 코드 조각들을 보여주진 않았잖아요.

- -

오라일리에서 나온 “파이썬 공부하기”와 같은 책보다 “파이썬 어렵게 공부하기”의 최대 장점은 책의 내용을 최소한의 개념으로 줄였다는데 있다고 전 생각합니다. “이렇게 입력하세요. 이렇게 보여야 해요. 이런 일이 일어난 거에요.” 반면에 대부분의 다른 컴퓨터책에서는 한 문장으로 줄여서 표현하거나 통째로 들어내도 될 문단들을 나열하곤 하는데, 이에 비하면 최고죠. “파이썬 어렵게 공부하기” 책은 기껏해야 200 페이지 정도밖에 되지 않아요. 600 페이지에 달하는 다른 책들에 비하면 훨씬 이해하기 쉬워요.

- -

컴퓨터 과학을 전공하지 않았거나 프로그램을 배우는데 전념할 필요가 없는 학생들로 구성된 수업을 할 때에는, 학생들이 공부하고 싶어 하는 것이 개념 자체가 아니라 그러한 개념을 이용해서 뭔가 만들고 싶어 한다는 것이라는 것을 잊어버리곤 해요. 작은 게임이나 웹 애플리케이션은 거기엔 최적이에요. 당신의 책 22번 예제에서 말한 것처럼, “생각할 필요없이 단순하게 외우기만 하는 이와 같은 예제를 공부할 때에는, 왜 그렇게 해야 하는지 이유를 아는게 중요합니다. 그렇게 함으로써 목표에 집중하고 당신이 노력해야 하는 목적을 깨닫게 하는데 도움이 됩니다.

-
- - - -
- -
- - - - -
-
- - - - - - - - - - - - - - - - - diff --git a/blog/2012/03/22/what-we-did-today/index.html b/blog/2012/03/22/what-we-did-today/index.html deleted file mode 100644 index df52d32..0000000 --- a/blog/2012/03/22/what-we-did-today/index.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - 3월 22일, 개발자영어에서는... - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

3월 22일, 개발자영어에서는...

- - -

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

- -
- - -

개발자’s Diary

- - - - -

번역..

- - - - -

번역하며 오간 이야기

- - - -
- - - -
- -
- - - - -
-
- - - - - - - - - - - - - - - - - diff --git a/blog/2012/03/26/nerd-dork-geek-dweeb/index.html b/blog/2012/03/26/nerd-dork-geek-dweeb/index.html deleted file mode 100644 index 5ebb8b6..0000000 --- a/blog/2012/03/26/nerd-dork-geek-dweeb/index.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - 뚜둥! 너드, 얼간이, 긱의 차이요? 그림으로 확인하시죠. - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

뚜둥! 너드, 얼간이, 긱의 차이요? 그림으로 확인하시죠.

- - -

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

- -
- - -

Great White Snark 지음 | 2010년 3월 25일

- -

번역 프로젝트에 관한 글을 보시려면

- -
    -
  • 너드 Nerd
  • -
  • 얼간이 Dork
  • -
  • 긱 Geek
  • -
  • 샌님, 꽁생원 Dweeb
  • -
- - -

저처럼,

- -

부당하게도, 그리고 적절치 못하게도,

- -

“얼간이” 딱지가 붙었던

- -

너드와 긱 여러분께

- -

이 셋을 구분하는게 정말 가능할까?

- -

못 미더워하시는 분들께

- -

이 셋 사이의 차이를

- -

제대로 설명해 보이겠습니다.

- -

자~ 보시죠!

- -

이 그림을 보시면, -너드,얼간이,긱,샌님의 차이를 -확실하게 알게 되실 겁니다.

- -

앞으로 헷갈리실 일이 없을 거에요.

- -

긱,너드,얼간이,샌님

- -

‘샌님’소리 들으시는 분들께는 -이렇게 말씀드리고 싶네요:

- -

50년대 사람들하고는 -어울리지를 마세요.

- -

Via 매튜 (at Sed Contra)

- -

p.s : 이베이에서 “긱을 위한 빈티지 안경”을 쳐보세요.

- -

긱을 위한 빈티지 안경

-
- - - -
- -
- - - - -
-
- - - - - - - - - - - - - - - - - diff --git a/blog/archives/index.html b/blog/archives/index.html deleted file mode 100644 index b270f72..0000000 --- a/blog/archives/index.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - Blog Archive - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

- -
- -
- -
-
-
- - -
- - - - -
-
- - - - - - - - - - - - - - - - - diff --git a/blog/categories/main/atom.xml b/blog/categories/main/atom.xml deleted file mode 100644 index 300f7c7..0000000 --- a/blog/categories/main/atom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - <![CDATA[Category: main | engfordev Blog]]> - - - 2012-04-12T14:48:25+09:00 - http://EngForDev.github.com/ - - - - - Octopress - - - - <![CDATA[English for Developers]]> - - 2012-03-19T22:08:00+09:00 - http://EngForDev.github.com/blog/2012/03/19/english-for-developers - 요즘 개발자영어에서는... - -

1.플레이 프레임워크 소개문서를 번역하고 있습니다. - NEW

- - - - -

2. 아치리눅스 설치방법 번역을 마치고 다듬고 있습니다.

- -
    -
  • 번역하게 된 계기 등이 궁금하시면 이곳으로..
  • -
  • 바로 번역에 참여하시려면 이곳으로~ <- 100개의 찜 중에 30>51>74개 완료하였습니다!
  • -
- - -

3. '깃허브 페이지 만드는 법'을 번역하고 있습니다.

- -
    -
  • 번역에 참여하시려면 이곳으로 ~ 8개의 찜 중에 5개 남았어요~
  • -
- - -

4. 영어로 짤막한 일기를 쓰고 있습니다. <- NEW

- - - - -

5. Dijkstra의 "Go To 문은 해롭다"라는 글을 번역하고 있습니다.

- - - - -

오프 모임을 준비하고 있습니다. - Coming Soon

- - - - -

최근에 마무리 한 것들

- -
    -
  • 프로그래밍 자체를 배우고 싶어하는게 아니에요! 자세히
  • -
  • 자바 스크립트 코딩 스타일에 대한 글, 번역한 것을 이쁘게 정리했습니다~~ 자세히 - NEW
  • -
  • Ruby 튜토리얼 번역한 것을 정리해서 공개했습니다~ (>>자세히) - NEW
  • -
  • 박준태님이 번역하신 글에 공동으로 피드백을 드렸습니다. (>>자세히)
  • -
  • 많은 분들이 읽을 수 있도록 많이많이 퍼뜨려주세요~ (글 링크)
  • -
  • 프로트 엔드 개발자 면접볼 때 나오는 질문을 번역했고요. (>>자세히)
  • -
- - -

페이스북 그룹에서 진행되니, 그룹을 방문하세요. ^^ -이전에 진행했던 내용을 보시려면, 이곳을 눌러주세요. -engfordev 사이트에는 http://engfordev.com/ 로 들어올 수 있습니다.

-]]>
-
- -
diff --git a/blog/categories/main/index.html b/blog/categories/main/index.html deleted file mode 100644 index 00708e2..0000000 --- a/blog/categories/main/index.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - Category: main - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

- -
- -
- -
-
-
- - -
- - - - -
-
- - - - - - - - - - - - - - - - - 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 dcad0c0..0000000 --- a/index.html +++ /dev/null @@ -1,532 +0,0 @@ - - - - - - - - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

뚜둥! 너드, 얼간이, 긱의 차이요? 그림으로 확인하시죠.

- - -

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

- -
- - -

Great White Snark 지음 | 2010년 3월 25일

- -

번역 프로젝트에 관한 글을 보시려면

- -
    -
  • 너드 Nerd
  • -
  • 얼간이 Dork
  • -
  • 긱 Geek
  • -
  • 샌님, 꽁생원 Dweeb
  • -
- - -

저처럼,

- -

부당하게도, 그리고 적절치 못하게도,

- -

“얼간이” 딱지가 붙었던

- -

너드와 긱 여러분께

- -

이 셋을 구분하는게 정말 가능할까?

- -

못 미더워하시는 분들께

- -

이 셋 사이의 차이를

- -

제대로 설명해 보이겠습니다.

- -

자~ 보시죠!

- -

이 그림을 보시면, -너드,얼간이,긱,샌님의 차이를 -확실하게 알게 되실 겁니다.

- -

앞으로 헷갈리실 일이 없을 거에요.

- -

긱,너드,얼간이,샌님

- -

‘샌님’소리 들으시는 분들께는 -이렇게 말씀드리고 싶네요:

- -

50년대 사람들하고는 -어울리지를 마세요.

- -

Via 매튜 (at Sed Contra)

- -

p.s : 이베이에서 “긱을 위한 빈티지 안경”을 쳐보세요.

- -

긱을 위한 빈티지 안경

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

사람들은 프로그래밍 자체를 배우고 싶은게 아니에요!

- - -

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

- -
- - -

※ 원문 및 번역에 관해 궁금하시면~ http://opentutorials.org/course/167/1388

- -

사람들은 프로그래밍하는 법 자체를 배우고 싶어하는게 아니에요. 제 생각에는 프로그래밍을 잘 하는 사람들이 프로그래밍을 가르칠 때 몇 가지 문제점이 있는 것 같아요. 프로그래밍 튜토리얼에 보면 보통 앞부분에 프로그래밍 관련 개념들이 나오죠. 변수나 루프, 데이터형 등등이요. 이런 내용을 가지고 가르치기 시작하는 것이 당연하게 보이겠지만, 사실은 프로그래밍을 가르치기에는 적절하지 않은 방법이에요. 왜냐고요? 사람들은 프로그래밍을 배우고 싶어하질 않거든요.

- -

돈을 내고 프로그래밍 교육을 받으려는 사람들에게는 이런 방법이 적절할 수도 있어요. 하지만 대부분의 사람들은 다릅니다.

- -

프로그래밍에 흥미가 별로 없는 사람들이나, 호기심 많은 어린 학생들에게는 변수나 루프 같은 개념이 별로 재미없어요. 이들은 알고리즘이나 자동으로 형을 변환해주는 게 어떤 건지에 대해 관심이 없어요. 이들은 슈퍼마리오나 트위터, 앵그리버드 같은 것을 만들고 싶어할 뿐이죠. 라이언 노쓰의 공룡 만화에는 이런 점이 잘 나타나 있습니다. (여기 누르면 확대)

- -

프로그래밍을 가르치는 분들, 프로그래밍 튜토리얼을 만드는 분들에게 다섯 가지 조언을 드리겠습니다.

- -

1. 자동화된 개발 도구(Kit)로는 프로그래밍을 할 수 없습니다.

- -

시중에는 소프트웨어를 만드는 자동화된 개발 도구 같은 것들이 많이 나와 있죠. 마우스로 드래그앤 드랍을 하면서 프로그램을 만드는 거죠.

- -

하지만 사람들은 이런 프로그램에 한계를 느낍니다. 이런 개발도구로는 간단한 어플이나 게임을 만들 수는 있지만 유연성이 부족해서 만들 수 있는 것에는 한계가 있습니다. 우리에게 필요한 것은 이미 완성된 장난감이 아니라 레고 블럭입니다.

- -

(십대들이 Scratch라는 개발도구 프로그램을 사용하는 것은 열렬히 지지합니다. 그 나이대에는 타자로 코드를 치는 것이 큰 장벽이 되거든요. 하지만 다른 개발도구 프로그램의 경우에는 지지하지 않습니다.)

- -

2. 작은 프로그램을 만드는 예제를 사용해보세요. 만들었다고 자랑할 만한 것으로 말이죠.

- -

프로그래밍 책이나 튜토리얼에는 대부분 예제가 들어있기는 합니다. 하지만 보통은 하나의 함수나 개념을 설명하는 파편적인 내용이죠. 프로그래밍을 가르치려면 이렇게 해야 하기는 하지만, 문제는 아무도 프로그래밍을 배우고 싶어하지 않는다는 거에요.

- -

저는 “파이썬으로 컴퓨터 게임 만들기”라는 책을 썼는데요, 이 책에는 “숫자 맞추기”나 “틱택토” 같은 간단한 게임의 전체 소스 코드를 제공합니다. 그리고 이 프로그램이 어떻게 작동하는지 설명하죠. 처음에는 프로그래밍 개념을 몇 개 익힌 후에, 개념 몇 개에 대한 예제를 다룹니다. 각 장의 내용은 잘 동작하는 게임을 중심으로 합니다.

- -

(“파이썬으로 컴퓨터 게임 만들기”는 http://inventwithpython.com에서 무료로 읽을 수 있습니다.

- -

처음에 나오는 프로그램의 길이는 50줄 이하입니다. 그러나 나름대로 완성된 프로그램이라서 괜찮습니다. 이걸 앱스토어에다 팔 수는 없어요. 하지만 사람들에게 보여주고 자랑할 정도는 되죠. 완성된 프로그램을 다루면서 프로그래밍에 관한 개념을 설명하고, 개념을 깊게 파고들면, 학습자에게 학습을 계속할 동기를 부여할 수 있어요.

- -

이 책에서는 게임 프로그램에 나오는 코드를 가지고 설명하다보니, 기존의 프로그래밍 책과는 다른 순서로 개념을 소개하기도 합니다. 하지만 괜찮아요. 초보 프로그래머들은 개념을 어떤 순서로 배우는 지에 대해 신경쓰지 않습니다. 그리고 독학용 튜토리얼을 쓰는 경우라면, 어차피 보는 사람은 순서대로 보지 않고 이곳저곳 넘기면서 봅니다. 그러니 개념을 다루는 순서가 섞여도 별 문제가 안됩니다.

- -

3. 초보 프로그래머는 따라쟁이입니다. ( 그러니 따라할 것을 많이 주세요)

- -

저는 초등학교 3학년 때 베이직을 배우기 시작했습니다. 특별한 사람들이나 프로그래밍을 배운다고 생각하는 사람들이 이 얘기를 들으면 ‘우와~’ 할지도 모릅니다. 근데 말이죠, 프로그래밍을 배운 후 몇 년 동안 제가 만든 프로그램은요, 그 전에 본 프로그램을 약간만 변경해서 만든 것들이었어요. 이 프로그램 안에 들어있는 것이라고는 아무 숫자를 집어넣은 print, if문이 대부분이었죠.

- -

초보자들은 자기가 본 프로그램과 비슷한 프로그램들을 만듭니다. 왜냐하면 초보자일 때에는 독창적인 것을 만들어내는데 필요한 충분한 경험이 부족하기 때문입니다. 그래서 프로그래밍을 가르칠 때에는, 학습자에게 다양한 예제를 주고, 따라해보게 도와주는 것이 좋습니다.

- -

(“파이썬으로 뭔가 만들기”에는 여러가지 프로그램들이 들어 있습니다. ‘동전 던지기’ 게임, 문자열을 다루는 행맨 게임, Bagles, 2D 데카르트 좌표를 사용하는 게임, 간단한 암호화 프로그램 등 ) 학습자들이 프로그램 작동 방법을 완전히 이해하지 못해도 괜찮습니다. 학습자가 따라할 수 있도록 여러 가지 예제를 주면, 학습자는 이 소재로 다양한 프로그램을 만들 것입니다.

- -

4. 제가 만든 프로그램을 보여드리죠.

- -

MIT에서 운영하는 Scratch 프로그래밍 환경에는 좋은 점이 있는데요, 학생들이 만든 프로그램을 직접 공유할 수 있게 해 놓았다는 거에요. 프로그래밍 자체를 하고 싶어하는 사람은 없어요. 사람들은 멋진 프로그램을 만들고 싶어하죠. MIT에서 하는 것처럼, 자기가 만든 프로그램을 커뮤니티와 쉽게 공유할 수 있으면, 프로그램을 만들고 싶다는 동기부여가 될 겁니다. 뿐만 아니라, 여러가지 사례 프로그램들이 공유되면, 다른 사람들이 보고선, ‘나도 나만의 프로그램을 만들어야지’하는 영감을 받을 것입니다.

- -

Pygame.org 웹사이트에는 사이드바가 있는데요, 여기에는 사람들이 올린 게임들이 소스와 함께 계속 업데이트됩니다. 이 게임은 다른 학습자를 위한 예제 역할을 하죠. 결국 사람들은 이 프로그램을 보고 배우기도 합니다. 바로 이런 점 때문에 Pygame이 Pyglet이나 다른 파이썬 게임 프레임워크보다 더 인기가 있다고 생각합니다.

- -

5. 초보 프로그래머에게 ‘객체지향’ 등의 개념을 들이대며, 혼란스럽게 하지 마세요.

- -

이미 충분히 말했습니다. ‘재귀, 정규식 표현, MVC, 네트워킹, 파일 입출력 같은 것들’ 이런 것들은 훨씬 나중에 가르쳐도 늦지 않습니다. 학습자가 자기 프로그램을 몇 가지 만들어본 후에 이런 개념을 배워도 늦지 않습니다.

- -

코드의 끝에 세미콜론을 찍는 걸 기억해야 한다는 걸 재밌다고 느낄 사람은 없어요. 사람들은 프로그래밍하는 법을 알고 싶은게 아니에요. 그들은 프로그램을 만들고 싶어할 뿐이죠.

- -

추가:

- -

“파이썬 어렵게 공부하기”라는 훌륭한 책의 저자인 제드 쇼가 해커 뉴스에 다음과 같은 코멘트를 남겼습니다.

- -

“아니죠. 제가 말하고 싶은건, 아무도 “어려운 것”을 공부하고 싶어하지 않는다는 말은 신화일 뿐입니다. 제대로 가르치기만 한다면, 사람들은 어려운 걸 공부하고 싶어 합니다. 이 기사에 나온대로 한다면 나중에는 프로그래밍에 완전히 흥미를 잃은 사람들만 남게 될 거에요. 그래픽, 게임, 귀여운 만화 등을 총동원한다고 해서 사람들이 공부하고 싶게 만들 순 없습니다. 사람들을 깨우치게 하기 위해 억지로 하게 만들거나 속임수를 사용하지 마세요.

- -

하지만 더 중요한건 저는 제 신념을 뒷받침하는 증거를 갖고 있어요. 그러나 이 기사에는 증거가 전혀 없어요.”

- -

제드 쇼가 좋은 지적을 해주었습니다. 저는 이렇게 답변했어요.

- -

“안녕하세요 제드. 저는 알이고, 이 기사의 저자입니다. 제목이 좀 과장되었다는건 인정합니다. 물론 프로그래밍 자체만을 위해 프로그래밍을 배우고 싶어하는 사람도 있어요. 심지어 즉시 쓸모가 없다 하더라도 수학을 배우는걸 좋아하는 사람들 처럼요.

- -

저는 토요일 아침마다 10대 초반 어린이들로 구성된 소규모 수업에서 프로그래밍을 가르치고 있고, 10 여명의 학생을 대상으로 스탠포드 스플래시 프로그램에서 두어번 특강을 진행하기도 했습니다. 단순히 루프나 각 언어의 고유한 성질이 뭔지 설명하는것보다, 학습자들이 만들고 싶어하는게 무엇인지 최종 목적을 염두에 두는 것이 그들을 더 잘 이끌어 갈 수 있다는걸 알게 됐어요. 파이썬과 루비는 학습 단계에서 언어의 고유한 성질을 언급하는걸 최소화할 수 있기 때문에 학습용으론 최적입니다.

- -

그리고 저역시 프로그래밍에 흥미를 갖게하는데 그래픽이나 귀여운 만화가 도움이 될거라고 생각하지 않아요. 제 책 “파이썬으로 프로그램 만들기”는 마지막 몇 개의 장을 제외하면 아스키 텍스트 형식의 게임으로 만들었습니다. 이러한 것들은 자기 게임/프로그램을 다른 사람에게 자랑하기에는 꽤 낮은 수준인데요. 그러나 아직 아무도 자신의 코드 조각들을 보여주진 않았잖아요.

- -

오라일리에서 나온 “파이썬 공부하기”와 같은 책보다 “파이썬 어렵게 공부하기”의 최대 장점은 책의 내용을 최소한의 개념으로 줄였다는데 있다고 전 생각합니다. “이렇게 입력하세요. 이렇게 보여야 해요. 이런 일이 일어난 거에요.” 반면에 대부분의 다른 컴퓨터책에서는 한 문장으로 줄여서 표현하거나 통째로 들어내도 될 문단들을 나열하곤 하는데, 이에 비하면 최고죠. “파이썬 어렵게 공부하기” 책은 기껏해야 200 페이지 정도밖에 되지 않아요. 600 페이지에 달하는 다른 책들에 비하면 훨씬 이해하기 쉬워요.

- -

컴퓨터 과학을 전공하지 않았거나 프로그램을 배우는데 전념할 필요가 없는 학생들로 구성된 수업을 할 때에는, 학생들이 공부하고 싶어 하는 것이 개념 자체가 아니라 그러한 개념을 이용해서 뭔가 만들고 싶어 한다는 것이라는 것을 잊어버리곤 해요. 작은 게임이나 웹 애플리케이션은 거기엔 최적이에요. 당신의 책 22번 예제에서 말한 것처럼, “생각할 필요없이 단순하게 외우기만 하는 이와 같은 예제를 공부할 때에는, 왜 그렇게 해야 하는지 이유를 아는게 중요합니다. 그렇게 함으로써 목표에 집중하고 당신이 노력해야 하는 목적을 깨닫게 하는데 도움이 됩니다.

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

English for Developers

- - -

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

- -
- - -

요즘 개발자영어에서는…

- -

1.플레이 프레임워크 소개문서를 번역하고 있습니다. - NEW

- - - - -

2. 아치리눅스 설치방법 번역을 마치고 다듬고 있습니다.

- -
    -
  • 번역하게 된 계기 등이 궁금하시면 이곳으로..
  • -
  • 바로 번역에 참여하시려면 이곳으로~ <- 100개의 찜 중에 30>51>74개 완료하였습니다!
  • -
- - -

3. ‘깃허브 페이지 만드는 법’을 번역하고 있습니다.

- -
    -
  • 번역에 참여하시려면 이곳으로 ~ 8개의 찜 중에 5개 남았어요~
  • -
- - -

4. 영어로 짤막한 일기를 쓰고 있습니다. <- NEW

- - - - -

5. Dijkstra의 “Go To 문은 해롭다”라는 글을 번역하고 있습니다.

- - - - -

오프 모임을 준비하고 있습니다. - Coming Soon

- - - - -

최근에 마무리 한 것들

- -
    -
  • 프로그래밍 자체를 배우고 싶어하는게 아니에요! 자세히
  • -
  • 자바 스크립트 코딩 스타일에 대한 글, 번역한 것을 이쁘게 정리했습니다~~ 자세히 - NEW
  • -
  • Ruby 튜토리얼 번역한 것을 정리해서 공개했습니다~ (>>자세히) - NEW
  • -
  • 박준태님이 번역하신 글에 공동으로 피드백을 드렸습니다. (>>자세히)
  • -
  • 많은 분들이 읽을 수 있도록 많이많이 퍼뜨려주세요~ (글 링크)
  • -
  • 프로트 엔드 개발자 면접볼 때 나오는 질문을 번역했고요. (>>자세히)
  • -
- - -

페이스북 그룹에서 진행되니, 그룹을 방문하세요. ^^ -이전에 진행했던 내용을 보시려면, 이곳을 눌러주세요. -engfordev 사이트에는 http://engfordev.com/ 로 들어올 수 있습니다.

-
- - - - -
- - -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/blogging/code/index.html b/octopress/blogging/code/index.html deleted file mode 100644 index 777da44..0000000 --- a/octopress/blogging/code/index.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - Sharing Code Snippets - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Sharing Code Snippets

-

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

-
- -

« Previous, Blogging Basics

- -

Sharing code is important, and blogging about it should be easy and beautiful. -That’s why Octopress is packed with features to make blogging your code a breeze. -Though Jekyll comes with support for Pygments syntax highlighting, -Octopress makes it way better. Here’s how.

- -
    -
  • A Sass port of Solarized syntax highlighting created specifically for Octopress.
  • -
  • Gist code embedding - by Brandon Tilly.
  • -
  • Insert code snippets from your filesystem with a download link.
  • -
  • Easy inline code blocks with <figure> and <figcaption> and optional download links.
  • -
  • Pygments caching - a Jekyll community plugin.
  • -
  • Table based line numbers added with javascript.
  • -
- - -

Solarized Highlighting

- -

Solarized has a beautiful syntax highlighting color scheme, but reproducing it requires a highly sophisticated highlighting engine. -Pygments (the highlighter Jekyll uses) processes code snippets into styleable HTML, but it isn’t nearly as powerful as the highlighting engine in Vim for example. -In order to port Solarized theme to octopress, I processed its test files with Pygments and styled the output with Sass while comparing -them to the Vim rendered versions.

- -

Check out the test page to see the results.

- -

Backtick Code Blocks

- -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/plugins/backtick-codeblock/index.markdown could not be found

- -

Gist Embedding

- -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/plugins/gist-tag/index.markdown could not be found

- -

Include Code Snippets

- -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/plugins/include-code/index.markdown could not be found

- -

Inline Code Blocks

- -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/plugins/codeblock/index.markdown could not be found

- -

Also, see Blogging with Plugins and The Octopress plugins page

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/blogging/code/test/index.html b/octopress/blogging/code/test/index.html deleted file mode 100644 index 9dfd20f..0000000 --- a/octopress/blogging/code/test/index.html +++ /dev/null @@ -1,737 +0,0 @@ - - - - - - - - Syntax Highlighting Test - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Syntax Highlighting Test

- -
- -

File /Users/marocchino/Documents/engfordev.github.com/source/downloads/code/javascripts/test.js could not be found

- -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<title>A Tiny Page</title>
-<style type="text/css">
-<!--
-      p { font-size:15pt; color:#000 }
-    -->
-</style></head><!-- real comment -->
-<body bgcolor="#FFFFFF" text="#000000" link="#0000CC">
-<script language="javascript" type="text/javascript">
-      function changeHeight(h) {
-        var tds = document.getElementsByTagName("td");
-        for(var i = 0; i < tds.length; i++) {
-          tds[i].setAttribute("height", h + "px");
-      }}
-</script>
-<h1>abc</h1>
-<h2>def</h2>
-<p>Testing page</p>
-</body></html>
-
- - - - -
-
- - - - -
Testing PHP (syntax_test.php)
-
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-
<?php
-require_once($GLOBALS['g_campsiteDir']. "/$ADMIN_DIR/country/common.php");
-require_once($GLOBALS['g_campsiteDir']. "/classes/SimplePager.php");
-camp_load_translation_strings("api");
-
-$f_country_language_selected = camp_session_get('f_language_selected', '');
-$f_country_offset = camp_session_get('f_country_offset', 0);
-if (empty($f_country_language_selected)) {
-  $f_country_language_selected = null;
-}
-$ItemsPerPage = 20;
-$languages = Language::GetLanguages(null, null, null, array(), array(), true);
-$numCountries = Country::GetNumCountries($f_country_language_selected);
-
-$pager = new SimplePager($numCountries, $ItemsPerPage, "index.php?");
-
-$crumbs = array();
-$crumbs[] = array(getGS("Configure"), "");
-$crumbs[] = array(getGS("Countries"), "");
-echo camp_html_breadcrumbs($crumbs);
-
-?>
-
-<?php  if ($g_user->hasPermission("ManageCountries")) { ?>
-<table BORDER="0" CELLSPACING="0" CELLPADDING="1">
-    <tr>
-        <td><a href="add.php"><?php putGS("Add new"); ?></a></td>
-    </tr>
-</table>
-
- - - - -
Testing Objective C (Cocoa1AppDelegate.m)
-
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
#import "Cocoa1AppDelegate.h"
-
-@implementation Cocoa1AppDelegate
-
-@synthesize window,siteUrl,pageContents;
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
-{
-    // Insert code here to initialize your application
-    model = [[Cocoa1Model alloc] init];
-}
-
-- (IBAction)getSiteContents:(id)sender {
-    [model setPageUrl:[siteUrl stringValue]];
-    NSString* reply = [model getUrlAsString];
-    NSLog(@"pageSrc: %@", reply);
-    [pageContents setString:reply];
-    [[[pageContents textStorage] mutableString] appendString:reply];
-}
-
-@end
-
- - - - -
Testing Haskel (syntax_test.hs)
-
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
{-# LANGUAGE OverloadedStrings #-}
-module Main where
-
---import Prelude hiding (id)
---import Control.Category (id)
-import Control.Arrow ((>>>), (***), arr)
-import Control.Monad (forM_)
--- import Data.Monoid (mempty, mconcat)
-
--- import System.FilePath
-
-import Hakyll
-
-
-main :: IO ()
-main = hakyll $ do
-
-    route   "css/*" $ setExtension "css"
-    compile "css/*" $ byExtension (error "Not a (S)CSS file")
-        [ (".css",  compressCssCompiler)
-        , (".scss", sass)
-        ]
-
-    route   "js/**" idRoute
-    compile "js/**" copyFileCompiler
-
-    route   "img/*" idRoute
-    compile "img/*" copyFileCompiler
-
-    compile "templates/*" templateCompiler
-
-    forM_ ["test.md", "index.md"] $ \page -> do
-        route   page $ setExtension "html"
-        compile page $ pageCompiler
-            >>> applyTemplateCompiler "templates/default.html"
-            >>> relativizeUrlsCompiler
-
-sass :: Compiler Resource String
-sass = getResourceString >>> unixFilter "sass" ["-s", "--scss"]
-                         >>> arr compressCss
-
- - - - -
Testing Bash (syntax_test.sh)
-
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
#!/bin/bash
-
-cd $ROOT_DIR
-DOT_FILES="lastpass weechat ssh Xauthority"
-for dotfile in $DOT_FILES; do conform_link "$DATA_DIR/$dotfile" ".$dotfile"; done
-
-# TODO: refactor with suffix variables (or common cron values)
-
-case "$PLATFORM" in
-  linux)
-        #conform_link "$CONF_DIR/shell/zshenv" ".zshenv"
-        crontab -l > $ROOT_DIR/tmp/crontab-conflict-arch
-        cd $ROOT_DIR/$CONF_DIR/cron
-        if [[ "$(diff ~/tmp/crontab-conflict-arch crontab-current-arch)" == ""
-            ]];
-            then # no difference with current backup
-                logger "$LOG_PREFIX: crontab live settings match stored "\
-                    "settings; no restore required"
-                rm ~/tmp/crontab-conflict-arch
-            else # current crontab settings in file do not match live settings
-                crontab $ROOT_DIR/$CONF_DIR/cron/crontab-current-arch
-                logger "$LOG_PREFIX: crontab stored settings conflict with "\
-                    "live settings; stored settings restored. "\
-                    "Previous settings recorded in ~/tmp/crontab-conflict-arch."
-        fi
-    ;;
-
- - - - -
Testing Python (syntax_test.py)
-
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-
# test python (sample from offlineimap)
-
-class ExitNotifyThread(Thread):
-    """This class is designed to alert a "monitor" to the fact that a thread has
-    exited and to provide for the ability for it to find out why."""
-    def run(self):
-        global exitthreads, profiledir
-        self.threadid = thread.get_ident()
-        try:
-            if not profiledir:          # normal case
-                Thread.run(self)
-            else:
-                try:
-                    import cProfile as profile
-                except ImportError:
-                    import profile
-                prof = profile.Profile()
-                try:
-                    prof = prof.runctx("Thread.run(self)", globals(), locals())
-                except SystemExit:
-                    pass
-                prof.dump_stats( \
-                            profiledir + "/" + str(self.threadid) + "_" + \
-                            self.getName() + ".prof")
-        except:
-            self.setExitCause('EXCEPTION')
-            if sys:
-                self.setExitException(sys.exc_info()[1])
-                tb = traceback.format_exc()
-                self.setExitStackTrace(tb)
-        else:
-            self.setExitCause('NORMAL')
-        if not hasattr(self, 'exitmessage'):
-            self.setExitMessage(None)
-
-        if exitthreads:
-            exitthreads.put(self, True)
-
-    def setExitCause(self, cause):
-        self.exitcause = cause
-    def getExitCause(self):
-        """Returns the cause of the exit, one of:
-        'EXCEPTION' -- the thread aborted because of an exception
-        'NORMAL' -- normal termination."""
-        return self.exitcause
-    def setExitException(self, exc):
-        self.exitexception = exc
-    def getExitException(self):
-        """If getExitCause() is 'EXCEPTION', holds the value from
-        sys.exc_info()[1] for this exception."""
-        return self.exitexception
-    def setExitStackTrace(self, st):
-        self.exitstacktrace = st
-    def getExitStackTrace(self):
-        """If getExitCause() is 'EXCEPTION', returns a string representing
-        the stack trace for this exception."""
-        return self.exitstacktrace
-    def setExitMessage(self, msg):
-        """Sets the exit message to be fetched by a subsequent call to
-        getExitMessage.  This message may be any object or type except
-        None."""
-        self.exitmessage = msg
-    def getExitMessage(self):
-        """For any exit cause, returns the message previously set by
-        a call to setExitMessage(), or None if there was no such message
-        set."""
-        return self.exitmessage
-
- - - - -
Testing Perl (syntax_test.pl)
-
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-
#!perl -w
-
-# Time-stamp: <2002/04/06, 13:12:13 (EST), maverick, csvformat.pl>
-# Two pass CSV file to table formatter
-
-$delim = $#ARGV >= 1 ? $ARGV[1] : ',';
-print STDERR "Split pattern: $delim\n";
-
-# first pass
-open F, "<$ARGV[0]" or die;
-while(<F>)
-{
-  chomp;
-  $i = 0;
-  map { $max[$_->[1]] = $_->[0] if $_->[0] > ($max[$_->[1]] || 0) }
-    (map {[length $_, $i++]} split($delim));
-}
-close F;
-
-print STDERR 'Field width:   ', join(', ', @max), "\n";
-print STDERR join(' ', map {'-' x $_} @max);
-
-# second pass
-open F, "<$ARGV[0]" or die;
-while(<F>)
-  {
-  chomp;
-  $i = 0;
-  map { printf("%-$max[$_->[1]]s ", $_->[0]) }
-    (map {[$_, $i++]} split($delim));
-  print "\n";
-}
-close F;
-
- - - - -
Test Java (syntax_test.java)
-
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-
import java.util.Map;
-import java.util.TreeSet;
-
-public class GetEnv {
-  /**
-   * let's test generics
-   * @param args the command line arguments
-   */
-  public static void main(String[] args) {
-    // get a map of environment variables
-    Map<String, String> env = System.getenv();
-    // build a sorted set out of the keys and iterate
-    for(String k: new TreeSet<String>(env.keySet())) {
-      System.out.printf("%s = %s\n", k, env.get(k));
-    }
-  }    }
-
- - - - -
Test C (syntax_test.c)
-
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-
#define UNICODE
-#include <windows.h>
-
-int main(int argc, char **argv) {
-  int speed = 0, speed1 = 0, speed2 = 0; // 1-20
-  printf("Set Mouse Speed by Maverick\n");
-
-  SystemParametersInfo(SPI_GETMOUSESPEED, 0, &speed, 0);
-  printf("Current speed: %2d\n", speed);
-
-  if (argc == 1) return 0;
-  if (argc >= 2) sscanf(argv[1], "%d", &speed1);
-  if (argc >= 3) sscanf(argv[2], "%d", &speed2);
-
-  if (argc == 2) // set speed to first value
-    speed = speed1;
-  else if (speed == speed1 || speed == speed2) // alternate
-    speed = speed1 + speed2 - speed;
-  else
-    speed = speed1;  // start with first value
-
-  SystemParametersInfo(SPI_SETMOUSESPEED, 0,  speed, 0);
-  SystemParametersInfo(SPI_GETMOUSESPEED, 0, &speed, 0);
-  printf("New speed:     %2d\n", speed);
-  return 0;
-}
-
- - - - - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/blogging/index.html b/octopress/blogging/index.html deleted file mode 100644 index 9d18e01..0000000 --- a/octopress/blogging/index.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - - 블로깅하기 기본편 - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

블로깅하기 기본편

-

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

-
- -

옥토프레스에서는 rake task를 몇 개 제공합니다. 이를 사용해서 메타데이터가 로드된, 그리고 지킬의 명명 규칙에 따르는 포스트와 페이지를 만들 수 있습니다.

- -

또한 옥토프레스에서는 포스트에 대한 전체 피드, 카테고리별 피드를 생성합니다. ( atom.xml와, blog/categories/<category>/atom.xml에서 확인할 수 있습니다).

- -

블로그 글쓰기

- -

블로그 글은 source/_posts디랙토리 밑에 저장 되고 지킬(Jekyll)의 이름 규칙(YYYY-MM-DD-post-title.markdown)을 따라야 합니다. 파일의 이름은 url의 일부로 이용되고 날짜는 글들을 구분하고 보여주는 순서를 정하는데 사용됩니다.

- -

옥토프레스에서는 rake 명령어를 제공하는데요, rake 명령어를 사용하면 정확한 명명 규칙을 따르며 적절한 yaml 메타데이터를 포함하는 새 블로그 포스트를 만들 수 있습니다.

- -

문법 (Syntax)

- -
1
-
rake new_post["title"]
-
- - -

new_post 명령어의 뒤에는 자연스러운 제목이 와야 합니다.그리고 new_post는 파일이름을 만들 때, url로 쓰기에 부적합한 문자는 제거해 줍니다.

- -

새로운 포스트의 기본 확장자는 markdown 이지만 Rakefile 에서 수정할 수 있습니다.

- -

새로운 포스트를 만드는 방법 - 예

- -
1
-2
-3
-
rake new_post["Zombie Ninjas Attack: A survivor's retrospective"]
-   # (닌자 좀비의 공격 : 살아남은 자의 회상)
-# 이렇게 쓰면 다음의 파일이 만들어집니다. source/_posts/2011-07-03-zombie-ninjas-attack-a-survivors-retrospective.markdown
-
- - -

파일이름에 따라서 url 주소가 만들어집니다. 위에서 만든 포스트의 기본url은 이렇습니다. http://site.com/blog/2011/07/03/zombie-ninjas-attack-a-survivors-retrospective/index.html [기본 영구주소 설정에 관하여] (https://github.com/mojombo/jekyll/wiki/Permalinks)

- -

포스트를 텍스트 편집기에서 열어서 보세요. 포스트와 페이지를 처리하는 방법을 알려주는 yaml 부분 yaml front matter을 볼 수 있을 겁니다.

- -
1
-2
-3
-4
-5
-6
-7
-
---
-layout: post
-title: "Zombie Ninjas Attack: A survivor's retrospective"
-date: 2011-07-03 5:59
-comments: true
-categories:
----
-
- - -

여기서는 댓글 기능을 숨기거나 포스트의 카테고리를 지정할 수 있습니다. 팀블로그를 운영하신다고요? 그렇다면 포스트의 메타데이터에 author: 저자의 이름를 추가하면 됩니다. 초안 작업 중이라면, 포스트의 메타데이터에 published: false라고 추가해두면, 포스트를 저장하더라도 블로그에 게시되지 않습니다.

- -

카테고리를 한 개, 또는 여러 개 추가하려면, 아래와 같이 하세요.

- -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-
 # 카테고리 한 개 추가하는 방법
-categories: Sass
-
-# 카테고리 여러 개 추가하는 방법 - 1
-categories: [CSS3, Sass, Media Queries]
-
-# 카테고리 여러 개 추가하는 방법 - 2
-categories:
-- CSS3
-- Sass
-- Media Queries
-
- - -

새로운 페이지 만들기

- -

블로그 소스 폴더에다가 페이지를 만들어두면 지킬이 파싱을 해줍니다.

- -

그리고 파일의 경로에 따라 URL이 만들어져요. -즉, about.markdown 파일을 만들면, 이 페이지의 URL은 site.com/about.html이 됩니다. -site.come/about/ 이런 경로를 쓰고 싶으시면, 페이지를 만드실 때 about/index.markdown 이렇게 about 폴더 안에 만들면 됩니다.

- -

옥토프레스에서는 rake 명령어를 사용해서 새로운 페이지를 쉽게 만들 수 있습니다.

- -
1
-2
-3
-4
-5
-
rake new_page[super-awesome]
-# 이렇게 써주면 /source/super-awesome/index.markdown 파일이 만들어집니다.
-
-rake new_page[super-awesome/page.html]
-# 이렇게 써주면 /source/super-awesome/page.html 파일이 만들어집니다.
-
- - -

new post 명령어를 썼을 때와 마찬가지로, 새로운 페이지 파일의 기본 파일확장자는 markdown이지만, Rakefile에서 수정할 수 있습니다. 새로 생성된 페이지를 편집기에서 열어보면 다음과 같이 나옵니다.

- -
1
-2
-3
-4
-5
-6
-7
-8
-
---
-layout: page
-title: "Super Awesome"
-date: 2011-07-03 5:59
-comments: true
-sharing: true
-footer: true
----
-
- - -

포스트의 제목은 파일명에서 자동으로 추출됩니다. 그러니, 포스트의 제목은 별도로 바꿔줘야 합니다.

- -

이것은 yaml 포스트하고 매우 비슷합니다. 카테고리를 포함하지 않는다는 점만 빼면요. 그리고 공개/비공개 여부를 바꿀 수도 있고, footer 부분을 모두 제거할 수도 있습니다.

- -

페이지에서 날짜 부분을 안 보여주고 싶으면, yaml에서 지워버리면 됩니다.

- -

페이지, 포스트의 내용부분(Content)

- -

페이지 및 포스트의 내용부분(content)은 여러분이 사이트 환경 파일(site configuration file)에서 지정해둔 마크업 엔진에 의해 표현됩니다(render).

- -

또한 지킬문서 Jekyll docs 에서 소개하는 리퀴드 템플릿 기능 liquid template features 을 사용할 수 있습니다.

- -

포스트에다가 주석(<!-- more --> )을 포함시키면, 주석표시 아래의 부분은 요약문(index page)에 안 나옵니다. 대신에 “Continue →” 버튼이 나옵니다. 이 버튼을 누르면 전체 포스트를 볼 수 있습니다.

- -

새로운 포스트 만들기 & 미리보기

- -
1
-2
-3
-4
-
rake generate   # public 폴더 안에 새로운 포스트와 페이지를 만듭니다.
-rake watch      # source/나 sass/ 폴더 안에 변경된 것이나 새로 생성된 것이 있는지 감시(watch)합니다.
-rake preview    # 감시하고 웹서버를 http://localhost:4000에다가 마운트합니다.
-   (역자주 : 감시(watch) : 변경사항이 있으면 자동으로 html이나 css를 생성해주는 명령어)
-
- - -

포스트를 발행하지 않은 채로 작업하려면, 포스트의 YAML 헤더 부분에 published:false를 추가하면 됩니다.

- -

이 상태에서 rake preview 명령어를 사용하면 로컬 서버에서 이 포스트를 미리 볼 수 있습니다. 하지만 rake generate 명령어를 사용해도 포스트는 발행되지 않습니다.

- -

‘rake preview’ 서버를 사용하는 것은 멋지지만 여러분이 POW 사용자라면, 옥토프레스 사이트를 다음과 같이 설정할 수 있습니다.

- -
1
-2
-3
-
cd ~/.pow
-ln -s /path/to/octopress octopress
-cd -
-
- - -

자~ 이제 POW를 설정했으니, rake watch를 실행해서, http://octopress.dev를 로드해보세요. (역자주: POW - 자동화툴의 하나)

- -

그리고 코드조각 공유하기하고 플러그인 사용해서 블로깅하기문서도 봐 주세요.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/blogging/plugins/index.html b/octopress/blogging/plugins/index.html deleted file mode 100644 index ecaada7..0000000 --- a/octopress/blogging/plugins/index.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - Plugins - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Plugins

-

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

-
- -

There are other plugins for octopress, but here’s an overview of the ones you’ll be likely to use while blogging. -This is mainly a description and demo, so be sure to follow the links beneath each section for examples and documentation.

- -

Excerpts

- -

When writing a post, you can add an HTML comment <!--more--> to split the post for an excerpt. Only the first section of the post, before the comment, -will show up on the blog index.

- -

HTML5 Video Tag

- -

This plugin makes it easy to insert mp4 encoded HTML5 videos in a post. Octopress ships with javascripts which -detect mp4 video support (using Modernizr) and automatically offer a flash player fallback.

- -

Examples & documentation »

- -

Image Tag

- -

This plugin makes it easy to insert images in a post, with optional class names, alt and title attributes.

- -

Examples & documentation »

- -

Block quote

- -

Give a man a fish, he’ll have food for a day. Teach a man to fish, and he’ll always come to you with his fishing problems.

- - -

Examples & documentation »

- -

Pull quote

- -

Octopress offers a CSS only technique for pull quotes, based on the technique by Maykel Loomans.

- -

-When writing longform posts, I find it helpful to include pull quotes to help readers easily identify the topics covered in each section. Some prefer to break things up with lots of headings, and while this seems to be a trend it doesn’t work so well for long form prose. -It is important to note that pull quotes are merely visual in presentation and should not appear twice in the text. That is why it a CSS only technique for styling pull quotes is preferable. Octopress includes a handy pull quote plugin to make this easy for you. -

- -

Examples & documentation »

- -

Code Blocks

- -

Write blocks of code directly in your posts and optionally add titles and links.

- -
Javascript Array Syntax (array.js)MDN Documentation
1
-2
-
var arr1 = new Array(arrayLength);
-var arr2 = new Array(element0, element1, ..., elementN);
-
- - -

Examples & documentation »

- -

Gist Tag

- -

Easily embed gists in your posts or pages.

- -
{% gist 996818 %}
-
- -

Examples & documentation »

- -

Include Code

- -

Import files on your filesystem into any blog post as embedded code snippets with syntax highlighting and a download link.

- -

File /Users/marocchino/Documents/engfordev.github.com/source/downloads/code/test.js could not be found

- -

Examples & documentation »

- -

Render Partial

- -

Import files on your file system into any blog post or page. For example, to embed this page in another post I’d use the following code.

- -
{% render_partial docs/blogging/plugins/index.markdown %}
-
- -

Examples & documentation »

- -

Also see the Octopress Plugin index for the full list of Octopress plugins.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/configuring/index.html b/octopress/configuring/index.html deleted file mode 100644 index aed54a1..0000000 --- a/octopress/configuring/index.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - Configuring Octopress - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Configuring Octopress

-

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

-
- -

« Previous, Octopress Setup

- -

저는 옥토프레스의 설정을 정말 단순하게 유지하려고 노력했습니다. 여러분은 ‘Rakefile’과 ‘_config.yml’ 파일만 수정하면 됩니다. 옥토프레스 설정관련한 파일은 다음과 같습니다.

- -
1
-2
-3
-4
-
_config.yml       # 주요 설정  (지킬 설정)
-Rakefile          # 배포에 관한 설정
-config.rb         # 컴퍼스(Compass) 설정
-config.ru         # 랙(Rack) 설정
-
- - -

Rakefile안의 설정들은 대부분 배포에 관련된 것들이며, rsync를 사용하지 않는 이상 건드리지 않아도 됩니다.

- -

블로그 환경설정

- -

`_config.yml 파일에는 옥토프레스 블로그 설정에 관한 부분이 세 개의 섹션으로 나누어져 있습니다.

- -

내용을 미리 조금 이야기하자면…: url은 바꿔야 돼요. 그리고 title, subtitle,author` 부분도 바꾸고 싶을 겁니다. 그리고 서드 파티 서비스를 사용하도록 설정할 수 있습니다.

- -

주요 설정

- -
1
-2
-3
-4
-5
-6
-7
-8
-9
-
url:                # RSS용으로 url을 다시 만들어낼 때 사용합니다.
-title:              # 헤더하고 타이틀 태그에서 사용합니다.
-subtitle:           # 헤더에서 설명하기 위해 사용합니다.(description).
-author:             # RSS, Copyright, 메타데이터에 들어가는 여러분의 이름입니다.
-simple_search:      # 사이트내 검색에 사용할 간단한 검색 엔진입니다.
-description:        # 사이트에 대해 기본으로 제공하는 간단한 메타 설명입니다.
-subscribe_rss:      # 블로그의 피드에 사용하는 Url입니다. 디폴트는 /atom.xml입니다.
-subscribe_email:    # 이메일로 구독하기 위한 url 주소입니다. (서비스가 필요하고요.)
-email:              # RSS피드용으로 사용할 이메일 주소입니다. 원하는 경우에 사용하시면 되요.
-
- - -

주의하세요! 여러 사람이 쓰는 블로그라면 어쩌면 ‘author’의 값을 당신의 회사나 프로젝트 이름으로 하면 됩니다. 그리고 포스트와 페이지에 실제 작업한 사람을 나타내려면 저자에 대한 메타데이터(author metadata)를 추가하세요.

- -

지킬(Jekyll) & 플러그인

- -

여기에 나오는 설정들은 지킬(Jekyll)과 플러그인에서 사용합니다.

- -

지킬 사용이 익숙하지 않으시면, 이곳을 한번 봐주세요. configuration octopress에서, 이 문서에서 다루지 않은 옵션들을 볼 수 있습니다. .

- -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-
root:               # 상대 주소(url)를 위한 매핑 (기본값은 : /)
-permalink:          # 블로그 포스트를 위한 퍼머링크 (고유주소) 구조
-source:             # 사이트 소스 파일을 위한 디렉토리
-destination:        # 생성되는 사이트 파일에 대한 디렉토리
-plugins:            # 지킬 플러그인을 위한 디렉토리
-code_dir:           # 코드 스니펫에 대한 디렉토리 (또한 include_code plugin에 대한 디렉토리)
-category_dir:       # 생성되는 블로그 분류 페이지를 위한 카테고리
-pygments:           # pygments 하이라이트 기능을 끄거나 켜기(토글하기)
-paginate:           # 블로그의 인덱스 페이지에서 보여줄 포스트 갯수
-pagination_dir:     # URL에 붙는 페이지의 베이스 경로
-recent_posts:       # 사이드바에서 보여줄 최근 포스트의 개수
-default_asides:     # 사이드바에서 보여줄 것, 보여주는 순서를 설정함
-blog_index_asides:  # 블로그 요약문을 사이드바에 보여줄 지 설정하는 것(Optional sidebar config for blog index page)(블로그 요약문)
-post_asides:        # Optional sidebar config for post layout
-page_asides:        # Optional sidebar config for page layout
-
- - -

블로그 포스트의 영구주소(permalinks)가 표기되는 방식을 바꾸고 싶으시면, 이 문서를 보세요. -지킬의 영구주소 관련문서.

- -

주의하세요! 지킬에는 WEBrick서버에 연결해서 하위 디랙토리 발행을 구현한 baseurl 설정이 있지만 사용하지 마세요.

- -

사이트를 하위 디렉토리(subdirectory)로 발행하려면 이 문서를 보세요. (옥토프레스를 하위 디렉토리에 배포하기).

- -

써드 파티 설정

- - -

써드 파티를 통합시키기 위한 설정은 이미 준비되어 있습니다. 설정에서 빈 칸을 채우면 사이트에 추가됩니다.

- -
    -
  • 트위터 - *트위터 피드 사이드바와 팔로우 버튼, (포스트나 페이지를 공유하는) 트윗버튼을 설정하세요.

  • -
  • 구글 플러스 원 - *구글 플러스 원 네트워크에서 작성한 포스트와 페이지를 공유하도록 설정하세요.

  • -
  • 핀보드 - *핀보드에서 즐겨찾기 등록한 것을 블로그의 사이트바에서 보여줍니다.

  • -
  • 딜리셔스 - *딜리셔스에 최근에 등록한 북마크를 블로그의 사이드바에서 공유하세요..

  • -
  • 디스커스 댓글 - *사이트에서 disqus를 사용하여 댓글을 달 수 있도록 disqus short name을 여기에 추가하세요.

  • -
  • 구글 분석기(Google Analytics) - *구글 분석기로 사이트/블로그를 분석하려면, 여기에 구글 분석기 id를 적어 주세요.

  • -
- - -

옥토프레스 레아아웃에서는 이 설정사항(configuration)을 읽어들여서, 사용하도록 설정되있고, 서비스에 필요한 자바스크립트와 html만을 포함시킵니다.

- -

자, 다음은 옥토프레스로 블로깅 하기로 넘어가죠 »

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/deploying/github/index.html b/octopress/deploying/github/index.html deleted file mode 100644 index 4bd8ee6..0000000 --- a/octopress/deploying/github/index.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - Deploying to Github Pages - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Deploying to Github Pages

-

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

-
- -

With Github User/Organization pages

- -

Use this if you want to host a blog from http://username.github.com (though you can also use custom domains).

- -

Create a new Github repository and name the repository with your user name or organization name username.github.com or organization.github.com.

- -

Github Pages for users and organizations uses the master branch like the public directory on a web server, serving up the files at your Pages url http://username.github.com. -As a result, you’ll want to work on the source for your blog in the source branch and commit the generated content to the master branch. Octopress has a configuration task that helps you set all this up.

- -
1
-
rake setup_github_pages
-
- - -

This will:

- -
    -
  1. Ask you for your Github Pages repository url.
  2. -
  3. Rename the remote pointing to imathis/octopress from ‘origin’ to ‘octopress’
  4. -
  5. Add your Github Pages repository as the default origin remote.
  6. -
  7. Switch the active branch from master to source.
  8. -
  9. Configure your blog’s url according to your repository.
  10. -
  11. Setup a master branch in the _deploy directory for deployment.
  12. -
- - -

Next run:

- -
1
-2
-
rake generate
-rake deploy
-
- - -

This will generate your blog, copy the generated files into _deploy/, add them to git, commit and push them up to the master branch. In a few seconds you should get an email -from Github telling you that your commit has been received and will be published on your site.

- -

Don’t forget to commit the source for your blog.

- -
1
-2
-3
-
git add .
-git commit -m 'your message'
-git push origin source
-
- - -

Note: With new repositories, Github sets the default branch based on the branch you push first, and it looks there for the generated site content. -If you’re having trouble getting Github to publish your site, go to the admin panel for your repository and make sure that the master branch is the default branch.

- -

With Github Project pages (gh-pages)

- -

Github’s Project Pages service allows you to host a site for your existing open source project. -Github will look for a gh-pages branch in your project’s repository and make the contents available at url like http://username.github.com/project.

- -

Here’s now you can set up Octopress site to publish to your projects gh-pages repository:

- -
1
-
rake setup_github_pages
-
- - -

This will:

- -
    -
  1. Ask you for the repository url for your project.
  2. -
  3. Rename the remote pointing to imathis/octopress from ‘origin’ to ‘octopress’
  4. -
  5. Configure your blog for deploying to a subdirectory.
  6. -
  7. Set up a gh-pages branch for your project in the _deploy directory, ready for deployment.
  8. -
- - -

Next run:

- -
1
-2
-
rake generate
-rake deploy
-
- - -

This will generate your blog, copy the generated files into _deploy/, add them to git, commit and push them up to the master branch. In a few seconds you should get an email -from Github telling you that your commit has been received and will be published on your site.

- -

Now you have a place to commit the generated content for your site, but you should also set up repository to store the source for your blog. -After you set up a repository for your blog source, add it as the origin remote.

- -
1
-2
-3
-
git remote add origin (your repo url)
-# set your new origin as the default branch
-git config branch.master.remote origin
-
- - -

Now push your changes and you’ll be all set.

- -

Custom Domains

- - -

First you’ll need to create a file named CNAME in the source containing your domain name.

- -
1
-
echo 'your-domain.com' >> source/CNAME
-
- - -

From Github’s Pages guide:
-Next, you’ll need to visit your domain registrar or DNS host and add a record for your domain name. -For a sub-domain like www.example.com you would simply create a CNAME record pointing at charlie.github.com. -If you are using a top-level domain like example.com, you must use an A record pointing to 207.97.227.245. -Do not use a CNAME record with a top-level domain it can have adverse side effects on other services like email. -Many DNS services will let you set a CNAME on a TLD, even though you shouldn’t. Remember that it may take up to a full day for DNS changes to propagate, so be patient.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/deploying/heroku/index.html b/octopress/deploying/heroku/index.html deleted file mode 100644 index 7786ed0..0000000 --- a/octopress/deploying/heroku/index.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - Using Octopress with Heroku - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Using Octopress With Heroku

-

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

-
- -

If you don’t already have a Heroku account, create one, it’s free. Then install the Heroku gem.

- -

Basic Octopress setup

- -

First make sure you’ve installed the Heroku gem

- -
1
-
gem install heroku
-
- - -

Next create a heroku app for deployment. If this is your first time using Heroku, this command will ask for your account credentials, -and automatically upload your public SSH key. If you don’t already have a public key follow Github’s guide and create one.

- -
1
-
heroku create
-
- - -

This will create a new Heroku app for you to deploy to and add a git remote named ‘heroku’.

- -
1
-2
-
# Set heroku to be the default remote for push/fetch
-git config branch.master.remote heroku
-
- - -

Edit the .gitignore in the root of your repository and remove public. This will let you add generated content for deploying it to Heroku.

- -
1
-2
-3
-4
-
rake generate
-git add .
-git commit -m 'site updated'
-git push heroku master
-
- - -

That’s it, you just deployed to Heroku. If you want to set up a custom domain check out the docs at Heroku.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/deploying/index.html b/octopress/deploying/index.html deleted file mode 100644 index 98d2dd9..0000000 --- a/octopress/deploying/index.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - 배포하기 - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

배포하기

-

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

-
- -

옥토프레스 블로그를 깔끔하고 쉽게 배포하는 방법을 소개합니다.

- -

깃헙 페이지

- -

블로그를 Github의 Pages 서비스에 호스팅하는건 공짜이고 다른 도메인으로 연결할 수도 있습니다.배포를 하려면 간단히 Github의 저장소에 푸쉬만 하면 됩니다. 이런 점은 개인용 블로그를 운영하기에도 좋고요, pull request와 커밋 방식으로 팀원의 참여가 이루어지는 그룹 블로그 운영하기에도 매우 좋습니다.

- -

깃헙 페이지(Github Pages)에 배포하기 »

- -

Heroku

- -

깃헙 페이지(Github Pages)처럼, Heroku도 공짜입니다. 그리고 다른 도메인을 연결할 수 있고 배포환경은 깃(git)을 기반으로 합니다. Heroku는 깃헙 페이지보다 더 단순하고, 블로그 저장소를 비공개로 관리할 수 있다는 장점이 있습니다.

- -

Heroku에 배포하기 »

- -

Rsync

- -

웹 호스팅 서비스를 이용하고 있다면, Rsync로 배포할 수도 있습니다. 이렇게 배포하면 SSH를 사용해서 새로운 파일이나 변경된 파일을 동기화시키기 때문에 매우 빠릅니다.

- -

SSH 방식의 접근을 지원하는 웹호스팅 사이트를 찾으신다면, 이 사이트를 살펴 보세요. Dreamhost (저는 2005년부터 이 사이트를 쓰고 있는데요, 만족하고 있답니다.)

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/deploying/rsync/index.html b/octopress/deploying/rsync/index.html deleted file mode 100644 index f6c1bec..0000000 --- a/octopress/deploying/rsync/index.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - Deploying with Rsync - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Deploying With Rsync

-

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

-
- -

Deploying with Rsync via SSH

- - -

Add your server configurations to the Rakefile under Rsync deploy config. To deploy with Rsync, be sure your public key is listed in your server’s ~/.ssh/authorized_keys file.

- -
1
-2
-3
-
ssh_user       = "user@domain.com"
-document_root  = "~/website.com/"
-deploy_default = "rsync"
-
- - -

Now if you run

- -
1
-2
-
rake generate   # If you haven't generated your blog yet
-rake deploy     # Syncs your blog via ssh
-
- - -

in your terminal, your public directory will be synced to your server’s document root.

- -

Version control

- -

You’ll want to keep your blog source in a remote git repository, -so either set up a Github repository or host your own and then do this.

- -
1
-2
-3
-4
-5
-
# Since you cloned Octopress, you'll need to change the origin remote
-git remote rename origin octopress
-git remote add origin (your repository url)
-# set your new origin as the default branch
-git config branch.master.remote origin
-
- - -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/deploying/_self_hosted_git.markdown could not be found

- -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/deploying/_subdir.markdown could not be found

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/index.html b/octopress/index.html deleted file mode 100644 index 018d261..0000000 --- a/octopress/index.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - Octopress Documentation - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Octopress Documentation

-

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

-
- -

Octopress is a framework designed for Jekyll, the static blogging engine powering Github Pages. Have a look through -the documentation and if you have trouble, I’ll be happy to help. If you find errors in the documentation -post an issue or fork and send a pull request on the site branch.

- -

Getting Started

- -

This section will help you get set up, and explain how to configure Octopress for your site. -Note: If you already have a blog, check out Jekyll’s Migration page to help you get your current blog set up for Octopress blogging.

- - - - -

Using Octopress

- -

Your blog should be awesome. This should help.

- - - - -

Octopress Plugins - Usage & Examples

- -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/plugins/index.markdown could not be found

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/backtick-codeblock/index.html b/octopress/plugins/backtick-codeblock/index.html deleted file mode 100644 index 703534c..0000000 --- a/octopress/plugins/backtick-codeblock/index.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - Backtick Code Blocks - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Backtick Code Blocks

-

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

-
- -

With the backtick_codeblock filter you can use Github’s lovely back tick syntax highlighting blocks. -Simply start a line with three back ticks followed by a space and the language you’re using.

- -

Syntax

- -
``` [language] [title] [url] [link text]
-code snippet
-```
-
- -

Example (plain)

- -
```
-$ sudo make me a sandwich
-```
-
- -
1
-
$ sudo make me a sandwich
- - -

Example With Syntax Highlighting a Caption and Link

- -
``` ruby Discover if a number is prime http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/ Source Article
-class Fixnum
-  def prime?
-    ('1' * self) !~ /^1?$|^(11+?)\1+$/
-  end
-end
-```
-
- -
Discover if a number is prime Source Article
1
-2
-3
-4
-5
-
class Fixnum
-  def prime?
-    ('1' * self) !~ /^1?$|^(11+?)\1+$/
-  end
-end
-
- - - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/blockquote/index.html b/octopress/plugins/blockquote/index.html deleted file mode 100644 index 5ffed72..0000000 --- a/octopress/plugins/blockquote/index.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - Blockquote - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Blockquote

-

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

-
- -

The blockquote plugin takes and author, source, title and quote, and outputs semantic HTML.

- -

Syntax

- -
{% blockquote [author[, source]] [link] [source_link_title] %}
-Quote string
-{% endblockquote %}
-
- -

You’ll notice there are two entries for source; one after author, and one after link. If you are citing from a printed work or a speech or something you cannot link to, -use the first method Author's Name, Cited Work. If you’re going to link to the work, omit the first source method, and add a source title after the link Author's Name http://source.com Article title.

- -

Examples

- -

Blockquote arguments are optional, you can output a plain blockquote like this.

- -
{% blockquote %}
-Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.
-{% endblockquote %}
-
- -

Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.

- - -

Quote from a printed work.

- -
{% blockquote Douglas Adams, The Hichhikers Guide to the Galaxy %}
-Flying is learning how to throw yourself at the ground and miss.
-{% endblockquote %}
-
- -

Flying is learning how to throw yourself at the ground and miss.

Douglas Adams The Hitchhikers Guide to the Galaxy
- - -

Quote from Twitter

- -
{% blockquote @allanbranch https://twitter.com/allanbranch/status/90766146063712256 %}
-Over the past 24 hours I've been reflecting on my life & I've realized only one thing. I need a medieval battle axe.
-{% endblockquote %}
-
- -

Over the past 24 hours I’ve been reflecting on my life & I’ve realized only one thing. I need a medieval battle axe.

- - -

Quote from an article on the web

- -
{% blockquote Seth Godin http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html Welcome to Island Marketing %}
-Every interaction is both precious and an opportunity to delight.
-{% endblockquote %}
-
- -

Every interaction is both precious and an opportunity to delight.

- - -

For those who appreciate the little things, you’ll notice in the Twitter example above, the url is truncated and drops the protocol segment. -Sometimes (like with Twitter) ading a link title doesn’t really make sense, but showing the full url is noisy and distracting. -For this reason, the blockquote plugin automatically strips out the protocol, and if the url is longer than 32 characters it truncates the url on a forward slash for beauty’s sake.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/category-generator/index.html b/octopress/plugins/category-generator/index.html deleted file mode 100644 index 85fa23d..0000000 --- a/octopress/plugins/category-generator/index.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - Category Generator - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Category Generator

-

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

-
- -

The category generator builds category specific archive pages for each category in your blog posts. -The archive pages use the category layout (included with Octopress). In the _config.yml you may change -the directory for the category archives if you like and the title for the category pages.

- -
category_dir: blog/categories
-category_title_prefix: "Category: "
-
- -

If you visit a category archive for ‘open source’ the url would be /blog/categories/open-source/ and the title would be Category: Open Source.

- -

This plugin was originally developed by Dave Perrett but it has been updated and improved for Octopress.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/codeblock/index.html b/octopress/plugins/codeblock/index.html deleted file mode 100644 index 093fbc0..0000000 --- a/octopress/plugins/codeblock/index.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - Codeblock - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Codeblock

-

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

-
- -

With this plugin you can write blocks of code directly in your posts and optionally add titles and links.

- -

Syntax

- -
{% codeblock [title] [lang:language] [url] [link text] %}
-code snippet
-{% endcodeblock %}
-
- -

Example 1

- -
{% codeblock %}
-Awesome code snippet
-{% endcodeblock %}
-
- -
1
-
Awesome code snippet
- - -

Example 2

- -

You can also add syntax highlighting like this.

- -
{% codeblock lang:objc %}
-[rectangle setX: 10 y: 10 width: 20 height: 20];
-{% endcodeblock %}
-
- -
1
-
[rectangle setX: 10 y: 10 width: 20 height: 20];
-
- - -

Example 3

- -

Including a file extension in the title enables highlighting

- -
{% codeblock Time to be Awesome - awesome.rb %}
-puts "Awesome!" unless lame
-{% endcodeblock %}
-
- -
Time to be Awesome - awesome.rb
-
1
-
puts "Awesome!" unless lame
-
- - -

Example 4 (Force Highlighting)

- -

Pygments supports many languages, but doesn’t recognize some file extensions. -Add lang:your_language to force highlighting if the filename doesn’t work.

- -
{% codeblock Here's an example .rvmrc file. lang:ruby %}
-rvm ruby-1.8.6 # ZOMG, seriously? We still use this version?
-{% endcodeblock %}
-
- -
Here’s an example .rvmrc file.
-
1
-
rvm ruby-1.8.6 # ZOMG, seriously? We still use this version?
-
- - -

Example 5

- -

Add an optional URL to enable downloading or linking to source.

- -
{% codeblock Javascript Array Syntax lang:js http://j.mp/pPUUmW MDN Documentation %}
-var arr1 = new Array(arrayLength);
-var arr2 = new Array(element0, element1, ..., elementN);
-{% endcodeblock %}
-
- -
Javascript Array Syntax MDN Documentation
1
-2
-
var arr1 = new Array(arrayLength);
-var arr2 = new Array(element0, element1, ..., elementN);
-
- - -

The last argument link_text is optional. You may want to link to a source for download file, or documentation on some other site.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/gist-tag/index.html b/octopress/plugins/gist-tag/index.html deleted file mode 100644 index 1f1ee62..0000000 --- a/octopress/plugins/gist-tag/index.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - Gist Tag - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Gist Tag

-

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

-
- -

All you need is the gist’s id and you can easily embed it in your page. This actually downloads a cache of the gist and embeds it in a <noscript> tag for RSS -readers and search engines, while still using Github’s javascript gist embed code for browsers.

- -

Syntax

- -
{% gist gist_id [filename] %}
-
- -

Example

- -
{% gist 996818 %}
-
- -
-
- - -

If you have a gist with multiple files, you can include files one at a time by adding the name after the gist id.

- -
{% gist 1059334 svg_bullets.rb %}
-{% gist 1059334 usage.scss %}
-
- -

This plugin was developed by Brandon Tilly but I have fixed some bugs and made some improvements to it for Octopress.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/image-tag/index.html b/octopress/plugins/image-tag/index.html deleted file mode 100644 index 7bfdf6c..0000000 --- a/octopress/plugins/image-tag/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - Image Tag - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Image Tag

-

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

-
- -

If you like Markdown’s syntax for images, you’ll love the simplicity of the Octopress image tag.

- -

Syntax

- -
{% img [class names] /path/to/image [width] [height] [title text [alt text]] %}
-
- -

Examples

- -
{% img http://placekitten.com/890/280 %}
-{% img left http://placekitten.com/320/250 Place Kitten #2 %}
-{% img right http://placekitten.com/300/500 150 250 Place Kitten #3 %}
-{% img right http://placekitten.com/300/500 150 250 'Place Kitten #4' 'An image of a very cute kitten' %}
-
- -

-Bacon ipsum dolor sit amet exercitation ball tip consectetur tempor. Biltong exercitation aliqua, ribeye consequat veniam consectetur.

- -

- -Aliquip nulla do tempor, ball tip dolore anim esse strip steak nisi nostrud. Tri-tip mollit deserunt ut duis, commodo brisket short loin est hamburger sunt consequat rump meatloaf. Exercitation enim aliqua tempor dolore. Non eu venison, officia boudin tri-tip enim beef ribs flank cupidatat in aute. Tail voluptate fugiat aute flank, venison sint.

- -

Brisket quis velit bresaola. Pork loin pork chop beef duis. Short loin fugiat officia short ribs magna. Ullamco eu proident jerky, fugiat chuck nostrud ham rump meatloaf eiusmod adipisicing. Qui et reprehenderit, magna biltong consequat short ribs pancetta. Tail tenderloin sausage, hamburger corned beef drumstick ad. Eu labore enim velit.

- -

Filler text courtesy of Bacon Ipsum, Images courtesy of Place Kitten.

- -

An image of a very cute kitten

- -

« Plugins page

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/include-array/index.html b/octopress/plugins/include-array/index.html deleted file mode 100644 index 79aac7e..0000000 --- a/octopress/plugins/include-array/index.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - Include Array Plugin - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Include Array Plugin

-

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

-
- -

This plugin was created for Octopress by Jason Woodward to make it possible to manage order of the sidebar partials from the _confgi.yml. -This is mostly useful for those working on an Octopress theme.

- -

First, How Partials Work

- -

Jekyll allows you to include partials from the /source/_includes directory as follows:

- -
1
-
{% include partial.html %}
-
- - -

This will embed the contents of /source/_includes/partial.html in place of the snippet above.

- -

Now, How Include Array Works

- -

First add an array pointing to a list of partials underneath /source/_includes

- -
1
-
asides: [asides/about.html, asides/social.html]
-
- - -

Now from within a template you can render the partials from the yaml array like this.

- -
1
-
{% include_array asides %}
-
- - -

Octopress uses include_array to allow configuration of different sidebars for each layout.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/include-code/index.html b/octopress/plugins/include-code/index.html deleted file mode 100644 index 34eb5a3..0000000 --- a/octopress/plugins/include-code/index.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - Include Code - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Include Code

-

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

-
- -

Import files on your filesystem into any blog post as embedded code snippets with syntax highlighting and a download link. -In the _config.yml you can set your code_dir but the default is source/downloads/code. Simply put a file anywhere under that directory and -use the following tag to embed it in a post.

- -

Syntax

- -
{% include_code [title] [lang:language] path/to/file %}
-
- -

Example 1

- -

This includes a file from source/downloads/code/test.js.

- -
{% include_code test.js %}
-
- -

File /Users/marocchino/Documents/engfordev.github.com/source/downloads/code/test.js could not be found

- -

Example 2

- -

By default the <figcaption> will be the filename, but you can add a title before the filepath if you like.

- -
{% include_code Add to_fraction for floats ruby/test.rb %}
-
- -

This includes a file from source/downloads/code/ruby/test.rb.

- -

File /Users/marocchino/Documents/engfordev.github.com/source/downloads/code/ruby/test.rb could not be found

- -

Example 3 (Force Highlighting)

- -

Pygments supports many languages, but doesn’t recognize some file extensions. -Add lang:your_language to force highlighting if the filename doesn’t work.

- -
{% include_code test.coffee lang:coffeescript %}
-
- -

File /Users/marocchino/Documents/engfordev.github.com/source/downloads/code/test.coffee could not be found

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/index.html b/octopress/plugins/index.html deleted file mode 100644 index dc0954d..0000000 --- a/octopress/plugins/index.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - Octopress Plugins - Usage & Examples - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Octopress Plugins - Usage & Examples

-

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

-
- -

Octopress ships with the following plugins. Many have been written specially for Octopress, but some have been selected from the Jekyll community with various changes and improvements.

- -
    -
  • HTML5 Video Tag - embeds mp4 encoded HTML5 videos
  • -
  • Backtick Code Block - for simple lightweight code sharing
  • -
  • Code Block - for sharing code with titles and links
  • -
  • Include Code - embed code from your filesystem with a download link
  • -
  • Gist Tag - automatically downloads and embeds Github gists
  • -
  • jsFiddle - embeds code from jsFiddle
  • -
  • Image Tag - easily post images with class names and titles
  • -
  • Render Partial - insert any file into another post or page
  • -
  • Block Quote - generate beautiful, semantic block quotes
  • -
  • Pull Quote - generate CSS only pull quotes — no duplicate data, no javascript
  • -
  • Category Generator - generates archive pages for each blog category
  • -
  • Include Array - includes an array of partials specified in the _config.yml
  • -
- - -

The following filters are used by Octopress, and are documented as necessary in their source.

- -
    -
  • Octopress filters - liquid filters built just for Octopress
  • -
  • Sitemap Generator - generates an SEO friendly sitemap.xml
  • -
  • Compass Compiler - forces Jekyll to compile Compass on each load
  • -
  • Haml Converter - allows .haml pages to be processed by Jekyll
  • -
  • Pygments Code - converts code snippets to highlighted code and caches to speed up Jekyll processing
  • -
  • Titlecase - required by several plugins to automatically generate proper title captalization
  • -
- - -

Octopress plugins source

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/jsfiddle-tag/index.html b/octopress/plugins/jsfiddle-tag/index.html deleted file mode 100644 index 6e2680e..0000000 --- a/octopress/plugins/jsfiddle-tag/index.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - jsFiddle Tag - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

jsFiddle Tag

-

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

-
- -

All you need is the fiddle’s id and you can easily embed it in your page.

- -

Syntax

- -
{% jsfiddle shorttag [tabs] [skin] [height] [width] %}
-
- -

Example

- -
{% jsfiddle ccWP7 %}
-
- - - - -

Adjusting Tabs

- -

It’s possible to easily adjust the display order of the tabs. In this case, I’m moving the result to be the first item shown.

- -
{% jsfiddle ccWP7 result,js,html,css %}
-
- - - - -

Presentation: Skin

- -

We can easily adjust the skin. Right now, it looks like light and presentation are really the only supported options, but if jsFiddle announces new options, you can start using them immediately.

- -
{% jsfiddle ccWP7 default presentation %}
-
- - - - -

This plugin was developed by Brian Arnold.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/pullquote/index.html b/octopress/plugins/pullquote/index.html deleted file mode 100644 index 9f18c23..0000000 --- a/octopress/plugins/pullquote/index.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - Pullquote - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Pullquote

-

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

-
- -

Octopress offers a CSS only technique for pull quotes, based on the technique by Maykel Loomans.

- -

Syntax

- -
{% pullquote %}
-Surround your paragraph with the pull quote tags. Then when you come to
-the text you want to pull, {" surround it like this "} and that's all there is to it.
-{% endpullquote %}
-
- -

Here’s a more realistic example of how you might use a pull quote. - -When writing longform posts, I find it helpful to include pull quotes to help readers easily identify the topics covered in each section. Some prefer to break things up with lots of headings, and while this seems to be a trend it doesn’t work so well for long form prose. -It is important to note that pull quotes are merely visual in presentation and should not appear twice in the text. That is why it a CSS only technique for styling pull quotes is preferable. Octopress includes a handy pull quote plugin to make this easy for you. -

- -

Inspect the source and you’ll see the pulled content appears in the data-pullquote attribute of the paragraph. The pull quote effect is created -entirely with CSS, and is supported by all modern browsers as well as IE8 and up.

- -

« Plugins page

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/render-partial/index.html b/octopress/plugins/render-partial/index.html deleted file mode 100644 index a90309f..0000000 --- a/octopress/plugins/render-partial/index.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - Render Partial - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Render Partial

-

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

-
- -

Import files on your file system into any blog post or page. As a best practice, be sure these files are included in your site’s repository.

- -

Syntax

- -
{% render_partial path/to/file %}
-
- -

The render_partial tag resolves paths to the source directory, so write your paths accordingly.

- -

Example Usage 1

- -

Perhaps you want to create a readme page for your blog. You have a file at source/readme/index.markdown and the README.markdown for your project is -a sibling to your source directory. To import your project’s readme into your readme page, you’d do this:

- -
{% render_partial ../README.markdown %}
-
- -

Example Usage 2

- -

You may have two pages which need to share some of the same content. To prevent your partial from being rendered by Jekyll as a page, add an underscore to the -beginning of the file name, or put it in a directory that begins with an underscore. For example, if you wanted multiple pages to share a table of contents, you might create source/documentation/_partials/TOC.markdown. -Any post or page could import this file like this:

- -
{% render_partial documentation/TOC.markdown %}
-
- -

« Plugins page

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/plugins/video-tag/index.html b/octopress/plugins/video-tag/index.html deleted file mode 100644 index f24c226..0000000 --- a/octopress/plugins/video-tag/index.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - Video Tag - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Video Tag

-

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

-
- -

This plugin makes it easy to insert mp4 encoded HTML5 videos in a post. Octopress ships with javascripts which -detect mp4 video support (using Modernizr) and automatically offer a flash player fallback.

- -

Syntax

- -
{% video url/to/video [width height] [url/to/poster] %}
-
- -

Example

- -
{% video http://s3.imathis.com/video/zero-to-fancy-buttons.mp4 640 320 http://s3.imathis.com/video/zero-to-fancy-buttons.png %}
-
- -

- -

You’re probably using a browser which supports HTML5 video and you’re looking at this page wondering if it really works. -Reloading the page with the url hash #flash-test and you’ll get to see the flash player fallback.

- - -

« Plugins page

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/setup/index.html b/octopress/setup/index.html deleted file mode 100644 index dec34fd..0000000 --- a/octopress/setup/index.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - 옥토프레스 설정하기 - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

옥토프레스 설정하기

-

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

-
- -

먼저, 옥토프레스는 해커들을 위한 블로그 프레임워크라는 점을 강조하고 싶어요. -옥토프레스를 쓰시려면 Git 기본 사용법이 익숙해야 하고, -쉘 커맨드에서 편하게 명령어를 실행할 수 있어야 해요. -이 말이 어렵게 느껴진다면, 옥토프레스는 아마 힘드실 거에요.

- -

시작하기 전에

- -

옥토프레스로 블로깅을 하려면 우선은 깃(Git)을 설치해야 합니다. 그리고 루비를 설치해야 해요. - 옥토프레스를 쓰려면 루비 1.9.2가 필요합니다 RVM 이나 rbenv를 사용하면 쉽게 루비 1.9.2를 설치할 수 있어요.

- -

rbenv 와 RVM은 루비 환경 관리툴인데요, 동시에 사용하면 충돌하므로, 하나만 선택해 주세요.

- -

RVM을 사용하실 경우

- -

아직 RVM을 사용하지 않으시면, RVM을 설치하시고 루비 1.9.2를 설치해주세요.

- -
1
-
rvm install 1.9.2 && rvm use 1.9.2
-
- - -

rbenv를 사용하실 경우

- -

아직 rbenv를 사용하지 않으시면, rbenv를 설치하시고 ruby-build를 설치 하시고 루비 1.9.2를 설치해주세요.

- -
1
-
rbenv install 1.9.2-p290
-
- - -

옥토 프레스 설정하기

- -
1
-2
-3
-
git clone git://github.com/imathis/octopress.git octopress
-cd octopress    # RVM를 사용하시면, .rvmrc 파일을 신뢰하는지 묻는 선택지가 나옵니다 (yes 라고 입력해주세요).
-ruby --version  # 1.9.2버전이어야합니다.
-
- - -

만약 ruby --version해서 1.9.2이외의 버전이 나오면, RVM 설치하기부분을 보면서 다시 설치해주세요.

- -

이제 의존라이브러리를 설치합시다.

- -
1
-2
-3
-
gem install bundler
-rbenv rehash    # rbenv를 사용하신다면, rehash 명령을 실행해서 bundle 명령이 실행되도록 합시다.(*역주:RVM 을 사용하신다면 이 부분은 건너뛰어도 됩니다.)
-bundle install
-
- - -

기본 테마를 설치합시다.

- -
1
-
rake install
-
- - -

다음 단계

- - - - - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/setup/rvm/index.html b/octopress/setup/rvm/index.html deleted file mode 100644 index 7e37b4f..0000000 --- a/octopress/setup/rvm/index.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - Installing RVM - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Installing RVM

-

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

-
- -

RVM (Ruby Version Manager) handles the installation and management of multiple Ruby environments, and Octopress was designed to work in an RVM-controlled environment. -Installation should be pretty smooth, but if you have trouble get help here.

- -

Run this command to install RVM for your user account.

- -
1
-
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
-
- - -

Next add RVM to your shell as a function.

- -
1
-2
-3
-4
-5
-6
-
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
-source ~/.bash_profile
-
-# If using Zsh do this instead
-echo '[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm' >> ~/.zshrc
-source ~/.zshrc
-
- - -

Install Ruby 1.9.2 and ensure RVM has the latest RubyGems.

- -
1
-2
-
rvm install 1.9.2 && rvm use 1.9.2
-rvm rubygems latest
-
- - - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/theme/index.html b/octopress/theme/index.html deleted file mode 100644 index 917936a..0000000 --- a/octopress/theme/index.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - Theming & Customization - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Theming & Customization

-

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

-
- -

For now Octopress ships with a single theme in the .themes directory. When you install the Octopress theme, HTML and Javascripts are copied into /source and Sass stylesheets are copied into /sass. -You are free to make any changes you like, but I’ve set up a few patterns to make it easy to customize and keep your site up to date with the latest Octopress releases.

- -

I’ve broken this up into two sections.

- -
    -
  1. Customizing the Template - Learn how to change the HEAD, sidebar, header, navigation & footer
  2. -
  3. Changing Styles - Learn how to change the color scheme, layout, and override styles
  4. -
- - -

Also see Updating Your Blog »

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/theme/styles/index.html b/octopress/theme/styles/index.html deleted file mode 100644 index ee677b2..0000000 --- a/octopress/theme/styles/index.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - Styles - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Styles

-

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

-
- -

Overriding Styles

- - -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/theme/styles/_styles.markdown could not be found

- -

Changing the Color Scheme

- - -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/theme/styles/_colors.markdown could not be found

- -

Changing the Layout

- - -

File /Users/marocchino/Documents/engfordev.github.com/source/docs/theme/styles/_layout.markdown could not be found

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/theme/template/index.html b/octopress/theme/template/index.html deleted file mode 100644 index 70f76a0..0000000 --- a/octopress/theme/template/index.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - - Theming & Customization - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Theming & Customization

-

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

-
- -

Shortly after the 2.0 release Octopress added the source/_includes/custom directory. If you don’t have this, you’ll want to update because it’s really nice.

- -
source/
-  _includes/    # Main layout partials
-    custom/     # <- Customize head, header, navigation, footer, and sidebar here
-    asides/     # Theme sidebar partials
-    post/       # post metadata, sharing & comment partials
-  _layouts/     # layouts for pages, posts & category archives
-
- -

Landing Page vs. Blog Index

- - -

By default Octopress generates your blog’s post index at your site’s root directory. -If you’d rather publish your blog index somewhere else like blog/index.html do this in your terminal.

- -
1
-2
-
mv source/index.html source/blog/index.html
-rake new_page[index.html]
-
- - -

Next you’ll want to update your Rakefile to be sure your new blog index is preserved when you update Octopress.

- -
1
-
blog_index_dir = 'source/blog'
-
- - -

Remember to update the main navigation for your site, since currently the blog link points to /. Skip down to the section on changing navigation, add a ‘home’ link and update the ‘blog’ link to point to /blog/.

- -

Finally, source/index.html can become the landing page of your wildest dreams.

- -

Changing the <HEAD>

- -

If you want to add to the <HEAD>take a look at /source/_includes/custom/head.html.

- -
<HEAD> (source/_includes/custom/head.html)
-
1
-2
-3
-
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
-<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
-<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
-
- - -

Here you can easily change or remove the Google Webfonts, insert javascripts, etc.

- -

Changing the sidebar

- -

Octopress integrates with some 3rd party services like Twitter, Pinboard and Delicious which appear in the sidebar. -In the _config.yml you can rearrange these, create custom sidebars for each layout, and add your own sidebar sections.

- -
Sidebar configuration (_config.yml)
-
1
-2
-3
-4
-
default_asides:   [asides/recent_posts.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html]
-# blog_index_asides:
-# post_asides:
-# page_asides:
-
- - -

If you want to add a section to your sidebar, create a new file in source/_includes/custom/asides/. -Since many people probably want to add an About Me section, there’s already an about.html file in there waiting to be added. Here’s a look.

- -
About Me (source/_includes/custom/asides/about.html)
-
1
-2
-3
-4
-
<section>
-  <h1>About Me</h1>
-  <p>A little something about me.</p>
-</section>
-
- - -

Whenever you add a section to the sidebar, follow this pattern, with a <section> block and an <h1> for a title. To add it to the sidebar, edit the _config.yml and add it to the list of asides.

- -
Sidebar configuration (_config.yml)
-
1
-2
-3
-4
-
default_asides:     [asides/recent_posts.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html]
-blog_index_asides:  [custom/asides/about.html, asides/recent_posts.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html]
-post_asides:        [custom/asides/about.html, asides/recent_posts.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html]
-# page_asides:
-
- - -

In the configuration above I’ve added the about page to the blog index and post pages. Since page_asides isn’t being set, it will inherit from the default list.

- -

Changing the Header, Navigation & Footer

- -

These are sections of the site that are most likely to be customized. You can edit each in /source/_includes/custom/ and your changes will be preserved across updates.

- -

Changing the Header

- -

The header title and subtitle should be configured in the _config.yml If you want to make other changes to the header, edit /source/_includes/custom/header.html which looks like this:

- -
Header (source/_includes/custom/header.html)
-
1
-2
-3
-4
-5
-6
-
<hgroup>
-  <h1><a href="{{ root_url }}/">{{ site.title }}</a></h1>
-  {% if site.subtitle %}
-    <h2>{{ site.subtitle }}</h2>
-  {% endif %}
-</hgroup>
-
- - - - -

Changing the Navigation

- - -

To change or add links to the main navigation, edit /source/_includes/custom/navigation.html which looks like this:

- -
Navigation (source/_includes/custom/navigation.html)
-
1
-2
-3
-4
-
<ul class="main-navigation">
-  <li><a href="{{ root_url }}/">Blog</a></li>
-  <li><a href="{{ root_url }}/blog/archives">Archives</a></li>
-</ul>
-
- - -

The href for each link begins with {{ root_url }} (this helps Octopress write urls differently if a site is deployed to a subdirectory). -If you’re deploying your site to a subdirectory like yoursite.com/octopress you’ll want to add this to any links you add.

- -

Changing the Footer

- -

You can customize the footer in source/_includes/custom/footer.html which looks like this:

- -
Footer (source/_includes/custom/footer.html)
-
1
-2
-3
-4
-
<p>
-  Copyright &copy; {{ site.time | date: "%Y" }} - {{ site.author }} -
-  <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
-</p>
-
- - -

Change this however you like, but be cool and keep the Octopress link in there.

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - diff --git a/octopress/updating/index.html b/octopress/updating/index.html deleted file mode 100644 index 53424c9..0000000 --- a/octopress/updating/index.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - Updating Octopress - engfordev Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

engfordev Blog

- -

English For Developers

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

Updating Octopress

-

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

-
- -

« Previous, Theming & Customization

- -

How to Update

- -
1
-2
-3
-4
-
git pull octopress master     # Get the latest Octopress
-bundle install                # Keep gems updated
-rake update_source            # update the template's source
-rake update_style             # update the template's style
-
- - -

This will update your plugins, theme, gemfiles, rakefile and configs, preserving your changes as explained in Theming & Customization. -Read on for an explanation of how all this works.

- -

How Updating Works

- -

In the open source world, version control generally takes care of staying current with the latest releases, but once you’ve begun to customize your code, -merging in updates isn’t always what you want. As a result I’ve come up with the following pattern for Octopress:

- -
    -
  1. Plugins, configs, gemfiles, .themes, .gitignore and the Rakefile are all tracked for easy to updating and collaborating.

  2. -
  3. The install process copies layouts, pages, javascripts, and styles out of the .themes directory. Once you’ve installed a theme, none of the -files under source or sass are in any repository except your own. This way you can change them to your liking without worrying about merging in -updates and screwing up your changes.

  4. -
- - -

When you pull down changes from the Octopress repository, the latest layouts, pages, javascripts and styles are merged into your .themes directory. -To update your site, you must manually merge in the new files. Before you do a spit-take, I written some Rake tasks to help out with this.

- -

Updating the Template’s Style

- -

If you’ve pulled in changes and you want to update your /sass directory, run this.

- -
rake update_style
-
- -

This task will:

- -
    -
  1. Move /sass to /sass.old
  2. -
  3. Copy .themes/classic/sass to /sass
  4. -
  5. Replace /sass/custom/ with /sass.old/custom/
  6. -
- - -

This way if you keep your theme changes in /sass/custom you’ll be able to upgrade your stylesheets without losing any of your work. If you made changes elsewhere, you can copy them back them from /sass.old. -After you have the update in place, you can remove the /sass.old directory.

- -

Updating the Template’s Source

- -

If you’ve pulled in changes and you want to update your /source directory, run this.

- -
rake update_source
-
- -

This task will:

- -
    -
  1. Move /source to /source.old
  2. -
  3. Copy .themes/classic/source to /source
  4. -
  5. Copy back everything in /source.old (cp -rn - without replacing )
  6. -
  7. Replace everything in /source/_includes/custom/ with /source.old/_includes/custom/ which includes head, header, navigation, footer and custom asides.
  8. -
- - -

This way all of the files you’ve added, eg. _posts, about.html etc. and all the customizations in source/_includes/custom will be preserved while all files tracked by Octopress will be updated. -If you made changes elsewhere, you can copy them back them from /source.old or check them out from your git repository. After you have the update in place, you can remove the /source.old directory.

- -

That’s It?

- -

Yep. I figured this is the simplest thing that could possibly work. I don’t like the idea of having blog files change if someone wants to update their plugins, -and I haven’t yet figured out a better way. If you have a better idea, post an issue with your idea for improving this.

- -

See also Blogging With Octopress and Theming & Customization

- - -
- -
- - -
-
- - - - - - - - - - - - - - - - - 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..7fb8c26 --- /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(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/preview_unpublished.rb b/plugins/preview_unpublished.rb new file mode 100644 index 0000000..321ffd6 --- /dev/null +++ b/plugins/preview_unpublished.rb @@ -0,0 +1,48 @@ +# Monkeypatch for Jekyll +# Introduce distinction between preview/productive site generation +# so posts with YAML attribute `published: false` can be previewed +# on localhost without being published to the productive environment. + +module Jekyll + + class Site + # Read all the files in <source>/<dir>/_posts and create a new Post + # object with each one. + # + # dir - The String relative path of the directory to read. + # + # Returns nothing. + def read_posts(dir) + base = File.join(self.source, dir, '_posts') + return unless File.exists?(base) + entries = Dir.chdir(base) { filter_entries(Dir['**/*']) } + + # first pass processes, but does not yet render post content + entries.each do |f| + if Post.valid?(f) + post = Post.new(self, self.source, dir, f) + + # Monkeypatch: + # On preview environment (localhost), publish all posts + if ENV.has_key?('OCTOPRESS_ENV') && ENV['OCTOPRESS_ENV'] == 'preview' && post.data.has_key?('published') && post.data['published'] == false + post.published = true + # Set preview mode flag (if necessary), `rake generate` will check for it + # to prevent pushing preview posts to productive environment + File.open(".preview-mode", "w") {} + end + + if post.published && (self.future || post.date <= self.time) + self.posts << post + post.categories.each { |c| self.categories[c] << post } + post.tags.each { |c| self.tags[c] << post } + end + end + end + + self.posts.sort! + + # limit the posts if :limit_posts option is set + self.posts = self.posts[-limit_posts, limit_posts] if limit_posts + end + end +end \ No newline at end of file diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb new file mode 100644 index 0000000..2b59bad --- /dev/null +++ b/plugins/pullquote.rb @@ -0,0 +1,47 @@ +# +# 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 + @quote = RubyPants.new($1).to_html + #@quote = CGI.escape($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/rubypants.rb b/plugins/rubypants.rb new file mode 100644 index 0000000..e4f4502 --- /dev/null +++ b/plugins/rubypants.rb @@ -0,0 +1,489 @@ +# +# = RubyPants -- SmartyPants ported to Ruby +# +# Ported by Christian Neukirchen <mailto:chneukirchen@gmail.com> +# Copyright (C) 2004 Christian Neukirchen +# +# Incooporates ideas, comments and documentation by Chad Miller +# Copyright (C) 2004 Chad Miller +# +# Original SmartyPants by John Gruber +# Copyright (C) 2003 John Gruber +# + +# +# = RubyPants -- SmartyPants ported to Ruby +# +# == Synopsis +# +# RubyPants is a Ruby port of the smart-quotes library SmartyPants. +# +# The original "SmartyPants" is a free web publishing plug-in for +# Movable Type, Blosxom, and BBEdit that easily translates plain ASCII +# punctuation characters into "smart" typographic punctuation HTML +# entities. +# +# +# == Description +# +# RubyPants can perform the following transformations: +# +# * Straight quotes (<tt>"</tt> and <tt>'</tt>) into "curly" quote +# HTML entities +# * Backticks-style quotes (<tt>``like this''</tt>) into "curly" quote +# HTML entities +# * Dashes (<tt>--</tt> and <tt>---</tt>) into en- and em-dash +# entities +# * Three consecutive dots (<tt>...</tt> or <tt>. . .</tt>) into an +# ellipsis entity +# +# This means you can write, edit, and save your posts using plain old +# ASCII straight quotes, plain dashes, and plain dots, but your +# published posts (and final HTML output) will appear with smart +# quotes, em-dashes, and proper ellipses. +# +# RubyPants does not modify characters within <tt><pre></tt>, +# <tt><code></tt>, <tt><kbd></tt>, <tt><math></tt> or +# <tt><script></tt> tag blocks. Typically, these tags are used to +# display text where smart quotes and other "smart punctuation" would +# not be appropriate, such as source code or example markup. +# +# +# == Backslash Escapes +# +# If you need to use literal straight quotes (or plain hyphens and +# periods), RubyPants accepts the following backslash escape sequences +# to force non-smart punctuation. It does so by transforming the +# escape sequence into a decimal-encoded HTML entity: +# +# \\ \" \' \. \- \` +# +# This is useful, for example, when you want to use straight quotes as +# foot and inch marks: 6'2" tall; a 17" iMac. (Use <tt>6\'2\"</tt> +# resp. <tt>17\"</tt>.) +# +# +# == Algorithmic Shortcomings +# +# One situation in which quotes will get curled the wrong way is when +# apostrophes are used at the start of leading contractions. For +# example: +# +# 'Twas the night before Christmas. +# +# In the case above, RubyPants will turn the apostrophe into an +# opening single-quote, when in fact it should be a closing one. I +# don't think this problem can be solved in the general case--every +# word processor I've tried gets this wrong as well. In such cases, +# it's best to use the proper HTML entity for closing single-quotes +# ("<tt>’</tt>") by hand. +# +# +# == Bugs +# +# To file bug reports or feature requests (except see above) please +# send email to: mailto:chneukirchen@gmail.com +# +# If the bug involves quotes being curled the wrong way, please send +# example text to illustrate. +# +# +# == Authors +# +# John Gruber did all of the hard work of writing this software in +# Perl for Movable Type and almost all of this useful documentation. +# Chad Miller ported it to Python to use with Pyblosxom. +# +# Christian Neukirchen provided the Ruby port, as a general-purpose +# library that follows the *Cloth API. +# +# +# == Copyright and License +# +# === SmartyPants license: +# +# Copyright (c) 2003 John Gruber +# (http://daringfireball.net) +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# * Neither the name "SmartyPants" nor the names of its contributors +# may be used to endorse or promote products derived from this +# software without specific prior written permission. +# +# This software is provided by the copyright holders and contributors +# "as is" and any express or implied warranties, including, but not +# limited to, the implied warranties of merchantability and fitness +# for a particular purpose are disclaimed. In no event shall the +# copyright owner or contributors be liable for any direct, indirect, +# incidental, special, exemplary, or consequential damages (including, +# but not limited to, procurement of substitute goods or services; +# loss of use, data, or profits; or business interruption) however +# caused and on any theory of liability, whether in contract, strict +# liability, or tort (including negligence or otherwise) arising in +# any way out of the use of this software, even if advised of the +# possibility of such damage. +# +# === RubyPants license +# +# RubyPants is a derivative work of SmartyPants and smartypants.py. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# This software is provided by the copyright holders and contributors +# "as is" and any express or implied warranties, including, but not +# limited to, the implied warranties of merchantability and fitness +# for a particular purpose are disclaimed. In no event shall the +# copyright owner or contributors be liable for any direct, indirect, +# incidental, special, exemplary, or consequential damages (including, +# but not limited to, procurement of substitute goods or services; +# loss of use, data, or profits; or business interruption) however +# caused and on any theory of liability, whether in contract, strict +# liability, or tort (including negligence or otherwise) arising in +# any way out of the use of this software, even if advised of the +# possibility of such damage. +# +# +# == Links +# +# John Gruber:: http://daringfireball.net +# SmartyPants:: http://daringfireball.net/projects/smartypants +# +# Chad Miller:: http://web.chad.org +# +# Christian Neukirchen:: http://kronavita.de/chris +# + + +class RubyPants < String + + # Create a new RubyPants instance with the text in +string+. + # + # Allowed elements in the options array: + # + # 0 :: do nothing + # 1 :: enable all, using only em-dash shortcuts + # 2 :: enable all, using old school en- and em-dash shortcuts (*default*) + # 3 :: enable all, using inverted old school en and em-dash shortcuts + # -1 :: stupefy (translate HTML entities to their ASCII-counterparts) + # + # If you don't like any of these defaults, you can pass symbols to change + # RubyPants' behavior: + # + # <tt>:quotes</tt> :: quotes + # <tt>:backticks</tt> :: backtick quotes (``double'' only) + # <tt>:allbackticks</tt> :: backtick quotes (``double'' and `single') + # <tt>:dashes</tt> :: dashes + # <tt>:oldschool</tt> :: old school dashes + # <tt>:inverted</tt> :: inverted old school dashes + # <tt>:ellipses</tt> :: ellipses + # <tt>:convertquotes</tt> :: convert <tt>"</tt> entities to + # <tt>"</tt> for Dreamweaver users + # <tt>:stupefy</tt> :: translate RubyPants HTML entities + # to their ASCII counterparts. + # + def initialize(string, options=[2]) + super string + @options = [*options] + end + + # Apply SmartyPants transformations. + def to_html + do_quotes = do_backticks = do_dashes = do_ellipses = do_stupify = nil + convert_quotes = false + + if @options.include? 0 + # Do nothing. + return self + elsif @options.include? 1 + # Do everything, turn all options on. + do_quotes = do_backticks = do_ellipses = true + do_dashes = :normal + elsif @options.include? 2 + # Do everything, turn all options on, use old school dash shorthand. + do_quotes = do_backticks = do_ellipses = true + do_dashes = :oldschool + elsif @options.include? 3 + # Do everything, turn all options on, use inverted old school + # dash shorthand. + do_quotes = do_backticks = do_ellipses = true + do_dashes = :inverted + elsif @options.include?(-1) + do_stupefy = true + else + do_quotes = @options.include? :quotes + do_backticks = @options.include? :backticks + do_backticks = :both if @options.include? :allbackticks + do_dashes = :normal if @options.include? :dashes + do_dashes = :oldschool if @options.include? :oldschool + do_dashes = :inverted if @options.include? :inverted + do_ellipses = @options.include? :ellipses + convert_quotes = @options.include? :convertquotes + do_stupefy = @options.include? :stupefy + end + + # Parse the HTML + tokens = tokenize + + # Keep track of when we're inside <pre> or <code> tags. + in_pre = false + + # Here is the result stored in. + result = "" + + # This is a cheat, used to get some context for one-character + # tokens that consist of just a quote char. What we do is remember + # the last character of the previous text token, to use as context + # to curl single- character quote tokens correctly. + prev_token_last_char = nil + + tokens.each { |token| + if token.first == :tag + result << token[1] + if token[1] =~ %r!<(/?)(?:pre|code|kbd|script|math)[\s>]! + in_pre = ($1 != "/") # Opening or closing tag? + end + else + t = token[1] + + # Remember last char of this token before processing. + last_char = t[-1].chr + + unless in_pre + t = process_escapes t + + t.gsub!(/"/, '"') if convert_quotes + + if do_dashes + t = educate_dashes t if do_dashes == :normal + t = educate_dashes_oldschool t if do_dashes == :oldschool + t = educate_dashes_inverted t if do_dashes == :inverted + end + + t = educate_ellipses t if do_ellipses + + # Note: backticks need to be processed before quotes. + if do_backticks + t = educate_backticks t + t = educate_single_backticks t if do_backticks == :both + end + + if do_quotes + if t == "'" + # Special case: single-character ' token + if prev_token_last_char =~ /\S/ + t = "’" + else + t = "‘" + end + elsif t == '"' + # Special case: single-character " token + if prev_token_last_char =~ /\S/ + t = "”" + else + t = "“" + end + else + # Normal case: + t = educate_quotes t + end + end + + t = stupefy_entities t if do_stupefy + end + + prev_token_last_char = last_char + result << t + end + } + + # Done + result + end + + protected + + # Return the string, with after processing the following backslash + # escape sequences. This is useful if you want to force a "dumb" quote + # or other character to appear. + # + # Escaped are: + # \\ \" \' \. \- \` + # + def process_escapes(str) + str.gsub('\\\\', '\'). + gsub('\"', '"'). + gsub("\\\'", '''). + gsub('\.', '.'). + gsub('\-', '-'). + gsub('\`', '`') + end + + # The string, with each instance of "<tt>--</tt>" translated to an + # em-dash HTML entity. + # + def educate_dashes(str) + str.gsub(/--/, '—') + end + + # The string, with each instance of "<tt>--</tt>" translated to an + # en-dash HTML entity, and each "<tt>---</tt>" translated to an + # em-dash HTML entity. + # + def educate_dashes_oldschool(str) + str.gsub(/---/, '—').gsub(/--/, '–') + end + + # Return the string, with each instance of "<tt>--</tt>" translated + # to an em-dash HTML entity, and each "<tt>---</tt>" translated to + # an en-dash HTML entity. Two reasons why: First, unlike the en- and + # em-dash syntax supported by +educate_dashes_oldschool+, it's + # compatible with existing entries written before SmartyPants 1.1, + # back when "<tt>--</tt>" was only used for em-dashes. Second, + # em-dashes are more common than en-dashes, and so it sort of makes + # sense that the shortcut should be shorter to type. (Thanks to + # Aaron Swartz for the idea.) + # + def educate_dashes_inverted(str) + str.gsub(/---/, '–').gsub(/--/, '—') + end + + # Return the string, with each instance of "<tt>...</tt>" translated + # to an ellipsis HTML entity. Also converts the case where there are + # spaces between the dots. + # + def educate_ellipses(str) + str.gsub('...', '…').gsub('. . .', '…') + end + + # Return the string, with "<tt>``backticks''</tt>"-style single quotes + # translated into HTML curly quote entities. + # + def educate_backticks(str) + str.gsub("``", '“').gsub("''", '”') + end + + # Return the string, with "<tt>`backticks'</tt>"-style single quotes + # translated into HTML curly quote entities. + # + def educate_single_backticks(str) + str.gsub("`", '‘').gsub("'", '’') + end + + # Return the string, with "educated" curly quote HTML entities. + # + def educate_quotes(str) + punct_class = '[!"#\$\%\'()*+,\-.\/:;<=>?\@\[\\\\\]\^_`{|}~]' + + str = str.dup + + # Special case if the very first character is a quote followed by + # punctuation at a non-word-break. Close the quotes by brute + # force: + str.gsub!(/^'(?=#{punct_class}\B)/, '’') + str.gsub!(/^"(?=#{punct_class}\B)/, '”') + + # Special case for double sets of quotes, e.g.: + # <p>He said, "'Quoted' words in a larger quote."</p> + str.gsub!(/"'(?=\w)/, '“‘') + str.gsub!(/'"(?=\w)/, '‘“') + + # Special case for decade abbreviations (the '80s): + str.gsub!(/'(?=\d\ds)/, '’') + + close_class = %![^\ \t\r\n\\[\{\(\-]! + dec_dashes = '–|—' + + # Get most opening single quotes: + str.gsub!(/(\s| |--|&[mn]dash;|#{dec_dashes}|ȁ[34];)'(?=\w)/, + '\1‘') + # Single closing quotes: + str.gsub!(/(#{close_class})'/, '\1’') + str.gsub!(/'(\s|s\b|$)/, '’\1') + # Any remaining single quotes should be opening ones: + str.gsub!(/'/, '‘') + + # Get most opening double quotes: + str.gsub!(/(\s| |--|&[mn]dash;|#{dec_dashes}|ȁ[34];)"(?=\w)/, + '\1“') + # Double closing quotes: + str.gsub!(/(#{close_class})"/, '\1”') + str.gsub!(/"(\s|s\b|$)/, '”\1') + # Any remaining quotes should be opening ones: + str.gsub!(/"/, '“') + + str + end + + # Return the string, with each RubyPants HTML entity translated to + # its ASCII counterpart. + # + # Note: This is not reversible (but exactly the same as in SmartyPants) + # + def stupefy_entities(str) + str. + gsub(/–/, '-'). # en-dash + gsub(/—/, '--'). # em-dash + + gsub(/‘/, "'"). # open single quote + gsub(/’/, "'"). # close single quote + + gsub(/“/, '"'). # open double quote + gsub(/”/, '"'). # close double quote + + gsub(/…/, '...') # ellipsis + end + + # Return an array of the tokens comprising the string. Each token is + # either a tag (possibly with nested, tags contained therein, such + # as <tt><a href="<MTFoo>"></tt>, or a run of text between + # tags. Each element of the array is a two-element array; the first + # is either :tag or :text; the second is the actual value. + # + # Based on the <tt>_tokenize()</tt> subroutine from Brad Choate's + # MTRegex plugin. <http://www.bradchoate.com/past/mtregex.php> + # + # This is actually the easier variant using tag_soup, as used by + # Chad Miller in the Python port of SmartyPants. + # + def tokenize + tag_soup = /([^<]*)(<[^>]*>)/ + + tokens = [] + + prev_end = 0 + scan(tag_soup) { + tokens << [:text, $1] if $1 != "" + tokens << [:tag, $2] + + prev_end = $~.end(0) + } + + if prev_end < size + tokens << [:text, self[prev_end..-1]] + end + + tokens + end +end 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(site, post) + 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(site, page) + 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(site, page_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..7648932 --- /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 are capitalized after colon, period, exclamation mark, question mark + 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 "base/utilities"; +@import "base/solarized"; +@import "base/theme"; +@import "base/typography"; +@import "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 "partials/header"; +@import "partials/navigation"; +@import "partials/blog"; +@import "partials/sharing"; +@import "partials/syntax"; +@import "partials/archive"; +@import "partials/sidebar"; +@import "partials/footer"; diff --git a/sass/base/_layout.scss b/sass/base/_layout.scss new file mode 100644 index 0000000..ad99c6a --- /dev/null +++ b/sass/base/_layout.scss @@ -0,0 +1,192 @@ +$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 { + overflow: hidden; + > 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; + overflow: visible; + 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..9a50a8b --- /dev/null +++ b/sass/base/_theme.scss @@ -0,0 +1,86 @@ +$noise-bg: image-url('noise.png') top left !default; +$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('noise.png') !default; +$nav-bg-back: linear-gradient(lighten($nav-bg, 8), $nav-bg, darken($nav-bg, 11)) !default; +$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-hover: darken($sidebar-bg, 7) !default; +$sidebar-link-color-subdued: lighten($sidebar-color, 20) !default; +$sidebar-link-color-subdued-hover: $sidebar-link-color-hover !default; +$twitter-status-link: lighten($sidebar-link-color-subdued, 15) !default; + +$footer-color: #888 !default; +$footer-bg: #ccc !default; +$footer-bg-front: image-url('noise.png') !default; +$footer-bg-back: linear-gradient(lighten($footer-bg, 8), $footer-bg, darken($footer-bg, 11)) !default; +$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('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..b68753f --- /dev/null +++ b/sass/base/_typography.scss @@ -0,0 +1,161 @@ +$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; +$header-subtitle-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 > header h2 { + font-family: $header-subtitle-font-family; +} + +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($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('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('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..1a6b2a0 --- /dev/null +++ b/sass/custom/_fonts.scss @@ -0,0 +1,10 @@ +// 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; +//$header-subtitle-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..57fe7a8 --- /dev/null +++ b/sass/partials/_blog.scss @@ -0,0 +1,141 @@ +article { + 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('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..3eecb48 --- /dev/null +++ b/sass/partials/_sharing.scss @@ -0,0 +1,8 @@ +.sharing { + p.meta + & { + padding: { top: 1em; left: 0; } + background: $img-border top left repeat-x; + } +} + +#fb-root { display: none; } 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 "sidebar/base"; +@import "sidebar/twitter"; +@import "sidebar/googleplus"; +@import "sidebar/pinboard"; +@import "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("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..5441304 --- /dev/null +++ b/sass/partials/sidebar/_base.scss @@ -0,0 +1,106 @@ +.side-shadow-border { + @include box-shadow(lighten($sidebar-bg, 5) 0 1px); +} +aside.sidebar { + overflow: hidden; + 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..dfd49b5 --- /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]:first-child { + 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 "compass"; +@include global-reset; +@include reset-html5; + +@import "custom/colors"; +@import "custom/fonts"; +@import "custom/layout"; +@import "base"; +@import "partials"; +@import "custom/styles"; diff --git a/sitemap.xml b/sitemap.xml deleted file mode 100644 index c8b9178..0000000 --- a/sitemap.xml +++ /dev/null @@ -1,145 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'> - <url> - <loc>http://EngForDev.github.com/blog/2012/03/19/english-for-developers/</loc> - <lastmod>2012-03-22T11:50:22+09:00</lastmod> - </url> - <url> - <loc> - http://EngForDev.github.com/blog/2012/03/21/no-body-wants-to-learn-how-to-program-korean-translation/ - </loc> - <lastmod>2012-03-22T11:50:22+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/blog/2012/03/22/what-we-did-today/</loc> - <lastmod>2012-04-12T14:12:42+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/blog/2012/03/26/nerd-dork-geek-dweeb/</loc> - <lastmod>2012-04-12T14:12:42+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/blog/archives/</loc> - <lastmod>2012-04-12T14:12:42+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/</loc> - <lastmod>2012-04-12T14:12:42+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/blogging/code/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/blogging/code/test/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/blogging/</loc> - <lastmod>2012-04-12T14:48:24+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/blogging/plugins/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/configuring/</loc> - <lastmod>2012-04-12T14:46:43+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/deploying/github/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/deploying/heroku/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/deploying/</loc> - <lastmod>2012-04-12T14:46:15+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/deploying/rsync/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/</loc> - <lastmod>2012-04-12T14:40:02+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/backtick-codeblock/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/blockquote/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/category-generator/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/codeblock/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/gist-tag/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/image-tag/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/include-array/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/include-code/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/jsfiddle-tag/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/pullquote/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/render-partial/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/plugins/video-tag/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/setup/</loc> - <lastmod>2012-04-12T14:44:25+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/setup/rvm/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/theme/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/theme/styles/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/theme/template/</loc> - <lastmod>2012-04-12T14:18:09+09:00</lastmod> - </url> - <url> - <loc>http://EngForDev.github.com/octopress/updating/</loc> - <lastmod>2012-04-12T14:18:09+09: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="{{ root_url }}{{ post.url }}">{{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="{{ root_url }}{{ post.url }}">{% 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="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#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="{{ root_url }}{{ post.url }}">{{ 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/{{ site.delicious_user }}?count={{ site.delicious_count }}&sort=date&callback=renderDeliciousLinks"></script> + <p><a href="http://delicious.com/{{ site.delicious_user }}">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..cb267f0 --- /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/{{site.github_user}}">@{{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="{{ root_url }}/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/{{ site.googleplus_user }}?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:{{ site.pinboard_user }}">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="{{ root_url }}{{ post.url }}">{{ 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..bab5de4 --- /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="{{ root_url }}/javascripts/twitter.js" type="text/javascript"> </script> + {% if site.twitter_follow_button %} + <a href="http://twitter.com/{{ site.twitter_user }}" class="twitter-follow-button" data-show-count="{{ site.twitter_show_follower_count }}">Follow @{{ site.twitter_user }}</a> + {% else %} + <p>Follow <a href="http://twitter.com/{{site.twitter_user}}">@{{ 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..2f0e628 --- /dev/null +++ b/source/_includes/navigation.html @@ -0,0 +1,15 @@ +
    +
  • RSS
  • + {% if site.subscribe_email %} +
  • Email
  • + {% endif %} +
+ {% if site.simple_search %} +
+
+ + +
+
+ {% 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..4091168 --- /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/2012-03-19-english-for-developers.markdown b/source/_posts/2012-03-19-english-for-developers.markdown new file mode 100644 index 0000000..8c8d0ba --- /dev/null +++ b/source/_posts/2012-03-19-english-for-developers.markdown @@ -0,0 +1,54 @@ +--- +layout: post +title: "English for Developers" +date: 2012-03-19 22:08 +comments: true +categories: main +--- + +# 요즘 개발자영어에서는... +## 1.플레이 프레임워크 소개문서를 번역하고 있습니다. - NEW +* 번역하게 된 계기 등이 궁금하시면 [이곳으로…](http://opentutorials.org/course/167/1472) +* 바로 번역에 참여하시려면 [이곳으로~](https://docs.google.com/document/d/1NferctmWGwbE-ZANseBshNr7p4y30KTokStOfE25piU/edit#heading=h.7g51kgoq7teh) + + + +## 2. 아치리눅스 설치방법 번역을 마치고 다듬고 있습니다. + +* 번역하게 된 계기 등이 궁금하시면 [이곳으로..](http://opentutorials.org/course/167/1396) +* 바로 번역에 참여하시려면 [이곳으로~]("https://docs.google.com/document/d/1VqEeZ8s2z_yf_Ujj5Xk1sE6zRKyKtYYl-gISRaMeqDk/edit#heading=h.gnor0k7apma9") <- 100개의 찜 중에 30>51>74개 완료하였습니다! + + +### 3. '깃허브 페이지 만드는 법'을 번역하고 있습니다. + +* 번역에 참여하시려면 [이곳으로](https://docs.google.com/document/d/1JWRn9bDN3YyeMRn2FpWYAuco5jZYefF_0kYD-fIlu50/edit) ~ 8개의 찜 중에 5개 남았어요~ + +### 4. 영어로 짤막한 일기를 쓰고 있습니다. <- NEW + +* 3월 14일의 일기를 쓰시려면~ [이곳으로](http://www.facebook.com/groups/engfordev/338078569577308/) +* 그간 쓴 예를 보시려면 [이곳으로~](http://opentutorials.org/course/227) + +### 5. Dijkstra의 "Go To 문은 해롭다"라는 글을 번역하고 있습니다. + +* 번역하게 된 계기가 궁금하시면 [이곳으로~](http://opentutorials.org/course/167/1437) +* 번역에 참여하시려면 [이곳으로~](https://docs.google.com/document/d/1mW8znza4aedevsFw4jKRHVC6cBYAM_niaL7yiWLs-sM/edit#heading=h.obmx1smx4ar2) + +#### 오프 모임을 준비하고 있습니다. - Coming Soon + +* 오프모임 소개글(작성중입니다) - [http://opentutorials.org/course/73/1389](http://opentutorials.org/course/73/1389) NEW +* 준비멤버 첫 모임 - 03/05/월 19:30 - [http://www.facebook.com/events/399024236778845/](http://www.facebook.com/events/399024236778845/) + +### 최근에 마무리 한 것들 + +* 프로그래밍 자체를 배우고 싶어하는게 아니에요! [자세히](http://docs.google.com/document/d/1VDKgYcUjSnyrF2dITTr7-LfApgtzHMvoj1dwtXZauAY/edit) +* 자바 스크립트 코딩 스타일에 대한 글, 번역한 것을 이쁘게 정리했습니다~~ [자세히](http://opentutorials.org/course/167/1363) - NEW +* Ruby 튜토리얼 번역한 것을 정리해서 공개했습니다~ (>>[자세히](http://opentutorials.org/course/80)) - NEW +* 박준태님이 번역하신 글에 공동으로 피드백을 드렸습니다. (>>[자세히](http://opentutorials.org/course/167/1351)) +* 많은 분들이 읽을 수 있도록 많이많이 퍼뜨려주세요~ (글 [링크](http://rkjun.wordpress.com/2012/02/13/open-source-for-you-korean_translate/)) +* 프로트 엔드 개발자 면접볼 때 나오는 질문을 번역했고요. (>>[자세히](https://docs.google.com/document/d/1anFEywxcH5q9ZHio2PtJm_4Beh0nxVeNmlGQCV175zs/edit)) + + +페이스북 그룹에서 진행되니, 그룹을 방문하세요. ^^ +이전에 진행했던 내용을 보시려면, 이곳을 눌러주세요. +engfordev 사이트에는 [http://engfordev.com/](http://engfordev.com/) 로 들어올 수 있습니다. + diff --git a/source/_posts/2012-03-21-no-body-wants-to-learn-how-to-program-korean-translation.markdown b/source/_posts/2012-03-21-no-body-wants-to-learn-how-to-program-korean-translation.markdown new file mode 100644 index 0000000..eb6e033 --- /dev/null +++ b/source/_posts/2012-03-21-no-body-wants-to-learn-how-to-program-korean-translation.markdown @@ -0,0 +1,79 @@ +--- +layout: post +title: "사람들은 프로그래밍 자체를 배우고 싶은게 아니에요!" +date: 2012-03-21 23:46 +comments: true +categories: +--- + +※ 원문 및 번역에 관해 궁금하시면~ [http://opentutorials.org/course/167/1388](http://opentutorials.org/course/167/1388) + + +사람들은 프로그래밍하는 법 자체를 배우고 싶어하는게 아니에요. 제 생각에는 프로그래밍을 잘 하는 사람들이 프로그래밍을 가르칠 때 몇 가지 문제점이 있는 것 같아요. 프로그래밍 튜토리얼에 보면 보통 앞부분에 프로그래밍 관련 개념들이 나오죠. 변수나 루프, 데이터형 등등이요. 이런 내용을 가지고 가르치기 시작하는 것이 당연하게 보이겠지만, 사실은 프로그래밍을 가르치기에는 적절하지 않은 방법이에요. 왜냐고요? 사람들은 프로그래밍을 배우고 싶어하질 않거든요. + +돈을 내고 프로그래밍 교육을 받으려는 사람들에게는 이런 방법이 적절할 수도 있어요. 하지만 대부분의 사람들은 다릅니다. + +프로그래밍에 흥미가 별로 없는 사람들이나, 호기심 많은 어린 학생들에게는 변수나 루프 같은 개념이 별로 재미없어요. 이들은 알고리즘이나 자동으로 형을 변환해주는 게 어떤 건지에 대해 관심이 없어요. 이들은 슈퍼마리오나 트위터, 앵그리버드 같은 것을 만들고 싶어할 뿐이죠. 라이언 노쓰의 공룡 만화에는 이런 점이 잘 나타나 있습니다. (여기 누르면 확대) + +프로그래밍을 가르치는 분들, 프로그래밍 튜토리얼을 만드는 분들에게 다섯 가지 조언을 드리겠습니다. + +## 1. 자동화된 개발 도구(Kit)로는 프로그래밍을 할 수 없습니다. + +시중에는 소프트웨어를 만드는 자동화된 개발 도구 같은 것들이 많이 나와 있죠. 마우스로 드래그앤 드랍을 하면서 프로그램을 만드는 거죠. + +하지만 사람들은 이런 프로그램에 한계를 느낍니다. 이런 개발도구로는 간단한 어플이나 게임을 만들 수는 있지만 유연성이 부족해서 만들 수 있는 것에는 한계가 있습니다. 우리에게 필요한 것은 이미 완성된 장난감이 아니라 레고 블럭입니다. + +(십대들이 Scratch라는 개발도구 프로그램을 사용하는 것은 열렬히 지지합니다. 그 나이대에는 타자로 코드를 치는 것이 큰 장벽이 되거든요. 하지만 다른 개발도구 프로그램의 경우에는 지지하지 않습니다.) + +## 2. 작은 프로그램을 만드는 예제를 사용해보세요. 만들었다고 자랑할 만한 것으로 말이죠. + +프로그래밍 책이나 튜토리얼에는 대부분 예제가 들어있기는 합니다. 하지만 보통은 하나의 함수나 개념을 설명하는 파편적인 내용이죠. 프로그래밍을 가르치려면 이렇게 해야 하기는 하지만, 문제는 아무도 프로그래밍을 배우고 싶어하지 않는다는 거에요. + +저는 “파이썬으로 컴퓨터 게임 만들기”라는 책을 썼는데요, 이 책에는 “숫자 맞추기”나 “틱택토” 같은 간단한 게임의 전체 소스 코드를 제공합니다. 그리고 이 프로그램이 어떻게 작동하는지 설명하죠. 처음에는 프로그래밍 개념을 몇 개 익힌 후에, 개념 몇 개에 대한 예제를 다룹니다. 각 장의 내용은 잘 동작하는 게임을 중심으로 합니다. + +(“파이썬으로 컴퓨터 게임 만들기”는 [http://inventwithpython.com](http://inventwithpython.com)에서 무료로 읽을 수 있습니다. + +처음에 나오는 프로그램의 길이는 50줄 이하입니다. 그러나 나름대로 완성된 프로그램이라서 괜찮습니다. 이걸 앱스토어에다 팔 수는 없어요. 하지만 사람들에게 보여주고 자랑할 정도는 되죠. 완성된 프로그램을 다루면서 프로그래밍에 관한 개념을 설명하고, 개념을 깊게 파고들면, 학습자에게 학습을 계속할 동기를 부여할 수 있어요. + +이 책에서는 게임 프로그램에 나오는 코드를 가지고 설명하다보니, 기존의 프로그래밍 책과는 다른 순서로 개념을 소개하기도 합니다. 하지만 괜찮아요. 초보 프로그래머들은 개념을 어떤 순서로 배우는 지에 대해 신경쓰지 않습니다. 그리고 독학용 튜토리얼을 쓰는 경우라면, 어차피 보는 사람은 순서대로 보지 않고 이곳저곳 넘기면서 봅니다. 그러니 개념을 다루는 순서가 섞여도 별 문제가 안됩니다. + +## 3. 초보 프로그래머는 따라쟁이입니다. ( 그러니 따라할 것을 많이 주세요) + +저는 초등학교 3학년 때 베이직을 배우기 시작했습니다. 특별한 사람들이나 프로그래밍을 배운다고 생각하는 사람들이 이 얘기를 들으면 ‘우와~’ 할지도 모릅니다. 근데 말이죠, 프로그래밍을 배운 후 몇 년 동안 제가 만든 프로그램은요, 그 전에 본 프로그램을 약간만 변경해서 만든 것들이었어요. 이 프로그램 안에 들어있는 것이라고는 아무 숫자를 집어넣은 print, if문이 대부분이었죠. + +초보자들은 자기가 본 프로그램과 비슷한 프로그램들을 만듭니다. 왜냐하면 초보자일 때에는 독창적인 것을 만들어내는데 필요한 충분한 경험이 부족하기 때문입니다. 그래서 프로그래밍을 가르칠 때에는, 학습자에게 다양한 예제를 주고, 따라해보게 도와주는 것이 좋습니다. + +(“파이썬으로 뭔가 만들기”에는 여러가지 프로그램들이 들어 있습니다. ‘동전 던지기’ 게임, 문자열을 다루는 행맨 게임, Bagles, 2D 데카르트 좌표를 사용하는 게임, 간단한 암호화 프로그램 등 ) 학습자들이 프로그램 작동 방법을 완전히 이해하지 못해도 괜찮습니다. 학습자가 따라할 수 있도록 여러 가지 예제를 주면, 학습자는 이 소재로 다양한 프로그램을 만들 것입니다. + +## 4. 제가 만든 프로그램을 보여드리죠. + +MIT에서 운영하는 Scratch 프로그래밍 환경에는 좋은 점이 있는데요, 학생들이 만든 프로그램을 직접 공유할 수 있게 해 놓았다는 거에요. 프로그래밍 자체를 하고 싶어하는 사람은 없어요. 사람들은 멋진 프로그램을 만들고 싶어하죠. MIT에서 하는 것처럼, 자기가 만든 프로그램을 커뮤니티와 쉽게 공유할 수 있으면, 프로그램을 만들고 싶다는 동기부여가 될 겁니다. 뿐만 아니라, 여러가지 사례 프로그램들이 공유되면, 다른 사람들이 보고선, ‘나도 나만의 프로그램을 만들어야지’하는 영감을 받을 것입니다. + + +Pygame.org 웹사이트에는 사이드바가 있는데요, 여기에는 사람들이 올린 게임들이 소스와 함께 계속 업데이트됩니다. 이 게임은 다른 학습자를 위한 예제 역할을 하죠. 결국 사람들은 이 프로그램을 보고 배우기도 합니다. 바로 이런 점 때문에 Pygame이 Pyglet이나 다른 파이썬 게임 프레임워크보다 더 인기가 있다고 생각합니다. + +## 5. 초보 프로그래머에게 ‘객체지향’ 등의 개념을 들이대며, 혼란스럽게 하지 마세요. + +이미 충분히 말했습니다. ‘재귀, 정규식 표현, MVC, 네트워킹, 파일 입출력 같은 것들’ 이런 것들은 훨씬 나중에 가르쳐도 늦지 않습니다. 학습자가 자기 프로그램을 몇 가지 만들어본 후에 이런 개념을 배워도 늦지 않습니다. + +코드의 끝에 세미콜론을 찍는 걸 기억해야 한다는 걸 재밌다고 느낄 사람은 없어요. 사람들은 프로그래밍하는 법을 알고 싶은게 아니에요. 그들은 프로그램을 만들고 싶어할 뿐이죠. + +### 추가: + +“파이썬 어렵게 공부하기"라는 훌륭한 책의 저자인 제드 쇼가 해커 뉴스에 다음과 같은 코멘트를 남겼습니다. + +“아니죠. 제가 말하고 싶은건, 아무도 “어려운 것"을 공부하고 싶어하지 않는다는 말은 신화일 뿐입니다. 제대로 가르치기만 한다면, 사람들은 어려운 걸 공부하고 싶어 합니다. 이 기사에 나온대로 한다면 나중에는 프로그래밍에 완전히 흥미를 잃은 사람들만 남게 될 거에요. 그래픽, 게임, 귀여운 만화 등을 총동원한다고 해서 사람들이 공부하고 싶게 만들 순 없습니다. 사람들을 깨우치게 하기 위해 억지로 하게 만들거나 속임수를 사용하지 마세요. + +하지만 더 중요한건 저는 제 신념을 뒷받침하는 증거를 갖고 있어요. 그러나 이 기사에는 증거가 전혀 없어요.” + +제드 쇼가 좋은 지적을 해주었습니다. 저는 이렇게 답변했어요. + +“안녕하세요 제드. 저는 알이고, 이 기사의 저자입니다. 제목이 좀 과장되었다는건 인정합니다. 물론 프로그래밍 자체만을 위해 프로그래밍을 배우고 싶어하는 사람도 있어요. 심지어 즉시 쓸모가 없다 하더라도 수학을 배우는걸 좋아하는 사람들 처럼요. + +저는 토요일 아침마다 10대 초반 어린이들로 구성된 소규모 수업에서 프로그래밍을 가르치고 있고, 10 여명의 학생을 대상으로 스탠포드 스플래시 프로그램에서 두어번 특강을 진행하기도 했습니다. 단순히 루프나 각 언어의 고유한 성질이 뭔지 설명하는것보다, 학습자들이 만들고 싶어하는게 무엇인지 최종 목적을 염두에 두는 것이 그들을 더 잘 이끌어 갈 수 있다는걸 알게 됐어요. 파이썬과 루비는 학습 단계에서 언어의 고유한 성질을 언급하는걸 최소화할 수 있기 때문에 학습용으론 최적입니다. + +그리고 저역시 프로그래밍에 흥미를 갖게하는데 그래픽이나 귀여운 만화가 도움이 될거라고 생각하지 않아요. 제 책 “파이썬으로 프로그램 만들기"는 마지막 몇 개의 장을 제외하면 아스키 텍스트 형식의 게임으로 만들었습니다. 이러한 것들은 자기 게임/프로그램을 다른 사람에게 자랑하기에는 꽤 낮은 수준인데요. 그러나 아직 아무도 자신의 코드 조각들을 보여주진 않았잖아요. + +오라일리에서 나온 “파이썬 공부하기"와 같은 책보다 “파이썬 어렵게 공부하기"의 최대 장점은 책의 내용을 최소한의 개념으로 줄였다는데 있다고 전 생각합니다. “이렇게 입력하세요. 이렇게 보여야 해요. 이런 일이 일어난 거에요.” 반면에 대부분의 다른 컴퓨터책에서는 한 문장으로 줄여서 표현하거나 통째로 들어내도 될 문단들을 나열하곤 하는데, 이에 비하면 최고죠. “파이썬 어렵게 공부하기" 책은 기껏해야 200 페이지 정도밖에 되지 않아요. 600 페이지에 달하는 다른 책들에 비하면 훨씬 이해하기 쉬워요. + +컴퓨터 과학을 전공하지 않았거나 프로그램을 배우는데 전념할 필요가 없는 학생들로 구성된 수업을 할 때에는, 학생들이 공부하고 싶어 하는 것이 개념 자체가 아니라 그러한 개념을 이용해서 뭔가 만들고 싶어 한다는 것이라는 것을 잊어버리곤 해요. 작은 게임이나 웹 애플리케이션은 거기엔 최적이에요. 당신의 책 22번 예제에서 말한 것처럼, “생각할 필요없이 단순하게 외우기만 하는 이와 같은 예제를 공부할 때에는, 왜 그렇게 해야 하는지 이유를 아는게 중요합니다. 그렇게 함으로써 목표에 집중하고 당신이 노력해야 하는 목적을 깨닫게 하는데 도움이 됩니다. diff --git a/source/_posts/2012-03-23-what-we-did-today.markdown b/source/_posts/2012-03-23-what-we-did-today.markdown new file mode 100644 index 0000000..d85ec15 --- /dev/null +++ b/source/_posts/2012-03-23-what-we-did-today.markdown @@ -0,0 +1,26 @@ +--- +layout: post +title: "3월 22일, 개발자영어에서는..." +date: 2012-03-22 23:59 +comments: true +categories: +--- + +## 개발자's Diary + +- 오늘의 일기 - [젤루 좋아하는 프레임 워.크.](http://opentutorials.org/course/227/1533) +- 영작놀이 - [깃헙 가이드를 번역한 계기](http://opentutorials.org/course/227/1535) + + +## 번역.. + +- 오늘 번역시작! - [옥토프레스로 블로깅하는 법](http://opentutorials.org/course/167/1536) +- 번역 진행중 - [플레이 프레임워크 2.0 소개](http://opentutorials.org/course/230/1474) + + +## 번역하며 오간 이야기 + +- [deploy](http://opentutorials.org/course/231/1545) +- [setup과 configuration](http://opentutorials.org/course/231/1542) +- [Jekyll - 지킬? 제길?](http://opentutorials.org/course/231/1539) + diff --git a/source/_posts/2012-03-26-nerd-dork-geek-dweeb.markdown b/source/_posts/2012-03-26-nerd-dork-geek-dweeb.markdown new file mode 100644 index 0000000..8184096 --- /dev/null +++ b/source/_posts/2012-03-26-nerd-dork-geek-dweeb.markdown @@ -0,0 +1,58 @@ +--- +layout: post +title: "뚜둥! 너드, 얼간이, 긱의 차이요? 그림으로 확인하시죠." +date: 2012-03-26 21:02 +comments: true +categories: +--- + +Great White Snark 지음 | 2010년 3월 25일 + +#### [번역 프로젝트에 관한 글을 보시려면](http://opentutorials.org/course/167/1551) + +* 너드 Nerd +* 얼간이 Dork +* 긱 Geek +* 샌님, 꽁생원 Dweeb + +저처럼, + +부당하게도, 그리고 적절치 못하게도, + +“얼간이” 딱지가 붙었던 + +너드와 긱 여러분께 + + +이 셋을 구분하는게 정말 가능할까? + +못 미더워하시는 분들께 + +이 셋 사이의 차이를 + +제대로 설명해 보이겠습니다. + + +자~ 보시죠! + +이 그림을 보시면, +너드,얼간이,긱,샌님의 차이를 +확실하게 알게 되실 겁니다. + +앞으로 헷갈리실 일이 없을 거에요. + + +![긱,너드,얼간이,샌님](https://lh5.googleusercontent.com/QW44yjNh2UUlilGkVlYvR1plHjw5-5xGaMFbnTEWxEkUnItu3bACX7laud78SiknatTh9v3ABvhzuHF4X5mbKaIujJj-gnWUwXs_P0Uuz_IoXJollNQ) + +‘샌님’소리 들으시는 분들께는 +이렇게 말씀드리고 싶네요: + +50년대 사람들하고는 +어울리지를 마세요. + + +Via 매튜 (at Sed Contra) + +p.s : 이베이에서 “긱을 위한 빈티지 안경”을 쳐보세요. + +![긱을 위한 빈티지 안경](https://lh6.googleusercontent.com/Ki8OP-zataSu2vNAsdoLe2qscipa_wpIVsN5UJlTQUPL239tLcCpJtTMiloSJ6P86X-El3xsrOL2psVg5yjIEJCqPrhDPDP0HDcTKmOEx1FmfON7SNA) 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..71bdced --- /dev/null +++ b/source/assets/jwplayer/glow/glow.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + +