summaryrefslogtreecommitdiff
path: root/lib/rdoc/generator/template/darkfish
AgeCommit message (Collapse)Author
2025-01-15Migrate rdoc as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12577
2024-12-25[DOC] Fix duplicate entriesNobuyoshi Nakada
A tentative workaround for duplicate entries in "Class and Module Index". Notes: Merged: https://github.com/ruby/ruby/pull/12463
2024-12-19[ruby/rdoc] Auto-hide navigation on link clickJames Reid-Smith
(https://github.com/ruby/rdoc/pull/1238) Hide navigation sidebar when clicking anchor links on mobile devices. Previously, anchor links would change the page but the navigation sidebar would block the view. https://github.com/ruby/rdoc/commit/f12a96b7fa Notes: Merged: https://github.com/ruby/ruby/pull/12394
2024-12-15[ruby/rdoc] Hide hamburger on desktopJames Reid-Smith
(https://github.com/ruby/rdoc/pull/1237) * Clean up the duplicate definitions and unnecessary print styling * Hides the navigation toggle when there's enough room to always display the navigation * Update lib/rdoc/generator/template/darkfish/css/rdoc.css --------- https://github.com/ruby/rdoc/commit/c6193bf1e2 Co-authored-by: Stan Lo <[email protected]>
2024-12-15[ruby/rdoc] Fix iPad Pro navigation not shownJames Reid-Smith
(https://github.com/ruby/rdoc/pull/1236) Found this issue when I was debugging the navigation toggle. I noticed it first in the chrome dev tools, but it was also reproducible on an iPad Pro. Symptom: - On iPad Pro, the navigation section is hidden but there's enough space to show it. Making the user have to click the hamburger button to show it but it's not necessary to hide the navigation section. - On desktop, the navigation section is shown. - On mobile, the navigation section is hidden until the hamburger button is clicked. Fix: - The javascript code was matching 1024px instead of 1023px. The media sections of the css was altering the layout on 1024px. So ipad got the full desktop layout but the navigation section was hidden. https://github.com/ruby/rdoc/commit/1794e59755
2024-12-08[ruby/rdoc] Use distinct styles for note lists and label listsnicholas a. evans
(https://github.com/ruby/rdoc/pull/1209) * Use the original `label` description list style As a default for all description lists, the original "label" style is more readable. This is slightly different from the original `label` dl though: * slightly increased left margin for `dd` (to 1em) * removed right margin on `dd` * removed `dt` bottom margin and `dd` top margin, to reduce the gap between the term and its description (to only the standard line-height gap). * Add closing tags for description list terms Without the closing tags, the dt elements contain whitespace after the text. This normally isn't a big deal, but does mess some things up, e.g: using `::after` with `content: ", "` in stylesheets. * Restore float:left style for note lists Unlike the original note list styles, this version sets the line-height for all `dt` elements to be the same as the `p` elements contained inside the `dd`, so that the second line has the same indentation as all subsequent lines. * Add commas between note list terms https://github.com/ruby/rdoc/commit/9e69ea6d75
2024-11-13[ruby/rdoc] Split list of class and instance methods in twoAlexis Bernard
(https://github.com/ruby/rdoc/pull/1206) Looking for a method is easier because eyes don't have to skip dashes or double colon. https://github.com/ruby/rdoc/commit/6852567640
2024-11-04[ruby/rdoc] Display class ancestors in the sidebar #1183Alexis Bernard
https://github.com/ruby/rdoc/commit/50dda13426
2024-10-31[ruby/rdoc] Use thicker fonts with high contrast to improveStan Lo
readability (https://github.com/ruby/rdoc/pull/1197) https://github.com/ruby/rdoc/commit/7fb0e509ec
2024-10-25[ruby/rdoc] Remove details markers in HTML documentsNobuyoshi Nakada
`summary {list-style: none;}` still does not work in Safari 18. https://github.com/ruby/rdoc/commit/c6a0a6a0d5
2024-10-23[ruby/rdoc] Red-based darkfish color schemeStan Lo
(https://github.com/ruby/rdoc/pull/1191) * Cleanup rdoc.css * Use red as the highlight color * Use the same red as ruby-lang.org * Make main section links stand out more * Remove scrollbar styling https://github.com/ruby/rdoc/commit/f69dc470ac
2024-10-17[ruby/rdoc] feature: Render mixed-in methods and constants withMike Dalessio
`--embed-mixins` (https://github.com/ruby/rdoc/pull/842) * Embed mixed-in methods and constants with `--embed-mixins` When `--embed-mixins` option is set: - methods from an `extend`ed module are documented as singleton methods - attrs from an `extend`ed module are documented as class attributes - methods from an `include`ed module are documented as instance methods - attrs from an `include`ed module are documented as instance attributes - constants from an `include`ed module are documented Sections are created when needed, and Darkfish's template annotates each of these mixed-in CodeObjects. We also respect the mixin methods' visibility. This feature is inspired by Yard's option of the same name. * Add comment to document why we set object visibility Co-authored-by: Stan Lo <[email protected]> * Add the mixin_from attribute to CodeObject's initializer * Add test coverage for private mixed-in attributes. --------- https://github.com/ruby/rdoc/commit/481c2ce660 Co-authored-by: Stan Lo <[email protected]>
2024-10-17[ruby/rdoc] Use scroll-margin-top on anchor targetsStan Lo
(https://github.com/ruby/rdoc/pull/1190) This will make the anchor target easier to read. https://github.com/ruby/rdoc/commit/e2fe4882f4
2024-10-17[ruby/rdoc] Add scroll-margin-top on all :target elementsMads Ohm Larsen
(https://github.com/ruby/rdoc/pull/1174) https://github.com/ruby/rdoc/commit/7398e5b0ad Co-authored-by: Stan Lo <[email protected]>
2024-10-15[ruby/rdoc] Generate meta tags based on page's contentVinicius Stock
(https://github.com/ruby/rdoc/pull/1091) https://github.com/ruby/rdoc/commit/716bc16a7d
2024-10-10[ruby/rdoc] Make methods and attributes linkableStan Lo
(https://github.com/ruby/rdoc/pull/1189) * Use the same color for both class/module and method highlight * Make methods and attributes linkable https://github.com/ruby/rdoc/commit/7757fd9fe4
2024-10-10[ruby/rdoc] Improve method source togglingStan Lo
(https://github.com/ruby/rdoc/pull/1176) * Move method source block to the top Currently, if a method description is long (e.g. `Array.new`), users need to click the method toggle button next to the method title, and then scroll down to the source code expanded below the description. This commit changes the behavior so that the source code is expanded immediately below the method title. * Update method toggle's interface 1. Display the method toggle button by default instead of displaying on hover 2. Only toggle the source code when clicking the method toggle button, not when clicking the entire method title section. This will allow us to display an anchor link next to the method title 3. Simplify the toggle source button's appearance * Use details tag for method toggling * Rename method-click-advice to method-source-toggle * Improve method controls' display on mobile By moving the method controls out of the method header, we can display them to the right of the method name on desktop, and below the method name on mobile. * Add "Example" label to example code blocks The label should help users distinguish example code blocks from other code blocks, such as method source code. It's only applied to Ruby code examples. * Revert "Add "Example" label to example code blocks" This reverts commit https://github.com/ruby/rdoc/commit/69fc9ce6a379. * Give source code blocks a different background color * Change targeted method's highlighting color to work better with the new method source https://github.com/ruby/rdoc/commit/e608a84af3
2024-10-07[ruby/rdoc] Use normal `font-weight` for linksSam Bostock
(https://github.com/ruby/rdoc/pull/1188) https://github.com/ruby/rdoc/commit/b53f0cb2ed
2024-09-30[ruby/rdoc] Only let browser search through source code until it'sEarlopain
expanded (https://github.com/ruby/rdoc/pull/1181) Something that's been bothering me is that while the source code is not visible by default, the browser still jump to it when searching. Adding the `visible` property prevents this. Test it out yourself: * `bundle exec rdoc` * open `_site/index.html` * Search for `NameError` Before, you will get a match from `load_yaml` source code, after you only get the match when that methods source code is expanded. https://github.com/ruby/rdoc/commit/003126cc23
2024-09-08[ruby/rdoc] Use pointer cursor for navigation toggleMads Ohm Larsen
(https://github.com/ruby/rdoc/pull/1175) https://github.com/ruby/rdoc/commit/964a1982c8
2024-09-06[ruby/rdoc] Add more space after magnifying glassMads Ohm Larsen
(https://github.com/ruby/rdoc/pull/1173) https://github.com/ruby/rdoc/commit/6a9cad4c54
2024-08-26[ruby/rdoc] Make darkfish more responsive and readable on mobileStan Lo
devices (https://github.com/ruby/rdoc/pull/1162) - Make the sidebar toggle fixed on all devices - Prevent default zooming on mobile devices - Improve sidebar opening on mobile devices https://github.com/ruby/rdoc/commit/95b6cfb64f
2024-08-24[ruby/rdoc] Make the summary triangle appear in the correct placeUfuk Kayserilioglu
when the summary text overflows to next line. (https://github.com/ruby/rdoc/pull/1160) https://github.com/ruby/rdoc/commit/f2eb62f6f8
2024-08-24[ruby/rdoc] Modernize RDoc Darkfish template CSSStan Lo
(https://github.com/ruby/rdoc/pull/1157) - Update color scheme with muted green tones and improved contrast - Enhance readability by adjusting font sizes and weights - Improve code block styling with a light gray background - Refactor layout for better responsiveness and sidebar presentation - Standardize link styles across the document - Implement CSS variables for easier theme customization - Adjust heading styles for better visual hierarchy - Enhance table and list styling for improved readability - Optimize search field and navigation toggle appearance - Improve method detail and documentation section styling - Reorganize css and overhaul the sidebar design - Improve code block's syntax highlighting https://github.com/ruby/rdoc/commit/6cde9edadb
2024-08-15[ruby/rdoc] Fix sidebar scroll again and add missing footer backStan Lo
(https://github.com/ruby/rdoc/pull/1154) * Add missing footers In #1152 the footer partial was only added to the index.rhtml file. This commit adds the footer partial to the other template files. * Remove unnecessary middle divs in nav * Simplify sidebar's overflow settings Because sidebar needs to be scrollable, its overflow should default to auto. Currently it's set to hidden and force individual elements to set overflow auto, which overcomplicates things. https://github.com/ruby/rdoc/commit/b8c2bcd8db
2024-08-13Sync rdocStan Lo
2024-08-08Sync rdoc to fix master doc's display issue (#11345)Stan Lo
Sync rdoc This syncs changes made in https://github.com/ruby/rdoc/pull/1148, which will fix https://docs.ruby-lang.org/en/master/'s display on certain screens. Notes: Merged-By: k0kubun <[email protected]>
2024-08-08[ruby/rdoc] Use ascii chatacter in HTML filetompng
https://github.com/ruby/rdoc/commit/40a6690010
2024-08-05Sync rdocStan Lo
Notes: Merged: https://github.com/ruby/ruby/pull/11308
2023-11-27[ruby/rdoc] [DOC] Slightly decorate `em` and `strong`Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/2161157205
2023-09-05[ruby/rdoc] Omit descriptions and parameter lists for methods defined in C ↵Jeremy Evans
not mentioned in call-seq This allows RDoc to better generate documentation for methods following the Ruby core documentation guide (which omits aliases in call-seq in most cases). This makes documentation for methods defined in C more similar to methods defined in Ruby. For methods defined in Ruby, the method description of the aliased method is already not used (you have to explicitly document the alias to use it). Internally, this adds AnyMethod#has_call_seq? and #skip_description?, and updates Darkfish to: * only show the method name if there is a call-seq for the method, but the call-seq omits the method * to omit the method description if the method is an alias or has aliases and has a call-seq that does not include the method See discussion in https://github.com/ruby/ruby/pull/7316 for details. https://github.com/ruby/rdoc/commit/e3688de49b
2023-07-05[ruby/rdoc] [DOC] Improve CSS for "toggle source" hovering over one more ↵Masafumi Koba
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`: https://github.com/ruby/rdoc/blob/0e060c69f51ec4a877e5cde69b31d47eaeb2a2b9/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[ruby/rdoc] [DOC] Fix to use KeyboardEvent.key over keyCodegemmaro
https://github.com/ruby/rdoc/commit/663edc807c
2023-07-05[ruby/rdoc] Add keydown event listener to focus on search fieldgemmaro
https://github.com/ruby/rdoc/commit/db62e47df2
2023-06-14[ruby/rdoc] Use flat_map for better performancePetrik
https://github.com/ruby/rdoc/commit/76192a280d
2023-05-26[ruby/rdoc] Improve `<summary>` CSS on sidebarMasafumi Koba
- 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[ruby/rdoc] Improve layout CSSMasafumi Koba
- 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-02[ruby/rdoc] Section may not have `label`Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/945f0cb3e9
2023-05-02[ruby/rdoc] Fix references to nested label in table_of_contentsNobuyoshi Nakada
Fixes https://github.com/ruby/rdoc/pull/1000 https://github.com/ruby/rdoc/commit/291e2b7e8b
2022-11-27[ruby/rdoc] Darkfish: group method call-seq in div.method-headernick evans
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[ruby/rdoc] Darkfish: Nest sidebar ToC as a tree of headingsnick evans
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-10-07[ruby/rdoc] Escape search resultsNobuyoshi Nakada
https://hackerone.com/reports/1321358 https://github.com/ruby/rdoc/commit/2ebf8fd510
2022-10-07[ruby/rdoc] Escape file namesNobuyoshi Nakada
https://hackerone.com/reports/1321358 https://github.com/ruby/rdoc/commit/8c07cc4657
2022-10-07[ruby/rdoc] Escape main titleNobuyoshi Nakada
https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/5dedb5741d
2022-03-22[ruby/rdoc] Expand the enclosing tree of the current fileNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/f9f90ef2ff
2022-03-22[ruby/rdoc] Fold files in the page directoryNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/b7b4cdab6c
2022-03-20[ruby/rdoc] Allow method source code to scroll [ci skip]Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/1bb0496c53
2022-03-20[ruby/rdoc] Use the custom style `details summary` only in `nav-section`Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/7736d3a89c
2022-03-14[ruby/rdoc] Start with open when only one visible class/moduleNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/6bb93001db
2022-03-14[ruby/rdoc] Fold class and module indexNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/4c7c46fcc4