utopia-project 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/utopia/project/base.rb +6 -2
- data/lib/utopia/project/version.rb +1 -1
- data/pages/source/show.xnode +12 -1
- data/public/_static/site.css +25 -0
- data/utopia-project.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf11019a91266f8e5a3bc28b2d122761ca40364112063261d7ef543c228c471c
|
4
|
+
data.tar.gz: 7b3a1f947c4040a315c1c549cc420d6d5844702d49aaf1596056b329bfdff6f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14804a71072ad2958b5b6b3e0db1e7b8c74f5f1822fe6e5fe42b33d62360e797be67b9cf363ff71bd2a943cf65bd665e6bed18bef38211998fab918ec1c51efc
|
7
|
+
data.tar.gz: e79643a8cb6126f359f629a9a422df5f5b19706841b6987faf2e806bbc8c173ea48d8316a3393919de97d2b4055dad6bcf87a81e8218c924579c2f2c1505cb87
|
data/lib/utopia/project/base.rb
CHANGED
@@ -137,8 +137,12 @@ module Utopia
|
|
137
137
|
end
|
138
138
|
|
139
139
|
# Compute a unique string which can be used as `id` attribute in the HTML output.
|
140
|
-
def id_for(symbol)
|
141
|
-
|
140
|
+
def id_for(symbol, suffix = nil)
|
141
|
+
if suffix
|
142
|
+
"#{symbol.qualified_name}-#{suffix}"
|
143
|
+
else
|
144
|
+
symbol.qualified_name
|
145
|
+
end
|
142
146
|
end
|
143
147
|
|
144
148
|
# Compute a link href to the given symbol for use within the HTML output.
|
data/pages/source/show.xnode
CHANGED
@@ -44,7 +44,7 @@
|
|
44
44
|
parameters = documentation.parameters.to_a
|
45
45
|
|
46
46
|
if parameters.any?
|
47
|
-
?><dl><?r
|
47
|
+
?><h4>Parameters</h4><dl><?r
|
48
48
|
parameters.each do |parameter|
|
49
49
|
?>
|
50
50
|
<dt><code class="syntax">#{parameter[:name]}</code> — #{base.linkify(parameter[:type], symbol)}</dt>
|
@@ -55,6 +55,17 @@
|
|
55
55
|
end
|
56
56
|
?></dl><?r
|
57
57
|
end
|
58
|
+
|
59
|
+
if symbol.multiline?
|
60
|
+
collapsible_id = base.id_for(symbol, :implementation)
|
61
|
+
?><section class="collapsible">
|
62
|
+
<input type="checkbox" id="#{collapsible_id}"/>
|
63
|
+
<label for="#{collapsible_id}">
|
64
|
+
<h4>Implementation</h4>
|
65
|
+
</label>
|
66
|
+
<pre><code class="language-#{symbol.language.name}">#{symbol.text}</code></pre>
|
67
|
+
</section><?r
|
68
|
+
end
|
58
69
|
end
|
59
70
|
end
|
60
71
|
end
|
data/public/_static/site.css
CHANGED
@@ -142,3 +142,28 @@ footer {
|
|
142
142
|
margin: 1rem;
|
143
143
|
margin-top: 5rem;
|
144
144
|
}
|
145
|
+
|
146
|
+
section.collapsible input[type=checkbox] {
|
147
|
+
display: none;
|
148
|
+
}
|
149
|
+
|
150
|
+
section.collapsible pre {
|
151
|
+
display: none;
|
152
|
+
}
|
153
|
+
|
154
|
+
section.collapsible input[type=checkbox]:checked ~ pre {
|
155
|
+
display: block;
|
156
|
+
}
|
157
|
+
|
158
|
+
section.collapsible > label {
|
159
|
+
cursor: pointer;
|
160
|
+
}
|
161
|
+
|
162
|
+
section.collapsible input[type=checkbox] ~ label > *:last-child:after {
|
163
|
+
content: '▸';
|
164
|
+
padding: 0 0.5rem;
|
165
|
+
}
|
166
|
+
|
167
|
+
section.collapsible input[type=checkbox]:checked ~ label > *:last-child:after {
|
168
|
+
content: '▾';
|
169
|
+
}
|
data/utopia-project.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
# spec.add_dependency "utopia-gallery"
|
21
21
|
|
22
22
|
spec.add_dependency "kramdown"
|
23
|
-
spec.add_dependency "decode"
|
23
|
+
spec.add_dependency "decode", "~> 0.9"
|
24
24
|
spec.add_dependency "rackula"
|
25
25
|
spec.add_dependency "falcon"
|
26
26
|
spec.add_dependency "thread-local"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia-project
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: utopia
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: decode
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '0.9'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '0.9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rackula
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|