From a4a9075e540d0b1140d1363d5771c0025b77f8c5 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Sun, 12 Jun 2011 11:45:11 -0700 Subject: [PATCH 1/7] Use Susy instead of Blueprint --- CHANGELOG | 3 +- lib/middleman/renderers/sass.rb | 1 + .../default/source/stylesheets/site.css.sass | 31 ++++++++++------- .../xhtml/source/stylesheets/site.css.sass | 33 +++++++++++-------- middleman.gemspec | 1 + 5 files changed, 43 insertions(+), 26 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0a0e6a61..c1c5231b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,4 +3,5 @@ - Combine views/ and public/ into a single source/ folder. - Support YAML front-matter -- Blog-aware \ No newline at end of file +- Blog-aware +- Replaced Blueprint CSS templates with Susy \ No newline at end of file diff --git a/lib/middleman/renderers/sass.rb b/lib/middleman/renderers/sass.rb index 27a404a8..4fabe73e 100644 --- a/lib/middleman/renderers/sass.rb +++ b/lib/middleman/renderers/sass.rb @@ -1,6 +1,7 @@ require "sass" require "sass/plugin" require "compass" +require "susy" module Middleman module Renderers diff --git a/lib/middleman/templates/default/source/stylesheets/site.css.sass b/lib/middleman/templates/default/source/stylesheets/site.css.sass index 51fdfcc9..7ed9b680 100644 --- a/lib/middleman/templates/default/source/stylesheets/site.css.sass +++ b/lib/middleman/templates/default/source/stylesheets/site.css.sass @@ -1,27 +1,34 @@ @import "compass" -@import "blueprint" +@import "susy" -$font-color: #2a2a2a $link-color: #0388a6 $link-hover-color: #009ce0 -$link-focus-color: $link-color -$link-active-color: $link-color -$link-visited-color: $link-color +$link-focus-color: false +$link-active-color: false +$link-visited-color: false -$blueprint-font-family: 'Century Gothic', 'Apple Gothic', 'Helvetica Neue', arial, sans-serif -$blueprint-font-size: 13px -$blueprint-grid-columns: 12 -$blueprint-grid-width: 60px -$blueprint-grid-margin: 20px +$font-color: #2a2a2a +$font-family: 'Helvetica Neue', sans-serif +$base-font-size: 12px +$base-line-height: 18px + +$total-cols: 12 +$col-width: 4em +$gutter-width: 1em +$side-gutter-width: $gutter-width +global-reset -+blueprint-typography ++establish-baseline + +body + font-family: $font-family + color: $font-color a +link-colors($link-color, $link-hover-color, $link-focus-color, $link-active-color, $link-visited-color) #main padding: 50px - text-align: center +container + +susy-grid-background \ No newline at end of file diff --git a/lib/middleman/templates/xhtml/source/stylesheets/site.css.sass b/lib/middleman/templates/xhtml/source/stylesheets/site.css.sass index 13e7359c..7ed9b680 100644 --- a/lib/middleman/templates/xhtml/source/stylesheets/site.css.sass +++ b/lib/middleman/templates/xhtml/source/stylesheets/site.css.sass @@ -1,27 +1,34 @@ @import "compass" -@import "blueprint" +@import "susy" -$font-color: #2a2a2a $link-color: #0388a6 $link-hover-color: #009ce0 -$link-focus-color: $link-color -$link-active-color: $link-color -$link-visited-color: $link-color +$link-focus-color: false +$link-active-color: false +$link-visited-color: false -$blueprint-font-family: 'Century Gothic', 'Apple Gothic', 'Helvetica Neue', arial, sans-serif -$blueprint-font-size: 13px -$blueprint-grid-columns: 12 -$blueprint-grid-width: 60px -$blueprint-grid-margin: 20px +$font-color: #2a2a2a +$font-family: 'Helvetica Neue', sans-serif +$base-font-size: 12px +$base-line-height: 18px + +$total-cols: 12 +$col-width: 4em +$gutter-width: 1em +$side-gutter-width: $gutter-width +global-reset -+blueprint-typography ++establish-baseline + +body + font-family: $font-family + color: $font-color a +link-colors($link-color, $link-hover-color, $link-focus-color, $link-active-color, $link-visited-color) -#frame +#main padding: 50px - text-align: center +container + +susy-grid-background \ No newline at end of file diff --git a/middleman.gemspec b/middleman.gemspec index 6cfa44e8..e4922267 100644 --- a/middleman.gemspec +++ b/middleman.gemspec @@ -32,6 +32,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("coffee-filter", ["~> 0.1.0"]) s.add_runtime_dependency("sass", ["~> 3.1.0"]) s.add_runtime_dependency("compass", ["~> 0.11.1"]) + s.add_runtime_dependency("compass-susy-plugin", ["~> 0.9.0"]) s.add_runtime_dependency("coffee-script", ["~> 2.2.0"]) s.add_runtime_dependency("httparty", ["~> 0.7.0"]) s.add_development_dependency("cucumber", ["~> 0.10.0"]) From f7a567d2d324900f176e17c19700af3c033474a7 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Mon, 13 Jun 2011 18:33:50 -0700 Subject: [PATCH 2/7] always rely on frontmatter --- lib/middleman/features/blog.rb | 5 +---- lib/middleman/server.rb | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/middleman/features/blog.rb b/lib/middleman/features/blog.rb index 0fde10bf..759da01e 100644 --- a/lib/middleman/features/blog.rb +++ b/lib/middleman/features/blog.rb @@ -4,10 +4,7 @@ module Middleman module Features module Blog class << self - def registered(app) - # Depend on FrontMatter - app.activate Middleman::Features::FrontMatter - + def registered(app) # Include helpers app.helpers Middleman::Features::Blog::Helpers diff --git a/lib/middleman/server.rb b/lib/middleman/server.rb index 75a66638..590460fe 100644 --- a/lib/middleman/server.rb +++ b/lib/middleman/server.rb @@ -49,6 +49,8 @@ module Middleman # Activate Webservices Proxy package # register Middleman::Features::Proxy + register Middleman::Features::FrontMatter + # Activate Lorem helpers register Middleman::Features::Lorem From d2e7dde496a72843f3c9a7f7a8f229ffda3f17ec Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Mon, 13 Jun 2011 18:34:14 -0700 Subject: [PATCH 3/7] new release --- lib/middleman/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/middleman/version.rb b/lib/middleman/version.rb index 87b96428..ec17c4a1 100644 --- a/lib/middleman/version.rb +++ b/lib/middleman/version.rb @@ -1,3 +1,3 @@ module Middleman - VERSION = "2.0.0.beta1" + VERSION = "2.0.0.beta2" end From d17fa7b71bb1763117630879cfd90b86e68b614d Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Tue, 14 Jun 2011 13:54:59 -0700 Subject: [PATCH 4/7] fix esoteric image path bug --- lib/middleman/features/default_helpers.rb | 2 +- lib/middleman/features/front_matter.rb | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/middleman/features/default_helpers.rb b/lib/middleman/features/default_helpers.rb index 58ca72dd..e431c8b7 100644 --- a/lib/middleman/features/default_helpers.rb +++ b/lib/middleman/features/default_helpers.rb @@ -50,7 +50,7 @@ module Middleman::Features::DefaultHelpers else kind.to_s end source = source.to_s.gsub(/\s/, '') - ignore_extension = (asset_folder.to_s == kind.to_s) # don't append extension + ignore_extension = (kind == :images) # don't append extension source << ".#{kind}" unless ignore_extension or source =~ /\.#{kind}/ result_path = source if source =~ %r{^/} # absolute path result_path ||= asset_url(source, asset_folder) diff --git a/lib/middleman/features/front_matter.rb b/lib/middleman/features/front_matter.rb index 0db76884..f666df84 100644 --- a/lib/middleman/features/front_matter.rb +++ b/lib/middleman/features/front_matter.rb @@ -6,12 +6,15 @@ module Middleman::Features::FrontMatter def registered(app) app.extend ClassMethods + ::Tilt::register MarukuTemplate, 'markdown', 'mkd', 'md' ::Tilt::register MarukuTemplate, 'markdown', 'mkd', 'md' ::Tilt::register KramdownTemplate, 'markdown', 'mkd', 'md' ::Tilt::register BlueClothTemplate, 'markdown', 'mkd', 'md' ::Tilt::register RedcarpetTemplate, 'markdown', 'mkd', 'md' ::Tilt::register RDiscountTemplate, 'markdown', 'mkd', 'md' ::Tilt::register RedClothTemplate, 'textile' + ::Tilt::register ERBTemplate, 'erb', 'rhtml' + ::Tilt::register ErubisTemplate, 'erb', 'rhtml', 'erubis' end alias :included :registered end @@ -66,4 +69,13 @@ module Middleman::Features::FrontMatter class RedClothTemplate < ::Tilt::RedClothTemplate include Middleman::Features::FrontMatter::YamlAware end + + # ERb + class ERBTemplate < ::Tilt::ERBTemplate + include Middleman::Features::FrontMatter::YamlAware + end + + class ErubisTemplate < ::Tilt::ErubisTemplate + include Middleman::Features::FrontMatter::YamlAware + end end \ No newline at end of file From 5cecbec455f428be326506db7914e85afca521dc Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Tue, 14 Jun 2011 14:02:33 -0700 Subject: [PATCH 5/7] specific compass --- middleman.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleman.gemspec b/middleman.gemspec index e4922267..f993b90c 100644 --- a/middleman.gemspec +++ b/middleman.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("haml", ["~> 3.1.0"]) s.add_runtime_dependency("coffee-filter", ["~> 0.1.0"]) s.add_runtime_dependency("sass", ["~> 3.1.0"]) - s.add_runtime_dependency("compass", ["~> 0.11.1"]) + s.add_runtime_dependency("compass", ["0.11.2"]) s.add_runtime_dependency("compass-susy-plugin", ["~> 0.9.0"]) s.add_runtime_dependency("coffee-script", ["~> 2.2.0"]) s.add_runtime_dependency("httparty", ["~> 0.7.0"]) From 38ed58070d805b63a670f2c52b1f8924b9c3d585 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Tue, 14 Jun 2011 14:02:46 -0700 Subject: [PATCH 6/7] new beta --- lib/middleman/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/middleman/version.rb b/lib/middleman/version.rb index ec17c4a1..d353e575 100644 --- a/lib/middleman/version.rb +++ b/lib/middleman/version.rb @@ -1,3 +1,3 @@ module Middleman - VERSION = "2.0.0.beta2" + VERSION = "2.0.0.beta3" end From 5861a1bd7fcb1326f1372be0cc1d14b8300cf84a Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Thu, 23 Jun 2011 18:05:25 -0700 Subject: [PATCH 7/7] Don't double list sass. Ignore leftover build folder in git --- .gitignore | 1 + lib/middleman.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 572e021f..4e693d42 100755 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ pkg Gemfile.lock docs .rvmrc +fixtures/test-app/build \ No newline at end of file diff --git a/lib/middleman.rb b/lib/middleman.rb index 9d2eb39d..ddb121f4 100755 --- a/lib/middleman.rb +++ b/lib/middleman.rb @@ -19,7 +19,7 @@ # * Sass (.sass) # * Scss (.scss) # * Haml (.haml) -# * Sass (.sass) +# * Slim (.slim) # * Less CSS (.less) # * Builder (.builder) # * Liquid (.liquid)