-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
356 lines (339 loc) · 16.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Start a new Sphinx documentation</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
label {
text-align: right;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<ul class="breadcrumb">
<li><a href="https://diecutter.readthedocs.org">Diecutter</a></li>
<li><a href="https://diecutter.alwaysdata.net">Template index</a></li>
<li class="active">sphinx-quickstart</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-7 col-md-7 col-lg-7">
<h1>Start a Sphinx documentation</h1>
<p class="lead">Configure, generate and download the layout of a new Sphinx documentation.</p>
<div class="panel panel-default">
<div class="panel-body">
<form id="sphinx_form" action="" method="POST" class="form-horizontal" role="form">
<fieldset>
<legend>Project</legend>
<div class="form-group">
<label for="sphinx_project_name" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Project name</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_project_name" name="project_name" type="text" value="" />
</div>
</div>
<div class="form-group">
<label for="sphinx_author" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Author</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_author" name="author" type="text" value="" placeholder="Author" />
<span class="help-block">Copyright holder.</span>
</div>
</div>
<div class="form-group">
<label for="sphinx_copyright_string" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Copyright</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_copyright" name="copyright" type="text" value="" placeholder="YYYY-YYYY, Author" />
</div>
</div>
</fieldset>
<fieldset>
<legend>Meta information files</legend>
<p>Paths to standard project information files, relative to the root of the project's documentation.</p>
<div class="form-group">
<label for="sphinx_readme_file" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Path to README</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_readme_file" name="readme_file" type="text" value="../README" />
</div>
</div>
<div class="form-group">
<label for="sphinx_license_file" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Path to LICENSE</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_license_file" name="license_file" type="text" value="../LICENSE" />
</div>
</div>
<div class="form-group">
<label for="sphinx_authors_file" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Path to AUTHORS</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_authors_file" name="authors_file" type="text" value="../AUTHORS" />
</div>
</div>
<div class="form-group">
<label for="sphinx_changelog_file" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Path to CHANGELOG</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_changelog_file" name="changelog_file" type="text" value="../CHANGELOG" />
</div>
</div>
<div class="form-group">
<label for="sphinx_install_file" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Path to INSTALL</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_install_file" name="install_file" type="text" value="../INSTALL" />
</div>
</div>
<div class="form-group">
<label for="sphinx_version_file" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Path to VERSION</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_version_file" name="version_file" type="text" value="../VERSION" />
</div>
</div>
<div class="form-group">
<label for="sphinx_contributing_file" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Path to CONTRIBUTING</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_contributing_file" name="contributing_file" type="text" value="../CONTRIBUTING" />
</div>
</div>
</fieldset>
<fieldset>
<legend>Demo</legend>
<p>
Do you provide a demonstration as part of development sources?
</p>
<div class="form-group">
<label for="sphinx_with_demo" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">With demo?</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input id="sphinx_with_demo" name="with_demo" type="checkbox" value="1" checked />
<span class="help-block">Options below will have no effect if you uncheck this.</span>
</div>
</div>
<div class="form-group">
<label for="sphinx_demo_readme" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Path to demo's README</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_demo_readme" name="demo_readme" type="text" value="../demo/README" />
<span class="help-block">Path to demo's README file, relative to the root of project's documentation.</span>
</div>
</div>
</fieldset>
<fieldset>
<legend>Build options</legend>
<p>The following options have effect on the generated "Makefile" or "make.bat" files.</p>
<div class="form-group">
<label for="sphinx_sphinx_build" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Build command</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_sphinx_build" name="sphinx_build" type="text" value="sphinx-build" />
<span class="help-block">Build command, particularly useful if "sphinx-build" is not in path.</span>
</div>
</div>
<div class="form-group">
<label for="sphinx_sphinx_build_dir" class="col-xs-4 col-sm-4 col-md-3 col-lg-3">Build directory</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-9">
<input class="form-control" id="sphinx_sphinx_build_dir" name="sphinx_build_dir" type="text" value="_build" />
<span class="help-block">Output directory for Sphinx builds, relative to the root of project's documentation.</span>
</div>
</div>
</fieldset>
<hr />
<div>
<button type="submit" id="sphinx_submit" class="btn btn-primary btn-lg center-block">
<span class="glyphicon glyphicon-circle-arrow-down"> </span>
Generate Sphinx documentation
</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5">
<div class="well">
<h2>About this template</h2>
<p>
As <em>diecutter</em>'s authors, we are glad to share this page
with you.
<p>
<p>
The
<a href="https://github.com/diecutter/sphinx-quickstart/tree/master/template/">template</a>
should make it easy to scaffold of a new Sphinx documentation.
It is more than an alternative to Sphinx's builtin <code>sphinx-quickstart</code> command:
as <code>sphinx-quickstart</code>, it generates configuration and directory layout,
but it also helps you start with documentation content.
About content, we are trying to promote best practices from
<a href="http://writethedocs.org">Write The Docs</a> community.
</p>
<p>
The
<a href="https://github.com/diecutter/sphinx-quickstart/tree/master/index.html">user interface</a>
is just an HTML page.
</p>
<p>
Feel free to give feedback, report issues or request features in the
<a href="https://github.com/diecutter/sphinx-quickstart/issues">bugtracker</a>.
</p>
</div>
</div>
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5">
<div class="well">
<h2>About <em>diecutter</em></h2>
<p>
<em>diecutter</em> is a server that handles templates.
When you post data to a template resource, you retrieve the generated
content.
Templates can be either single files (returns single files) or directories
(returns archive). Learn more in
<a href="https://diecutter.readthedocs.org"><em>diecutter</em>'s documentation</a>.
</p>
<p>
<em>diecutter</em> is open-source template rendering software.
</p>
<p>
<em>diecutter.io</em> is the original online provider for diecutter.
</p>
<h3>Resources</h3>
<ul>
<li><a href="http://diecutter.io">SAAS platform</a></li>
<li><a href="http://diecutter.readthedocs.org">Documentation</a></li>
<li><a href="http://pypi.python.org/pypi/diecutter">PyPI page</a></li>
<li><a href="https://github.com/diecutter/diecutter">Code repository</a></li>
<li><a href="https://github.com/diecutter/diecutter/issues">Bugtracker</a></li>
<li><a href="https://travis-ci.org/diecutter/diecutter">Continuous integration</a></li>
</ul>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<form role="form" class="form-horizontal well">
<h2>How does it work?</h2>
<p>
When you submit the form above, you perform a <code>POST</code>
request to <em>diecutter</em>'s service.
</p>
<div class="form-group has-feedback">
<label for="diecutter_service" class="col-xs-3 col-sm-3 col-md-2 col-lg-2">Service</label>
<div class="col-xs-7 col-sm-7 col-md-8 col-lg-8">
<input class="form-control" id="diecutter_service" name="service" type="text" placeholder="http://" value="https://diecutter.alwaysdata.net/github" class="form-control" />
<span class="glyphicon glyphicon-question-sign form-control-feedback"></span>
<span class="help-block">
<em>diecutter</em>'s API root endpoint.
</span>
</div>
<button id="diecutter_service_test" class="btn col-xs-2 col-sm-2 col-md-2 col-lg-2"><span class="glyphicon glyphicon-refresh"></span> Check</button>
</div>
<div class="form-group">
<label for="diecutter_resource" class="col-xs-3 col-sm-3 col-md-2 col-lg-2">Resource</label>
<div class="col-xs-9 col-sm-9 col-md-10 col-lg-10">
<input id="diecutter_resource" name="resource" type="text" value="/diecutter/sphinx-quickstart/master/template/docs" class="form-control" />
<span class="help-block">
Template's path, relative to diecutter's service URL.
For <em>/github</em> endpoint, it is <code>/<owner>/<project>/<version>/<path></code>
</span>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- Scripts. -->
<script src="//code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script type="text/javascript">
(function ( $ ) {
var diecutter_form = null;
var data_form_prefix = 'sphinx_';
var data_form = null;
/* Return URL for resource.
*
* Path is built with the following values:
*
* - value of the input with id="diecutter_service"
* - value of the input with id="diecutter_resource"
*
*/
function diecutter_url( path ) {
if( path === undefined ) {
path = $('#diecutter_resource').val();
if( path !== '' && path[0] != '/') {
path = '/' + path;
$('#diecutter_resource').val(path);
}
}
var service = $('#diecutter_service').val();
if ( service[service.length - 1] == '/' ) {
service = service.substr(0, service.length - 1);
}
url = service + path;
return url;
}
/* Set client form's "action" attribute to event's subject value. */
function update_form_action( event ) {
url = diecutter_url();
data_form.attr('action', url);
}
/* GET to diecutter service root. */
function get_diecutter_service_status( event ) {
// Disable button.
$( '#diecutter_service_test' ).attr('disabled', 'disabled');
// Show 'in progress' status.
$( '#diecutter_service' ).parent().removeClass('has-success has-error');
$( '#diecutter_service' ).parent().addClass('has-warning');
$( '#diecutter_service ~ span' ).first().removeClass('glyphicon-question-sign');
$( '#diecutter_service ~ span' ).first().addClass('glyphicon-refresh');
// AJAX call.
url = diecutter_url( '/' );
var jqxhr = $.ajax( url, {
type: 'GET',
dataType: 'json',
crossDomain: true,
processData: false
}).fail( function ( jqXHR, textStatus, errorThrown ) {
$( '#diecutter_service' ).parent()
.removeClass( 'has-warning' )
.addClass( 'has-error' );
$( '#diecutter_service ~ span' ).first()
.removeClass( 'glyphicon-refresh' )
.addClass( 'glyphicon-remove' );
}).done( function ( data, textStatus, jqXHR ) {
$( '#diecutter_service' ).parent()
.removeClass( 'has-warning' )
.addClass( 'has-success' );
$( '#diecutter_service ~ span' ).first()
.removeClass( 'glyphicon-refresh' )
.addClass( 'glyphicon-ok' );
}).always( function ( jqXHR, textStatus ) {
$( '#diecutter_service_test' ).removeAttr('disabled');
});
return false;
}
/* POST to diecutter resource. */
function post_diecutter( event ) {
data_form.submit();
}
$(document).ready(function() {
$('.collapse').collapse()
diecutter_form = $('#diecutter_form');
data_form = $('#' + data_form_prefix + 'form');
update_form_action();
get_diecutter_service_status();
// Event listeners.
$( '#diecutter_service' )
.on( 'change', get_diecutter_service_status );
$( '#diecutter_service_test' )
.on( 'click', get_diecutter_service_status );
$( '#diecutter_resource_get' )
.on( 'click', get_diecutter_resource );
$( '#diecutter_service' ).on( 'change', update_form_action );
$( '#diecutter_resource' ).on( 'change', update_form_action );
$( '#sphinx_submit' ).on( 'click', post_diecutter );
});
})( jQuery );
</script>
</body>
</html>