mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Retain heading styles in the page chapters list
This commit is contained in:
parent
f35187be22
commit
5a4622b8b8
2 changed files with 6 additions and 5 deletions
|
@ -24,7 +24,7 @@ dl dt { font-weight: bold; }
|
|||
dd { margin-left: 1.5em;}
|
||||
|
||||
pre,code { margin: 1.5em 0; overflow: auto; color: #222;}
|
||||
pre,code,tt {
|
||||
pre,code {
|
||||
font-size: 1em;
|
||||
font-family: "Anonymous Pro", "Inconsolata", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
||||
line-height: 1.5;
|
||||
|
@ -156,6 +156,7 @@ a, a:link, a:visited {
|
|||
}
|
||||
|
||||
#mainCol a, #subCol a, #feature a {color: #980905;}
|
||||
#mainCol a code, #subCol a code, #feature a code {color: #980905;}
|
||||
|
||||
|
||||
/* Navigation
|
||||
|
@ -400,7 +401,7 @@ div.code_container {
|
|||
margin: 0.25em 0 1.5em 0;
|
||||
}
|
||||
|
||||
.note tt, .info tt, .todo tt {border:none; background: none; padding: 0;}
|
||||
.note code, .info code, .todo code {border:none; background: none; padding: 0;}
|
||||
|
||||
#mainCol ul li {
|
||||
list-style:none;
|
||||
|
|
|
@ -65,11 +65,11 @@ module RailsGuides
|
|||
when 'h3'
|
||||
hierarchy = [node]
|
||||
node[:id] = dom_id(hierarchy)
|
||||
@raw_index += "1. [#{node.text}](##{node[:id]})\n"
|
||||
@raw_index += "1. [#{node.inner_html}](##{node[:id]})\n"
|
||||
when 'h4'
|
||||
hierarchy = hierarchy[0, 1] + [node]
|
||||
node[:id] = dom_id(hierarchy)
|
||||
@raw_index += " * [#{node.text}](##{node[:id]})\n"
|
||||
@raw_index += " * [#{node.inner_html}](##{node[:id]})\n"
|
||||
when 'h5'
|
||||
hierarchy = hierarchy[0, 2] + [node]
|
||||
node[:id] = dom_id(hierarchy)
|
||||
|
@ -78,7 +78,7 @@ module RailsGuides
|
|||
node[:id] = dom_id(hierarchy)
|
||||
end
|
||||
|
||||
node.inner_html = "#{node_index(hierarchy)} #{node.text}"
|
||||
node.inner_html = "#{node_index(hierarchy)} #{node.inner_html}"
|
||||
end
|
||||
end
|
||||
end.to_html
|
||||
|
|
Loading…
Reference in a new issue