mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
generate api index page
This commit is contained in:
79
scripts/docs/templates/api/api.template.html
vendored
Normal file
79
scripts/docs/templates/api/api.template.html
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
---
|
||||
<@ include "lib/yaml.template.html" @>
|
||||
title: "<@ if doc.docType == "directive" @><$ doc.name | dashCase $><@ else @><$ doc.name $><@ endif @>"
|
||||
header_sub_title: "<$ doc.docType | capital $> in module <$ doc.module $>"
|
||||
doc: "<$ doc.name $>"
|
||||
docType: "<$ doc.docType $>"
|
||||
---
|
||||
|
||||
<div class="improve-docs">
|
||||
<a href='http://github.com/driftyco/ionic/tree/master/<$ doc.relativePath $>#L<$ doc.startingLine $>'>
|
||||
View Source
|
||||
</a>
|
||||
|
||||
<a href='http://github.com/driftyco/ionic/edit/master/<$ doc.relativePath $>#L<$ doc.startingLine $>'>
|
||||
Improve this doc
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<@ block content @>
|
||||
|
||||
<@ block header @>
|
||||
<h1 class="api-title">
|
||||
<@ if doc.docType == "directive" @>
|
||||
<$ doc.name | dashCase $>
|
||||
<@ else @>
|
||||
<$ doc.name $>
|
||||
<@ endif @>
|
||||
<@ if doc.parent @>
|
||||
<br />
|
||||
<small>
|
||||
Child of <$ doc.parent $>
|
||||
</small>
|
||||
<@ endif @>
|
||||
<@ if doc.delegate @>
|
||||
<br/>
|
||||
<small>
|
||||
Delegate: <$ doc.delegate $>
|
||||
</small>
|
||||
<@ endif @>
|
||||
</h1>
|
||||
|
||||
<@ if doc.codepen @>
|
||||
{% include codepen.html id="<$ doc.codepen $>" %}
|
||||
<@ endif @>
|
||||
<@ endblock @>
|
||||
|
||||
<@ block description @>
|
||||
<$ doc.description $>
|
||||
<@ endblock @>
|
||||
|
||||
<@ if doc.deprecated @>
|
||||
<fieldset class="deprecated">
|
||||
<legend>Deprecated API</legend>
|
||||
<$ doc.deprecated| marked $>
|
||||
</fieldset>
|
||||
<@ endif @>
|
||||
|
||||
<@ block dependencies @>
|
||||
<@- if doc.requires @>
|
||||
<h2 id="dependencies">Dependencies</h2>
|
||||
<ul>
|
||||
<@ for require in doc.requires @><li><$ require | link $></li><@ endfor @>
|
||||
</ul>
|
||||
<@ endif -@>
|
||||
<@ endblock @>
|
||||
|
||||
<@ block additional @>
|
||||
<@ endblock @>
|
||||
|
||||
<@ block examples @>
|
||||
<@- if doc.examples @>
|
||||
<h2 id="example">Example</h2>
|
||||
<@- for example in doc.examples -@>
|
||||
<$ example | marked $>
|
||||
<@- endfor -@>
|
||||
<@ endif -@>
|
||||
<@ endblock @>
|
||||
|
||||
<@ endblock @>
|
||||
Reference in New Issue
Block a user