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

View File

@ -3,6 +3,7 @@ title: Compass Documentation
crumb: Docs
body_id: home
---
%article
%h1#logo Compass
%p

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,6 +3,8 @@ title: Compass Alternating Rows and Columns
crumb: Alternating Rows And Columns
framework: compass
stylesheet: compass/utilities/tables/_alternating-rows-and-columns.scss
layout: core
nav_stylesheet: compass/_utilities.scss
classnames:
- reference
---

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,15 +4,15 @@
%meta{:charset => "utf-8"}/
%meta{:content => "chrome=1", "http-equiv" => "X-UA-Compatible"}
%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]><!-->
%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]-->
/[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]
%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" }
%body{body_attributes(@item)}
%nav#skip-links
@ -34,9 +34,9 @@
%li
%a{:href => "/docs/"} introduction
%li
%a{:href => "/docs/compass/"} core
%a{:href => "/docs/reference/compass/"} core
%li
%a{:href => "/docs/blueprint/"} blueprint
%a{:href => "/docs/reference/blueprint/"} blueprint
%li
%a{:href => "/docs/plugins/"} plugins
#search-docs
@ -44,7 +44,7 @@
%p
%label{:for => "search"} 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-ui-1.7.2.custom.min.js")
%script(src="/docs/javascripts/fixups.js" deferred)

View File

@ -1,21 +1,2 @@
%h2
%a(href="/docs/") Compass Documentation
%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
%nav#local-nav
%ul= item_tree(reference_item(:stylesheet => (@item[:nav_stylesheet] || "_compass.scss")), :depth => 2, :omit_self => true)

View File

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

View File

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