Some new sidebar action

This commit is contained in:
Chris Eppstein 2010-04-20 22:43:25 -07:00
parent bf83b2d5b3
commit 8a01916356
56 changed files with 139 additions and 62 deletions

View File

@ -29,7 +29,6 @@ compile '/examples/*/' do
layout 'example' layout 'example'
end end
skip = Proc.new{nil}
sass_options = Compass.sass_engine_options sass_options = Compass.sass_engine_options
(0..5).each do |i| (0..5).each do |i|
@ -43,7 +42,7 @@ end
compile '/reference/*/' do compile '/reference/*/' do
filter :haml, :ugly => true filter :haml, :ugly => true
filter :highlight if ENV['SYNTAX'] filter :highlight if ENV['SYNTAX']
layout 'default' layout item[:layout] || 'main'
end end
compile '*' do compile '*' do
@ -76,8 +75,8 @@ route '/stylesheets/*/' do
SITE_ROOT+item.identifier.chop + '.css' SITE_ROOT+item.identifier.chop + '.css'
end end
['/examples/*/markup/', '/examples/*/stylesheet/', '/examples/*/background/'].each do |ex_file| %w(markup stylesheet background).each do |ex_file|
route ex_file do route "/examples/*/#{ex_file}/" do
nil nil
end end
end end

View File

