documentation/share/html/section.hbs
2015-06-08 12:25:24 -04:00

123 lines
2.8 KiB
Handlebars

<section id='{{permalink}}'class='mt2 mb2 py1 px2 keyline-top'>
{{#if context.github}}
<div class='right py2'>
{{#if augments}}
<span class='font-smaller'>
Extends
{{#augments}}
{{{autolink name}}}
{{/augments}}
</span>
{{/if}}
<a class='fade font-smaller' href='{{{context.github}}}'><code>{{{context.path}}}</code></a>
</div>
{{/if}}
<h3 class='regular'>
<a class='black' href='#{{permalink}}'>
<code>
{{name}}<span class='gray'>{{{format_params}}}</span>
</code>
</a>
</h3>
{{{md description}}}
{{#if params}}
<p>
<table class='table-light overflow-hidden bg-cloudy-light'>
<thead>
<th class='col-3'>parameter</th>
<th class='col-3'>type</th>
<th class='col-6'>description</th>
</thead>
{{#params}}
<tr>
<td>{{name}}</td>
<td>
{{{format_type type}}}
{{#default}}
(default <code>{{.}}</code>)
{{/default}}
</td>
<td>{{{md description}}}</td>
</tr>
{{/params}}
</table>
</p>
{{/if}}
{{#if properties}}
<p>
<table class='table-light overflow-hidden bg-cloudy-light'>
<thead>
<th class='col-3'>property</th>
<th class='col-3'>type</th>
<th class='col-6'>description</th>
</thead>
{{#properties}}
<tr>
<td>{{name}}</td>
<td>
{{{format_type type}}}
{{#default}}
(default <code>{{.}}</code>)
{{/default}}
</td>
<td>{{{md description}}}</td>
</tr>
{{/properties}}
</table>
</p>
{{/if}}
{{#if returns}}
{{#returns}}
<h4>Returns</h4>
<code>{{{format_type type}}}</code>
{{#if description}}:{{/if}}
<span class='force-inline'>
{{{md description}}}
</span>
{{/returns}}
{{/if}}
{{#if throws}}
<h4>Throws</h4>
<table class='table-light overflow-hidden bg-cloudy-light'>
<thead>
<th class='col-3'>exception</th>
<th class='col-9'>description</th>
</thead>
{{#throws}}
<tr>
<td>{{{format_type type}}}</td>
<td>
{{{md description}}}
</td>
</tr>
{{/throws}}
</table>
{{/if}}
{{#if examples}}
<h4>Examples</h4>
{{#each examples ~}}<pre>{{{.}}}</pre>{{/each}}
{{/if}}
{{#if members.static}}
{{#each members.static}}
<div class='section-indent'>
{{> section}}
</div>
{{/each}}
{{/if}}
{{#if members.instance}}
{{#each members.instance}}
<div class='section-indent'>
{{> section}}
</div>
{{/each}}
{{/if}}
</section>