mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs: simplify templates more
This commit is contained in:
14
docs/templates/api/api.template.html
vendored
14
docs/templates/api/api.template.html
vendored
@@ -1,3 +1,17 @@
|
||||
---
|
||||
<@ 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="pull-right">
|
||||
<a href='http://github.com/driftyco/ionic/edit/master/<$ doc.relativePath $>#L<$ doc.startingLine $>' class='improve-docs'>
|
||||
Improve this doc
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<@ extends "base.template.html" @>
|
||||
|
||||
<@ block content @>
|
||||
|
||||
12
docs/templates/api/input.template.html
vendored
12
docs/templates/api/input.template.html
vendored
@@ -1,12 +0,0 @@
|
||||
<@ include "lib/macros.html" -@>
|
||||
<@ extends "api/directive.template.html" @>
|
||||
|
||||
<@ block usage @>
|
||||
<h2>Usage</h2>
|
||||
<@ code @>
|
||||
<input type="<$ doc.inputType $>"
|
||||
<@- for param in doc.params @>
|
||||
<$ directiveParam(param.alias or param.name, param.type, '="', '"') $>
|
||||
<@- endfor @>>
|
||||
<@ endcode @>
|
||||
<@ endblock @>
|
||||
70
docs/templates/api/module.template.html
vendored
70
docs/templates/api/module.template.html
vendored
@@ -1,70 +0,0 @@
|
||||
<@ extends "base.template.html" @>
|
||||
|
||||
<@ block content @>
|
||||
<h1>
|
||||
<@ if doc.title @><$ doc.title | marked $><@ else @><$ doc.name | code $><@ endif @>
|
||||
</h1>
|
||||
|
||||
<$ doc.description | marked $>
|
||||
|
||||
<@ if doc.name != 'ng' and doc.name != 'auto' @>
|
||||
<h2>Installation</h2>
|
||||
|
||||
<p>First include <$ doc.packageFile | code $> in your HTML:</p>
|
||||
|
||||
<@ code @>
|
||||
<script src="angular.js">
|
||||
<script src="<$ doc.packageFile $>">
|
||||
<@ endcode @>
|
||||
|
||||
<p>You can download this file from the following places:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a><br>
|
||||
e.g. <$ ("//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/" + doc.packageFile) | code $>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://bower.io">Bower</a><br>
|
||||
e.g. <@ code @>bower install <$ doc.packageName $>@X.Y.Z<@ endcode @>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://code.angularjs.org/">code.angularjs.org</a><br>
|
||||
e.g. <@ code @>"//code.angularjs.org/X.Y.Z/<$ doc.packageFile $>"<@ endcode @>
|
||||
</li>
|
||||
</ul>
|
||||
<p>where X.Y.Z is the AngularJS version you are running.</p>
|
||||
<p>Then load the module in your application by adding it as a dependent module:</p>
|
||||
<@ code @>
|
||||
angular.module('app', ['<$ doc.name $>']);
|
||||
<@ endcode @>
|
||||
|
||||
<p>With that you're ready to get started!</p>
|
||||
<@ endif @>
|
||||
|
||||
<div class="component-breakdown">
|
||||
<h2>Module Components</h2>
|
||||
<@ for componentGroup in doc.componentGroups @>
|
||||
<div>
|
||||
<h3 class="component-heading" id="<$ componentGroup.groupType | dashCase $>"><$ componentGroup.groupType | title $></h3>
|
||||
<table class="definition-table">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<@ for component in componentGroup.components @>
|
||||
<tr>
|
||||
<td><$ component.id | link(component.name, component) $></td>
|
||||
<td><$ component.description | firstParagraph | marked $></td>
|
||||
</tr>
|
||||
<@ endfor @>
|
||||
</table>
|
||||
</div>
|
||||
<@ endfor @>
|
||||
</div>
|
||||
|
||||
<@ if doc.usage @>
|
||||
<h2>Usage</h2>
|
||||
<$ doc.usage | marked $>
|
||||
<@ endif @>
|
||||
|
||||
<@ endblock @>
|
||||
16
docs/templates/base.template.html
vendored
16
docs/templates/base.template.html
vendored
@@ -1,16 +0,0 @@
|
||||
---
|
||||
<@ 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="pull-right">
|
||||
<a href='http://github.com/driftyco/ionic/edit/master/<$ doc.relativePath $>#L<$ doc.startingLine $>' class='improve-docs'>
|
||||
Improve this doc
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<@ block content @>
|
||||
<@ endblock @>
|
||||
1
docs/templates/lib/yaml.template.html
vendored
1
docs/templates/lib/yaml.template.html
vendored
@@ -2,3 +2,4 @@ layout: docs_0.9.0
|
||||
active: javascript
|
||||
version: "<$ version.current.name $>"
|
||||
versionHref: "<$ version.current.href $>"
|
||||
path: "<$ doc.path $>"
|
||||
|
||||
5
docs/templates/overview.template.html
vendored
5
docs/templates/overview.template.html
vendored
@@ -1,5 +0,0 @@
|
||||
<@ extends "base.template.html" @>
|
||||
|
||||
<@ block content @>
|
||||
<$ doc.description $>
|
||||
<@ endblock @>
|
||||
9
docs/templates/pages-data.template.html
vendored
9
docs/templates/pages-data.template.html
vendored
@@ -160,10 +160,11 @@
|
||||
Version:
|
||||
<select style="width: 100px"
|
||||
onchange="window.location.href=this.options[this.selectedIndex].value">
|
||||
<@ for version in version.list @>
|
||||
<option value="<$ version.href $>"
|
||||
{% if page.version == "<$ version.name $>" %}selected{% endif %}>
|
||||
<$ version.name $>
|
||||
<@ for ver in version.list @>
|
||||
<option
|
||||
value="<$ ver.href $>/{% if page.path %}{{page.path}}{% endif %}"
|
||||
{% if page.version == "<$ ver.name $>" %}selected{% endif %}>
|
||||
<$ ver.name $>
|
||||
</option>
|
||||
<@ endfor @>
|
||||
</select>
|
||||
|
||||
1
docs/templates/tutorial.template.html
vendored
1
docs/templates/tutorial.template.html
vendored
@@ -1 +0,0 @@
|
||||
<@ include 'overview.template.html' @>
|
||||
@@ -44,7 +44,9 @@ gulp.task('docs', function(done) {
|
||||
return process.exit(1);
|
||||
}
|
||||
process.env.DOC_VERSION = docVersion;
|
||||
dgeni('docs/docs.config.js').generateDocs().then(done);
|
||||
return dgeni('docs/docs.config.js').generateDocs().then(function() {
|
||||
gutil.log('Docs for', gutil.colors.cyan(docVersion), 'generated!');
|
||||
});
|
||||
});
|
||||
|
||||
var IS_WATCH = false;
|
||||
|
||||
Reference in New Issue
Block a user