Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/docurium.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ def generate_docs(options)

end

# We tally the sigantures in the order they finished, which is
# We tally the signatures in the order they finished, which is
# arbitrary due to the concurrency, so we need to sort them once
# they've finsihed.
# they've finished.
sort_sigs!

project = {
Expand Down Expand Up @@ -435,7 +435,7 @@ def update_globals!(data, recs)
# process this type of record
case r[:type]
when :function, :callback
t = r[:type] == :function ? :functions : :callbacks
t = r[:type] == :function ? :functions : :callbacks
data[t][r[:name]] ||= {}
wanted[:functions].each do |k|
next unless r.has_key? k
Expand Down
4 changes: 2 additions & 2 deletions site/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ input.search {
background: url(../images/search_icon.png) 5px 50% no-repeat white;
}

a small {
a small {
font-size: 0.8em;
color: #aaa;
}

h2 small {
h2 small {
font-size: 0.8em;
font-weight: normal;
color: #666;
Expand Down
222 changes: 112 additions & 110 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>API Documentation</title>
<link href="shared/css/documentation.css" media="screen" rel="stylesheet" type="text/css">
<link href="shared/css/pygments.css" media="screen" rel="stylesheet" type="text/css">
<link href="css/style.css" media="screen" rel="stylesheet" type="text/css">
<script src="shared/js/jquery.js" type="text/javascript"></script>
<script src="js/json2.js" type="text/javascript"></script>
<script src="js/underscore.js" type="text/javascript"></script>
<script src="js/backbone.js" type="text/javascript"></script>
<script src="js/docurium.js" type="text/javascript"></script>
<link href="shared/css/documentation.css" media="screen" rel="stylesheet" type="text/css">
<link href="shared/css/pygments.css" media="screen" rel="stylesheet" type="text/css">
<link href="css/style.css" media="screen" rel="stylesheet" type="text/css">
<script src="shared/js/jquery.js" type="text/javascript"></script>
<script src="js/json2.js" type="text/javascript"></script>
<script src="js/underscore.js" type="text/javascript"></script>
<script src="js/backbone.js" type="text/javascript"></script>
<script src="js/docurium.js" type="text/javascript"></script>

<!-- Changelog -->
<script type="text/template" id="changelog-item-template">
<p>
<ul>
<% _.each(dels, function(elem) { %>
<li class="deletes"><%= elem %></li>
<% }) %>
</ul>
<ul>
<% _.each(dels, function(elem) { %>
<li class="deletes"><%= elem %></li>
<% }) %>
</ul>
</p>
<p>
<ul>
<% _.each(adds, function(elem) { %>
<li class="adds"><a href="#<%= elem.link %>"><%= elem.text %></a></li>
<% }) %>
</ul>
<ul>
<% _.each(adds, function(elem) { %>
<li class="adds"><a href="#<%= elem.link %>"><%= elem.text %></a></li>
<% }) %>
</ul>
</p>
</script>

Expand All @@ -35,7 +35,7 @@ <h1>Function Changelog</h1>
<% _.each(versions, function(version) { %>
<h3><%= version.title %></h3>
<div class="changelog">
<%= version.listing %>
<%= version.listing %>
</div>
<% }) %>
</script>
Expand All @@ -55,27 +55,27 @@ <h3><%= version.title %></h3>
<!-- Sidebar where the groups and types appear -->
<script type="text/template" id="type-list-template">
<li>
<li><span class="divide"><%= title %></span></li>
<% _.each(elements, function(e) { %>
<li>
<a href="#<%= e.link %>" ref="<%= e.ref %>" class="type", id="typeItem<%= e.name %>">
<%= e.name %>
</a>
</li>
<% }) %>
<li><span class="divide"><%= title %></span></li>
<% _.each(elements, function(e) { %>
<li>
<a href="#<%= e.link %>" ref="<%= e.ref %>" class="type", id="typeItem<%= e.name %>">
<%= e.name %>
</a>
</li>
<% }) %>
</li>
</script>
<script type="text/template" id="file-list-template">
<li>
<h3><a href="#">Functions</a></h3>
<ul>
<% _.each(funs, function(fun, i) { %>
<li>
<a href="#<%= fun.link %>" ref="<%= i %>" class="group" id="groupItem<%= fun.name %>">
<%= fun.name %>&nbsp;<small>(<%= fun.num %>)</small>
</a>
</li>
<% }) %>
<% _.each(funs, function(fun, i) { %>
<li>
<a href="#<%= fun.link %>" ref="<%= i %>" class="group" id="groupItem<%= fun.name %>">
<%= fun.name %>&nbsp;<small>(<%= fun.num %>)</small>
</a>
</li>
<% }) %>
</ul>
</li>
<li>
Expand All @@ -85,22 +85,22 @@ <h3><a href="#">Types</a></h3>
<li>
<h3><a href="#">Files</a></h3>
<ul class="hidden">
<% _.each(files, function(file) { %>
<li>
<a target="github" href="<%= file.url %>"><%= file.name %></a>
</li>
<% }) %>
<% _.each(files, function(file) { %>
<li>
<a target="github" href="<%= file.url %>"><%= file.name %></a>
</li>
<% }) %>
</ul>
</li>
<% if (examples.length > 0) { %>
<li>
<h3><a href="#">Examples</a></h3>
<ul>
<% _.each(examples, function(example) { %>
<li>
<a href="<%= example.path %>"><%= example.name %></a>
</li>
<% }) %>
<% _.each(examples, function(example) { %>
<li>
<a href="<%= example.path %>"><%= example.name %></a>
</li>
<% }) %>
</ul>
</li>
<% } %> <!-- if we have examples -->
Expand All @@ -109,13 +109,13 @@ <h3><a href="#">Examples</a></h3>
<!-- Listing of the details of a single function -->
<script type="text/template" id="function-args-template">
<table class="funcTable">
<% _.each(args, function(arg) { %>
<tr>
<td valign="top" nowrap="true"><%= arg.link %></td>
<td valign="top" class="var"><%= arg.name %></td>
<td class="comment"><%= arg.comment %></td>
</tr>
<% }) %>
<% _.each(args, function(arg) { %>
<tr>
<td valign="top" nowrap="true"><%= arg.link %></td>
<td valign="top" class="var"><%= arg.name %></td>
<td class="comment"><%= arg.comment %></td>
</tr>
<% }) %>
</table>
</script>
<script type="text/template" id="function-template">
Expand All @@ -126,10 +126,10 @@ <h3 class="funcDesc"><%= data.description %></h3>
<div class="returns">
<h3>returns</h3>
<table class="funcTable">
<tr>
<td valign="top"><%= returns.link %></td>
<td class="comment"><%= returns.comment %></td>
</tr>
<tr>
<td valign="top"><%= returns.link %></td>
<td class="comment"><%= returns.comment %></td>
</tr>
</table>
</div>
<div><%= data.comments %></div>
Expand All @@ -143,9 +143,9 @@ <h3>signature</h3>
<div class="signatures">
<h3>versions</h3>
<ul>
<% _.each(sigs, function(sig) { %>
<li><a href="<%= sig.url %>" class="<%= sig.klass %>"><%= sig.name %></a></li>
<% }) %>
<% _.each(sigs, function(sig) { %>
<li><a href="<%= sig.url %>" class="<%= sig.klass %>"><%= sig.name %></a></li>
<% }) %>
</ul>
</div>
<% } %> <!-- if we have version history -->
Expand All @@ -168,7 +168,7 @@ <h3>versions</h3>
<div class="also">
Also in <a href="<%= alsoGroup %>"><%= groupName %></a> group: <br/>
<% _.each(_.initial(alsoLinks), function(link) { %>
<a href="<%= link.url %>"><%= link.name %></a>,
<a href="<%= link.url %>"><%= link.name %></a>,
<% }) %>
<% var link = _.last(alsoLinks) %>
<a href="<%= link.url %>"><%= link.name %></a>.
Expand All @@ -182,11 +182,11 @@ <h1>Public API Functions</h1>
<% _.each(groups, function(group) { %>
<h2 class="funcGroup"><%= group.name %></h2>
<p class="functionList">
<% _.each(_.initial(group.funs), function(fun) { %>
<a href="<%= fun.url %>" class="<%= fun.klass %>"><%= fun.name %></a>
<% }) %> <!-- loop through all but the last function -->
<% var fun = _.last(group.funs) %>
<a href="<%= fun.url %>" class="<%= fun.klass %>"><%= fun.name %></a>
<% _.each(_.initial(group.funs), function(fun) { %>
<a href="<%= fun.url %>" class="<%= fun.klass %>"><%= fun.name %></a>
<% }) %> <!-- loop through all but the last function -->
<% var fun = _.last(group.funs) %>
<a href="<%= fun.url %>" class="<%= fun.klass %>"><%= fun.name %></a>
</p>
<% }) %> <!-- loop through the groups -->
</script>
Expand All @@ -211,8 +211,8 @@ <h3>Argument in</h3>
<% } %> <!-- if we have 'needs' -->

<div class="fileLink">
Defined in:
<a href="<%= fileLink.url %>"><%= fileLink.name %></a>
Defined in:
<a href="<%= fileLink.url %>"><%= fileLink.name %></a>
</div>
</script>

Expand All @@ -229,19 +229,20 @@ <h1 class="funcTitle"><%= type.tname %><small><%= type.type %></small></h1>
<% } %>

<table>
<% _.each(type.data.fields, function(field) { %>
<tr>
<td><code><%= field.name %></code></td>
<tr>
<% if (field.comments) { %>
<tr>
<td class="type-comment"><%= field.comments %></td>
</tr>
<% } %>
<% }) %>
<% _.each(type.data.fields, function(field) { %>
<tr>
<td><code><%= field.name %></code></td>
</tr>
<% if (field.comments) { %>
<tr>
<td class="type-comment"><%= field.comments %></td>
</tr>
<% } %>
<% }) %>
</table>
<%= uses %>
</script>

<!-- listing for a struct -->
<script type="text/template" id="struct-template">
<h1 class="funcTitle"><%= type.tname %><small><%= type.type %></small></h1>
Expand All @@ -255,17 +256,17 @@ <h1 class="funcTitle"><%= type.tname %><small><%= type.type %></small></h1>
<% } %>

