rdoc 6.16.1 → 7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +196 -0
  3. data/LEGAL.rdoc +6 -0
  4. data/README.md +20 -3
  5. data/lib/rdoc/code_object/any_method.rb +15 -7
  6. data/lib/rdoc/code_object/class_module.rb +38 -8
  7. data/lib/rdoc/code_object/constant.rb +9 -0
  8. data/lib/rdoc/code_object/method_attr.rb +13 -1
  9. data/lib/rdoc/code_object/top_level.rb +13 -1
  10. data/lib/rdoc/generator/aliki.rb +141 -0
  11. data/lib/rdoc/generator/darkfish.rb +8 -2
  12. data/lib/rdoc/generator/template/aliki/_footer.rhtml +1 -1
  13. data/lib/rdoc/generator/template/aliki/_head.rhtml +4 -4
  14. data/lib/rdoc/generator/template/aliki/_header.rhtml +4 -4
  15. data/lib/rdoc/generator/template/aliki/_icons.rhtml +208 -0
  16. data/lib/rdoc/generator/template/aliki/_sidebar_ancestors.rhtml +12 -2
  17. data/lib/rdoc/generator/template/aliki/_sidebar_classes.rhtml +12 -2
  18. data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +20 -10
  19. data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +20 -10
  20. data/lib/rdoc/generator/template/aliki/_sidebar_methods.rhtml +32 -12
  21. data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +58 -28
  22. data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +3 -3
  23. data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +16 -6
  24. data/lib/rdoc/generator/template/aliki/class.rhtml +11 -12
  25. data/lib/rdoc/generator/template/aliki/css/rdoc.css +381 -50
  26. data/lib/rdoc/generator/template/aliki/index.rhtml +2 -1
  27. data/lib/rdoc/generator/template/aliki/js/aliki.js +43 -21
  28. data/lib/rdoc/generator/template/aliki/js/{search.js → search_controller.js} +15 -6
  29. data/lib/rdoc/generator/template/aliki/js/search_navigation.js +105 -0
  30. data/lib/rdoc/generator/template/aliki/js/search_ranker.js +239 -0
  31. data/lib/rdoc/generator/template/aliki/page.rhtml +2 -1
  32. data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +1 -1
  33. data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +1 -1
  34. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +1 -1
  35. data/lib/rdoc/generator/template/darkfish/class.rhtml +9 -11
  36. data/lib/rdoc/markup/blank_line.rb +25 -23
  37. data/lib/rdoc/markup/element.rb +21 -0
  38. data/lib/rdoc/markup/hard_break.rb +30 -27
  39. data/lib/rdoc/markup/heading.rb +96 -79
  40. data/lib/rdoc/markup/raw.rb +52 -55
  41. data/lib/rdoc/markup/table.rb +48 -40
  42. data/lib/rdoc/markup/to_ansi.rb +4 -0
  43. data/lib/rdoc/markup/to_bs.rb +4 -0
  44. data/lib/rdoc/markup/to_rdoc.rb +11 -3
  45. data/lib/rdoc/markup.rb +1 -0
  46. data/lib/rdoc/options.rb +1 -1
  47. data/lib/rdoc/rubygems_hook.rb +3 -3
  48. data/lib/rdoc/version.rb +1 -1
  49. data/rdoc.gemspec +1 -1
  50. metadata +10 -6
  51. data/CONTRIBUTING.rdoc +0 -219
@@ -116,22 +116,22 @@
116
116
  ></script>
117
117
 
118
118
  <script
119
- src="<%= h asset_rel_prefix %>/js/navigation.js?v=<%= h RDoc::VERSION %>"
119
+ src="<%= h asset_rel_prefix %>/js/search_navigation.js?v=<%= h RDoc::VERSION %>"
120
120
  defer
121
121
  ></script>
122
122
 
123
123
  <script
124
- src="<%= h asset_rel_prefix %>/js/search.js?v=<%= h RDoc::VERSION %>"
124
+ src="<%= h asset_rel_prefix %>/js/search_data.js?v=<%= h RDoc::VERSION %>"
125
125
  defer
