Unified · Split
| @@ -1,7 +1,7 @@ | |||
| 1 | ._rdoc { | 1 | ._rdoc { |
| 2 | > .description, > .documentation-section { padding-left: 1rem; } | 2 | > .description, > .documentation-section { padding-left: 1rem; } |
| 3 | > .description > h2, .section-header { @extend %block-heading; } | 3 | > .description > h2, header > h3 { @extend %block-heading; } |
| 4 | > .description > h2, .section-header, .method-heading { margin-left: -1rem; } | 4 | > .description > h2, header > h3, .method-heading { margin-left: -1rem; } |
| 5 | .description > h1 { font-size: 1rem; } | 5 | .description > h1 { font-size: 1rem; } |
| 6 | .method-description > h2, h3, h4, h5, h6 { font-size: 1em; } | 6 | .method-description > h2, h3, h4, h5, h6 { font-size: 1em; } |
| 7 | 7 | ||
| @@ -7,7 +7,7 @@ module Docs · 6 unmodified lines | |||
| 7 | end | 7 | end |
| 8 | 8 | ||
| 9 | def root | 9 | def root |
| 10 | at_css('.section-header').remove | 10 | at_css('h3').remove |
| 11 | 11 | ||
| 12 | # Remove skipped items | 12 | # Remove skipped items |
| 13 | css('li > span').each do |node| | 13 | css('li > span').each do |node| |
| @@ -5,17 +5,20 @@ module Docs · 4 unmodified lines | |||
| 5 | if root_page? | 5 | if root_page? |
| 6 | at_css '#classindex-section' | 6 | at_css '#classindex-section' |
| 7 | else | 7 | else |
| 8 | container = at_css '#documentation' | 8 | container = at_css 'main' |
| 9 | 9 | ||
| 10 | # Add <dl> mentioning parent class and included modules | 10 | # Add <dl> mentioning parent class and included modules |
| 11 | meta = Nokogiri::XML::Node.new 'dl', doc | 11 | meta = Nokogiri::XML::Node.new 'dl', doc |
| 12 | meta['class'] = 'meta' | 12 | meta['class'] = 'meta' |
| 13 | |||
| 13 | if parent = at_css('#parent-class-section') | 14 | if parent = at_css('#parent-class-section') |
| 14 | meta << %(<dt>Parent:</dt><dd class="meta-parent">#{parent.at_css('.link').inner_html.strip}</dd>) | 15 | meta << %(<dt>Parent:</dt><dd class="meta-parent">#{parent.at_css('.link').inner_html.strip}</dd>) |
| 15 | end | 16 | end |
| 17 | |||
| 16 | if includes = at_css('#includes-section') | 18 | if includes = at_css('#includes-section') |
| 17 | meta << %(<dt>Included modules:</dt><dd class="meta-includes">#{includes.css('a').map(&:to_html).join(', ')}</dd>) | 19 | meta << %(<dt>Included modules:</dt><dd class="meta-includes">#{includes.css('a').map(&:to_html).join(', ')}</dd>) |
| 18 | end | 20 | end |
| 21 | |||
| 19 | container.at_css('h1').after(meta) | 22 | container.at_css('h1').after(meta) |
| 20 | 23 | ||
| 21 | container | 24 | container |
| @@ -20,7 +20,7 @@ module Docs · 19 unmodified lines | |||
| 20 | end | 20 | end |
| 21 | 21 | ||
| 22 | def include_default_entry? | 22 | def include_default_entry? |
| 23 | at_css('#description p') || css('.documentation-section').any? { |node| node.content.present? } | 23 | at_css('> .description p') || css('.documentation-section').any? { |node| node.content.present? } |
| 24 | end | 24 | end |
| 25 | 25 | ||
| 26 | def additional_entries | 26 | def additional_entries |