summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/generator/template/darkfish/rdoc.css21
-rw-r--r--lib/rdoc/markup/to_html.rb4
2 files changed, 25 insertions, 0 deletions
diff --git a/lib/rdoc/generator/template/darkfish/rdoc.css b/lib/rdoc/generator/template/darkfish/rdoc.css
index b965e604e60..35207033dea 100644
--- a/lib/rdoc/generator/template/darkfish/rdoc.css
+++ b/lib/rdoc/generator/template/darkfish/rdoc.css
@@ -28,6 +28,27 @@ h1 {
}
h2,h3,h4 { margin-top: 1.5em; }
+h1 span,
+h2 span,
+h3 span,
+h4 span,
+h5 span,
+h6 span {
+ display: none;
+ padding-left: 1em;
+ font-size: 50%;
+ vertical-align: super;
+}
+
+h1:hover span,
+h2:hover span,
+h3:hover span,
+h4:hover span,
+h5:hover span,
+h6:hover span {
+ display: inline;
+}
+
:link,
:visited {
color: #6C8C22;
diff --git a/lib/rdoc/markup/to_html.rb b/lib/rdoc/markup/to_html.rb
index afe35c26caf..37b9492e23d 100644
--- a/lib/rdoc/markup/to_html.rb
+++ b/lib/rdoc/markup/to_html.rb
@@ -268,6 +268,10 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
@res << "\n<h#{level} id=\"#{label}\">"
@res << to_html(heading.text)
+ unless @options.pipe then
+ @res << "<span><a href=\"##{label}\">&para;</a>"
+ @res << " <a href=\"#documentation\">&uarr;</a></span>"
+ end
@res << "</h#{level}>\n"
end