126
126
  ></script>
127
127
 
128
128
  <script
129
- src="<%= h asset_rel_prefix %>/js/search_index.js?v=<%= h RDoc::VERSION %>"
129
+ src="<%= h asset_rel_prefix %>/js/search_ranker.js?v=<%= h RDoc::VERSION %>"
130
130
  defer
131
131
  ></script>
132
132
 
133
133
  <script
134
- src="<%= h asset_rel_prefix %>/js/searcher.js?v=<%= h RDoc::VERSION %>"
134
+ src="<%= h asset_rel_prefix %>/js/search_controller.js?v=<%= h RDoc::VERSION %>"
135
135
  defer
136
136
  ></script>
137
137
 
@@ -7,13 +7,13 @@
7
7
  <div class="navbar-search navbar-search-desktop" role="search">
8
8
  <form action="#" method="get" accept-charset="utf-8">
9
9
  <input id="search-field" role="combobox" aria-label="Search"
10
- aria-autocomplete="list" aria-controls="search-results"
10
+ aria-autocomplete="list" aria-controls="search-results-desktop"
11
11
  type="text" name="search" placeholder="Search (/) for a class, method..."
12
12
  spellcheck="false" autocomplete="off"
13
13
  title="Type to search, Up and Down to navigate, Enter to load">
14
- <ul id="search-results" aria-label="Search Results"
14
+ <ul id="search-results-desktop" aria-label="Search Results"
15
15
  aria-busy="false" aria-expanded="false"
16
- aria-atomic="false" class="initially-hidden"></ul>
16
+ aria-atomic="false" class="initially-hidden search-results"></ul>
17
17
  </form>
18
18
  </div>
19
19
 
@@ -47,7 +47,7 @@
47
47
  <div class="search-modal-body">
48
48
  <ul id="search-results-mobile" aria-label="Search Results"
49
49
  aria-busy="false" aria-expanded="false"
50
- aria-atomic="false" class="search-modal-results initially-hidden"></ul>
50
+ aria-atomic="false" class="search-results search-modal-results initially-hidden"></ul>
51
51
  <div class="search-modal-empty">
52
52
  <p>No recent searches</p>
53
53
  </div>
