1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

textilize titles in ToC of guides

This commit is contained in:
Xavier Noria 2009-02-17 23:14:58 +01:00
parent fefbddbfdb
commit 190984567e
2 changed files with 5 additions and 2 deletions

View file

@ -483,6 +483,9 @@ h6 {
font-size: 1em; font-size: 1em;
font-weight: normal; font-weight: normal;
} }
#subCol .chapters p {
font-size: 1em;
}
tt { tt {
font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace; font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace;

View file

@ -82,11 +82,11 @@ module RailsGuides
# Set index for 2 levels # Set index for 2 levels
i.level_hash.each do |key, value| i.level_hash.each do |key, value|
bookmark = '#' + key.gsub(/[^a-z0-9\-_\+]+/i, '').underscore.dasherize bookmark = '#' + key.gsub(/[^a-z0-9\-_\+]+/i, '').underscore.dasherize
link = view.content_tag(:a, :href => bookmark) { key } link = view.content_tag(:a, :href => bookmark) { textile(key) }
children = value.keys.map do |k| children = value.keys.map do |k|
bm = '#' + k.gsub(/[^a-z0-9\-_\+]+/i, '').underscore.dasherize bm = '#' + k.gsub(/[^a-z0-9\-_\+]+/i, '').underscore.dasherize
l = view.content_tag(:a, :href => bm) { k } l = view.content_tag(:a, :href => bm) { textile(k) }
view.content_tag(:li, l) view.content_tag(:li, l)
end end