<table>
<% _.each(type.data.fields, function(field) { %>
<tr>
<td><code><%= field.type %></code></td>
<td><code><%= field.name %></code></td>
<tr>
<% if (field.comments) { %>
<tr>
<td colspan="2" class="type-comment"><%= field.comments %></td>
</tr>
<% } %>
<% }) %>
<% _.each(type.data.fields, function(field) { %>
<tr>
<td><code><%= field.type %></code></td>
<td><code><%= field.name %></code></td>
<tr>
<% if (field.comments) { %>
<tr>
<td colspan="2" class="type-comment"><%= field.comments %></td>
</tr>
<% } %>
<% }) %>
</table>

<%= uses %>
Expand All @@ -275,41 +276,42 @@ <h1 class="funcTitle"><%= type.tname %><small><%= type.type %></small></h1>
<h1><%= gname %> functions</h1>
<!-- table with all the functions -->
<table class="methods">
<% _.each(functions, function(fun) { %>
<tr>
<td valign="top" nowrap="true">
<%= fun.returns %>
</td>
<td valign="top" class="methodName">
<a href="<%= fun.url %>"><%= fun.name %></a>
</td>
<td>
<% _.each(fun.args, function(arg) { %>
<%= arg.type %> <%= arg.name %><br/>
<% }) %> <!-- loop over the args of a function -->
</td>
</tr>
<% }) %> <!-- loop over the functions -->
<% _.each(functions, function(fun) { %>
<tr>
<td valign="top" nowrap="true">
<%= fun.returns %>
</td>
<td valign="top" class="methodName">
<a href="<%= fun.url %>"><%= fun.name %></a>
</td>
<td>
<% _.each(fun.args, function(arg) { %>
<%= arg.type %> <%= arg.name %><br/>
<% }) %> <!-- loop over the args of a function -->
</td>
</tr>
<% }) %> <!-- loop over the functions -->
</table>

<!-- list of the functions with the descriptions -->
<% _.each(functions, function(fun) { %>
<h2><a href="<%= fun.url %>"><%= fun.name %></a><small>(<%= fun.argline %>)</small></h2>
<div class="description">
<%= fun.description %>
<%= fun.comments %>
<%= fun.description %>
<%= fun.comments %>
</div>
<% }) %> <!-- loop over the functions -->
</script>

<script type="text/template" id="search-template">
<h1>Search Results</h1>
<table>
<% _.each(results, function(result) { %>
<tr>
<td><a href="<%= result.url %>"><%= result.name %></a></td>
<td><%= result.match %></td>
</tr>
<% }) %>
<% _.each(results, function(result) { %>
<tr>
<td><a href="<%= result.url %>"><%= result.name %></a></td>
<td><%= result.match %></td>
</tr>
<% }) %>
</table>
</script>

Expand Down
Loading