@@ -0,0 +1,208 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
2
+ <!-- Chevron (right arrow) - used for expand/collapse -->
3
+ <symbol
4
+ id="icon-chevron"
5
+ viewBox="0 0 24 24"
6
+ fill="none"
7
+ stroke="currentColor"
8
+ stroke-width="2"
9
+ stroke-linecap="round"
10
+ stroke-linejoin="round"
11
+ >
12
+ <polyline points="9 18 15 12 9 6"></polyline>
13
+ </symbol>
14
+
15
+ <!-- File/Document - Pages section -->
16
+ <symbol
17
+ id="icon-file"
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ stroke="currentColor"
21
+ stroke-width="2"
22
+ stroke-linecap="round"
23
+ stroke-linejoin="round"
24
+ >
25
+ <path
26
+ d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"
27
+ ></path>
28
+
29
+ <polyline points="14 2 14 8 20 8"></polyline>
30
+ </symbol>
31
+
32
+ <!-- Layers/Stack - Classes and Modules section -->
33
+ <symbol
34
+ id="icon-layers"
35
+ viewBox="0 0 24 24"
36
+ fill="none"
37
+ stroke="currentColor"
38
+ stroke-width="2"
39
+ stroke-linecap="round"
40
+ stroke-linejoin="round"
41
+ >
42
+ <polygon points="12 2 2 7 12 12 22 7 12 2"></polygon>
43
+ <polyline points="2 17 12 22 22 17"></polyline>
44
+ <polyline points="2 12 12 17 22 12"></polyline>
45
+ </symbol>
46
+
47
+ <!-- Curly braces with C - Class Methods section -->
48
+ <symbol
49
+ id="icon-class-methods"
50
+ viewBox="0 0 24 24"
51
+ fill="none"
52
+ stroke="currentColor"
53
+ stroke-width="2"
54
+ stroke-linecap="round"
55
+ stroke-linejoin="round"
56
+ >
57
+ <path d="M6 3C3.5 3 2 4.5 2 7v3c0 1.5-1 2-1 2s1 .5 1 2v5c0 2.5 1.5 4 4 4"></path>
58
+ <path d="M18 3c2.5 0 4 1.5 4 4v3c0 1.5 1 2 1 2s-1 .5-1 2v5c0 2.5-1.5 4-4 4"></path>
59
+
60
+ <text
61
+ x="12"
62
+ y="17"
63
+ text-anchor="middle"
64
+ font-size="13"
65
+ font-weight="bold"
66
+ fill="currentColor"
67
+ stroke="none"
68
+ >
69
+ C
70
+ </text>
71
+ </symbol>
72
+
73
+ <!-- Curly braces with I - Instance Methods section -->
74
+ <symbol
75
+ id="icon-instance-methods"
76
+ viewBox="0 0 24 24"
77
+ fill="none"
78
+ stroke="currentColor"
79
+ stroke-width="2"
80
+ stroke-linecap="round"
81
+ stroke-linejoin="round"
82
+ >
83
+ <path d="M6 3C3.5 3 2 4.5 2 7v3c0 1.5-1 2-1 2s1 .5 1 2v5c0 2.5 1.5 4 4 4"></path>
84
+ <path d="M18 3c2.5 0 4 1.5 4 4v3c0 1.5 1 2 1 2s-1 .5-1 2v5c0 2.5-1.5 4-4 4"></path>
85
+
86
+ <text
87
+ x="12"
88
+ y="17"
89
+ text-anchor="middle"
90
+ font-size="13"
91
+ font-weight="bold"
92
+ fill="currentColor"
93
+ stroke="none"
94
+ >
95
+ I
96
+ </text>
97
+ </symbol>
98
+
99
+ <!-- Double chevrons up - Ancestors section -->
100
+ <symbol
101
+ id="icon-ancestors"
102
+ viewBox="0 0 24 24"
103
+ fill="none"
104
+ stroke="currentColor"
105
+ stroke-width="2"
106
+ stroke-linecap="round"
107
+ stroke-linejoin="round"
108
+ >
109
+ <polyline points="17 11 12 6 7 11"></polyline>
110
+ <polyline points="17 18 12 13 7 18"></polyline>
111
+ </symbol>
112
+
113
+ <!-- User with plus - Included Modules section -->
114
+ <symbol
115
+ id="icon-includes"
116
+ viewBox="0 0 24 24"
117
+ fill="none"
118
+ stroke="currentColor"
119
+ stroke-width="2"
120
+ stroke-linecap="round"
121
+ stroke-linejoin="round"
122
+ >
123
+ <path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
124
+ <circle cx="8.5" cy="7" r="4"></circle>
125
+
126
+ <line
127
+ x1="20"
128
+ y1="8"
129
+ x2="20"
130
+ y2="14"
131
+ ></line>
132
+
133
+ <line
134
+ x1="23"
135
+ y1="11"
136
+ x2="17"
137
+ y2="11"
138
+ ></line>
139
+ </symbol>
140
+
141
+ <!-- User with check - Extended Modules section -->
142
+ <symbol
143
+ id="icon-extends"
144
+ viewBox="0 0 24 24"
145
+ fill="none"
146
+ stroke="currentColor"
147
+ stroke-width="2"
148
+ stroke-linecap="round"
149
+ stroke-linejoin="round"
150
+ >
151
+ <path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
152
+ <circle cx="8.5" cy="7" r="4"></circle>
153
+ <polyline points="17 11 19 13 23 9"></polyline>
154
+ </symbol>
155
+
156
+ <!-- List - Sections section -->
157
+ <symbol
158
+ id="icon-list"
159
+ viewBox="0 0 24 24"
160
+ fill="none"
161
+ stroke="currentColor"
162
+ stroke-width="2"
163
+ stroke-linecap="round"
164
+ stroke-linejoin="round"
165
+ >
166
+ <line
167
+ x1="8"
168
+ y1="6"
169
+ x2="21"
170
+ y2="6"
171
+ ></line>
172
+
173
+ <line
174
+ x1="8"
175
+ y1="12"
176
+ x2="21"
177
+ y2="12"
178
+ ></line>
179
+
180
+ <line
181
+ x1="8"
182
+ y1="18"
183
+ x2="21"
184
+ y2="18"
185
+ ></line>
186
+
187
+ <line
188
+ x1="3"
189
+ y1="6"
190
+ x2="3.01"
191
+ y2="6"
192
+ ></line>
193
+
194
+ <line
195
+ x1="3"
196
+ y1="12"
197
+ x2="3.01"
198
+ y2="12"
199
+ ></line>
200
+
201
+ <line
202
+ x1="3"
203
+ y1="18"
204
+ x2="3.01"
205
+ y2="18"
206
+ ></line>
207
+ </symbol>
208
+ </svg>
@@ -1,6 +1,16 @@
1
1
  <%- if klass.type == 'class' && (ancestors = klass.super_classes).any? %>
