From c2900a184a456b63bf106b4393d36c36359f7696 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 27 Mar 2010 23:46:06 -0700 Subject: [PATCH] Better indication of the current page in the sidebar. --- doc-src/content/stylesheets/main.sass | 5 ++++- doc-src/lib/default.rb | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc-src/content/stylesheets/main.sass b/doc-src/content/stylesheets/main.sass index 8db1beab..f8e50822 100644 --- a/doc-src/content/stylesheets/main.sass +++ b/doc-src/content/stylesheets/main.sass @@ -24,7 +24,10 @@ body ul, ol list-style-position: inside padding-left: 10px - + .selected + font-weight: bold + a + +hover-link // Typography blockquote diff --git a/doc-src/lib/default.rb b/doc-src/lib/default.rb index 56953ade..e9c0649d 100644 --- a/doc-src/lib/default.rb +++ b/doc-src/lib/default.rb @@ -61,7 +61,15 @@ def item_tree(item) end child_html << "" end - %Q{
  • #{crumb}#{child_html}
  • } + css_class = nil + prefix = nil + suffix = nil + if item.identifier == @item.identifier + css_class = %Q{class="selected"} + prefix = "»" + suffix = "«" + end + %Q{
  • #{prefix}#{crumb}#{suffix}
  • #{child_html}} end