mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
have v2 doc template match v1 doc format
This commit is contained in:
50
scripts/docs/templates/common.template.html
vendored
50
scripts/docs/templates/common.template.html
vendored
@ -1,3 +1,11 @@
|
|||||||
|
---
|
||||||
|
<@ include "lib/yaml.template.html" @>
|
||||||
|
title: "<@ if doc.docType == "directive" @><$ doc.name | dashCase $><@ else @><$ doc.name $><@ endif @>"
|
||||||
|
header_sub_title: "<$ doc.docType $> in module <$ doc.module $>"
|
||||||
|
doc: "<$ doc.name $>"
|
||||||
|
docType: "<$ doc.docType $>"
|
||||||
|
---
|
||||||
|
|
||||||
<@ macro paramList(paramData) -@>
|
<@ macro paramList(paramData) -@>
|
||||||
<@- if paramData -@><span class="params">(
|
<@- if paramData -@><span class="params">(
|
||||||
<@- for param in paramData -@>
|
<@- for param in paramData -@>
|
||||||
@ -10,6 +18,47 @@
|
|||||||
<@- endmacro -@>
|
<@- endmacro -@>
|
||||||
|
|
||||||
<@ block body @>
|
<@ block body @>
|
||||||
|
<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 @>
|
||||||
<h1 class="class export"><$ doc.name $> <span class="type"><$ doc.docType $></span></h1>
|
<h1 class="class export"><$ doc.name $> <span class="type"><$ doc.docType $></span></h1>
|
||||||
<p class="module">exported from {@link <$ doc.moduleDoc.id $> <$doc.moduleDoc.id $> }<br/>
|
<p class="module">exported from {@link <$ doc.moduleDoc.id $> <$doc.moduleDoc.id $> }<br/>
|
||||||
defined in <$ githubViewLink(doc) $>
|
defined in <$ githubViewLink(doc) $>
|
||||||
@ -49,3 +98,4 @@ defined in <$ githubViewLink(doc) $>
|
|||||||
<@- endif -@>
|
<@- endif -@>
|
||||||
|
|
||||||
<@ endblock @>
|
<@ endblock @>
|
||||||
|
<@ endblock @>
|
||||||
|
Reference in New Issue
Block a user