Skip to content

Commit

Permalink
Use details tag for method toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Sep 8, 2024
1 parent 973c9d3 commit 2dcefd2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/rdoc/generator/template/darkfish/class.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@
gsub(/(.*)[-=]>/, '\1→') %>
</span>
<%- if i == 0 and method.token_stream then -%>
<span class="method-click-advice">Toggle source</span>
<details class="method-click-advice">
<summary>Source</summary>
</details>
<%- end -%>
</div>
<%- end -%>
Expand All @@ -122,7 +124,9 @@
<span class="method-name"><%= h method.name %></span><span
class="method-args"><%= h method.param_seq %></span>
<%- if method.token_stream then -%>
<span class="method-click-advice">Toggle source</span>
<details class="method-click-advice">
<summary>Source</summary>
</details>
<%- end -%>
</div>
<%- end -%>
Expand Down

0 comments on commit 2dcefd2

Please sign in to comment.