Documentation. Copious.

This commit is contained in:
Stephen Dolan committed 2012-09-18 17:51:53 +01:00
1 parent a4eea165bb
commit cf134909fd
25 files changed
+10269

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
{% include "shared/head" %}
<body id="{{slug}}">
{% include "shared/header" %}
<div class="container">
<div class="row">
<h1>{{headline}}</h1>
{% for item in body %}
{% if item.text %}
{{ item.text | markdownify }}
{% endif %}
{% if item.command %}
{% capture resultID %}{{ "result" | unique}}{% endcapture %}
<div class="tutorial-example">
<div class="accordion-heading">
<pre>{{item.command}}</pre>
<a data-toggle="collapse" href="#{{resultID}}">Show result</a>
</div>
<div id="{{resultID}}" class="accordion-body collapse"><pre>{{item.result}}</pre></div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% include "shared/footer" %}
</body>
</html>
+38
View File
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
{% include "shared/head" %}
<body id="{{slug}}">
{% include "shared/header" %}
<div class="container">
<div class="row">
<div class="hero-unit">
<img src="/jq.png" style="width: 400px; height: 220px; float: left; margin-right: 60px">
<div id="blurb">
{{blurb | markdownify}}
<div class="btn-group" style="float:right">
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#">
Download jq-{{jq_version}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="/download/linux/x68_64/jq">Linux (x86_64)</a></li>
<li><a href="/download/osx/64/jq">OS X (64-bit)</a></li>
<li><a href="/download">Other platforms and source</a></li>
</ul>
</div>
</div>
<div style="clear:both;"></div>
</div>
</div>
<div class="row">
{{body | markdownify}}
</div>
</div>
{% include "shared/footer" %}
</body>
</html>
+109
View File
@@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
{% include "shared/head" %}
<body id="{{slug}}" data-spy="scroll" data-target="#navcolumn" data-offset="100">
{% include "shared/header" %}
<div class="container">
<div class="row">
<div class="span3" id="navcolumn">
<div class="affix">
<h4>Contents</h4>
<ul class="nav nav-pills nav-stacked">
{% for section in sections %}
<li {% if forloop.first %} class="active" {% endif %}>
<a href="#{{section.title | sanitize}}">{{section.title}}</a>
</li>
{% endfor %}
</ul>
<form class="form-search">
<script type="text/javascript">
var section_map = {
{% for section in sections %}
{% for entry in section.entries %}
{{entry.title | json}} : {{entry.title | sanitize | json}},
{% endfor %}
{{section.title | json}} : {{section.title | sanitize | json}}
{% unless forloop.last %},{% endunless %}
{% endfor %}
};
var section_names = $.map(section_map, function(v,k){return k});
$(function(){
$('#searchbox').typeahead({source: section_names})
$('#searchbox').change(function() {
if ($(this).val() in section_map) {
location.hash = '#' + section_map[$(this).val()];
}
});
});
</script>
<input type="text"
class="input-medium search-query"
placeholder="Search"
autocomplete="off"
id="searchbox">
</form>
</div>
</div>
<div class="span9">
<h1>{{headline}}</h1>
{% for section in sections %}
<section id="{{section.title | sanitize}}">
<h2>{{section.title}}</h2>
{{section.body | markdownify}}
{% for entry in section.entries %}
<section id="{{entry.title | sanitize}}">
<h3>
{{entry.title | markdownify}}
{% if entry.subtitle %}<small>{{entry.subtitle}}</small>{% endif %}
</h3>
{{entry.body | markdownify}}
{% if entry.examples %}
<div>
{% capture exampleID %}{{ "" | unique }}{% endcapture %}
<a data-toggle="collapse" href="#example{{exampleID}}">
<i class="icon-chevron-right"></i>
{% if entry.examples[1] %}Examples{%else%}Example{%endif%}
</a>
<div id="example{{exampleID}}" class="collapse">
{% for example in entry.examples %}
<table class="manual-example">
<tr><th></th><td class="jqprogram">jq '{{example.program}}'</td></tr>
<tr><th>Input</th><td>{{example.input}}</td></tr>
{% unless example.output[0] %}
<tr>
<th>Output</th>
<td><i>none</i></td>
</tr>
{% endunless %}
{% for output in example.output %}
<tr>
{% if forloop.index == 1 %}
<th>Output</th>
{% else %}
<th></th>
{% endif %}
<td>{{output}}</td>
</tr>
{% endfor %}
</table>
{% endfor %}
</div>
</div>
{% endif %}
</section>
{% endfor %}
</section>
{% endfor %}
</div>
</div>
</div>
{% include "shared/footer" %}
</body>
</html>
+5
View File
@@ -0,0 +1,5 @@
<footer>
<div class="container">
{{ footer | markdownify }}
</div>
</footer>
+12
View File
@@ -0,0 +1,12 @@
<head>
<meta charset=UTF-8>
<title>{{headline}} | jq</title>
<link rel="stylesheet" href="/bootstrap/css/bootstrap.css" type="text/css">
<link rel="stylesheet" href="/css/base.css" type="text/css">
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="/bootstrap/js/bootstrap.js"></script>
</head>
+24
View File
@@ -0,0 +1,24 @@
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="/">jq</a>
<div class="nav-collapse collapse">
<ul class="nav">
{% for item in navigation %}
<li {% if item.permalink == permalink %} class="active" {% endif %}>
<a href="{{item.permalink}}">{{item.name}}</a>
</li>
{% endfor %}
<li><a href="https://github.com/stedolan/jq/issues">Issues</a></li>
<li><a href="https://github.com/stedolan/jq">Source</a></li>
</ul>
</div>
</div>
</div>
</div>