2
2
  <div id="parent-class-section" class="nav-section">
3
- <h3>Ancestors</h3>
4
- <%= generate_ancestor_list(ancestors, klass) %>
3
+ <details class="nav-section-collapsible" open>
4
+ <summary class="nav-section-header">
5
+ <span class="nav-section-icon">
6
+ <svg><use href="#icon-ancestors"></use></svg>
7
+ </span>
8
+ <span class="nav-section-title">Ancestors</span>
9
+ <span class="nav-section-chevron">
10
+ <svg><use href="#icon-chevron"></use></svg>
11
+ </span>
12
+ </summary>
13
+ <%= generate_ancestor_list(ancestors, klass) %>
14
+ </details>
5
15
  </div>
6
16
  <%- end %>
@@ -1,5 +1,15 @@
1
1
  <div id="classindex-section" class="nav-section">
2
- <h3>Class and Module Index</h3>
2
+ <details class="nav-section-collapsible" open>
3
+ <summary class="nav-section-header">
4
+ <span class="nav-section-icon">
5
+ <svg><use href="#icon-layers"></use></svg>
6
+ </span>
7
+ <span class="nav-section-title">Classes and Modules</span>
8
+ <span class="nav-section-chevron">
9
+ <svg><use href="#icon-chevron"></use></svg>
10
+ </span>
11
+ </summary>
3
12
 
4
- <%= generate_class_index_content(@classes, rel_prefix) %>
13
+ <%= generate_class_index_content(@classes, rel_prefix) %>
14
+ </details>
5
15
  </div>
@@ -1,15 +1,25 @@
1
1
  <%- unless klass.extends.empty? then %>
2
2
  <div id="extends-section" class="nav-section">
3
- <h3>Extended With Modules</h3>
3
+ <details class="nav-section-collapsible" open>
4
+ <summary class="nav-section-header">
5
+ <span class="nav-section-icon">
6
+ <svg><use href="#icon-extends"></use></svg>
7
+ </span>
8
+ <span class="nav-section-title">Extended With Modules</span>
9
+ <span class="nav-section-chevron">
10
+ <svg><use href="#icon-chevron"></use></svg>
11
+ </span>
12
+ </summary>
4
13
 
5
- <ul class="link-list">
6
- <%- klass.extends.each do |ext| %>
7
- <%- unless String === ext.module then %>
8
- <li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a></li>
9
- <%- else %>
10
- <li><span class="extend"><%= ext.name %></span></li>
11
- <%- end %>
12
- <%- end %>
13
- </ul>
14
+ <ul class="nav-list">
15
+ <%- klass.extends.each do |ext| %>
16
+ <%- unless String === ext.module then %>
17
+ <li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a></li>
18
+ <%- else %>
19
+ <li><span class="extend"><%= ext.name %></span></li>
20
+ <%- end %>
21
+ <%- end %>
22
+ </ul>
23
+ </details>
14
24
  </div>
