rorvswild_theme_rdoc 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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 +164 -0
- data/lib/rdoc/generator/template/rorvswild/css/fonts.css +34 -0
- data/lib/rdoc/generator/template/rorvswild/css/rdoc.css +855 -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.rb +14 -0
- data/lib/rorvswild_theme_rdoc.rb +4 -0
- metadata +42 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbe4495838431b2389d090bd182ed512aff8da1d681c64fb15ea494847a2d3f3
|
4
|
+
data.tar.gz: c768ff5590280f474c5529ac14d042e1c460d9acb06a171edab691f9bdfcb09c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78c1f474c02639db692cbf6154656f58d82898979ed025306e68407c460e77977a931f9a1759411df2e45a24095074699af5c3d22250f30115b15793736ef55f
|
7
|
+
data.tar.gz: 19f9ded82292b43e760e253504b52e2ef102170378b3accfe7df4613d699eb35a2b93e7a85f0160775c5c03a75aba4a7bf259bb5df8d0d05da4e3d9d74eee679
|
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
|
+
![RoRvsWild theme RDoc Light](https://cdn.rorvswild.com/assets/blog/2024/rdoc_new-ad5d5ed01e18b11607278cdf97899209dfac8a752b2f0413e83b859b90f48009.png)
|
7
|
+
|
8
|
+
![RoRvsWild theme RDoc Dark](https://cdn.rorvswild.com/assets/blog/2024/rdoc_new_dark-06b332002ea3c7df9aafd2a5081fd901d0ca02450b4a002fda08acb4395b29e6.png)
|
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.each_extend 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.each_include 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,164 @@
|
|
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><%= const.description.strip %></dd>
|
34
|
+
<%- else -%>
|
35
|
+
<dd class="missing-docs">(Not documented)</dd>
|
36
|
+
<%- end -%>
|
37
|
+
<%- end -%>
|
38
|
+
</dl>
|
39
|
+
</section>
|
40
|
+
<%- end -%>
|
41
|
+
|
42
|
+
<%- unless attributes.empty? then -%>
|
43
|
+
<section class="attribute-method-details" class="method-section">
|
44
|
+
<header>
|
45
|
+
<h2>Attributes</h2>
|
46
|
+
</header>
|
47
|
+
<%- attributes.each do |attrib| -%>
|
48
|
+
<div id="<%= attrib.aref %>" class="method-detail">
|
49
|
+
<div class="method-heading attribute-method-heading">
|
50
|
+
<a href="#<%= attrib.aref %>" title="Link to this attribute">
|
51
|
+
<span class="method-name"><%= h attrib.name %></span>
|
52
|
+
<span class="attribute-access-type">[<%= attrib.rw %>]</span>
|
53
|
+
</a>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
<div class="method-description">
|
57
|
+
<%- if attrib.comment then -%>
|
58
|
+
<%= attrib.description.strip %>
|
59
|
+
<%- else -%>
|
60
|
+
<p class="missing-docs">(Not documented)</p>
|
61
|
+
<%- end -%>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
<%- end -%>
|
65
|
+
</section>
|
66
|
+
<%- end -%>
|
67
|
+
|
68
|
+
<%- klass.methods_by_type(section).each do |type, visibilities|
|
69
|
+
next if visibilities.empty?
|
70
|
+
visibilities.each do |visibility, methods|
|
71
|
+
next if methods.empty? %>
|
72
|
+
<section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section">
|
73
|
+
<header>
|
74
|
+
<h2><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h2>
|
75
|
+
</header>
|
76
|
+
|
77
|
+
<%- methods.each do |method| -%>
|
78
|
+
<div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
|
79
|
+
<div class="method-header">
|
80
|
+
<%- if (call_seq = method.call_seq) then -%>
|
81
|
+
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
|
82
|
+
<div class="method-heading">
|
83
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
84
|
+
<span class="method-callseq">
|
85
|
+
<%= h(call_seq.strip.
|
86
|
+
gsub( /^\w+\./m, '')).
|
87
|
+
gsub(/(.*)[-=]>/, '\1→') %>
|
88
|
+
</span>
|
89
|
+
</a>
|
90
|
+
</div>
|
91
|
+
<%- end -%>
|
92
|
+
<%- elsif method.has_call_seq? then -%>
|
93
|
+
<div class="method-heading">
|
94
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
95
|
+
<span class="method-name"><%= h method.name %></span>
|
96
|
+
</a>
|
97
|
+
</div>
|
98
|
+
<%- else -%>
|
99
|
+
<div class="method-heading">
|
100
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
101
|
+
<span class="method-name"><%= h method.name %></span>
|
102
|
+
<span class="method-args"><%= h method.param_seq %></span>
|
103
|
+
</a>
|
104
|
+
</div>
|
105
|
+
<%- end -%>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
<%- unless method.skip_description? then -%>
|
109
|
+
<div class="method-description">
|
110
|
+
<%- if method.comment then -%>
|
111
|
+
<%= method.description.strip %>
|
112
|
+
<%- else -%>
|
113
|
+
<p class="missing-docs">(Not documented)</p>
|
114
|
+
<%- end -%>
|
115
|
+
<%- if method.calls_super then -%>
|
116
|
+
<div class="method-calls-super">
|
117
|
+
Calls superclass method <%= method.superclass_method ? method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil %>
|
118
|
+
</div>
|
119
|
+
<%- end -%>
|
120
|
+
<%- if method.token_stream then -%>
|
121
|
+
<button class="toggle-source">toggle source</button>
|
122
|
+
<div class="method-source-code" id="<%= method.html_name %>-source">
|
123
|
+
<pre><%= method.markup_code %></pre>
|
124
|
+
</div>
|
125
|
+
<%- end -%>
|
126
|
+
</div>
|
127
|
+
<%- end -%>
|
128
|
+
|
129
|
+
<%- unless method.aliases.empty? then -%>
|
130
|
+
<div class="aliases">
|
131
|
+
Also aliased as: <%= method.aliases.map do |aka|
|
132
|
+
if aka.parent then # HACK lib/rexml/encodings
|
133
|
+
%{<a href="#{klass.aref_to aka.path}">#{h aka.name}</a>}
|
134
|
+
else
|
135
|
+
h aka.name
|
136
|
+
end
|
137
|
+
end.join ", " %>
|
138
|
+
</div>
|
139
|
+
<%- end -%>
|
140
|
+
|
141
|
+
<%- if method.is_alias_for then -%>
|
142
|
+
<div class="aliases">
|
143
|
+
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
|
144
|
+
</div>
|
145
|
+
<%- end -%>
|
146
|
+
</div>
|
147
|
+
<%- end -%>
|
148
|
+
</section>
|
149
|
+
<%- end
|
150
|
+
end %>
|
151
|
+
<%- end -%>
|
152
|
+
</article>
|
153
|
+
<nav class="contextual">
|
154
|
+
<%= render '_sidebar_parent.rhtml' %>
|
155
|
+
<%= render '_sidebar_includes.rhtml' %>
|
156
|
+
<%= render '_sidebar_table_of_contents.rhtml' %>
|
157
|
+
<%= render '_sidebar_sections.rhtml' %>
|
158
|
+
<%= render '_sidebar_extends.rhtml' %>
|
159
|
+
<%= render '_sidebar_constants.rhtml' %>
|
160
|
+
<%= render '_sidebar_methods.rhtml' %>
|
161
|
+
</nav>
|
162
|
+
</main>
|
163
|
+
</div>
|
164
|
+
</body>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
@font-face {
|
2
|
+
font-family: "Monaspace";
|
3
|
+
font-style: normal;
|
4
|
+
font-weight: 400;
|
5
|
+
src: url('<%= asset_path('../fonts/MonaspaceNeon-Regular.woff2') %>') format('woff2');
|
6
|
+
}
|
7
|
+
|
8
|
+
@font-face {
|
9
|
+
font-family: "Monaspace";
|
10
|
+
font-style: normal;
|
11
|
+
font-weight: 700;
|
12
|
+
src: url('<%= asset_path('../fonts/MonaspaceNeon-Bold.woff2') %>') format('woff2');
|
13
|
+
}
|
14
|
+
|
15
|
+
@font-face {
|
16
|
+
font-family: "Inter";
|
17
|
+
font-style: normal;
|
18
|
+
font-weight: 400;
|
19
|
+
src: url('<%= asset_path('../fonts/Inter-Regular.woff2') %>') format('woff2');
|
20
|
+
}
|
21
|
+
|
22
|
+
@font-face {
|
23
|
+
font-family: "Inter";
|
24
|
+
font-style: italic;
|
25
|
+
font-weight: 400;
|
26
|
+
src: url('<%= asset_path('../fonts/Inter-Italic.woff2') %>') format('woff2');
|
27
|
+
}
|
28
|
+
|
29
|
+
@font-face {
|
30
|
+
font-family: "Inter";
|
31
|
+
font-style: normal;
|
32
|
+
font-weight: 700;
|
33
|
+
src: url('<%= asset_path('../fonts/Inter-Bold.woff2') %>') format('woff2');
|
34
|
+
}
|