Merge remote branch 'chris/docs' into docs

Conflicts:
	doc-src/content/examples/compass/css3/columns/stylesheet.sass
This commit is contained in:
Johan Ronsse 2010-02-04 00:52:31 +01:00
commit 5569b12f80
28 changed files with 80 additions and 57 deletions

View File

@ -1,6 +1,6 @@
---
title: Blueprint Fancy_type
crumb: Fancy_type
title: Blueprint Fancy Type
crumb: Fancy Type
framework: blueprint
stylesheet: blueprint/_fancy_type.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Blueprint Link_icons
crumb: Link_icons
title: Blueprint Link Icons
crumb: Link Icons
framework: blueprint
stylesheet: blueprint/_link_icons.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Compass
crumb: Compass
title: Compass Core Framework
crumb: Compass Core
framework: compass
stylesheet: _compass.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Background_clip
crumb: Background_clip
title: Compass Background Clip
crumb: Background Clip
framework: compass
stylesheet: compass/css3/_background_clip.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Background_origin
crumb: Background_origin
title: Compass Background Origin
crumb: Background Origin
framework: compass
stylesheet: compass/css3/_background_origin.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Background_size
crumb: Background_size
title: Compass Background Size
crumb: Background Size
framework: compass
stylesheet: compass/css3/_background_size.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Border_radius
crumb: Border_radius
title: Compass Border Radius
crumb: Border Radius
framework: compass
stylesheet: compass/css3/_border_radius.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Box_shadow
crumb: Box_shadow
title: Compass Box Shadow
crumb: Box Shadow
framework: compass
stylesheet: compass/css3/_box_shadow.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Box_sizing
crumb: Box_sizing
title: Compass Box Sizing
crumb: Box Sizing
framework: compass
stylesheet: compass/css3/_box_sizing.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Font_face
crumb: Font_face
title: Compass Font Face
crumb: Font Face
framework: compass
stylesheet: compass/css3/_font_face.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Inline_block
crumb: Inline_block
title: Compass Inline Block
crumb: Inline Block
framework: compass
stylesheet: compass/css3/_inline_block.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Text_shadow
crumb: Text_shadow
title: Compass Text Shadow
crumb: Text Shadow
framework: compass
stylesheet: compass/css3/_text_shadow.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Sticky_footer
crumb: Sticky_footer
title: Compass Sticky Footer
crumb: Sticky Footer
framework: compass
stylesheet: compass/layout/_sticky_footer.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Tag_cloud
crumb: Tag_cloud
crumb: Tag Cloud
framework: compass
stylesheet: compass/utilities/general/_tag_cloud.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Hover_link
crumb: Hover_link
title: Compass Hover Link
crumb: Hover Link
framework: compass
stylesheet: compass/utilities/links/_hover_link.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Link_colors
crumb: Link_colors
title: Compass Link Colors
crumb: Link Colors
framework: compass
stylesheet: compass/utilities/links/_link_colors.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Unstyled_link
crumb: Unstyled_link
title: Compass Unstyled Link
crumb: Unstyled Link
framework: compass
stylesheet: compass/utilities/links/_unstyled_link.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Horizontal_list
crumb: Horizontal_list
title: Compass Horizontal List
crumb: Horizontal List
framework: compass
stylesheet: compass/utilities/lists/_horizontal_list.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Inline_list
crumb: Inline_list
title: Compass Inline List
crumb: Inline List
framework: compass
stylesheet: compass/utilities/lists/_inline_list.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Sprite_img
crumb: Sprite_img
title: Compass Sprite Image
crumb: Sprite Image
framework: compass
stylesheet: compass/utilities/sprites/_sprite_img.sass
classnames:

View File

@ -1,6 +1,6 @@
---
title: Compass Alternating_rows_and_columns
crumb: Alternating_rows_and_columns
title: Compass Alternating Rows and Columns
crumb: Alternating Rows And Columns
framework: compass
stylesheet: compass/utilities/tables/_alternating_rows_and_columns.sass
classnames:

View File

@ -12,11 +12,11 @@ body
+container
#main
+column(18, true)
+prepend(6)
+column(16, true)
+prepend(8)
#sidebar
+column(6)
+column(8)
+pull(24, true)
body.reference

View File

@ -14,11 +14,7 @@
#main
= yield
#sidebar
%h2
Compass Documentation
%ul
%li= link_to "Blueprint Reference", reference_path(:stylesheet => "_blueprint.sass")
%li= link_to "Compass Reference", reference_path(:stylesheet => "_compass.sass")
= render "partials/sidebar"
#footer= @item[:content_for_footer]
:javascript
$(function(){

View File

@ -0,0 +1,5 @@
%h2
Compass Documentation
%ul
= item_tree(reference_item(:stylesheet => "_blueprint.sass"))
= item_tree(reference_item(:stylesheet => "_compass.sass"))

View File

@ -46,3 +46,22 @@ end
def cycle(*args)
yield Recycler.new *args
end
def default_path(item)
item.reps.find{|r| r.name == :default}.path
end
def item_tree(item)
crumb = item[:crumb] || item[:title]
child_html = ""
if item.children.any?
child_html << "<ol>"
item.children.each do |child|
child_html << item_tree(child)
end
child_html << "</ol>"
end
%Q{<li><a href="#{default_path(item)}">#{crumb}</a>#{child_html}</li>}
end

View File

@ -28,20 +28,23 @@ def imports(item)
imports
end
def reference_path(options)
def reference_item(options)
stylesheet = options[:stylesheet]
path = stylesheet_path(stylesheet)
if path
item = @items.detect do |i|
@items.detect do |i|
i[:stylesheet] == path &&
i.identifier =~ /^\/reference/
end
if item
end
end
def reference_path(options)
if item = reference_item(options)
rep = item.reps.find { |r| r.name == :default }
rep.path
end
end
end
def import_paths
paths = Compass::Frameworks::ALL.inject([]) {|m, f| m << f.stylesheets_directory}

View File

@ -141,7 +141,7 @@ module Sass
sass_str = "#{name.inspect}"
if default_value
sass_str << " = "
sass_str << default_value.inspect
sass_str << default_value.to_sass
end
sass_str
end