utopia-project 0.5.1 → 0.6.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/bake/utopia/project.rb +19 -3
- data/lib/utopia/project/version.rb +1 -1
- data/pages/_page.xnode +1 -0
- data/pages/index.xnode +2 -2
- data/pages/source/index.xnode +4 -2
- data/pages/source/show.xnode +16 -17
- data/public/_static/site.css +37 -27
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10d660d9b1d9caeaeb9c8ac952452a089c9474f892949332f6b6d8b51d463082
|
4
|
+
data.tar.gz: 79c655bd3e3155588e22e9e0f341a6b3259f0b3ee46575e9c96919141d82f370
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19e4d74ff5865a79d22df992932e62d3b87b93f75fa1d0474c2764417290df8d3c06cfe1ddb094472adbaf9ebe1d6f908a8f8e51849ab2b637030ce583e28476
|
7
|
+
data.tar.gz: b08734a0d3ee5b201f76928d696417dd98b5ac221f8e8113a4a733ff67a866fa4ee344641bfcb3f583f31838cf17fab67ee8ee7eb5bb4fabf8fc5fab4fe1aad5
|
data/bake/utopia/project.rb
CHANGED
@@ -8,14 +8,30 @@ def create
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
-
# Serve the project
|
12
|
-
|
11
|
+
# Serve the project using a web server.
|
12
|
+
# Binds to `https://localhost:9292` by default.
|
13
|
+
#
|
14
|
+
# @param port [Integer] The port to bind to.
|
15
|
+
# @param bind [String] The URL to bind to, e.g. `http://localhost:80`.
|
16
|
+
def serve(port: nil, bind: nil)
|
13
17
|
config_path = File.expand_path("../../template/config.ru", __dir__)
|
14
18
|
preload_path = File.expand_path("../../template/preload.rb", __dir__)
|
15
19
|
|
16
|
-
|
20
|
+
options = []
|
21
|
+
|
22
|
+
if bind
|
23
|
+
options << "--bind" << bind
|
24
|
+
end
|
25
|
+
|
26
|
+
if port
|
27
|
+
opttions << "--port" << port
|
28
|
+
end
|
29
|
+
|
30
|
+
system("falcon", "serve", "--config", config_path, "--preload", preload_path, *options)
|
17
31
|
end
|
18
32
|
|
33
|
+
# Generate a static copy of the site.
|
34
|
+
# @param output_path [String] The output path for the static site.
|
19
35
|
def static(output_path: "docs")
|
20
36
|
require 'rackula/command'
|
21
37
|
|
data/pages/_page.xnode
CHANGED
@@ -10,6 +10,7 @@
|
|
10
10
|
<?r end ?>
|
11
11
|
|
12
12
|
<meta charset="UTF-8" />
|
13
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
13
14
|
|
14
15
|
<link rel="icon" type="image/png" href="/_static/icon.png" />
|
15
16
|
<link rel="stylesheet" href="/_static/site.css" type="text/css" media="screen" />
|
data/pages/index.xnode
CHANGED
@@ -19,12 +19,12 @@
|
|
19
19
|
?><content:heading>Project</content:heading><?r
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
?><main>#{MarkupString.raw document.to_html}</main><?r
|
23
23
|
else
|
24
24
|
?>
|
25
25
|
<content:heading>Project</content:heading>
|
26
26
|
|
27
|
-
<p>This project does not have a README.md file.</p>
|
27
|
+
<main><p>This project does not have a README.md file.</p></main>
|
28
28
|
<?r
|
29
29
|
end
|
30
30
|
?>
|
data/pages/source/index.xnode
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
index = base.index
|
8
8
|
|
9
9
|
index.trie.traverse do |path, node, descend|
|
10
|
-
?><ul class="index"><?r
|
11
10
|
if symbols = node.values
|
12
11
|
symbol = base.best(symbols)
|
13
12
|
|
@@ -20,14 +19,17 @@
|
|
20
19
|
<?r end ?>
|
21
20
|
|
22
21
|
<?r if symbol.container?
|
22
|
+
?><ul class="index"><?r
|
23
23
|
descend.call
|
24
|
+
?></ul><?r
|
24
25
|
end ?>
|
25
26
|
</li><?r
|
26
27
|
end
|
27
28
|
else
|
29
|
+
?><ul class="index"><?r
|
28
30
|
descend.call
|
31
|
+
?></ul><?r
|
29
32
|
end
|
30
|
-
?></ul><?r
|
31
33
|
end
|
32
34
|
?>
|
33
35
|
</main>
|
data/pages/source/show.xnode
CHANGED
@@ -44,27 +44,26 @@
|
|
44
44
|
parameters = documentation.parameters.to_a
|
45
45
|
|
46
46
|
if parameters.any?
|
47
|
-
?><
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
<
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
47
|
+
?><details open>
|
48
|
+
<summary><h4>Parameters</h4></summary>
|
49
|
+
<dl><?r
|
50
|
+
parameters.each do |parameter|
|
51
|
+
?>
|
52
|
+
<dt><code class="syntax">#{parameter[:name]}</code> — #{base.linkify(parameter[:type], symbol)}</dt>
|
53
|
+
<?r if details = parameter[:details] ?>
|
54
|
+
<dd>#{base.format(parameter[:details], symbol)}</dd>
|
55
|
+
<?r end ?>
|
56
|
+
<?r
|
57
|
+
end
|
58
|
+
?></dl>
|
59
|
+
</details><?r
|
57
60
|
end
|
58
61
|
|
59
62
|
if symbol.multiline?
|
60
|
-
|
61
|
-
|
62
|
-
<input type="checkbox" id="#{collapsible_id}"/>
|
63
|
-
<label for="#{collapsible_id}">
|
64
|
-
<h4>Implementation</h4>
|
65
|
-
</label>
|
63
|
+
?><details>
|
64
|
+
<summary><h4>Implementation</h4></summary>
|
66
65
|
<pre><code class="language-#{symbol.language.name}">#{symbol.text}</code></pre>
|
67
|
-
</
|
66
|
+
</details><?r
|
68
67
|
end
|
69
68
|
end
|
70
69
|
end
|
data/public/_static/site.css
CHANGED
@@ -60,6 +60,11 @@ html {
|
|
60
60
|
}
|
61
61
|
}
|
62
62
|
|
63
|
+
html {
|
64
|
+
color: var(--main-color);
|
65
|
+
background-color: var(--main-background-color);
|
66
|
+
}
|
67
|
+
|
63
68
|
body {
|
64
69
|
margin: 0 0;
|
65
70
|
padding: 0;
|
@@ -67,18 +72,23 @@ body {
|
|
67
72
|
/* Force the element to contain margins */
|
68
73
|
display: flow-root;
|
69
74
|
min-height: 100vh;
|
70
|
-
|
71
|
-
color: var(--main-color);
|
72
|
-
background-color: var(--main-background-color);
|
73
|
-
|
75
|
+
|
74
76
|
max-width: 48rem;
|
75
77
|
margin: 0 auto;
|
76
78
|
}
|
77
79
|
|
78
|
-
header, h1, h2, h3, h4, h5, h6, p, ul, dl, ol {
|
80
|
+
header, h1, h2, h3, h4, h5, h6, p, pre, ul, dl, ol {
|
79
81
|
margin: 1rem;
|
80
82
|
}
|
81
83
|
|
84
|
+
h1 span {
|
85
|
+
display: inline-block;
|
86
|
+
}
|
87
|
+
|
88
|
+
main > pre {
|
89
|
+
padding: 1rem 2rem;
|
90
|
+
}
|
91
|
+
|
82
92
|
header img {
|
83
93
|
max-height: 50vh;
|
84
94
|
}
|
@@ -90,19 +100,17 @@ nav {
|
|
90
100
|
}
|
91
101
|
|
92
102
|
li {
|
93
|
-
margin: 0.
|
103
|
+
margin: 0.5rem 0;
|
94
104
|
}
|
95
105
|
|
96
106
|
ul.index {
|
97
107
|
padding: 0;
|
98
|
-
padding-left: 0.5rem;
|
99
|
-
margin: 0.5rem;
|
100
|
-
margin-bottom: 1rem;
|
101
108
|
list-style: none;
|
102
109
|
}
|
103
110
|
|
104
|
-
li
|
111
|
+
li ul, li ol {
|
105
112
|
margin: 0;
|
113
|
+
margin-left: 0.5rem;
|
106
114
|
}
|
107
115
|
|
108
116
|
h1 {
|
@@ -136,38 +144,40 @@ a:hover {
|
|
136
144
|
|
137
145
|
pre {
|
138
146
|
overflow: auto;
|
139
|
-
padding: 1rem 2rem;
|
140
147
|
}
|
141
148
|
|
142
149
|
footer {
|
143
150
|
text-align: right;
|
144
|
-
font-size: 0.
|
151
|
+
font-size: 0.8rem;
|
145
152
|
|
146
153
|
margin: 1rem;
|
147
154
|
margin-top: 5rem;
|
148
155
|
}
|
149
156
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
157
|
+
details {
|
158
|
+
margin: 1rem;
|
159
|
+
border: 1px solid #aaa;
|
160
|
+
border-radius: 0.5rem;
|
161
|
+
|
162
|
+
padding: .5em .5em 0;
|
156
163
|
}
|
157
164
|
|
158
|
-
|
159
|
-
|
165
|
+
summary > * {
|
166
|
+
margin: 0;
|
167
|
+
display: inline-block;
|
160
168
|
}
|
161
169
|
|
162
|
-
|
163
|
-
|
170
|
+
summary {
|
171
|
+
font-weight: bold;
|
172
|
+
margin: -.5rem -.5rem 0;
|
173
|
+
padding: .5rem;
|
164
174
|
}
|
165
175
|
|
166
|
-
|
167
|
-
|
168
|
-
padding: 0 0.5rem;
|
176
|
+
details[open] {
|
177
|
+
/* padding: .5rem; */
|
169
178
|
}
|
170
179
|
|
171
|
-
|
172
|
-
|
180
|
+
details[open] summary {
|
181
|
+
border-bottom: 1px solid #aaa;
|
182
|
+
/* margin-bottom: .5rem; */
|
173
183
|
}
|
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.6.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-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: utopia
|