Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 31 files changed
  • 0 commit comments
  • 1 contributor
View
7 .compass.rb
@@ -1,9 +1,6 @@
-# Require any additional compass plugins here.
-# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "public"
-sass_dir = "views"
+sass_dir = "styles"
images_dir = "images"
javascripts_dir = "javascripts"
-# To enable relative paths to assets via compass helper functions. Uncomment:
-# relative_assets = true
+output_style = :compressed
View
1  .gitignore
@@ -1,2 +1,3 @@
.sass-cache
/coverage
+.guard-rack-development.pid
View
28 Gemfile
@@ -1,21 +1,35 @@
#!/usr/bin/env ruby
source :rubygems
-gem 'sinatra'
-gem 'slim'
-gem 'builder'
+group :production do
+ gem 'sinatra'
+ gem 'slim'
+ gem 'builder'
+end
group :development do
- gem 'redcarpet'
gem 'shotgun'
- gem 'compass'
- gem 'rack-test'
- gem 'nokogiri'
gem 'heroku'
+end
+
+group :styles do
gem 'sass', '>= 3.2.0.alpha.237'
+ gem 'compass'
+end
+
+group :articles do
+ gem 'redcarpet'
+ gem 'nokogiri'
+end
+
+group :guard do
+ gem 'guard-rspec'
+ gem 'guard-compass'
end
group :test do
gem 'rspec'
gem 'spec_coverage'
+ gem 'rack-test'
+ gem 'nokogiri'
end
View
21 Gemfile.lock
@@ -8,8 +8,19 @@ GEM
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
+ daemons (1.1.8)
diff-lcs (1.1.3)
+ eventmachine (0.12.10)
+ ffi (1.0.11)
fssm (0.2.9)
+ guard (1.0.3)
+ ffi (>= 0.5.0)
+ thor (>= 0.14.6)
+ guard-compass (0.0.6)
+ compass (>= 0.10.5)
+ guard (>= 0.2.1)
+ guard-rspec (0.7.2)
+ guard (>= 0.10.0)
heroku (2.25.0)
launchy (>= 0.3.2)
netrc (~> 0.7.1)
@@ -33,7 +44,7 @@ GEM
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
rspec-mocks (~> 2.10.0)
- rspec-core (2.10.0)
+ rspec-core (2.10.1)
rspec-expectations (2.10.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
@@ -56,6 +67,11 @@ GEM
rspec (~> 2.0)
simplecov (~> 0.5.3)
temple (0.4.0)
+ thin (1.3.1)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ thor (0.15.2)
tilt (1.3.3)
PLATFORMS
@@ -64,6 +80,8 @@ PLATFORMS
DEPENDENCIES
builder
compass
+ guard-compass
+ guard-rspec
heroku
nokogiri
rack-test
@@ -74,3 +92,4 @@ DEPENDENCIES
sinatra
slim
spec_coverage
+ thin
View
31 Guardfile
@@ -0,0 +1,31 @@
+#!/usr/bin/env ruby
+
+require 'guard/guard'
+module ::Guard
+ class Shotgun < ::Guard::Guard
+
+ def initialize(watchers, options = {})
+ super
+ system "shotgun -p #{options.fetch(:port)} -o 0.0.0.0 &"
+ end
+
+ def run_all
+ end
+
+ def run_on_change(paths)
+ end
+
+ end
+end
+
+guard 'rspec', :version => 2, :cli => "--tag ~slow" do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch(%r{^web/(.+)\.rb$}) { |m| "spec/web/#{m[1]}_spec.rb" }
+end
+
+guard 'compass', :configuration_file => ".compass.rb" do
+ watch(%r{^styles/(.*)\.s[ac]ss$})
+end
+
+guard 'shotgun', :port => 3000
View
6 README.md
@@ -15,3 +15,9 @@ Test:
``` bash
./script/test
```
+
+Run:
+
+``` bash
+./script/run
+```
View
2  public/stylesheet.css
@@ -1 +1 @@
-@charset "UTF-8";body{font-family:"Lucida Grande","Lucida Sans Unicode",Helvetica,Arial,sans-serif;font-size:13px}@media only screen and (max-width: 1099px){body{background-color:#eeeeef}}@media only screen and (min-width: 1100px){body{background-image:url("/gradient_squares.png")}}h1{font-size:25px}h2{font-size:18px;line-height:20px;margin:0 0 6px 0}h2 a{color:#503e2b}h2 a:hover{color:#c00}h3{font-size:16px;line-height:20px;margin:0 0 6px 0}h3 a{color:#503e2b}h3 a:hover{color:#c00}h1,h2,h3,h4,h5,h6{color:#503e2b;font-weight:normal}p{color:#503e2b;line-height:18px;margin:0 0 6px 0}a{color:#047;text-decoration:none}a:hover{color:#c00}a:hover{text-decoration:underline}strong{font-weight:bold;color:#503e2b}em{font-style:italic}hr{border:0 none;border-bottom:1px dotted #ccc}@media only screen and (min-width: 1100px){#container{width:1000px;overflow:auto;margin:auto;padding:40px 0}}#main{-webkit-box-shadow:0px 2px 5px 0 #503e2b;-moz-box-shadow:0px 2px 5px 0 #503e2b;box-shadow:0px 2px 5px 0 #503e2b;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;min-height:650px;background-color:#fff}@media only screen and (min-width: 1100px){#main{width:600px;float:left;margin:0 0 0 200px;position:relative}}@media only screen and (min-width: 1100px){#github{display:block;position:absolute;top:-11px;right:-12px;background:url("/forkme.png") no-repeat top left;width:130px;height:130px}}#header{border-bottom:1px dotted #e3e3e3;min-height:135px}#header .blog-title{-moz-border-radius-topleft:7px;-webkit-border-top-left-radius:7px;-ms-border-top-left-radius:7px;-o-border-top-left-radius:7px;border-top-left-radius:7px;-moz-border-radius-topright:7px;-webkit-border-top-right-radius:7px;-ms-border-top-right-radius:7px;-o-border-top-right-radius:7px;border-top-right-radius:7px;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e9e9e9), color-stop(50%, #ffffff), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);background-image:-moz-linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);background-image:-o-linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);background-image:-ms-linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);background-image:linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);line-height:50px;border:2px solid #fff;font-size:30px;padding:10px 20px 5px}#header .blog-title a{color:#c00;text-decoration:none;text-shadow:#fff 0px 1px 0px}#header h2{padding:0 20px;width:520px;line-height:25px;color:#9e948a;font-size:16px;height:50px;display:table-cell;vertical-align:bottom;text-shadow:#fff 0px 1px 0px}#header h2 strong{color:#503e2b;font-weight:bold}#sidebar{text-shadow:#fff 0px 1px 0px}@media only screen and (min-width: 1100px){#sidebar{float:left;width:180px;padding:0 0 0 15px;margin:135px 0 0 5px;border-top:1px dotted #ccc}}@media only screen and (max-width: 1099px){#sidebar{width:auto;padding:20px;margin:0}}#sidebar h3{border-top:1px dotted #ccc;padding-top:6px;margin-top:20px}#sidebar h3:first-child{margin-top:0;padding-top:20px;border-top:0 none}#sidebar p{color:#9e948a;font-size:12px}#sidebar p a{color:#503e2b}#sidebar ul,#sidebar ol{list-style:none;margin:0;padding:0}#sidebar ul li a,#sidebar ol li a{color:#9e948a}#sidebar ul li a:hover,#sidebar ol li a:hover{color:#c00}#sidebar ul li{font-size:12px;line-height:20px}#sidebar ol li{font-size:10px;line-height:15px}#footer{clear:both;color:#9e948a;text-align:center;font-size:11px;line-height:18px;padding:5px;text-shadow:#fff 0px 1px 0px}#content{padding:20px;padding-top:0}#content p{color:#503e2b;text-align:justify}#content p.read_more{text-align:right}#content p.read_more a{display:-moz-inline-box;-moz-box-orient:vertical;display:inline-block;vertical-align:middle;*vertical-align:auto;padding:6px 0 6px 6px;margin-bottom:20px;color:#9e948a;text-decoration:none}#content p.read_more a{*display:inline}#content p.read_more a:hover{color:#c00}#content h1,#content h2,#content h3,#content h4,#content h5,#content h6{margin:20px 0 6px 0;padding:0 0 6px 0;border-bottom:1px dotted #ccc}#content ul{list-style:disc outside;margin:6px;margin-left:20px}#content ol{list-style:decimal outside;margin:20px}#content li{color:#808094;line-height:18px}#content li pre{display:block;width:auto !important;min-width:auto}#content tt,#content code{font-family:"DejaVu Sans Mono","Droid Sans Mono","Menlo","Monaco","Courier New",monospace;color:#363;font-size:12px}#content blockquote{margin:20px;line-height:18px;color:#9e948a}#content blockquote p{color:#9e948a}#content article{min-height:100px}#content article h1 a{color:#503e2b}#content article h2{margin:20px 0 6px -19px;padding:0 0 6px 20px;border-bottom:1px dotted #ccc}#content article p.summary a{color:#503e2b;text-decoration:none;display:block}@media only screen and (min-width: 1100px){#content aside{text-shadow:#fff 0px 1px 0px;float:left;border-top:1px dotted #ccc;padding:6px 13px;color:#9e948a;font-size:12px}}@media only screen and (max-width: 1099px){#content aside{display:none}}#content aside.post_date{width:30px;margin-left:-76px;margin-top:-7px;text-align:center}#content aside.post_date time{display:block}#content aside.post_date span{display:block}#content aside.post_date span.day{color:#503e2b;font-size:20px;line-height:30px}#content aside.post_date a{color:#9e948a;text-decoration:none;display:block}#content aside.toc{width:150px;margin-left:-196px;margin-top:80px;text-align:right;border-bottom:1px dotted #ccc}@media only screen and (min-width: 1100px){#content aside.toc{position:fixed}}#content aside.toc ul{margin:0;list-style-type:none}#content aside.toc a{color:#9e948a;display:block;padding:3px 0}#content aside.toc a.active{color:#047}#content aside.toc a.active:before{content:"→ ";color:#c00}#content aside.toc h3{border-bottom:0 none;font-size:14px;margin:6px 0}#content .ir_black,#content pre{border:3px solid #fff;-webkit-box-shadow:0px 2px 5px 0 #503e2b;-moz-box-shadow:0px 2px 5px 0 #503e2b;box-shadow:0px 2px 5px 0 #503e2b;padding:10px;background-color:#000;margin:20px 0;font-family:"DejaVu Sans Mono","Droid Sans Mono","Menlo","Monaco","Courier New",monospace;font-size:12px;line-height:15px;color:#f6f3e8;overflow:hidden}@media only screen and (max-width: 1099px){#content .ir_black,#content pre{width:auto;display:block}}@media only screen and (min-width: 1100px){#content .ir_black,#content pre{display:inline-block;width:532px;min-width:532px}}#content .ir_black code,#content pre code{color:#f6f3e8}#content .ir_black:hover,#content pre:hover{display:inline-block;position:relative;width:auto;overflow:auto;z-index:10000}.Comment{color:#7c7c7c}.Conditional{color:#69c}.Constant{color:#9c9}.Delimiter{color:#00a0a0}.Function{color:#ffd2a7}.Number{color:#ff73fd}.PreProc{color:#96cbfe}.Special{color:#e18964}.String{color:#a8ff60}.Type{color:#ffffb6}.rubyControl{color:#69c}.rubyStringDelimiter{color:#363}.Identifier{color:#c6c5fe}.Statement{color:#69c}.Keyword{color:#96cbfe}@media only screen and (min-width: 1100px){#twitter{margin-top:-1px;margin-right:-110px;float:right;width:60px;border-top:1px dotted #ccc;padding:12px 13px}}@media only screen and (max-width: 1099px){#twitter{display:none}}#comments{margin:20px -20px 0 -19px;padding:0 20px 0 20px;border-top:1px dotted #ccc}code,pre,.ir_black{font-family:"DejaVu Sans Mono","Droid Sans Mono","Menlo","Monaco","Courier New",monospace}.flash,.notice,.alert{color:#503e2b;margin-top:20px;padding:10px;font-size:11px;-moz-border-radius-topright:15px;-webkit-border-top-right-radius:15px;-ms-border-top-right-radius:15px;-o-border-top-right-radius:15px;border-top-right-radius:15px;-moz-border-radius-bottomleft:15px;-webkit-border-bottom-left-radius:15px;-ms-border-bottom-left-radius:15px;-o-border-bottom-left-radius:15px;border-bottom-left-radius:15px}.flash em,.notice em,.alert em{text-decoration:underline}.notice{background:#fff9e5;border:1px solid #ffea99}.alert{background:#f9e5e5;border:1px solid #ea9999}
+body{margin:0;padding:0}.content,.sidebar{padding:20px}.copyright{padding:6px}@media only screen and (min-width: 1100px){.container{width:1000px;margin:20px auto;overflow:none}.block,.sidebar,.copyright{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.block{width:750px;float:left}.sidebar{width:250px;float:left;margin-top:200px}.copyright{width:750px;clear:both}}@media only screen and (max-width: 1099px){.container{margin:20px}}body{background:#eeeeef;font-family:"Lucida Grande","Lucida Sans Unicode",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5em}h1{font-size:30px;line-height:1.5em}h2{font-size:24px;line-height:1.5em;margin:0 0 6px 0}h2 a{color:#503e2b}h2 a:hover{color:#c00}h3{font-size:20px;line-height:1.5em;margin:0 0 6px 0}h3 a{color:#503e2b}h3 a:hover{color:#c00}h1,h2,h3,h4,h5,h6{margin:1.5em 0 0.5em 0;padding:0;color:#503e2b;font-weight:normal}p{color:#503e2b;margin:0 0 0.5em 0}a{color:#047;text-decoration:none}a:hover{color:#c00}a:hover{text-decoration:underline}strong{font-weight:bold;color:#503e2b}em{font-style:italic}hr{border:0 none;border-bottom:1px dotted #ccc}.block{background:#fff;-webkit-box-shadow:0px 2px 5px 0 #503e2b;-moz-box-shadow:0px 2px 5px 0 #503e2b;box-shadow:0px 2px 5px 0 #503e2b;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}header .blog-title{-moz-border-radius-topleft:7px;-webkit-border-top-left-radius:7px;-ms-border-top-left-radius:7px;-o-border-top-left-radius:7px;border-top-left-radius:7px;-moz-border-radius-topright:7px;-webkit-border-top-right-radius:7px;-ms-border-top-right-radius:7px;-o-border-top-right-radius:7px;border-top-right-radius:7px;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e9e9e9), color-stop(50%, #ffffff), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);background-image:-moz-linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);background-image:-o-linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);background-image:-ms-linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);background-image:linear-gradient(#e9e9e9,#ffffff 50%,#ffffff);font-size:35px;line-height:2em;border:2px solid #fff;padding:0 20px}header .blog-title a{color:#c00;text-decoration:none;text-shadow:#fff 0px 1px 0px}header h2{margin:0;padding:0 20px;font-size:20px;line-height:1.5em;color:#9e948a;text-shadow:#fff 0px 1px 0px}header h2 strong{color:#503e2b;font-weight:bold}.content p{color:#503e2b;text-align:justify}.content p.read_more{text-align:right}.content p.read_more a{display:-moz-inline-box;-moz-box-orient:vertical;display:inline-block;vertical-align:middle;*vertical-align:auto;padding:6px 0 6px 6px;margin-bottom:20px;color:#9e948a;text-decoration:none}.content p.read_more a{*display:inline}.content p.read_more a:hover{color:#c00}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{border-bottom:1px dotted #ccc}.content ul{list-style:disc outside;margin:6px;margin-left:20px}.content ol{list-style:decimal outside;margin:20px}.content li{color:#808094}.content li pre{display:block;width:auto !important;min-width:auto}.content tt,.content code{font-family:"DejaVu Sans Mono","Droid Sans Mono","Menlo","Monaco","Courier New",monospace;color:#363}.content blockquote{margin:20px;color:#9e948a}.content blockquote p{color:#9e948a}.content article{min-height:100px}.content article h1 a{color:#503e2b}.content article h2{border-bottom:1px dotted #ccc}.content article p.summary a{color:#503e2b;text-decoration:none;display:block}.flash,.notice,.alert{color:#503e2b;margin-bottom:20px;padding:10px;font-size:11px;-moz-border-radius-topright:15px;-webkit-border-top-right-radius:15px;-ms-border-top-right-radius:15px;-o-border-top-right-radius:15px;border-top-right-radius:15px;-moz-border-radius-bottomleft:15px;-webkit-border-bottom-left-radius:15px;-ms-border-bottom-left-radius:15px;-o-border-bottom-left-radius:15px;border-bottom-left-radius:15px}.flash em,.notice em,.alert em{text-decoration:underline}.notice{background:#fff9e5;border:1px solid #ffea99}.alert{background:#f9e5e5;border:1px solid #ea9999}.copyright{font-size:10px;text-align:center}code,pre,.ir_black{font-family:"DejaVu Sans Mono","Droid Sans Mono","Menlo","Monaco","Courier New",monospace}pre{border:3px solid #fff;-webkit-box-shadow:0px 2px 5px 0 #503e2b;-moz-box-shadow:0px 2px 5px 0 #503e2b;box-shadow:0px 2px 5px 0 #503e2b;padding:10px;background-color:#000;margin:20px 0;font-family:"DejaVu Sans Mono","Droid Sans Mono","Menlo","Monaco","Courier New",monospace;font-size:14px;line-height:20px;color:#f6f3e8;overflow:hidden}pre code{color:#f6f3e8}pre:hover{display:inline-block;position:relative;width:auto;overflow:auto;z-index:10000}.Comment{color:#7c7c7c}.Conditional{color:#69c}.Constant{color:#9c9}.Delimiter{color:#00a0a0}.Function{color:#ffd2a7}.Number{color:#ff73fd}.PreProc{color:#96cbfe}.Special{color:#e18964}.String{color:#a8ff60}.Type{color:#ffffb6}.rubyControl{color:#69c}.rubyStringDelimiter{color:#363}.Identifier{color:#c6c5fe}.Statement{color:#69c}.Keyword{color:#96cbfe}
View
3  script/compile
@@ -1,3 +0,0 @@
-#!/bin/bash
-set -e
-compass watch views/stylesheet.sass -c .compass.rb -s compressed
View
4 script/run
@@ -0,0 +1,4 @@
+#!/bin/bash
+set -e
+./script/bundler
+bundle exec guard
View
4 script/server
@@ -1,4 +0,0 @@
-#!/bin/bash
-set -e
-./script/compile
-shotgun -p 3000 -o 0.0.0.0
View
2  spec/lib/code_spec.rb
@@ -1,6 +1,6 @@
require 'code'
-describe Code do
+describe Code, :slow => true do
let(:out) { double("out").as_null_object }
View
48 styles/_base.sass
@@ -0,0 +1,48 @@
+body
+ background: #eeeeef
+ font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, sans-serif
+ font-size: 16px
+ line-height: 1.5em
+
+h1
+ font-size: 30px
+ line-height: 1.5em
+
+h2
+ font-size: 24px
+ line-height: 1.5em
+ margin: 0 0 $small-gap 0
+ a
+ +link-colors($black, $red)
+
+h3
+ font-size: 20px
+ line-height: 1.5em
+ margin: 0 0 $small-gap 0
+ a
+ +link-colors($black, $red)
+
+h1, h2, h3, h4, h5, h6
+ margin: 1.5em 0 0.5em 0
+ padding: 0
+ color: $black
+ font-weight: normal
+
+p
+ color: $black
+ margin: 0 0 0.5em 0
+
+a
+ +link-colors($blue, $red)
+ +hover-link
+
+strong
+ font-weight: bold
+ color: $black
+
+em
+ font-style: italic
+
+hr
+ border: 0 none
+ border-bottom: $sidebar-border
View
4 styles/_block.sass
@@ -0,0 +1,4 @@
+.block
+ background: white
+ +box-shadow
+ +border-radius(5px)
View
60 styles/_code.sass
@@ -0,0 +1,60 @@
+code, pre, .ir_black
+ +code-font
+
+pre
+
+ border: 3px solid #fff
+
+ +box-shadow
+
+ padding: 10px
+ background-color: black
+ margin: $big-gap 0
+
+ +code-font
+ font-size: 14px
+ line-height: 20px
+ color: #f6f3e8
+
+ overflow: hidden
+
+ code
+ color: #f6f3e8
+
+ &:hover
+ display: inline-block
+ position: relative
+ width: auto
+ overflow: auto
+ z-index: 10000
+
+.Comment
+ color: #7c7c7c
+.Conditional
+ color: #6699cc
+.Constant
+ color: #99cc99
+.Delimiter
+ color: #00a0a0
+.Function
+ color: #ffd2a7
+.Number
+ color: #ff73fd
+.PreProc
+ color: #96cbfe
+.Special
+ color: #e18964
+.String
+ color: #a8ff60
+.Type
+ color: #ffffb6
+.rubyControl
+ color: #6699cc
+.rubyStringDelimiter
+ color: #336633
+.Identifier
+ color: #c6c5fe
+.Statement
+ color: #6699cc
+.Keyword
+ color: #96cbfe
View
54 styles/_content.sass
@@ -0,0 +1,54 @@
+.content
+
+ p
+ color: $black
+ text-align: justify
+
+ &.read_more
+ text-align: right
+ a
+ +inline-block
+ padding: $small-gap 0 $small-gap $small-gap
+ margin-bottom: $big-gap
+ +link-colors($warm-gray, $red)
+ text-decoration: none
+
+ h1, h2, h3, h4, h5, h6
+ border-bottom: $sidebar-border
+
+ ul
+ list-style: disc outside
+ margin: $small-gap
+ margin-left: $big-gap
+ ol
+ list-style: decimal outside
+ margin: $big-gap
+ li
+ color: $cool-gray
+ pre
+ display: block
+ width: auto !important
+ min-width: auto
+
+ tt, code
+ +code-font
+ color: #336633
+
+ blockquote
+ margin: $big-gap
+ color: $warm-gray
+ p
+ color: $warm-gray
+
+ article
+ min-height: 100px
+ h1
+ a
+ color: $black
+
+ h2
+ border-bottom: $sidebar-border
+ p.summary a
+ color: $black
+ text-decoration: none
+ display: block
View
19 styles/_flash.sass
@@ -0,0 +1,19 @@
+.flash
+ color: $black
+ margin-bottom: $big-gap
+ padding: $big-gap / 2
+ font-size: 11px
+ +border-top-right-radius(15px)
+ +border-bottom-left-radius(15px)
+ em
+ text-decoration: underline
+
+.notice
+ @extend .flash
+ background: mix(#ffcc00, #fff, 10%)
+ border: 1px solid mix(#ffcc00, #fff, 40%)
+
+.alert
+ @extend .flash
+ background: mix(#cc0000, #fff, 10%)
+ border: 1px solid mix(#cc0000, #fff, 40%)
View
3  styles/_footer.sass
@@ -0,0 +1,3 @@
+.copyright
+ font-size: 10px
+ text-align: center
View
16 styles/_functions.sass
@@ -0,0 +1,16 @@
+=small-screen
+ @media only screen and (max-width: 1099px)
+ @content
+
+=big-screen
+ @media only screen and (min-width: 1100px)
+ @content
+
+=code-font
+ font-family: "DejaVu Sans Mono", "Droid Sans Mono", "Menlo", "Monaco", "Courier New", monospace
+
+=embossed
+ +single-text-shadow(#ffffff, 0px, 1px, 0px)
+
+=aside-left($width)
+ margin-left: (($width + (2 * $big-gap)) * -1) - $default-box-shadow-blur - 1
View
29 styles/_header.sass
@@ -0,0 +1,29 @@
+header
+
+ .blog-title
+ +border-top-radius(7px)
+ +background-image(linear-gradient(#e9e9e9, #fff 50%, #fff))
+
+ font-size: 35px
+ line-height: 2em
+
+ border: 2px solid white
+ padding: 0 $big-gap
+
+ a
+ color: $red
+ text-decoration: none
+ +embossed
+
+ h2
+ margin: 0
+ padding: 0 $big-gap
+ font-size: 20px
+ line-height: 1.5em
+
+ color: $warm-gray
+ +embossed
+
+ strong
+ color: $black
+ font-weight: bold
View
37 styles/_layout.sass
@@ -0,0 +1,37 @@
+body
+ margin: 0
+ padding: 0
+
+.content, .sidebar
+ padding: $big-gap
+
+.copyright
+ padding: $small-gap
+
++big-screen
+
+ .container
+ width: $site-width
+ margin: $big-gap auto
+ overflow: none
+
+ .block, .sidebar, .copyright
+ +box-sizing(border-box)
+
+ .block
+ width: $main-width
+ float: left
+
+ .sidebar
+ width: $side-width
+ float: left
+ margin-top: 200px
+
+ .copyright
+ width: $main-width
+ clear: both
+
++small-screen
+
+ .container
+ margin: $big-gap
View
24 styles/_settings.sass
@@ -0,0 +1,24 @@
+$black: #503e2b
+$warm-gray: #9e948a
+$cool-gray: #808094
+$red: #cc0000
+$blue: #004477
+
+$content-border: 1px dotted #e3e3e3
+$sidebar-border: 1px dotted #cccccc
+
+$big-gap: 20px
+
+$site-width: 1000px
+$main-width: 750px
+$side-width: $site-width - $main-width
+
+$small-gap: 6px
+
+$default-box-shadow-color: $black
+$default-box-shadow-h-offset: 0px
+$default-box-shadow-v-offset: 2px
+$defualt-box-shadow-blur: 4px
+$default-box-shadow-spread: 0
+
+$background-color: #eeeeef
View
12 styles/stylesheet.sass
@@ -0,0 +1,12 @@
+@import compass
+@import settings
+@import functions
+
+@import layout
+@import base
+@import block
+@import header
+@import content
+@import flash
+@import footer
+@import code
View
2  views/_article.slim
@@ -2,8 +2,6 @@ article.summary
== partial :title, :article => article
- == partial :time, :article => article
-
== content
== partial :read_more, :article => article
View
1  views/_footer.slim
@@ -0,0 +1 @@
+p All contents on this site are &copy; Iain Hecker 2007-#{Date.today.year}, unless otherwise stated. All rights reserved.
View
3  views/_header.slim
@@ -0,0 +1,3 @@
+.blog-title
+ a href='/' rel="home" Adventures with Ruby
+== slim @intro if @intro
View
46 views/_javascript.erb
@@ -1,4 +1,4 @@
-<script>
+<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3029372-5']);
_gaq.push(['_trackPageview']);
@@ -8,48 +8,4 @@
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
-
- (function() {
- var s = document.createElement('script');
- s.type = 'text/javascript';
- s.async = true;
- s.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
- var x = document.getElementsByTagName('footer')[0];
- x.parentNode.insertBefore(s, x);
- })();
-
- (function() {
- var scrolling = function() {
- var scrollPositions = [];
- jQuery(".toc a").each(function(index, item) {
- var el = $(item);
- var id = document.getElementById(el.attr("href").slice(1))
- var header = $(id);
- scrollPositions.push({offset: header.offset()['top'], tocItem: el, header: header, id: id});
- });
-
- if (scrollPositions.length > 0) {
- $(window).scroll(function() {
- offset = $(window).scrollTop()
- len = scrollPositions.length
- var active = null;
- for (var i = 0; i < len; i++) {
- var head = scrollPositions[i];
- if (head.offset < offset + 50) {
- active = i
- }
- }
- for (var i = 0; i < len; i++) {
- if (i === active) {
- scrollPositions[i].tocItem.addClass('active');
- } else {
- scrollPositions[i].tocItem.removeClass('active');
- }
- }
- });
- }
- }
-
- window.onload = function() { jQuery(scrolling) };
- })();
</script>
View
27 views/_sidebar.slim
@@ -0,0 +1,27 @@
+h3 About me
+
+p
+ ' My name is Iain Hecker.
+ br
+ ' I am an open source enthusiast from Rotterdam with a passion for the Ruby
+ ' language and everything involved with writing good software.
+
+p
+ ' I also organize the
+ a href="http://rotterdam-rb.org" Rotterdam.rb
+ ' meetings and I am a regular visitor of
+ a href="http://amsterdam-rb.org" Amsterdam.rb
+ ' . If you're in the neighbourhood please feel free to drop by!
+p(style="text-align: right;")
+ strong Iain Hecker
+
+h3 More about me
+ul
+ li
+ a(href="https://github.com/iain" rel="me" title="My open source project on Github") Github
+ li
+ a(href="http://www.linkedin.com/in/iainhecker" rel="me" title="My LinkedIn profile") LinkedIn
+ li
+ a(href="http://stackoverflow.com/users/525636/iain" rel="me") StackOverflow
+ li
+ a(href="http://twitter.com/iain_nl" rel="me" title="My Twitter account") Twitter
View
11 views/_toc.slim
@@ -1,11 +0,0 @@
-- if @article.contents.toc?
- aside.toc
- nav
- ul
- li
- a(href="##{@article.id}") Introduction
- - @article.contents.toc.each do |item|
- li
- a(href=item["anchor"])= item["title"]
- li
- a(href="#comments") Discussion
View
4 views/article.slim
@@ -5,10 +5,6 @@ article
h1
a(href=@article.url id=@article.id rel='bookmark')= @article.title
- == partial :time, article: @article
-
- == partial :toc, article: @article
-
== @article.contents.html
== partial :comments, article: @article
View
63 views/layout.slim
@@ -2,57 +2,26 @@ doctype html
html
head
- title= @title || "Adventures with Ruby"
- meta(charset='UTF-8')
- meta(name='description' content=@description)
- meta(name="viewport" content="width=device-width, initial-scale=1.0")
- link(href='/stylesheet.css' rel='stylesheet')
- link(rel='shortcut icon' href='/favicon.png')
- link(href='/feed' type='application/rss+xml' rel='alternate' title='RSS Feed')
- /[if lt IE 9]
- script(src='http://html5shiv.googlecode.com/svn/trunk/html5.js')
- body
-
- #container
- section#main
- header#header
- .blog-title
- a(href='/' rel="home") Adventures with Ruby
- == slim @intro if @intro
-
- section#content
- == yield
- a#github(href="https://github.com/iain")
+ title= @title || 'Adventures with Ruby'
+ meta charset='UTF-8'
+ meta name='description' content=@description
+ meta name='viewport' content='width=device-width, initial-scale=1.0'
- section#sidebar
- h3 About me
- p I am an open source enthusiast from Rotterdam with a passion for the Ruby language and everything involved with writing good software.
- p I also organize the <a href="http://rotterdam-rb.org">Rotterdam.rb</a> meetings and I am a regular visitor of <a href="http://amsterdam-rb.org">Amsterdam.rb</a>. If you're in the neighbourhood please feel free to drop by!
- p(style="text-align: right;")
- strong Iain Hecker
-
- h3 More about me
- ul
- li
- a(href="http://www.facebook.com/iain.nl" rel="me") Facebook
- li
- a(href="https://github.com/iain" rel="me" title="My open source project on Github") Github
- li
- a(href="http://www.last.fm/user/iain-nl" rel="me" title="My last.fm account") Last.fm
- li
- a(href="http://www.linkedin.com/in/iainhecker" rel="me" title="My LinkedIn profile") LinkedIn
- li
- a(href="http://stackoverflow.com/users/525636/iain" rel="me") StackOverflow
- li
- a(href="http://twitter.com/iain_nl" rel="me" title="My Twitter account") Twitter
- li
- a(href="http://workingwithrails.com/person/12406-iain-hecker" rel="me" title="My profile on Working with Rails") Working with Rails
-
+ link rel='stylesheet' href='/stylesheet.css'
+ link rel='shortcut icon' href='/favicon.png'
+ link rel='alternate' href='/feed' type='application/rss+xml' title='RSS Feed'
+ /[if lt IE 9]
+ script src='http://html5shiv.googlecode.com/svn/trunk/html5.js'
+ body
- footer#footer
- p All contents on this site are &copy; Iain Hecker 2007-#{Date.today.year}, unless otherwise stated. All rights reserved.
+ .container
+ .block
+ header== partial :header
+ section.content== yield
+ section.sidebar== partial :sidebar
+ footer.copyright== partial :footer
== erb :_javascript
View
424 views/stylesheet.sass
@@ -1,424 +0,0 @@
-@import compass
-
-$black: #503e2b
-$warm-gray: #9e948a
-$cool-gray: #808094
-$red: #cc0000
-$blue: #004477
-
-$content-border: 1px dotted #e3e3e3
-$sidebar-border: 1px dotted #cccccc
-
-$big-gap: 20px
-$content-width: 600px
-$sidebar-width: 200px
-$container-width: $content-width + (2 * $sidebar-width)
-
-$small-gap: 6px
-
-$default-box-shadow-color: $black
-$default-box-shadow-h-offset: 0px
-$default-box-shadow-v-offset: 2px
-$defualt-box-shadow-blur: 4px
-$default-box-shadow-spread: 0
-
-$background-color: #eeeeef
-
-=small-screen
- @media only screen and (max-width: 1099px)
- @content
-
-=big-screen
- @media only screen and (min-width: 1100px)
- @content
-
-=code-font
- font-family: "DejaVu Sans Mono", "Droid Sans Mono", "Menlo", "Monaco", "Courier New", monospace
-
-=embossed
- +single-text-shadow(#ffffff, 0px, 1px, 0px)
-
-=aside-left($width)
- margin-left: (($width + (2 * $big-gap)) * -1) - $default-box-shadow-blur - 1
-
-
-body
- +small-screen
- background-color: $background-color
- +big-screen
- background-image: url("/gradient_squares.png")
- font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, sans-serif
- font-size: 13px
-
-h1
- font-size: 25px
-
-h2
- font-size: 18px
- line-height: 20px
- margin: 0 0 $small-gap 0
- a
- +link-colors($black, $red)
-
-h3
- font-size: 16px
- line-height: 20px
- margin: 0 0 $small-gap 0
- a
- +link-colors($black, $red)
-
-h1, h2, h3, h4, h5, h6
- color: $black
- font-weight: normal
-
-p
- color: $black
- line-height: 18px
- margin: 0 0 $small-gap 0
-
-a
- +link-colors($blue, $red)
- +hover-link
-
-strong
- font-weight: bold
- color: $black
-
-em
- font-style: italic
-
-hr
- border: 0 none
- border-bottom: $sidebar-border
-
-
-#container
- +big-screen
- width: $container-width
- overflow: auto
- margin: auto
- padding: ($big-gap * 2) 0
-
-#main
- +box-shadow
- +border-radius(5px)
- min-height: 650px
- background-color: white
- +big-screen
- width: $content-width
- float: left
- margin: 0 0 0 $sidebar-width
- position: relative
-
-#github
- +big-screen
- display: block
- position: absolute
- top: -11px
- right: -12px
- background: url('/forkme.png') no-repeat top left
- width: 130px
- height: 130px
-
-#header
- border-bottom: $content-border
- min-height: 135px
- .blog-title
- +border-top-radius(7px)
- +background-image(linear-gradient(#e9e9e9, #fff 50%, #fff))
- line-height: 50px
- border: 2px solid white
- font-size: 30px
- padding: 10px $big-gap 5px
- a
- color: $red
- text-decoration: none
- +embossed
- h2
- padding: 0 $big-gap
- width: 520px
- line-height: 25px
- color: $warm-gray
- font-size: 16px
- height: 50px
- display: table-cell
- vertical-align: bottom
- +embossed
- strong
- color: $black
- font-weight: bold
-
-#sidebar
- +embossed
- +big-screen
- float: left
- width: $sidebar-width - ($big-gap)
- padding: 0 0 0 ($big-gap - $default-box-shadow-blur)
- margin: 135px 0 0 $default-box-shadow-blur
- border-top: $sidebar-border
- +small-screen
- width: auto
- padding: $big-gap
- margin: 0
-
- h3
- border-top: $sidebar-border
- padding-top: $small-gap
- margin-top: $big-gap
- &:first-child
- margin-top: 0
- padding-top: $big-gap
- border-top: 0 none
-
- p
- color: $warm-gray
- font-size: 12px
- a
- color: $black
-
- ul, ol
- list-style: none
- margin: 0
- padding: 0
- li a
- +link-colors($warm-gray, $red)
- ul li
- font-size: 12px
- line-height: 20px
-
- ol li
- font-size: 10px
- line-height: 15px
-
-#footer
- clear: both
- color: $warm-gray
- text-align: center
- font-size: 11px
- line-height: 18px
- padding: 5px
- +embossed
-
-#content
- padding: $big-gap
- padding-top: 0
-
- p
- color: $black
- text-align: justify
-
- &.read_more
- text-align: right
- a
- +inline-block
- padding: $small-gap 0 $small-gap $small-gap
- margin-bottom: $big-gap
- +link-colors($warm-gray, $red)
- text-decoration: none
-
- h1, h2, h3, h4, h5, h6
- margin: $big-gap 0 $small-gap 0
- padding: 0 0 $small-gap 0
- border-bottom: $sidebar-border
-
- ul
- list-style: disc outside
- margin: $small-gap
- margin-left: $big-gap
- ol
- list-style: decimal outside
- margin: $big-gap
- li
- color: $cool-gray
- line-height: 18px
- pre
- display: block
- width: auto !important
- min-width: auto
-
- tt, code
- +code-font
- color: #336633
- font-size: 12px
-
- blockquote
- margin: $big-gap
- line-height: 18px
- color: $warm-gray
- p
- color: $warm-gray
-
- article
- min-height: 100px
- h1
- a
- color: $black
-
- h2
- margin: $big-gap 0 $small-gap ($big-gap * -1) + 1
- padding: 0 0 $small-gap $big-gap
- border-bottom: $sidebar-border
- p.summary a
- color: $black
- text-decoration: none
- display: block
-
- aside
- +big-screen
- +embossed
- float: left
- border-top: $sidebar-border
- padding: $small-gap 13px
- color: $warm-gray
- font-size: 12px
- +small-screen
- display: none
-
- aside.post_date
- width: 30px
- +aside-left(30px)
- margin-top: -7px
- text-align: center
- time
- display: block
- span
- display: block
- span.day
- color: $black
- font-size: 20px
- line-height: 30px
- a
- color: $warm-gray
- text-decoration: none
- display: block
-
- aside.toc
- width: 150px
- +aside-left(150px)
- margin-top: 80px
- +big-screen
- position: fixed
- text-align: right
- border-bottom: $sidebar-border
- ul
- margin: 0
- list-style-type: none
- a
- color: $warm-gray
- display: block
- padding: 3px 0
- &.active
- color: $blue
- &:before
- content: "→ "
- color: $red
- h3
- border-bottom: 0 none
- font-size: 14px
- margin: $small-gap 0
-
- .ir_black, pre
-
- border: 3px solid #fff
-
- +box-shadow
-
- padding: 10px
- background-color: black
- margin: $big-gap 0
-
- +small-screen
- width: auto
- display: block
- +big-screen
- display: inline-block
- width: 532px
- min-width: 532px
-
- +code-font
- font-size: 12px
- line-height: 15px
- color: #f6f3e8
-
- overflow: hidden
-
- code
- color: #f6f3e8
-
- &:hover
- display: inline-block
- position: relative
- width: auto
- overflow: auto
- z-index: 10000
-
-.Comment
- color: #7c7c7c
-.Conditional
- color: #6699cc
-.Constant
- color: #99cc99
-.Delimiter
- color: #00a0a0
-.Function
- color: #ffd2a7
-.Number
- color: #ff73fd
-.PreProc
- color: #96cbfe
-.Special
- color: #e18964
-.String
- color: #a8ff60
-.Type
- color: #ffffb6
-.rubyControl
- color: #6699cc
-.rubyStringDelimiter
- color: #336633
-.Identifier
- color: #c6c5fe
-.Statement
- color: #6699cc
-.Keyword
- color: #96cbfe
-
-
-#twitter
- +big-screen
- margin-top: -1px
- margin-right: -110px
- float: right
- width: 60px
- border-top: $sidebar-border
- padding: 2 * $small-gap 13px
- +small-screen
- display: none
-
-#comments
- margin: $big-gap ($big-gap * -1) 0 ($big-gap * -1) + 1
- padding: 0 $big-gap 0 $big-gap
- border-top: $sidebar-border
-
-code, pre, .ir_black
- +code-font
-
-.flash
- color: $black
- margin-top: $big-gap
- padding: $big-gap / 2
- font-size: 11px
- +border-top-right-radius(15px)
- +border-bottom-left-radius(15px)
- em
- text-decoration: underline
-
-.notice
- @extend .flash
- background: mix(#ffcc00, #fff, 10%)
- border: 1px solid mix(#ffcc00, #fff, 40%)
-
-.alert
- @extend .flash
- background: mix(#cc0000, #fff, 10%)
- border: 1px solid mix(#cc0000, #fff, 40%)

No commit comments for this range

Something went wrong with that request. Please try again.