utopia-project 0.19.1 → 0.20.2
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
- checksums.yaml.gz.sig +0 -0
- data/lib/utopia/project/base.rb +1 -1
- data/lib/utopia/project/document.rb +4 -2
- data/lib/utopia/project/version.rb +1 -1
- data/pages/_header.xnode +14 -1
- data/pages/source/controller.rb +3 -3
- data/pages/source/index.xnode +1 -1
- data/pages/source/show.xnode +30 -19
- data/public/_components/jquery/jquery.js +118 -109
- data/public/_components/jquery/jquery.min.js +2 -2
- data/public/_components/jquery/jquery.min.map +1 -1
- data/public/_components/jquery/jquery.slim.js +106 -101
- data/public/_components/jquery/jquery.slim.min.js +2 -2
- data/public/_components/jquery/jquery.slim.min.map +1 -1
- data/public/_components/mermaid/mermaid.min.js +1 -1
- data/public/_components/mermaid/mermaid.min.js.LICENSE.txt +1 -1
- data/public/_static/site.css +0 -4
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a592172db272c2789de44f49c0b441741a3d269f19f849ef5718aaf3c5a7152e
|
4
|
+
data.tar.gz: 66078c8df37cbff16f1dc674d18b05efef27f910894d258647189f4944d83b40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ce5ea33622890abb90b9192be7a546219f5e0b8f94cf193fe3640b1177f9c2a17ec0c0a3a037f52be677addfa255b6529a40059f1b063de9fd74e4e3224eae0
|
7
|
+
data.tar.gz: 01f392ac81d5d68117298bf3d803bc7d1f3171bde53a9c670e2eb9e737e7d09b24b122505b1fcfa970f526525232bd7e13c4a357730055594c262bfd3e7e7232
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/utopia/project/base.rb
CHANGED
@@ -55,9 +55,11 @@ module Utopia
|
|
55
55
|
if header.first_child.to_plaintext.include?(name)
|
56
56
|
# Now subsequent children:
|
57
57
|
current = header.next
|
58
|
-
|
58
|
+
|
59
|
+
# Delete everything in the section until we encounter another header:
|
60
|
+
while current && current.type != :header
|
59
61
|
current.delete
|
60
|
-
current =
|
62
|
+
current = current.next
|
61
63
|
end
|
62
64
|
|
63
65
|
return yield(header)
|
data/pages/_header.xnode
CHANGED
@@ -12,7 +12,20 @@
|
|
12
12
|
?> › <span>#{path.last}</span><?r
|
13
13
|
end
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
|
+
if lexical_path = controller[:lexical_path]
|
17
|
+
current = []
|
18
|
+
lexical_path.each do |part|
|
19
|
+
current << part
|
20
|
+
|
21
|
+
?> › <a href="/source/#{current.join('/')}/index">#{part}</a> <?r
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
if guide = controller[:guide]
|
26
|
+
?> › <a href="/guides/#{guide.name}/index">#{guide.title}</a> <?r
|
27
|
+
end
|
28
|
+
|
16
29
|
if localization.localized?
|
17
30
|
?> • (<?r
|
18
31
|
localization.all_locales.each.with_index do |locale, index|
|
data/pages/source/controller.rb
CHANGED
@@ -8,11 +8,11 @@ end
|
|
8
8
|
on '**/*/index' do |request, path|
|
9
9
|
@base = Utopia::Project::Base.instance
|
10
10
|
|
11
|
-
lexical_path = path.components.dup
|
11
|
+
@lexical_path = path.components.dup
|
12
12
|
# Remove the last "index" part:
|
13
|
-
lexical_path.pop
|
13
|
+
@lexical_path.pop
|
14
14
|
|
15
|
-
@node, @symbol = @base.lookup(lexical_path)
|
15
|
+
@node, @symbol = @base.lookup(@lexical_path)
|
16
16
|
|
17
17
|
unless @symbol
|
18
18
|
fail! :not_found
|
data/pages/source/index.xnode
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
if documentation = symbol.documentation or symbol.container?
|
13
13
|
?><li>
|
14
14
|
<?r if symbol.container? ?>
|
15
|
-
<a href="#{base.link_for(symbol)}"><code class="language-#{symbol.language.name}">#{symbol.
|
15
|
+
<a href="#{base.link_for(symbol)}"><code class="language-#{symbol.language.name}">#{symbol.short_form}</code></a>
|
16
16
|
|
17
17
|
#{partial 'content:pragmas', symbol: symbol, class: 'inline'}
|
18
18
|
|
data/pages/source/show.xnode
CHANGED
@@ -3,8 +3,12 @@
|
|
3
3
|
base = self[:base]
|
4
4
|
node = self[:node]
|
5
5
|
symbol = self[:symbol]
|
6
|
+
document.attributes[:title] ||= symbol.qualified_name
|
6
7
|
?>
|
7
|
-
|
8
|
+
|
9
|
+
<h1>
|
10
|
+
<code class="language-#{symbol.language.name}">#{symbol.short_form}</code>
|
11
|
+
</h1>
|
8
12
|
|
9
13
|
<?r
|
10
14
|
if document = base.document_for(symbol)
|
@@ -13,33 +17,39 @@
|
|
13
17
|
?>#{base.format(text.join("\n"), symbol)}<?r
|
14
18
|
end
|
15
19
|
?>
|
16
|
-
|
17
20
|
#{partial 'content:signature', symbol: symbol}
|
18
|
-
|
19
21
|
<?r
|
20
|
-
nested = node.children.map
|
22
|
+
nested = node.children.map do |name, child|
|
23
|
+
base.best(child.values)
|
24
|
+
end.select do |symbol|
|
25
|
+
symbol.container?
|
26
|
+
end
|
21
27
|
|
22
28
|
if nested.any?
|
23
29
|
?>
|
24
30
|
<section>
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
31
|
+
<h2>Nested</h2>
|
32
|
+
|
33
|
+
<ul>
|
34
|
+
<?r nested.each do |symbol| ?>
|
35
|
+
<li><a href="#{base.link_for(symbol)}"><code class="language-#{symbol.language.name}">#{symbol.nested_name}</code></a></li>
|
36
|
+
<?r end ?>
|
37
|
+
</ul>
|
32
38
|
</section>
|
33
39
|
<?r
|
34
40
|
end
|
35
|
-
?>
|
36
41
|
|
42
|
+
definitions = node.children.map do |name, child|
|
43
|
+
child.values.select{|symbol| symbol.documentation and !symbol.container?}
|
44
|
+
end.flatten
|
45
|
+
|
46
|
+
if definitions.any?
|
47
|
+
?>
|
37
48
|
<section>
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
child.values.each do |symbol|
|
49
|
+
<h2>Definitions</h2>
|
50
|
+
|
51
|
+
<?r
|
52
|
+
definitions.each do |symbol|
|
43
53
|
if symbol.documentation and !symbol.container?
|
44
54
|
?><section id="#{base.id_for(symbol)}"><h3><code class="language-#{symbol.language.name}">#{symbol.long_form}</code></h3><?r
|
45
55
|
|
@@ -58,9 +68,10 @@
|
|
58
68
|
?></section><?r
|
59
69
|
end
|
60
70
|
end
|
71
|
+
?>
|
72
|
+
</section>
|
73
|
+
<?r
|
61
74
|
end
|
62
75
|
?>
|
63
|
-
</section>
|
64
|
-
|
65
76
|
<content:discuss/>
|
66
77
|
</content:page>
|