15
25
  <%- end %>
@@ -1,15 +1,25 @@
1
1
  <%- unless klass.includes.empty? then %>
2
2
  <div id="includes-section" class="nav-section">
3
- <h3>Included Modules</h3>
3
+ <details class="nav-section-collapsible" open>
4
+ <summary class="nav-section-header">
5
+ <span class="nav-section-icon">
6
+ <svg><use href="#icon-includes"></use></svg>
7
+ </span>
8
+ <span class="nav-section-title">Included Modules</span>
9
+ <span class="nav-section-chevron">
10
+ <svg><use href="#icon-chevron"></use></svg>
11
+ </span>
12
+ </summary>
4
13
 
5
- <ul class="link-list">
6
- <%- klass.includes.each do |inc| %>
7
- <%- unless String === inc.module then %>
8
- <li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a></li>
9
- <%- else %>
10
- <li><span class="include"><%= inc.name %></span></li>
11
- <%- end %>
12
- <%- end %>
13
- </ul>
14
+ <ul class="nav-list">
15
+ <%- klass.includes.each do |inc| %>
16
+ <%- unless String === inc.module then %>
17
+ <li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a></li>
18
+ <%- else %>
19
+ <li><span class="include"><%= inc.name %></span></li>
20
+ <%- end %>
21
+ <%- end %>
22
+ </ul>
23
+ </details>
14
24
  </div>
15
25
  <%- end %>
@@ -1,21 +1,41 @@
1
1
  <% if (class_methods = klass.class_method_list.sort).any? %>
2
2
  <div class="nav-section">
3
- <h3>Class Methods</h3>
4
- <ul class="link-list" role="directory">
5
- <%- class_methods.each do |meth| %>
6
- <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li>
7
- <%- end %>
8
- </ul>
3
+ <details class="nav-section-collapsible" open>
4
+ <summary class="nav-section-header">
5
+ <span class="nav-section-icon">
6
+ <svg><use href="#icon-class-methods"></use></svg>
7
+ </span>
8
+ <span class="nav-section-title">Class Methods</span>
9
+ <span class="nav-section-chevron">
10
+ <svg><use href="#icon-chevron"></use></svg>
11
+ </span>
12
+ </summary>
13
+ <ul class="nav-list" role="directory">
14
+ <%- class_methods.each do |meth| %>
15
+ <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li>
16
+ <%- end %>
17
+ </ul>
18
+ </details>
9
19
  </div>
10
20
  <% end %>
11
21
 
12
22
  <% if (instance_methods = klass.instance_methods.sort).any? %>
13
23
  <div class="nav-section">
14
- <h3>Instance Methods</h3>
15
- <ul class="link-list" role="directory">
16
- <%- instance_methods.each do |meth| %>
17
- <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li>
18
- <%- end %>
19
- </ul>
24
+ <details class="nav-section-collapsible" open>
25
+ <summary class="nav-section-header">
26
+ <span class="nav-section-icon">
27
+ <svg><use href="#icon-instance-methods"></use></svg>
28
+ </span>
29
+ <span class="nav-section-title">Instance Methods</span>
30
+ <span class="nav-section-chevron">
31
+ <svg><use href="#icon-chevron"></use></svg>
32
+ </span>
33
+ </summary>
34
+ <ul class="nav-list" role="directory">
35
+ <%- instance_methods.each do |meth| %>
36
+ <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li>
37
+ <%- end %>
38
+ </ul>
39
+ </details>
20
40
  </div>
21
41
  <% end %>
@@ -1,37 +1,67 @@
1
1
  <%- simple_files = @files.select { |f| f.text? } %>
2
+
2
3
  <%- if defined?(current) && current.respond_to?(:page_name) %>
