Merge remote branch 'chris/docs' into docs
Conflicts: doc-src/content/examples/compass/css3/columns/stylesheet.sass
This commit is contained in:
commit
5569b12f80
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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
|
||||||
|
@ -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(){
|
||||||
|
5
doc-src/layouts/partials/sidebar.haml
Normal file
5
doc-src/layouts/partials/sidebar.haml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
%h2
|
||||||
|
Compass Documentation
|
||||||
|
%ul
|
||||||
|
= item_tree(reference_item(:stylesheet => "_blueprint.sass"))
|
||||||
|
= item_tree(reference_item(:stylesheet => "_compass.sass"))
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,20 +28,23 @@ 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
|
||||||
|
end
|
||||||
|
|
||||||
|
def reference_path(options)
|
||||||
|
if item = reference_item(options)
|
||||||
rep = item.reps.find { |r| r.name == :default }
|
rep = item.reps.find { |r| r.name == :default }
|
||||||
rep.path
|
rep.path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def import_paths
|
def import_paths
|
||||||
paths = Compass::Frameworks::ALL.inject([]) {|m, f| m << f.stylesheets_directory}
|
paths = Compass::Frameworks::ALL.inject([]) {|m, f| m << f.stylesheets_directory}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user