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

@ -14,4 +14,4 @@
+column-count(4) +column-count(4)
+column-rule(1px, "solid", red) +column-rule(1px, "solid", red)
width: 300px width: 300px
margin-bottom: 20px margin-bottom: 20px

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -14,11 +14,7 @@
#main #main
= yield = yield
#sidebar #sidebar
%h2 = render "partials/sidebar"
Compass Documentation
%ul
%li= link_to "Blueprint Reference", reference_path(:stylesheet => "_blueprint.sass")
%li= link_to "Compass Reference", reference_path(:stylesheet => "_compass.sass")
#footer= @item[:content_for_footer] #footer= @item[:content_for_footer]
:javascript :javascript
$(function(){ $(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) def cycle(*args)
yield Recycler.new *args yield Recycler.new *args
end 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,18 +28,21 @@ def imports(item)
imports imports
end end
def reference_path(options) def reference_item(options)
stylesheet = options[:stylesheet] stylesheet = options[:stylesheet]
path = stylesheet_path(stylesheet) path = stylesheet_path(stylesheet)
if path if path
item = @items.detect do |i| @items.detect do |i|
i[:stylesheet] == path && i[:stylesheet] == path &&
i.identifier =~ /^\/reference/ i.identifier =~ /^\/reference/
end end
if item end
rep = item.reps.find { |r| r.name == :default } end
rep.path
end def reference_path(options)
if item = reference_item(options)
rep = item.reps.find { |r| r.name == :default }
rep.path
end end
end end

View File

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