3
4
  <%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name %>
4
5
  <%- end %>
6
+
5
7
  <%- unless simple_files.empty? then %>
6
8
  <div id="fileindex-section" class="nav-section">
7
- <h3>Pages</h3>
8
-
9
- <ul class="link-list">
10
- <%- grouped_files = simple_files.group_by { |f| f.full_name[%r{\A[^/]+(?=/)}] || f.page_name } %>
11
- <%- grouped_files.each do |n, files| %>
12
- <%- f = files.shift %>
13
- <%- if files.empty? %>
14
- <li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a></li>
15
- <%- next %>
16
- <%- end %>
17
- <li>
18
- <details <%= dir == n ? ' open' : '' %>>
19
- <summary>
20
- <% if n == f.page_name %>
21
- <a href="<%= rel_prefix %>/<%= h f.path %>"><%= h n %></a>
22
- <% else %>
23
- <%= h n %>
24
- <% files.unshift(f) %>
25
- <% end %>
26
- </summary>
27
- <ul class="link-list">
28
- <%- files.each do |f| %>
29
- <li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a></li>
9
+ <details class="nav-section-collapsible" <%= 'open' unless @inside_class_file %>>
10
+ <summary class="nav-section-header">
11
+ <span class="nav-section-icon">
12
+ <svg>
13
+ <use href="#icon-file"></use>
14
+ </svg>
15
+ </span>
16
+
17
+ <span class="nav-section-title">Pages</span>
18
+
19
+ <span class="nav-section-chevron">
20
+ <svg>
21
+ <use href="#icon-chevron"></use>
22
+ </svg>
23
+ </span>
24
+ </summary>
25
+
26
+ <ul class="nav-list">
27
+ <%- grouped_files = simple_files.group_by { |f| f.full_name[%r{\A[^/]+(?=/)}] || f.page_name } %>
28
+
29
+ <%- grouped_files.each do |n, files| %>
30
+ <%- f = files.shift %>
31
+
32
+ <%- if files.empty? %>
33
+ <li>
34
+ <a href="<%= rel_prefix %>/<%= h f.path %>">
35
+ <%= h f.page_name %>
36
+ </a>
37
+ </li>
38
+ <%- next -%>
30
39
  <%- end %>
31
- </ul>
32
- </details>
33
- </li>
34
- <%- end %>
35
- </ul>
40
+
41
+ <li>
42
+ <details <%= dir == n ? ' open' : '' %>>
43
+ <summary>
44
+ <% if n == f.page_name %>
45
+ <a href="<%= rel_prefix %>/<%= h f.path %>"><%= h n %></a>
46
+ <% else %>
47
+ <%= h n %>
48
+ <% files.unshift(f) %>
49
+ <% end %>
50
+ </summary>
51
+
52
+ <ul class="link-list">
53
+ <%- files.each do |f| %>
54
+ <li>
55
+ <a href="<%= rel_prefix %>/<%= h f.path %>">
56
+ <%= h f.page_name %>
57
+ </a>
58
+ </li>
59
+ <%- end %>
60
+ </ul>
61
+ </details>
62
+ </li>
63
+ <%- end %>
64
+ </ul>
65
+ </details>
36
66
  </div>
37
67
  <%- end %>
@@ -2,14 +2,14 @@
2
2
  <form action="#" method="get" accept-charset="utf-8">
3
3
  <div id="search-field-wrapper">
4
4
  <input id="search-field" role="combobox" aria-label="Search"
5
- aria-autocomplete="list" aria-controls="search-results"
5
+ aria-autocomplete="list" aria-controls="search-results-desktop"
6
6
  type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
7
7
  autocomplete="off"
8
8
  title="Type to search, Up and Down to navigate, Enter to load">
9
9
  </div>
10
10
 
11
- <ul id="search-results" aria-label="Search Results"
11
+ <ul id="search-results-desktop" aria-label="Search Results"
12
12
  aria-busy="false" aria-expanded="false"
