From 826930e7c2d87dbb2dd56f706983c5b00023cae8 Mon Sep 17 00:00:00 2001 From: Jonathan Hefner Date: Tue, 10 Oct 2023 11:38:39 -0500 Subject: [PATCH 1/3] Add Outline heading in panel --- .../generator/template/rails/_file_nav.rhtml | 1 + .../generator/template/rails/_index_nav.rhtml | 1 + .../template/rails/_module_nav.rhtml | 1 + .../template/rails/resources/css/main.css | 21 +++++++++---------- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/rdoc/generator/template/rails/_file_nav.rhtml b/lib/rdoc/generator/template/rails/_file_nav.rhtml index e91ba3aa..737c9165 100644 --- a/lib/rdoc/generator/template/rails/_file_nav.rhtml +++ b/lib/rdoc/generator/template/rails/_file_nav.rhtml @@ -1,4 +1,5 @@ <% if @context.text? %> + diff --git a/lib/rdoc/generator/template/rails/_index_nav.rhtml b/lib/rdoc/generator/template/rails/_index_nav.rhtml index 5e335ee5..585d73c8 100644 --- a/lib/rdoc/generator/template/rails/_index_nav.rhtml +++ b/lib/rdoc/generator/template/rails/_index_nav.rhtml @@ -1,3 +1,4 @@ + diff --git a/lib/rdoc/generator/template/rails/_module_nav.rhtml b/lib/rdoc/generator/template/rails/_module_nav.rhtml index b9870238..cb6bf84f 100644 --- a/lib/rdoc/generator/template/rails/_module_nav.rhtml +++ b/lib/rdoc/generator/template/rails/_module_nav.rhtml @@ -1,6 +1,7 @@ <%= button_to_search @context, display_name: short_name(@context) %> <% if outline = outline(@context) %> + diff --git a/lib/rdoc/generator/template/rails/resources/css/main.css b/lib/rdoc/generator/template/rails/resources/css/main.css index 4a47dd18..2df32b19 100644 --- a/lib/rdoc/generator/template/rails/resources/css/main.css +++ b/lib/rdoc/generator/template/rails/resources/css/main.css @@ -410,10 +410,19 @@ html { } -* + .nav__outline { +.nav__heading { + font-size: 1.3em; +} + +* + .nav__heading { margin-top: var(--space-lg); } +.nav__heading + * { + margin-top: var(--space-sm); +} + + .nav__outline ul { margin-top: var(--space-sm); padding-left: 1em; @@ -432,16 +441,6 @@ html { } -.nav__heading { - margin-top: var(--space-lg); - font-size: 1.3em; -} - -.nav__heading + .nav__list { - margin-top: var(--space-sm); -} - - .nav__list { padding: 0; list-style: none; From a0d20c9dcef1a6463d135734cf49afbd87666d12 Mon Sep 17 00:00:00 2001 From: Jonathan Hefner Date: Tue, 10 Oct 2023 12:09:14 -0500 Subject: [PATCH 2/3] Add Namespace link in panel The `list.svg` file is from [Feather icons][feather] v4.29.0, and is [licensed under the MIT license][license]. [feather]: https://feathericons.com/ [license]: https://github.com/feathericons/feather/blob/v4.29.0/LICENSE --- .../generator/template/rails/_context.rhtml | 2 +- .../template/rails/_module_nav.rhtml | 3 ++ .../template/rails/resources/css/main.css | 29 ++++++++++++++----- .../template/rails/resources/i/list.svg | 1 + 4 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 lib/rdoc/generator/template/rails/resources/i/list.svg diff --git a/lib/rdoc/generator/template/rails/_context.rhtml b/lib/rdoc/generator/template/rails/_context.rhtml index dce4c3e8..2e8a0da4 100644 --- a/lib/rdoc/generator/template/rails/_context.rhtml +++ b/lib/rdoc/generator/template/rails/_context.rhtml @@ -156,7 +156,7 @@ <% unless @context.classes_and_modules.empty? %> -
Namespace
+
Namespace