diff --git a/scripts/docs/templates/common.template.html b/scripts/docs/templates/common.template.html index b40b7d2a..5b9a307d 100644 --- a/scripts/docs/templates/common.template.html +++ b/scripts/docs/templates/common.template.html @@ -12,65 +12,65 @@ docType: "<$ doc.docType $>" --- <@ macro paramList(paramData) -@> - <@- if paramData -@>( +<@- if paramData -@>( <@- for param in paramData -@> <$ param | escape $><@ if not loop.last @>, <@ endif @> <@- endfor @>) - <@- endif @> +<@- endif @> <@- endmacro -@> <@ macro githubViewLink(doc) -@> - <$ doc.fileInfo.relativePath $> (line <$ doc.location.start.line+1 $>) +<$ doc.fileInfo.relativePath $> (line <$ doc.location.start.line+1 $>) <@- endmacro -@> <@ macro paramTable(params, isDirective) -@> - - - - - + + + + + - <@ for param in params @> - - - - - - <@ endfor @> + <@ for param in params @> + + + + + + <@ endfor @>
<@ if isDirective @>Attr<@ else @>Param<@ endif @>TypeDetails
<@ if isDirective @>Attr<@ else @>Param<@ endif @>TypeDetails
- <$ param.name $> - <@ if param.alias @>| <$ param.alias $><@ endif @> - <@ if param.type.optional @>
(optional)
<@ endif @> -
- <$ typeList(param.typeList) $> - - <$ param.description | marked $> - <@ if param.default @>

(default: <$ param.default $>)

<@ endif @> -
+ <$ param.name $> + <@ if param.alias @>| <$ param.alias $><@ endif @> + <@ if param.type.optional @>
(optional)
<@ endif @> +
+ <$ typeList(param.typeList) $> + + <$ param.description | marked $> + <@ if param.default @>

(default: <$ param.default $>)

<@ endif @> +
<@- endmacro -@> <@- macro functionSyntax(fn) @> - <@- set sep = joiner(', ') -@> - <$ fn.name $>(<@- for param in fn.params @><$ sep() $> +<@- set sep = joiner(', ') -@> +<$ fn.name $>(<@- for param in fn.params @><$ sep() $> <@- if param.type.optional @>[<@ endif -@> <$ param.name $> <@- if param.type.optional @>]<@ endif -@> <@ endfor @>) - <@ if fn.alias @>(alias: <$ fn.alias $>)<@ endif @> +<@ if fn.alias @>(alias: <$ fn.alias $>)<@ endif @> <@ endmacro -@> <@ macro typeList(types) -@> - <@ set separator = joiner("|") @> - <@ for type in types @><$ separator() $><$ type | code $><@ endfor @> +<@ set separator = joiner("|") @> +<@ for type in types @><$ separator() $><$ type | code $><@ endfor @> <@- endmacro -@> <@- macro typeInfo(fn) -@> - <$ typeList(fn.typeList) $> <$ fn.description $> +<$ typeList(fn.typeList) $> <$ fn.description $> <@- endmacro -@> <@ block body @> @@ -82,30 +82,30 @@ docType: "<$ doc.docType $>"

-<@ if doc.docType == "directive" @> -<$ doc.name | dashCase $> -<@ else @> -<$ doc.name $> -<@ endif @> + <@ if doc.docType == "directive" @> + <$ doc.name | dashCase $> + <@ else @> + <$ doc.name $> + <@ endif @> -<@ if doc.parent @> -
- -Child of <$ doc.parent $> - -<@ endif @> + <@ if doc.parent @> +
+ + Child of <$ doc.parent $> + + <@ endif @> -<@ if doc.delegate @> -
- -Delegate: <$ doc.delegate $> - -<@ endif @> + <@ if doc.delegate @> +
+ + Delegate: <$ doc.delegate $> + + <@ endif @>

-Improve this doc + Improve this doc <@ if doc.codepen @> @@ -119,10 +119,23 @@ Improve this doc <@ for prop in doc.decorators[0].argumentInfo @>
$ cordova plugin add <$ prop.plugin $>

Repo: - -<$ prop.repo $> - + + <$ prop.repo $> +

+ +<@ if prop.platforms @> + +

Supported platforms

+<@ block platforms @> + +<@ endblock @> +<@ endif @> + <@ endfor @> <@ endif -@> @@ -149,42 +162,42 @@ Improve this doc <@ if doc.properties @>

Attributes:

- - - + + + -<@ set hasTypes = false @> -<@ for prop in doc.properties @> -<@ if prop.type @> -<@ set hasTypes = true @> -<@ endif @> -<@ endfor @> -<@ if hasTypes @> - -<@ endif @> + <@ set hasTypes = false @> + <@ for prop in doc.properties @> + <@ if prop.type @> + <@ set hasTypes = true @> + <@ endif @> + <@ endfor @> + <@ if hasTypes @> + + <@ endif @> - - - - -<@ for prop in doc.properties @> - - + + + + + <@ for prop in doc.properties @> + + -<@ if hasTypes @> - -<@ endif @> + <@ if hasTypes @> + + <@ endif @> - - -<@ endfor @> - + + + <@ endfor @> +
Attribute
AttributeTypeTypeDescription
-<$ prop.name $> -Description
+ <$ prop.name $> + -<$ prop.type.name $> - + <$ prop.type.name $> + -<$ prop.description $> -
+ <$ prop.description $> +
<@ endif @> @@ -194,6 +207,19 @@ Improve this doc

<$ functionSyntax(method) $>

+<@- if method.decorators @> +<@ for prop in method.decorators[0].argumentInfo @> +<@ if prop.platforms @> +

Platforms:

+ +<@ endif @> +<@ endfor @> +<@ endif -@> + <$ method.description $> <@ if method.params @> @@ -202,14 +228,14 @@ Improve this doc <@ if method.this @>

Method's `this` -<$ method.this $> + <$ method.this $>

<@ endif @> <@ if method.returns @>
- -Returns: <$ typeInfo(method.returns) $> + + Returns: <$ typeInfo(method.returns) $>
<@ endif @> <@ endif @> @@ -225,7 +251,7 @@ Improve this doc

-<$ functionSyntax(method) $> + <$ functionSyntax(method) $>

<$ method.description $> @@ -236,14 +262,14 @@ Improve this doc <@ if method.this @>

Method's `this` -<$ method.this $> + <$ method.this $>

<@ endif @> <@ if method.returns @>
- -Returns: <$ typeInfo(method.returns) $> + + Returns: <$ typeInfo(method.returns) $>
<@ endif @>