13
- aria-atomic="false" class="initially-hidden"></ul>
13
+ aria-atomic="false" class="initially-hidden search-results"></ul>
14
14
  </form>
15
15
  </div>
@@ -1,11 +1,21 @@
1
1
  <%- unless klass.sections.length == 1 then %>
2
2
  <div id="sections-section" class="nav-section">
3
- <h3>Sections</h3>
3
+ <details class="nav-section-collapsible" open>
4
+ <summary class="nav-section-header">
5
+ <span class="nav-section-icon">
6
+ <svg><use href="#icon-list"></use></svg>
7
+ </span>
8
+ <span class="nav-section-title">Sections</span>
9
+ <span class="nav-section-chevron">
10
+ <svg><use href="#icon-chevron"></use></svg>
11
+ </span>
12
+ </summary>
4
13
 
5
- <ul class="link-list" role="directory">
6
- <%- klass.sort_sections.each do |section| %>
7
- <li><a href="#<%= section.aref %>"><%= h section.title %></a></li>
8
- <%- end %>
9
- </ul>
14
+ <ul class="nav-list" role="directory">
15
+ <%- klass.sort_sections.each do |section| %>
16
+ <li><a href="#<%= section.aref %>"><%= h section.title %></a></li>
17
+ <%- end %>
18
+ </ul>
19
+ </details>
10
20
  </div>
11
21
  <%- end %>
@@ -1,8 +1,9 @@
1
1
  <body role="document" class="<%= klass.type %> has-toc">
2
+ <%= render '_icons.rhtml' %>
2
3
  <%= render '_header.rhtml' %>
3
4
  <%= render '_sidebar_toggle.rhtml' %>
4
5
 
5
- <nav id="navigation" role="navigation">
6
+ <nav id="navigation" role="navigation" hidden>
6
7
  <%= render '_sidebar_pages.rhtml' %>
7
8
  <%= render '_sidebar_sections.rhtml' %>
8
9
  <%= render '_sidebar_ancestors.rhtml' %>
@@ -109,10 +110,10 @@
109
110
  </section>
110
111
  <%- end %>
111
112
 
112
- <%- klass.methods_by_type(section).each do |type, visibilities|
113
- next if visibilities.empty?
114
- visibilities.each do |visibility, methods|
115
- next if methods.empty? %>
113
+ <%- klass.methods_by_type(section).each do |type, visibilities| %>
114
+ <%- next if visibilities.empty? %>
115
+ <%- visibilities.each do |visibility, methods| %>
116
+ <%- next if methods.empty? %>
116
117
  <section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section anchor-link">
117
118
  <header>
118
119
  <h3 id="<%= visibility %>-<%= type %>-methods"><a href="#<%= visibility %>-<%= type %>-methods"><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</a></h3>
@@ -155,15 +156,13 @@
155
156
  <summary>Source</summary>
156
157
  </details>
157
158
  </div>
159
+ <div class="method-source-code" id="<%= method.html_name %>-source">
160
+ <pre class="<%= method.source_language %>" data-language="<%= method.source_language %>"><%= method.markup_code %></pre>
161
+ </div>
158
162
  <%- end %>
159
163
 
160
164
  <%- unless method.skip_description? then %>
161
165
  <div class="method-description">
162
- <%- if method.token_stream then %>
163
- <div class="method-source-code" id="<%= method.html_name %>-source">
164
- <pre class="<%= method.source_language %>" data-language="<%= method.source_language %>"><%= method.markup_code %></pre>
165
- </div>
166
- <%- end %>
167
166
  <%- if method.mixin_from then %>
168
167
  <div class="mixin-from">
169
168
  <%= method.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(method.mixin_from.path) %>"><%= method.mixin_from.full_name %></a>
@@ -207,8 +206,8 @@
207
206
 
208
207
  <%- end %>
209
208
  </section>
210
- <%- end
211
- end %>
209
+ <%- end %>
210
+ <%- end %>
212
211
  </section>
213
212
  <%- end %>
214
213
  </main>