@ -3,26 +3,27 @@ title: Compass Documentation
crumb: Docs crumb: Docs
body_id: home body_id: home
--- ---
%h1#logo Compass %article
%h1#logo Compass
%p %p
Compass is a stylesheet authoring tool that uses the Sass stylesheet Compass is a stylesheet authoring tool that uses the Sass stylesheet
language to make your stylesheets smaller and your web site easier to language to make your stylesheets smaller and your web site easier to
maintain. Compass provides ports of the best of breed css frameworks maintain. Compass provides ports of the best of breed css frameworks
that you can use without forcing you to use their presentational class that you can use without forcing you to use their presentational class
names. Its a new way of thinking about stylesheets that must be seen names. Its a new way of thinking about stylesheets that must be seen
in action! in action!
%h2 Screencast Tutorial %h2 Screencast Tutorial
%p %p
This screencast will walk you through getting set up, This screencast will walk you through getting set up,
learning Sass, and then how to use Compass to style a webpage. learning Sass, and then how to use Compass to style a webpage.
<object width="660" height="371"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=4335944&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=4335944&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="660" height="371" /></object> <object width="660" height="371"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=4335944&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=4335944&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="660" height="371" /></object>
%h2 Bugs Reports, Discussions, Support %h2 Bugs Reports, Discussions, Support
:markdown :markdown
Send a note to the [mailing list](http://groups.google.com/group/compass-users) Send a note to the [mailing list](http://groups.google.com/group/compass-users)
and/or [File a bug](http://github.com/chriseppstein/compass/issues). and/or [File a bug](http://github.com/chriseppstein/compass/issues).

View File

@ -6,6 +6,7 @@ stylesheet: _compass.scss
classnames: classnames:
- reference - reference
meta_description: The Compass Core Framework. meta_description: The Compass Core Framework.
layout: core
--- ---
- render 'reference' do - render 'reference' do
%p %p

View File

@ -3,9 +3,11 @@ title: Compass CSS3
crumb: CSS3 crumb: CSS3
framework: compass framework: compass
stylesheet: compass/_css3.scss stylesheet: compass/_css3.scss
layout: core
classnames: classnames:
- reference - reference
meta_description: Provides cross browser CSS3 mixins that take advantage of available pre-spec vendor prefixes. meta_description: Provides cross browser CSS3 mixins that take advantage of available pre-spec vendor prefixes.
layout: core
--- ---
- render 'reference' do - render 'reference' do
%p %p

View File

@ -4,6 +4,7 @@ crumb: Background Clip
framework: compass framework: compass
stylesheet: compass/css3/_background-clip.scss stylesheet: compass/css3/_background-clip.scss
meta_description: Specify the background clip for all browsers. meta_description: Specify the background clip for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Background Origin
framework: compass framework: compass
stylesheet: compass/css3/_background-origin.scss stylesheet: compass/css3/_background-origin.scss
meta_description: Specify the background origin for all browsers. meta_description: Specify the background origin for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Background Size
framework: compass framework: compass
stylesheet: compass/css3/_background-size.scss stylesheet: compass/css3/_background-size.scss
meta_description: Specify the background size for all browsers. meta_description: Specify the background size for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Border Radius
framework: compass framework: compass
stylesheet: compass/css3/_border-radius.scss stylesheet: compass/css3/_border-radius.scss
meta_description: Specify the border radius for all browsers. meta_description: Specify the border radius for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Box Shadow
framework: compass framework: compass
stylesheet: compass/css3/_box-shadow.scss stylesheet: compass/css3/_box-shadow.scss
meta_description: Specify the box shadow for all browsers. meta_description: Specify the box shadow for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Box Sizing
framework: compass framework: compass
stylesheet: compass/css3/_box-sizing.scss stylesheet: compass/css3/_box-sizing.scss
meta_description: Specify the box sizing for all browsers. meta_description: Specify the box sizing for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Columns
framework: compass framework: compass
stylesheet: compass/css3/_columns.scss stylesheet: compass/css3/_columns.scss
meta_description: Specify a columnar layout for all browsers. meta_description: Specify a columnar layout for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Font Face
framework: compass framework: compass
stylesheet: compass/css3/_font-face.scss stylesheet: compass/css3/_font-face.scss
meta_description: Specify a downloadable font face for all browsers. meta_description: Specify a downloadable font face for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Gradient
framework: compass framework: compass
stylesheet: compass/css3/_gradient.scss stylesheet: compass/css3/_gradient.scss
meta_description: Specify linear gradients and radial gradients for all browsers. meta_description: Specify linear gradients and radial gradients for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Inline Block
framework: compass framework: compass
stylesheet: compass/css3/_inline-block.scss stylesheet: compass/css3/_inline-block.scss
meta_description: Declare an element inline block for all browsers. meta_description: Declare an element inline block for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Opacity
framework: compass framework: compass
stylesheet: compass/css3/_opacity.scss stylesheet: compass/css3/_opacity.scss
meta_description: Specify the opacity for all browsers. meta_description: Specify the opacity for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Text Shadow
framework: compass framework: compass
stylesheet: compass/css3/_text-shadow.scss stylesheet: compass/css3/_text-shadow.scss
meta_description: Specify the text shadow for all browsers. meta_description: Specify the text shadow for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Transform
framework: compass framework: compass
stylesheet: compass/css3/_transform.scss stylesheet: compass/css3/_transform.scss
meta_description: Specify the 2D transformation for all browsers. meta_description: Specify the 2D transformation for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Transition
framework: compass framework: compass
stylesheet: compass/css3/_transition.scss stylesheet: compass/css3/_transition.scss
meta_description: Specify a style transition for all browsers. meta_description: Specify a style transition for all browsers.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Layout
framework: compass framework: compass
stylesheet: compass/_layout.scss stylesheet: compass/_layout.scss
meta_description: Page layout module. So far, this is just the sticky-footer mixin. meta_description: Page layout module. So far, this is just the sticky-footer mixin.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,7 @@ title: Compass Sticky Footer
crumb: Sticky Footer crumb: Sticky Footer
framework: compass framework: compass
stylesheet: compass/layout/_sticky-footer.scss stylesheet: compass/layout/_sticky-footer.scss
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -4,6 +4,7 @@ crumb: Misc
framework: compass framework: compass
stylesheet: compass/_misc.scss stylesheet: compass/_misc.scss
meta_description: Cute stuff you probably don't need. meta_description: Cute stuff you probably don't need.
layout: core
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,7 @@ title: Compass Reset
crumb: Reset crumb: Reset
framework: compass framework: compass
stylesheet: compass/_reset.scss stylesheet: compass/_reset.scss
layout: core
classnames: classnames:
- reference - reference
meta_description: Adds a CSS Reset into your stylesheet. meta_description: Adds a CSS Reset into your stylesheet.

View File

@ -6,6 +6,8 @@ stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
meta_description: Provides basic mixins for common styling patterns. meta_description: Provides basic mixins for common styling patterns.
layout: core
nav_stylesheet: compass/_utilities.scss
--- ---
- render 'reference' do - render 'reference' do
%p %p

View File

@ -3,6 +3,8 @@ title: Compass General
crumb: General crumb: General
framework: compass framework: compass
stylesheet: compass/utilities/_general.scss stylesheet: compass/utilities/_general.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Clearfix
crumb: Clearfix crumb: Clearfix
framework: compass framework: compass
stylesheet: compass/utilities/general/_clearfix.scss stylesheet: compass/utilities/general/_clearfix.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Float
crumb: Float crumb: Float
framework: compass framework: compass
stylesheet: compass/utilities/general/_float.scss stylesheet: compass/utilities/general/_float.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Hacks
crumb: Hacks crumb: Hacks
framework: compass framework: compass
stylesheet: compass/utilities/general/_hacks.scss stylesheet: compass/utilities/general/_hacks.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Min
crumb: Min crumb: Min
framework: compass framework: compass
stylesheet: compass/utilities/general/_min.scss stylesheet: compass/utilities/general/_min.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Reset
crumb: Reset crumb: Reset
framework: compass framework: compass
stylesheet: compass/utilities/general/_reset.scss stylesheet: compass/utilities/general/_reset.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Tabs
crumb: Tabs crumb: Tabs
framework: compass framework: compass
stylesheet: compass/utilities/general/_tabs.scss stylesheet: compass/utilities/general/_tabs.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Tag_cloud
crumb: Tag Cloud crumb: Tag Cloud
framework: compass framework: compass
stylesheet: compass/utilities/general/_tag-cloud.scss stylesheet: compass/utilities/general/_tag-cloud.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Links
crumb: Links crumb: Links
framework: compass framework: compass
stylesheet: compass/utilities/_links.scss stylesheet: compass/utilities/_links.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Hover Link
crumb: Hover Link crumb: Hover Link
framework: compass framework: compass
stylesheet: compass/utilities/links/_hover-link.scss stylesheet: compass/utilities/links/_hover-link.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Link Colors
crumb: Link Colors crumb: Link Colors
framework: compass framework: compass
stylesheet: compass/utilities/links/_link-colors.scss stylesheet: compass/utilities/links/_link-colors.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Unstyled Link
crumb: Unstyled Link crumb: Unstyled Link
framework: compass framework: compass
stylesheet: compass/utilities/links/_unstyled-link.scss stylesheet: compass/utilities/links/_unstyled-link.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Lists
crumb: Lists crumb: Lists
framework: compass framework: compass
stylesheet: compass/utilities/_lists.scss stylesheet: compass/utilities/_lists.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Bullets
crumb: Bullets crumb: Bullets
framework: compass framework: compass
stylesheet: compass/utilities/lists/_bullets.scss stylesheet: compass/utilities/lists/_bullets.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Horizontal List
crumb: Horizontal List crumb: Horizontal List
framework: compass framework: compass
stylesheet: compass/utilities/lists/_horizontal-list.scss stylesheet: compass/utilities/lists/_horizontal-list.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Inline List
crumb: Inline List crumb: Inline List
framework: compass framework: compass
stylesheet: compass/utilities/lists/_inline-list.scss stylesheet: compass/utilities/lists/_inline-list.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Print
crumb: Print crumb: Print
framework: compass framework: compass
stylesheet: compass/utilities/_print.scss stylesheet: compass/utilities/_print.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Sprites
crumb: Sprites crumb: Sprites
framework: compass framework: compass
stylesheet: compass/utilities/_sprites.scss stylesheet: compass/utilities/_sprites.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Sprite Image
crumb: Sprite Image crumb: Sprite Image
framework: compass framework: compass
stylesheet: compass/utilities/sprites/_sprite-img.scss stylesheet: compass/utilities/sprites/_sprite-img.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Tables
crumb: Tables crumb: Tables
framework: compass framework: compass
stylesheet: compass/utilities/_tables.scss stylesheet: compass/utilities/_tables.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ 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.scss stylesheet: compass/utilities/tables/_alternating-rows-and-columns.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Borders
crumb: Borders crumb: Borders
framework: compass framework: compass
stylesheet: compass/utilities/tables/_borders.scss stylesheet: compass/utilities/tables/_borders.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Scaffolding
crumb: Scaffolding crumb: Scaffolding
framework: compass framework: compass
stylesheet: compass/utilities/tables/_scaffolding.scss stylesheet: compass/utilities/tables/_scaffolding.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Text
crumb: Text crumb: Text
framework: compass framework: compass
stylesheet: compass/utilities/_text.scss stylesheet: compass/utilities/_text.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Ellipsis
crumb: Ellipsis crumb: Ellipsis
framework: compass framework: compass
stylesheet: compass/utilities/text/_ellipsis.scss stylesheet: compass/utilities/text/_ellipsis.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Nowrap
crumb: Nowrap crumb: Nowrap
framework: compass framework: compass
stylesheet: compass/utilities/text/_nowrap.scss stylesheet: compass/utilities/text/_nowrap.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -3,6 +3,8 @@ title: Compass Replacement
crumb: Replacement crumb: Replacement
framework: compass framework: compass
stylesheet: compass/utilities/text/_replacement.scss stylesheet: compass/utilities/text/_replacement.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames: classnames:
- reference - reference
--- ---

View File

@ -143,6 +143,9 @@ footer[role="contentinfo"]
/* @group COMPONENTS by type /* @group COMPONENTS by type
article
text-align: left
article article
> nav > nav
border-top: $px2em*1px solid #ccc border-top: $px2em*1px solid #ccc
@ -197,12 +200,13 @@ article
+leader(1,14px) +leader(1,14px)
ul ul
+no-style-list +no-style-list
text-align: right text-align: left
h2 h2
+leader(1,14px) +leader(1,14px)
border-bottom: 1px solid #ccc border-bottom: 1px solid #ccc
margin-bottom: ($base_rhythm_unit*.5 - $px2em*1px) * (14/16) margin-bottom: ($base_rhythm_unit*.5 - $px2em*1px) * (14/16)
text-align: left a:hover
+text-shadow
#code #code
+full(12) +full(12)

View File

@ -0,0 +1,3 @@
- render 'main' do
%aside(role="sidebar")= render 'partials/sidebar'
%article= yield

View File

@ -4,16 +4,16 @@
%meta{:charset => "utf-8"}/ %meta{:charset => "utf-8"}/
%meta{:content => "chrome=1", "http-equiv" => "X-UA-Compatible"} %meta{:content => "chrome=1", "http-equiv" => "X-UA-Compatible"}
%link(rel="shortcut icon" type="image/png" href="/docs/images/compass_icon.png") %link(rel="shortcut icon" type="image/png" href="/docs/images/compass_icon.png")
%title home | compass docs wireframe %title
#{@item[:title]} | Compass Documentation
<!--[if !IE 6]><!--> <!--[if !IE 6]><!-->
%link{:charset => "utf-8", :href => "stylesheets/screen.css", :rel => "stylesheet", :type => "text/css"} %link{:charset => "utf-8", :href => "/docs/stylesheets/screen.css", :rel => "stylesheet", :type => "text/css"}
<!--<![endif]--> <!--<![endif]-->
/[if gte IE 7] /[if gte IE 7]
%link{:charset => "utf-8", :href => "stylesheets/ie.css", :rel => "stylesheet", :type => "text/css"} %link{:charset => "utf-8", :href => "/docs/stylesheets/ie.css", :rel => "stylesheet", :type => "text/css"}
/[if IE 6] /[if IE 6]
%link{:charset => "utf-8", :href => "http://universal-ie6-css.googlecode.com/files/ie6.0.3.css", :rel => "stylesheet", :type => "text/css"} %link{:charset => "utf-8", :href => "http://universal-ie6-css.googlecode.com/files/ie6.0.3.css", :rel => "stylesheet", :type => "text/css"}
%link{ :href => "/docs/stylesheets/main.css", :rel => "stylesheet", :type => "text/css", :media => "screen" } %link{ :href => "/docs/stylesheets/ui-lightness/jquery-ui-1.7.2.custom.css", :rel => "stylesheet", :type => "text/css", :media => "screen" }
%link{ :href => "/docs/stylesheets/ui-lightness/jquery-ui-1.7.2.custom.css", :rel => "stylesheet", :type => "text/css", :media => "screen" }
%body{body_attributes(@item)} %body{body_attributes(@item)}
%nav#skip-links %nav#skip-links
%a{:href => "#content"} skip to content %a{:href => "#content"} skip to content
@ -34,9 +34,9 @@
%li %li
%a{:href => "/docs/"} introduction %a{:href => "/docs/"} introduction
%li %li
%a{:href => "/docs/compass/"} core %a{:href => "/docs/reference/compass/"} core
%li %li
%a{:href => "/docs/blueprint/"} blueprint %a{:href => "/docs/reference/blueprint/"} blueprint
%li %li
%a{:href => "/docs/plugins/"} plugins %a{:href => "/docs/plugins/"} plugins
#search-docs #search-docs
@ -44,7 +44,7 @@
%p %p
%label{:for => "search"} search %label{:for => "search"} search
%input#search{:name => "search", :type => "text", :value => "", :placeholder => "Search"} %input#search{:name => "search", :type => "text", :value => "", :placeholder => "Search"}
%article= yield = yield
%script(src="/docs/javascripts/jquery-1.3.2.min.js") %script(src="/docs/javascripts/jquery-1.3.2.min.js")
%script(src="/docs/javascripts/jquery-ui-1.7.2.custom.min.js") %script(src="/docs/javascripts/jquery-ui-1.7.2.custom.min.js")
%script(src="/docs/javascripts/fixups.js" deferred) %script(src="/docs/javascripts/fixups.js" deferred)

View File

@ -1,21 +1,2 @@
%h2 %nav#local-nav
%a(href="/docs/") Compass Documentation %ul= item_tree(reference_item(:stylesheet => (@item[:nav_stylesheet] || "_compass.scss")), :depth => 2, :omit_self => true)
%h3
Tutorials
= item_tree(find("/tutorials/"), true)
%h3
Frameworks
%ul
= item_tree(reference_item(:stylesheet => "_compass.scss"))
= item_tree(reference_item(:stylesheet => "_blueprint.scss"))
%h3
Misc
%ul
%li
%a{:href => "/docs/frameworks/"}
Working with plugins and frameworks

View File

@ -1,5 +1,3 @@
= render "partials/breadcrumbs"
%h1= item[:title] %h1= item[:title]
%p %p

View File

@ -55,15 +55,24 @@ def find(identifier)
@items.find{|i| i.identifier == identifier} @items.find{|i| i.identifier == identifier}
end end
def item_tree(item, omit_self = false) def item_tree(item, options = {})
crumb = item[:crumb] || item[:title] crumb = item[:crumb] || item[:title]
options[:heading_level] ||= 1
child_html = "" child_html = ""
if item.children.any? if options.fetch(:depth,1) > 0
child_html << "<ol>" if item.children.any?
item.children.each do |child| child_html << "<ul>"
child_html << item_tree(child) item.children.sort_by{|c| c[:crumb] || c[:title]}.each do |child|
child_opts = options.dup
child_opts[:depth] -= 1 if child_opts.has_key?(:depth)
child_opts[:heading_level] += 1
child_opts.delete(:omit_self)
child_html << item_tree(child, child_opts)
end
child_html << "</ul>"
end end
child_html << "</ol>" else
options.delete(:heading_level)
end end
css_class = nil css_class = nil
prefix = nil prefix = nil
@ -73,8 +82,13 @@ def item_tree(item, omit_self = false)
prefix = "&raquo;" prefix = "&raquo;"
suffix = "&laquo;" suffix = "&laquo;"
end end
contents = unless omit_self contents = unless options[:omit_self]
%Q{<li><a href="#{default_path(item)}"#{css_class}>#{prefix}#{crumb}#{suffix}</a></li>} hl = if options[:heading_level]
"h#{options[:heading_level]}"
else
"span"
end
%Q{<li><#{hl}><a href="#{default_path(item)}"#{css_class}>#{prefix}#{crumb}#{suffix}</a></#{hl}></li>}
end end
%Q{#{contents}#{child_html}} %Q{#{contents}#{child_html}}
end end