rorvswild_theme_rdoc 0.1 → 0.3.0
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.
- checksums.yaml +4 -4
- data/LICENSE +29 -0
- data/README.md +27 -0
- data/lib/rdoc/discover.rb +1 -0
- data/lib/rdoc/generator/template/rorvswild/_dialog_search.rhtml +16 -0
- data/lib/rdoc/generator/template/rorvswild/_footer.rhtml +4 -0
- data/lib/rdoc/generator/template/rorvswild/_head.rhtml +25 -0
- data/lib/rdoc/generator/template/rorvswild/_navigation.rhtml +5 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_VCS_info.rhtml +19 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_classes.rhtml +48 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_constants.rhtml +10 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_extends.rhtml +15 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_in_files.rhtml +8 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_includes.rhtml +15 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_installed.rhtml +15 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_methods.rhtml +21 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_pages.rhtml +34 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_parent.rhtml +41 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_sections.rhtml +11 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_table_of_contents.rhtml +40 -0
- data/lib/rdoc/generator/template/rorvswild/_sidebar_toggle.rhtml +3 -0
- data/lib/rdoc/generator/template/rorvswild/_topbar.rhtml +12 -0
- data/lib/rdoc/generator/template/rorvswild/class.rhtml +187 -0
- data/lib/rdoc/generator/template/rorvswild/css/fonts.css +34 -0
- data/lib/rdoc/generator/template/rorvswild/css/rdoc.css +856 -0
- data/lib/rdoc/generator/template/rorvswild/fonts/Inter-Bold.woff2 +0 -0
- data/lib/rdoc/generator/template/rorvswild/fonts/Inter-Italic.woff2 +0 -0
- data/lib/rdoc/generator/template/rorvswild/fonts/Inter-Regular.woff2 +0 -0
- data/lib/rdoc/generator/template/rorvswild/fonts/MonaspaceNeon-Bold.woff2 +0 -0
- data/lib/rdoc/generator/template/rorvswild/fonts/MonaspaceNeon-Regular.woff2 +0 -0
- data/lib/rdoc/generator/template/rorvswild/index.rhtml +22 -0
- data/lib/rdoc/generator/template/rorvswild/js/darkfish.js +167 -0
- data/lib/rdoc/generator/template/rorvswild/js/search.js +110 -0
- data/lib/rdoc/generator/template/rorvswild/page.rhtml +15 -0
- data/lib/rdoc/generator/template/rorvswild/servlet_not_found.rhtml +15 -0
- data/lib/rdoc/generator/template/rorvswild/servlet_root.rhtml +63 -0
- data/lib/rdoc/generator/template/rorvswild/table_of_contents.rhtml +63 -0
- data/lib/rorvswild_theme_rdoc/patches/rdoc_before_6.13.0.rb +10 -0
- data/lib/rorvswild_theme_rdoc/patches/rdoc_before_6.8.0.rb +16 -0
- data/lib/rorvswild_theme_rdoc/version.rb +3 -0
- data/lib/rorvswild_theme_rdoc.rb +5 -0
- metadata +48 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a85143e9f438f5dd7bd333dbe53fcde2cc560e7436eb3b316255ffaf37a22d28
|
4
|
+
data.tar.gz: 448575df025e5b14f3b346383106d4e2b84deae015c1d9d9ff8cc927f10c59bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb458897afe53c38740177ea535cf795a4a3b164163efd920932a4d44f09d36050dc5f6f625069dce6ade54817446110d5068247fa24b35946a4055738e61079
|
7
|
+
data.tar.gz: bdad2622cdbf75bb81ebba5e17c96102535ad62a098838e159fc437a89b967677d4b04004307360444b0fdf2a148639d4c6964f1e864420312418a3396e3100c
|
data/LICENSE
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
RorVsWild RDoc theme is based on Darkfish, of which this is the original license:
|
2
|
+
|
3
|
+
|
4
|
+
Copyright (c) 2007, 2008, Michael Granger. All rights reserved.
|
5
|
+
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
8
|
+
|
9
|
+
* Redistributions of source code must retain the above copyright notice,
|
10
|
+
this list of conditions and the following disclaimer.
|
11
|
+
|
12
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
14
|
+
and/or other materials provided with the distribution.
|
15
|
+
|
16
|
+
* Neither the name of the author/s, nor the names of the project's
|
17
|
+
contributors may be used to endorse or promote products derived from this
|
18
|
+
software without specific prior written permission.
|
19
|
+
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# RoRvsWild theme for RDoc
|
2
|
+
|
3
|
+
[RDoc](https://github.com/ruby/rdoc) theme based on [RoRvsWild](https://www.rorvswild.com/) colors.
|
4
|
+
More than colors, it modifies the layout, navigation, typography and overall look and feel.
|
5
|
+
|
6
|
+

|
7
|
+
|
8
|
+

|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
If you want to use this theme in your documentation:
|
13
|
+
```
|
14
|
+
# Install the gem
|
15
|
+
gem install rorvswild_theme_rdoc
|
16
|
+
|
17
|
+
# Generate the documentation
|
18
|
+
rdoc --root path/to/source/code --template rorvswild
|
19
|
+
```
|
20
|
+
|
21
|
+
## Development
|
22
|
+
|
23
|
+
Call the custom `rorvswild-theme-rdoc` script which automatically loads RoRvsWild's theme.
|
24
|
+
|
25
|
+
```
|
26
|
+
./rorvswild-theme-rdoc --root path/to/source/code
|
27
|
+
```
|
@@ -0,0 +1 @@
|
|
1
|
+
require "rorvswild_theme_rdoc"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<dialog id="search-dialog" role="search" class="search-dialog initially-hidden">
|
2
|
+
<form action="#" method="get" accept-charset="utf-8">
|
3
|
+
<div id="search-field-wrapper">
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
|
5
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
6
|
+
aria-autocomplete="list" aria-controls="search-results"
|
7
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
8
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<ul id="search-results" aria-label="Search Results"
|
12
|
+
aria-busy="false" aria-expanded="false"
|
13
|
+
aria-atomic="false" class="initially-hidden">
|
14
|
+
</ul>
|
15
|
+
</form>
|
16
|
+
</dialog>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<footer role="contentinfo">
|
2
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> <%= RDoc::VERSION %>. <a href="https://validator.w3.org/check/referer">Validate</a>
|
3
|
+
<p><a href="http://rorvswild.com/theme">RoRvsWild theme</a> based on <a href="http://deveiate.org">Darkfish</a>.
|
4
|
+
</footer>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<meta charset="<%= @options.charset %>">
|
2
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
3
|
+
|
4
|
+
<title><%= h @title %></title>
|
5
|
+
|
6
|
+
<script type="text/javascript">
|
7
|
+
var rdoc_rel_prefix = "<%= h asset_rel_prefix %>/";
|
8
|
+
var index_rel_prefix = "<%= h rel_prefix %>/";
|
9
|
+
</script>
|
10
|
+
|
11
|
+
<script src="<%= h asset_rel_prefix %>/js/navigation.js" defer></script>
|
12
|
+
<script src="<%= h asset_rel_prefix %>/js/search.js" defer></script>
|
13
|
+
<script src="<%= h asset_rel_prefix %>/js/search_index.js" defer></script>
|
14
|
+
<script src="<%= h asset_rel_prefix %>/js/searcher.js" defer></script>
|
15
|
+
<script src="<%= h asset_rel_prefix %>/js/darkfish.js" defer></script>
|
16
|
+
|
17
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
18
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
19
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" rel="stylesheet">
|
20
|
+
|
21
|
+
<link href="<%= h asset_rel_prefix %>/css/fonts.css" rel="stylesheet">
|
22
|
+
<link href="<%= h asset_rel_prefix %>/css/rdoc.css" rel="stylesheet">
|
23
|
+
<%- @options.template_stylesheets.each do |stylesheet| -%>
|
24
|
+
<link href="<%= h asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
|
25
|
+
<%- end -%>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%- if !svninfo.empty? then %>
|
2
|
+
<div id="file-svninfo-section" class="nav-section">
|
3
|
+
<h3>VCS Info</h3>
|
4
|
+
|
5
|
+
<div class="section-body">
|
6
|
+
<dl class="svninfo">
|
7
|
+
<dt>Rev
|
8
|
+
<dd><%= svninfo[:rev] %>
|
9
|
+
|
10
|
+
<dt>Last Checked In
|
11
|
+
<dd><%= svninfo[:commitdate].strftime('%Y-%m-%d %H:%M:%S') %>
|
12
|
+
(<%= svninfo[:commitdelta] %> ago)
|
13
|
+
|
14
|
+
<dt>Checked in by
|
15
|
+
<dd><%= svninfo[:committer] %>
|
16
|
+
</dl>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<%- end -%>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<div class="nav-section">
|
2
|
+
<h3>Class and Module Index</h3>
|
3
|
+
|
4
|
+
<%-
|
5
|
+
all_classes = @classes.group_by do |klass|
|
6
|
+
klass.full_name[/\A[^:]++(?:::[^:]++(?=::))*+(?=::[^:]*+\z)/]
|
7
|
+
end.delete_if do |_, klasses|
|
8
|
+
!klasses.any?(&:display?)
|
9
|
+
end
|
10
|
+
link = proc do |index_klass, display = index_klass.display?|
|
11
|
+
if display
|
12
|
+
-%><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.name %></a><%-
|
13
|
+
else
|
14
|
+
-%><%= index_klass.name %><%-
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def has_active_descendant?(klass, current, all_classes)
|
19
|
+
return false unless defined?(current)
|
20
|
+
return true if klass == current
|
21
|
+
children = all_classes[klass.full_name]
|
22
|
+
return false unless children
|
23
|
+
children.any? { |child| has_active_descendant?(child, current, all_classes) }
|
24
|
+
end
|
25
|
+
|
26
|
+
if top = all_classes[nil]
|
27
|
+
solo = top.one? {|klass| klass.display?}
|
28
|
+
traverse = proc do |klasses|
|
29
|
+
has_active_descendant = false
|
30
|
+
-%>
|
31
|
+
<ul class="link-list" id="class-and-module-index">
|
32
|
+
<%- klasses.each do |index_klass| -%>
|
33
|
+
<%- if children = all_classes[index_klass.full_name] -%>
|
34
|
+
<li class="<%= "active" if defined?(current) && (index_klass == current) %>">
|
35
|
+
<details<% if solo || (defined?(current) && has_active_descendant?(index_klass, current, all_classes)); solo = false %> open<% end %>>
|
36
|
+
<summary><% link.call(index_klass) %></summary>
|
37
|
+
<%- traverse.call(children) -%>
|
38
|
+
</ul>
|
39
|
+
</details>
|
40
|
+
<%- elsif index_klass.display? -%>
|
41
|
+
<li class="<%= "active" if defined?(current) && (index_klass == current) %>">
|
42
|
+
<% link.call(index_klass, true) %>
|
43
|
+
<%- end -%>
|
44
|
+
<%- end -%>
|
45
|
+
<%- end -%>
|
46
|
+
<%- traverse.call(top) -%>
|
47
|
+
<%- end -%>
|
48
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if (constants = klass.constants.sort).any? %>
|
2
|
+
<div class="nav-section">
|
3
|
+
<h3>Constants</h3>
|
4
|
+
<ul class="link-list" role="directory">
|
5
|
+
<%- constants.each do |const| -%>
|
6
|
+
<li><a href="#<%= h const.name %>"><%= h const.name -%></a></li>
|
7
|
+
<%- end -%>
|
8
|
+
</ul>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%- unless klass.extends.empty? then %>
|
2
|
+
<div class="nav-section">
|
3
|
+
<h3>Extended With Modules</h3>
|
4
|
+
|
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>
|
9
|
+
<%- else -%>
|
10
|
+
<li><span class="extend"><%= ext.name %></span>
|
11
|
+
<%- end -%>
|
12
|
+
<%- end -%>
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
<%- end -%>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%- unless klass.includes.empty? then %>
|
2
|
+
<div class="nav-section">
|
3
|
+
<h3>Included Modules</h3>
|
4
|
+
|
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>
|
9
|
+
<%- else -%>
|
10
|
+
<li><span class="include"><%= inc.name %></span>
|
11
|
+
<%- end -%>
|
12
|
+
<%- end -%>
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
<%- end -%>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id="home-section" class="nav-section">
|
2
|
+
<h3>Documentation</h3>
|
3
|
+
|
4
|
+
<ul>
|
5
|
+
<%- installed.each do |name, href, exists, type, _| -%>
|
6
|
+
<%- next if type == :extra -%>
|
7
|
+
<li class="folder">
|
8
|
+
<%- if exists then -%>
|
9
|
+
<a href="<%= href %>"><%= h name %></a>
|
10
|
+
<%- else -%>
|
11
|
+
<%= h name %>
|
12
|
+
<%- end -%>
|
13
|
+
<%- end -%>
|
14
|
+
</ul>
|
15
|
+
</div>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% if (class_methods = klass.class_method_list.sort).any? %>
|
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>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<% if (instance_methods = klass.instance_methods.sort).any? %>
|
13
|
+
<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>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%- simple_files = @files.select { |f| f.text? } %>
|
2
|
+
|
3
|
+
<%- if defined?(current) && current.respond_to?(:page_name) -%>
|
4
|
+
<%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name -%>
|
5
|
+
<%- end -%>
|
6
|
+
|
7
|
+
<%- unless simple_files.empty? then -%>
|
8
|
+
<div class="nav-section">
|
9
|
+
<h3>Pages</h3>
|
10
|
+
|
11
|
+
<ul class="link-list">
|
12
|
+
<%- simple_files.group_by do |f| -%>
|
13
|
+
<%- f.full_name[%r{\A[^/]+(?=/)}] || f.page_name -%>
|
14
|
+
<%- end.each do |n, files| -%>
|
15
|
+
<%- f = files.shift -%>
|
16
|
+
<%- if files.empty? -%>
|
17
|
+
<li class="<%= 'active' if defined?(dir) && (dir == f.page_name) %>"><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a>
|
18
|
+
<%- next -%>
|
19
|
+
<%- end -%>
|
20
|
+
<li><details<% if dir == n %> open<% end %>><summary><%
|
21
|
+
if n == f.page_name
|
22
|
+
%><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h n %></a><%
|
23
|
+
else
|
24
|
+
%><%= h n %><% files.unshift(f)
|
25
|
+
end %></summary>
|
26
|
+
<ul class="link-list">
|
27
|
+
<%- files.each do |f| -%>
|
28
|
+
<li class="<%= 'active' if defined?(dir) && (dir == f.page_name) %>"><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a>
|
29
|
+
<%- end -%>
|
30
|
+
</ul></details>
|
31
|
+
<%- end -%>
|
32
|
+
</ul>
|
33
|
+
</div>
|
34
|
+
<%- end -%>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<%- if klass.type == 'class' && (ancestors = klass.super_classes).any? then -%>
|
2
|
+
<div class="nav-section">
|
3
|
+
<h3>Ancestors</h3>
|
4
|
+
<ul class="link-list" role="directory">
|
5
|
+
<%- ancestors.each_with_index do |ancestor, index| -%>
|
6
|
+
<%- if ancestor.is_a?(String) -%>
|
7
|
+
<li>
|
8
|
+
<%- if index == 0 && ancestors.size > 1 -%>
|
9
|
+
<details>
|
10
|
+
<summary><%= ancestor -%></summary>
|
11
|
+
<ul class="link-list" role="directory">
|
12
|
+
<%- else -%>
|
13
|
+
<span><%= ancestor -%></span>
|
14
|
+
<ul class="link-list" role="directory">
|
15
|
+
<%- end -%>
|
16
|
+
<%- elsif ancestor.is_a?(RDoc::NormalClass) -%>
|
17
|
+
<li>
|
18
|
+
<%- if index == 0 && ancestors.size > 1 -%>
|
19
|
+
<details>
|
20
|
+
<summary><a href="<%= klass.aref_to ancestor.path -%>"><%= ancestor.full_name -%></a></summary>
|
21
|
+
<ul class="link-list" role="directory">
|
22
|
+
<%- else -%>
|
23
|
+
<a href="<%= klass.aref_to ancestor.path -%>"><%= ancestor.full_name -%></a>
|
24
|
+
<ul class="link-list" role="directory">
|
25
|
+
<%- end -%>
|
26
|
+
<%- end -%>
|
27
|
+
<%- end -%>
|
28
|
+
|
29
|
+
<%- ancestors.each_with_index do |ancestor, index| -%>
|
30
|
+
<%- if index == 0 && ancestors.size > 1 -%>
|
31
|
+
</ul>
|
32
|
+
</details>
|
33
|
+
</li>
|
34
|
+
<%- else -%>
|
35
|
+
</ul>
|
36
|
+
</li>
|
37
|
+
<%- end -%>
|
38
|
+
<%- end -%>
|
39
|
+
</ul>
|
40
|
+
</div>
|
41
|
+
<%- end -%>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%- unless klass.sections.length == 1 then %>
|
2
|
+
<div class="nav-section">
|
3
|
+
<h3>Sections</h3>
|
4
|
+
|
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>
|
10
|
+
</div>
|
11
|
+
<%- end -%>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<%-
|
2
|
+
comment = if current.respond_to? :comment_location then
|
3
|
+
current.comment_location
|
4
|
+
else
|
5
|
+
current.comment
|
6
|
+
end
|
7
|
+
table = current.parse(comment).table_of_contents.dup
|
8
|
+
|
9
|
+
if table.length > 1 then %>
|
10
|
+
<div class="nav-section">
|
11
|
+
<h3>On this page</h3>
|
12
|
+
|
13
|
+
<%- display_link = proc do |heading| -%>
|
14
|
+
<a href="#<%= heading.label current %>"><%= heading.plain_html %></a>
|
15
|
+
<%- end -%>
|
16
|
+
|
17
|
+
<%- list_siblings = proc do -%>
|
18
|
+
<%- level = table.first&.level -%>
|
19
|
+
<%- while table.first && table.first.level >= level -%>
|
20
|
+
<%- heading = table.shift -%>
|
21
|
+
<%- if table.first.nil? || table.first.level <= heading.level -%>
|
22
|
+
<li><% display_link.call heading -%>
|
23
|
+
<%- else -%>
|
24
|
+
<li>
|
25
|
+
<details open>
|
26
|
+
<summary><%- display_link.call heading -%></summary>
|
27
|
+
<ul class="link-list" role="directory">
|
28
|
+
<% list_siblings.call %>
|
29
|
+
</ul>
|
30
|
+
</details>
|
31
|
+
</li>
|
32
|
+
<%- end -%>
|
33
|
+
<%- end -%>
|
34
|
+
<%- end -%>
|
35
|
+
|
36
|
+
<ul class="link-list" role="directory">
|
37
|
+
<% list_siblings.call %>
|
38
|
+
</ul>
|
39
|
+
</div>
|
40
|
+
<%- end -%>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<header class="topbar">
|
2
|
+
<div class="width-limiter">
|
3
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
4
|
+
<a href="<%= rel_prefix %>/index.html" rel="home"><%= @options.title %></a>
|
5
|
+
<button type="button" aria-label="Search" class="search-button">
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
|
7
|
+
<span>search</span>
|
8
|
+
</button>
|
9
|
+
</div>
|
10
|
+
</header>
|
11
|
+
|
12
|
+
<%= render '_dialog_search.rhtml' %>
|
@@ -0,0 +1,187 @@
|
|
1
|
+
<body id="top" role="document">
|
2
|
+
<%= render '_topbar.rhtml' %>
|
3
|
+
<div class="wrapper">
|
4
|
+
<%= render '_navigation.rhtml' %>
|
5
|
+
|
6
|
+
<main role="main" aria-labelledby="<%=h klass.aref %>">
|
7
|
+
<article>
|
8
|
+
<h1 id="<%=h klass.aref %>">
|
9
|
+
<%= klass.type %> <%= klass.full_name %>
|
10
|
+
</h1>
|
11
|
+
|
12
|
+
<%= klass.description %>
|
13
|
+
|
14
|
+
<%- klass.each_section do |section, constants, attributes| -%>
|
15
|
+
|
16
|
+
<%- if section.title then -%>
|
17
|
+
<h2><%= section.title %></h2>
|
18
|
+
<%- end -%>
|
19
|
+
|
20
|
+
<%- if section.comment then -%>
|
21
|
+
<div><%= section.description %></div>
|
22
|
+
<%- end -%>
|
23
|
+
|
24
|
+
<%- unless constants.empty? then -%>
|
25
|
+
<section class="constants-list">
|
26
|
+
<header>
|
27
|
+
<h2>Constants</h2>
|
28
|
+
</header>
|
29
|
+
<dl>
|
30
|
+
<%- constants.each do |const| -%>
|
31
|
+
<dt id="<%= const.name %>"><%= const.name %></dt>
|
32
|
+
<%- if const.comment then -%>
|
33
|
+
<dd>
|
34
|
+
<!-- commented future feature
|
35
|
+
<%#- if const.mixin_from then -%>
|
36
|
+
<div class="mixin-from">
|
37
|
+
Included from <a href="<%#= klass.aref_to(const.mixin_from.path)%>"><%#= const.mixin_from.full_name %></a>
|
38
|
+
</div>
|
39
|
+
<%#- end -%>
|
40
|
+
-->
|
41
|
+
<%= const.description.strip %>
|
42
|
+
</dd>
|
43
|
+
<%- else -%>
|
44
|
+
<dd class="missing-docs">(Not documented)</dd>
|
45
|
+
<%- end -%>
|
46
|
+
<%- end -%>
|
47
|
+
</dl>
|
48
|
+
</section>
|
49
|
+
<%- end -%>
|
50
|
+
|
51
|
+
<%- unless attributes.empty? then -%>
|
52
|
+
<section class="attribute-method-details" class="method-section">
|
53
|
+
<header>
|
54
|
+
<h2>Attributes</h2>
|
55
|
+
</header>
|
56
|
+
<%- attributes.each do |attrib| -%>
|
57
|
+
<div id="<%= attrib.aref %>" class="method-detail">
|
58
|
+
<div class="method-heading attribute-method-heading">
|
59
|
+
<a href="#<%= attrib.aref %>" title="Link to this attribute">
|
60
|
+
<span class="method-name"><%= h attrib.name %></span>
|
61
|
+
<span class="attribute-access-type">[<%= attrib.rw %>]</span>
|
62
|
+
</a>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<div class="method-description">
|
66
|
+
<!-- commented future feature
|
67
|
+
<%#- if attrib.mixin_from then -%>
|
68
|
+
<div class="mixin-from">
|
69
|
+
<%#= attrib.singleton ? "Extended" : "Included" %> from <a href="<%#= klass.aref_to(attrib.mixin_from.path)%>"><%#= attrib.mixin_from.full_name %></a>
|
70
|
+
</div>
|
71
|
+
<%#- end -%>
|
72
|
+
-->
|
73
|
+
<%- if attrib.comment then -%>
|
74
|
+
<%= attrib.description.strip %>
|
75
|
+
<%- else -%>
|
76
|
+
<p class="missing-docs">(Not documented)</p>
|
77
|
+
<%- end -%>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
<%- end -%>
|
81
|
+
</section>
|
82
|
+
<%- end -%>
|
83
|
+
|
84
|
+
<%- klass.methods_by_type(section).each do |type, visibilities|
|
85
|
+
next if visibilities.empty?
|
86
|
+
visibilities.each do |visibility, methods|
|
87
|
+
next if methods.empty? %>
|
88
|
+
<section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section">
|
89
|
+
<header>
|
90
|
+
<h2><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h2>
|
91
|
+
</header>
|
92
|
+
|
93
|
+
<%- methods.each do |method| -%>
|
94
|
+
<div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
|
95
|
+
<div class="method-header">
|
96
|
+
<%- if (call_seq = method.call_seq) then -%>
|
97
|
+
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
|
98
|
+
<div class="method-heading">
|
99
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
100
|
+
<span class="method-callseq">
|
101
|
+
<%= h(call_seq.strip.
|
102
|
+
gsub( /^\w+\./m, '')).
|
103
|
+
gsub(/(.*)[-=]>/, '\1→') %>
|
104
|
+
</span>
|
105
|
+
</a>
|
106
|
+
</div>
|
107
|
+
<%- end -%>
|
108
|
+
<%- elsif method.has_call_seq? then -%>
|
109
|
+
<div class="method-heading">
|
110
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
111
|
+
<span class="method-name"><%= h method.name %></span>
|
112
|
+
</a>
|
113
|
+
</div>
|
114
|
+
<%- else -%>
|
115
|
+
<div class="method-heading">
|
116
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
117
|
+
<span class="method-name"><%= h method.name %></span>
|
118
|
+
<span class="method-args"><%= h method.param_seq %></span>
|
119
|
+
</a>
|
120
|
+
</div>
|
121
|
+
<%- end -%>
|
122
|
+
</div>
|
123
|
+
|
124
|
+
<%- unless method.skip_description? then -%>
|
125
|
+
<div class="method-description">
|
126
|
+
<!-- commented future feature
|
127
|
+
<%#- if method.mixin_from then -%>
|
128
|
+
<div class="mixin-from">
|
129
|
+
<%#= method.singleton ? "Extended" : "Included" %> from <a href="<%#= klass.aref_to(method.mixin_from.path)%>"><%#= method.mixin_from.full_name %></a>
|
130
|
+
</div>
|
131
|
+
<%#- end -%>
|
132
|
+
-->
|
133
|
+
<%- if method.comment then -%>
|
134
|
+
<%= method.description.strip %>
|
135
|
+
<%- else -%>
|
136
|
+
<p class="missing-docs">(Not documented)</p>
|
137
|
+
<%- end -%>
|
138
|
+
<%- if method.calls_super then -%>
|
139
|
+
<div class="method-calls-super">
|
140
|
+
Calls superclass method <%= method.superclass_method ? method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil %>
|
141
|
+
</div>
|
142
|
+
<%- end -%>
|
143
|
+
<%- if method.token_stream then -%>
|
144
|
+
<button class="toggle-source">toggle source</button>
|
145
|
+
<div class="method-source-code" id="<%= method.html_name %>-source">
|
146
|
+
<pre><%= method.markup_code %></pre>
|
147
|
+
</div>
|
148
|
+
<%- end -%>
|
149
|
+
</div>
|
150
|
+
<%- end -%>
|
151
|
+
|
152
|
+
<%- unless method.aliases.empty? then -%>
|
153
|
+
<div class="aliases">
|
154
|
+
Also aliased as: <%= method.aliases.map do |aka|
|
155
|
+
if aka.parent then # HACK lib/rexml/encodings
|
156
|
+
%{<a href="#{klass.aref_to aka.path}">#{h aka.name}</a>}
|
157
|
+
else
|
158
|
+
h aka.name
|
159
|
+
end
|
160
|
+
end.join ", " %>
|
161
|
+
</div>
|
162
|
+
<%- end -%>
|
163
|
+
|
164
|
+
<%- if method.is_alias_for then -%>
|
165
|
+
<div class="aliases">
|
166
|
+
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
|
167
|
+
</div>
|
168
|
+
<%- end -%>
|
169
|
+
</div>
|
170
|
+
<%- end -%>
|
171
|
+
</section>
|
172
|
+
<%- end
|
173
|
+
end %>
|
174
|
+
<%- end -%>
|
175
|
+
</article>
|
176
|
+
<nav class="contextual">
|
177
|
+
<%= render '_sidebar_parent.rhtml' %>
|
178
|
+
<%= render '_sidebar_includes.rhtml' %>
|
179
|
+
<%= render '_sidebar_table_of_contents.rhtml' %>
|
180
|
+
<%= render '_sidebar_sections.rhtml' %>
|
181
|
+
<%= render '_sidebar_extends.rhtml' %>
|
182
|
+
<%= render '_sidebar_constants.rhtml' %>
|
183
|
+
<%= render '_sidebar_methods.rhtml' %>
|
184
|
+
</nav>
|
185
|
+
</main>
|
186
|
+
</div>
|
187
|
+
</body>
|