From 402a009e4d5929afd2429f2346c01b77a6347c5c Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 27 Mar 2010 23:23:45 -0700 Subject: [PATCH] Fill out some of the intro for the top level of the compass modules. --- doc-src/content/reference/compass.haml | 14 +++++++++++++- doc-src/content/reference/compass/layout.haml | 3 ++- doc-src/content/reference/compass/misc.haml | 2 +- doc-src/content/reference/compass/utilities.haml | 3 ++- doc-src/layouts/reference.haml | 4 ++++ doc-src/lib/stylesheets.rb | 4 ++++ 6 files changed, 26 insertions(+), 4 deletions(-) diff --git a/doc-src/content/reference/compass.haml b/doc-src/content/reference/compass.haml index bd5aee43..ec8b2196 100644 --- a/doc-src/content/reference/compass.haml +++ b/doc-src/content/reference/compass.haml @@ -9,4 +9,16 @@ meta_description: The Compass Core Framework. --- - render 'reference' do %p - Lorem ipsum dolor sit amet. + The compass core framework is a design-agnostic framework that + provides common code that would otherwise be duplicated across + other frameworks and extensions. + +%h2 Non Imported Modules + +%p + You can import these yourself if you want to use them. +%ul + = render "partials/reference/import", :import => "compass/_layout.sass" + = render "partials/reference/import", :import => "compass/_reset.sass" + = render "partials/reference/import", :import => "compass/_misc.sass" + diff --git a/doc-src/content/reference/compass/layout.haml b/doc-src/content/reference/compass/layout.haml index 950f2dd8..a2c54aad 100644 --- a/doc-src/content/reference/compass/layout.haml +++ b/doc-src/content/reference/compass/layout.haml @@ -9,4 +9,5 @@ classnames: --- - render 'reference' do %p - Lorem ipsum dolor sit amet. + This module provides tools to help you with page layout. + So far, it's just the stick-footer mixin. diff --git a/doc-src/content/reference/compass/misc.haml b/doc-src/content/reference/compass/misc.haml index 4147b094..29f73931 100644 --- a/doc-src/content/reference/compass/misc.haml +++ b/doc-src/content/reference/compass/misc.haml @@ -9,4 +9,4 @@ classnames: --- - render 'reference' do %p - Lorem ipsum dolor sit amet. + This mixin lets you style an Unobtrusive CSS logo obtrusively. diff --git a/doc-src/content/reference/compass/utilities.haml b/doc-src/content/reference/compass/utilities.haml index 12faaa7b..9c2b348b 100644 --- a/doc-src/content/reference/compass/utilities.haml +++ b/doc-src/content/reference/compass/utilities.haml @@ -9,4 +9,5 @@ meta_description: Provides basic mixins for common styling patterns. --- - render 'reference' do %p - Lorem ipsum dolor sit amet. + The Compass Utilities module provides some basic mixins + for common styling patterns. diff --git a/doc-src/layouts/reference.haml b/doc-src/layouts/reference.haml index 0e3445a8..caf2389d 100644 --- a/doc-src/layouts/reference.haml +++ b/doc-src/layouts/reference.haml @@ -2,6 +2,10 @@ %h1= item[:title] +%p + This file can be imported using: + %code @import #{departialize(item[:stylesheet])} + = yield = render "partials/reference/examples" diff --git a/doc-src/lib/stylesheets.rb b/doc-src/lib/stylesheets.rb index 7a73e85f..7455e0b0 100644 --- a/doc-src/lib/stylesheets.rb +++ b/doc-src/lib/stylesheets.rb @@ -41,6 +41,10 @@ def reference_item(options) end end +def departialize(path) + path.gsub(%r{(\b|/)_}){|m| m.size > 1 ? "/" : ""} +end + def reference_path(options) if item = reference_item(options) rep = item.reps.find { |r| r.name == :default }