66 Commits

Author SHA1 Message Date
Masafumi Koba
62b4983416 [ruby/rdoc] [DOC] Improve CSS for "toggle source" hovering over one more method signatures
This commit improves the behavior of showing the "toggle source" element on mouseover.

For example, when a method has one more signatures by using `:call-seq:`,

```ruby
# :call-seq:
#   foo {|element| ... } -> self
#   foo -> new_enumeration
def foo
end
```

The current CSS doesn't show "toggle source" even when hovering the second signature `foo -> new_enumeration`.
But this change will show "toggle source" always when hovering over any signature.

For details about the `.method-header` element, see `lib/rdoc/generator/template/darkfish/class.rhtml`:
0e060c69f5/lib/rdoc/generator/template/darkfish/class.rhtml (L101-L124)

For example, see https://docs.ruby-lang.org/en/3.2/Array.html#method-i-delete
2023-07-05 04:09:08 +00:00
gemmaro
62754503d8 [ruby/rdoc] [DOC] Fix to use KeyboardEvent.key over keyCode
https://github.com/ruby/rdoc/commit/663edc807c
2023-07-05 03:39:18 +00:00
gemmaro
77fa4787bd [ruby/rdoc] Add keydown event listener to focus on search field
https://github.com/ruby/rdoc/commit/db62e47df2
2023-07-05 03:37:28 +00:00
Petrik
0c55ef1150 [ruby/rdoc] Use flat_map for better performance
https://github.com/ruby/rdoc/commit/76192a280d
2023-06-14 23:47:25 +00:00
Masafumi Koba
94e5ecbbdd [ruby/rdoc] Improve <summary> CSS on sidebar
- Use a smaller font size for the toggle symbol. (Currently, it seems a little too large)
- Use the child combinator (`>`) to unify selectors.
- Use `margin-left` instead of whitespace within the `content` property.
- Use `::` instead of outdated `:` for the pseudo-element symbol.
  (See https://developer.mozilla.org/en-US/docs/Web/CSS/::before)

https://github.com/ruby/rdoc/commit/61ce0a7d75
2023-05-26 16:26:46 +00:00
Masafumi Koba
54b7ce0bff [ruby/rdoc] Improve layout CSS
- Use the `grid` property for the page layout.
  - https://caniuse.com/css-grid
- Adjust the `<main>` margin.
- Make the sidebar responsive and resizable.
  - https://caniuse.com/css-math-functions
  - https://caniuse.com/css-resize

Note all modern browsers support the new CSS properties and functions used by this change.

https://github.com/ruby/rdoc/commit/2db5097c41
2023-05-26 16:24:57 +00:00
Nobuyoshi Nakada
e47aa27dc7 [ruby/rdoc] Section may not have label
https://github.com/ruby/rdoc/commit/945f0cb3e9
2023-05-02 05:42:37 +00:00
Nobuyoshi Nakada
3833d0fee6 [ruby/rdoc] Fix references to nested label in table_of_contents
Fixes https://github.com/ruby/rdoc/pull/1000

https://github.com/ruby/rdoc/commit/291e2b7e8b
2023-05-02 04:19:46 +00:00
nick evans
29862ce273 [ruby/rdoc] Darkfish: group method call-seq in div.method-header
This way, custom CSS styles can be easily applied to the entire method
header at once.  Otherwise, it can be tricky to make a border that goes
around the entire set of method call-seq, but not the method
description.

https://github.com/ruby/rdoc/commit/5db4bce01e
2022-11-27 17:24:17 +00:00
nick evans
ae3817bc61 [ruby/rdoc] Darkfish: Nest sidebar ToC as a tree of headings
This uses `<details><summary>heading</summary><ul>nested</ul></detail>`,
similar to how the classes and pages lists are now nested.

https://github.com/ruby/rdoc/commit/e57beff287
2022-11-27 17:18:16 +00:00
Nobuyoshi Nakada
39909d8c18 [ruby/rdoc] Escape search results
https://hackerone.com/reports/1321358

https://github.com/ruby/rdoc/commit/2ebf8fd510
2022-10-07 12:12:09 +09:00
Nobuyoshi Nakada
a3cb09c7d1 [ruby/rdoc] Escape file names
https://hackerone.com/reports/1321358

https://github.com/ruby/rdoc/commit/8c07cc4657
2022-10-07 12:12:08 +09:00
Nobuyoshi Nakada
8d0b2162a0 [ruby/rdoc] Escape main title
https://hackerone.com/reports/1187156

https://github.com/ruby/rdoc/commit/5dedb5741d
2022-10-07 12:09:23 +09:00
Nobuyoshi Nakada
92ef73a918 [ruby/rdoc] Expand the enclosing tree of the current file
https://github.com/ruby/rdoc/commit/f9f90ef2ff
2022-03-22 01:32:13 +09:00
Nobuyoshi Nakada
dafe5c1323 [ruby/rdoc] Fold files in the page directory
https://github.com/ruby/rdoc/commit/b7b4cdab6c
2022-03-22 01:32:12 +09:00
Nobuyoshi Nakada
73541cdc2f
[ruby/rdoc] Allow method source code to scroll [ci skip]
https://github.com/ruby/rdoc/commit/1bb0496c53
2022-03-20 15:42:56 +09:00
Nobuyoshi Nakada
20ad09e560 [ruby/rdoc] Use the custom style details summary only in nav-section
https://github.com/ruby/rdoc/commit/7736d3a89c
2022-03-20 15:38:28 +09:00
Nobuyoshi Nakada
0bf194fb33 [ruby/rdoc] Start with open when only one visible class/module
https://github.com/ruby/rdoc/commit/6bb93001db
2022-03-14 14:48:13 +09:00
Nobuyoshi Nakada
976431d9ed [ruby/rdoc] Fold class and module index
https://github.com/ruby/rdoc/commit/4c7c46fcc4
2022-03-14 14:48:12 +09:00
Masafumi Koba
2e4516be26 [ruby/rdoc] Scrollable sidebar
This change makes the sidebar scrollable via `position: sticky` and `overflow: auto`;
See also <https://caniuse.com/?search=sticky>

https://github.com/ruby/rdoc/commit/4d52e24840
2022-03-11 17:38:13 +09:00
aycabta
4b024234b2 [ruby/rdoc] Update SourceCodePro font files
https://github.com/ruby/rdoc/commit/d3201d0d47
2021-10-11 21:15:07 +09:00
Nobuyoshi Nakada
76c7388c1f [ruby/rdoc] Add tests for --template-stylesheets option
Also flattens `@options.template_stylesheets` when parsing the
command lines.

Fixes #205
Fixes #828 too

https://github.com/ruby/rdoc/commit/857002a763
2021-09-03 19:13:15 +09:00
Nobuyoshi Nakada
10b082064e [ruby/rdoc] Add table style
https://github.com/ruby/rdoc/commit/2219c5ae80
2021-03-16 15:47:27 +09:00
Pankaj Doharey
05898c5b90 [ruby/rdoc] Update Rdoc.css sidebar panel.
Updates css so the sidebar look like a panel instead of looking like chopped edges.

https://github.com/ruby/rdoc/commit/b0098c6d72
2021-03-16 15:47:27 +09:00
Benoit Tigeot
7693aa7056 [ruby/rdoc] Remove empty lines from html file by using ERB trim_mode flag
https://github.com/ruby/rdoc/commit/9e27299a46
2020-07-22 02:34:58 +09:00
Nobuyoshi Nakada
e6d1363ae6 [ruby/rdoc] Fixed inverted CSS for note-list and label-list
https://github.com/ruby/rdoc/commit/a13d6439da
2020-05-24 23:47:24 +09:00
Jeremy Evans
7e7981c84f [ruby/rdoc] Treat multiple Ruby methods calling the same C method as aliases
Previously, only calls to rb_define_alias were treated as aliases.
This treats calls to rb_define_method with the same C function as
aliases, with the first function defined being the primary method.

This move the dedup code from the C parser to AnyMethod, and has
AnyMethod look in its aliases to find the call_seq.

Switch the deduplication code to remove lines matching one of the
other aliases, instead of only keeping lines matching the current
alias.  The previous approach could eliminate all call_seq lines
in cases where no line matched.  This was necessary to pass
tests when call_seq does deduplication by default.

The only change to the darkfish template is to not perform
unnecessary work by deduplicating twice.

https://github.com/ruby/rdoc/commit/0ead78616b
2020-05-24 23:47:24 +09:00
Kazuhiro NISHIYAMA
989e8ad322
Remove debug print [ci skip] 2019-08-28 10:34:56 +09:00
aycabta
f308ab2131 Remove jquery.js 2019-08-28 01:12:14 +09:00
aycabta
39810b4035 Good bye jQuery 2019-08-28 00:48:12 +09:00
Maxime Lapointe
21ce8b3298 [ruby/rdoc] Fix image links in rdoc.css
Every image in the rdoc.css that use url has the wrong one. They end up pointing to `css/images/zoom.png` instead of `images/zoom.png`.

Just open this page https://ruby.github.io/rdoc/RDoc/CodeObject.html on chrome and you can see in the console the spam of the failed GET queries.

This fixes it.
https://github.com/ruby/rdoc/commit/daf36f9894
2019-07-26 17:32:46 +08:00
aycabta
8bb4892376
[ruby/rdoc] Update jQuery to 3.3.1
https://github.com/ruby/rdoc/commit/17df871ee
2019-07-26 17:32:19 +08:00
nobu
19e672cce9 rdoc: Colorize background of code/pre [ci skip]
Borrowed the style of code/pre from bugs.ruby-lang.org.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-30 12:39:35 +00:00
nobu
33d026034e rdoc.css: make label-list compact
"Labeled Lists" section in lib/rdoc/markup.rb states labeled-list
will be formatted in same lines.

```
Notice that blank lines right after the label are ignored in labeled lists:

  [one]

      definition 1

  [two]

      definition 2

produces the same output as

  [one]  definition 1
  [two]  definition 2
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-02 06:54:55 +00:00
hsbt
95e213d354 Merge rdoc-6.1.0.beta1.
* https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 01:30:18 +00:00
hsbt
db6c51ec4f Merge rdoc-6.0.0.beta3.
* It version introduced did you mean? feature for ri command:
    https://github.com/ruby/rdoc/pull/533
  * Removed obbsoleted ruby_token.rbb.
    [Bug #13990][ruby-core:83180]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-10 02:01:00 +00:00
hsbt
4790c08906 Merge rdoc-6.0.0.beta1.
This version fixed strange behavior of ruby code parser.
  We will list all of impromovement to Changelog when 6.0.0 releasing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-29 11:52:50 +00:00
hsbt
cdc527db34 * lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0
Release note: b825775647/History.rdoc (500--2016-11-05)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 09:18:10 +00:00
hsbt
23863ff75d * lib/rdoc/*, test/rdoc/*: Update rdoc/rdoc master(f191513)
https://github.com/rdoc/rdoc/blob/master/History.rdoc#423--2016--
  https://github.com/rdoc/rdoc/blob/master/History.rdoc#422--2016-02-09

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-05 10:35:30 +00:00
hsbt
94c5f5a77c * lib/rdoc/*: Update rdoc master(cfffed5)
https://github.com/rdoc/rdoc/pull/337
  https://github.com/rdoc/rdoc/pull/367

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-28 07:05:17 +00:00
drbrain
4260aa1dc3 * lib/rdoc: Update to RDoc 4.2.0.
* test/rdoc:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-07 01:22:37 +00:00
hsbt
8cba9dccf6 * lib/rdoc/*.rb: Update to RDoc 4.2.0.alpha(579a11c)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 05:59:34 +00:00
zzak
f0ee1e67d3 * lib/rdoc/generator/template/darkfish/js/jquery.js: Backport
rdoc/rdoc@74f60fcb04


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 23:46:11 +00:00
hsbt
d42d6e690e * lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(313287)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 01:41:25 +00:00
drbrain
23201ab1c4 * lib/rdoc: Update to RDoc master 263a9e5. This improves the
accessibility of the search box.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 22:09:35 +00:00
drbrain
cc46b530b0 * lib/rdoc: Update to RDoc master a1195ce. Changes include:
Improved accessibility of the main sidebar navigation.

  Fixed handling of regexp options in HTML source highlighting.

* test/rdoc:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-19 00:47:33 +00:00
nobu
55e73bdf3a revert font files
* lib/rdoc/generator/template/darkfish/fonts/*.ttf: revert font files
  to r42971.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-19 07:33:09 +00:00
nobu
3145683203 * remove trailing spaces, append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-19 07:22:13 +00:00
drbrain
df7dac9174 * lib/rdoc: Update to RDoc 4.1.0.preview.1
RDoc 4.1.0 contains a number of enhancements including a new default
  style and accessibility support.  You can see the changelog here:

  https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc

* test/rdoc:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-18 23:33:36 +00:00
drbrain
6d0647c350 * lib/rdoc: Import RDoc 4.0.0.rc.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 08:05:44 +00:00