diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb index 1b408a6f8e..96bb4fb66f 100644 --- a/lib/rdoc/generator/darkfish.rb +++ b/lib/rdoc/generator/darkfish.rb @@ -677,7 +677,6 @@ def assemble_template body_file return body if body =~ / @@ -687,8 +686,6 @@ def assemble_template body_file #{head_file.read} #{body} - -#{footer_file.read} TEMPLATE end diff --git a/lib/rdoc/generator/template/darkfish/css/rdoc.css b/lib/rdoc/generator/template/darkfish/css/rdoc.css index d0f14067ab..877e9bf0a9 100644 --- a/lib/rdoc/generator/template/darkfish/css/rdoc.css +++ b/lib/rdoc/generator/template/darkfish/css/rdoc.css @@ -24,7 +24,9 @@ body { /* Layout */ display: flex; - flex-wrap: wrap; + flex-direction: column; + min-height: 100vh; + margin: 0; } body > :last-child { @@ -209,16 +211,35 @@ nav { border-right: 1px solid #ccc; position: fixed; top: 0; - overflow: auto; + bottom: 0; + overflow: hidden; z-index: 10; /* Layout */ width: var(--sidebar-width); min-height: 100vh; background: white; + + display: flex; + flex-direction: column; +} + +nav[hidden] { + display: none; +} + +nav #project-metadata { + overflow: auto; /* Make the content scrollable */ + flex: 1; /* Take up remaining space */ +} + +nav footer { + padding: 1em; + border-top: 1px solid #ccc; } main { + flex: 1; display: block; margin: 3em auto 1em; padding: 0 1em; /* Add padding to keep space between main content and sidebar/right side of the screen */ @@ -728,8 +749,4 @@ pre { font-family: "Source Code Pro", Monaco, monospace; } -footer { - z-index: 20; -} - /* @end */ diff --git a/lib/rdoc/generator/template/darkfish/index.rhtml b/lib/rdoc/generator/template/darkfish/index.rhtml index b3eede6c00..daaa0b5c54 100644 --- a/lib/rdoc/generator/template/darkfish/index.rhtml +++ b/lib/rdoc/generator/template/darkfish/index.rhtml @@ -12,6 +12,8 @@ <%= render '_sidebar_pages.rhtml' %> <%= render '_sidebar_classes.rhtml' %> + + <%= render '_footer.rhtml' %>