diff --git a/docs/docs.config.js b/docs/docs.config.js index 06b954db4e..ebe6a01ee3 100644 --- a/docs/docs.config.js +++ b/docs/docs.config.js @@ -45,8 +45,7 @@ module.exports = function(config) { require('./inline-tag-defs/link') ]); - config.append('processing.tagDefinitions', require('./tag-defs/codepen')); - config.append('processing.tagDefinitions', require('./tag-defs/parent')); + config.append('processing.tagDefinitions', require('./tag-defs')); //Don't conflict with the jekyll tags config.set('rendering.nunjucks.config.tags', { diff --git a/docs/tag-defs/codepen.js b/docs/tag-defs/codepen.js deleted file mode 100644 index 3ff77c359c..0000000000 --- a/docs/tag-defs/codepen.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = [{ - name: 'codepen' -}]; diff --git a/docs/tag-defs/index.js b/docs/tag-defs/index.js new file mode 100644 index 0000000000..d555484bee --- /dev/null +++ b/docs/tag-defs/index.js @@ -0,0 +1,23 @@ +module.exports = [ + { + name: 'controller', + transformFn: function(doc, tag) { + return { + path: '/docs/angularjs/api/ionic/controller/' + tag.description, + name: tag.description + }; + } + }, + { + name: 'parent', + transformFn: function(doc, tag) { + return { + path: '/docs/angularjs/api/ionic/directive/' + tag.description, + name: tag.description + }; + } + }, + { + name: 'codepen' + } +]; diff --git a/docs/tag-defs/parent.js b/docs/tag-defs/parent.js deleted file mode 100644 index 90725c3128..0000000000 --- a/docs/tag-defs/parent.js +++ /dev/null @@ -1,11 +0,0 @@ -var _ = require('lodash'); - -module.exports = [{ - name: 'parent', - transformFn: function(doc, tag) { - return { - path: 'docs/angularjs/ionic/api/directive/' + tag.description, - name: tag.description - }; - } -}]; diff --git a/docs/templates/api/api.template.html b/docs/templates/api/api.template.html index d739130aec..250b831d7d 100644 --- a/docs/templates/api/api.template.html +++ b/docs/templates/api/api.template.html @@ -7,7 +7,12 @@

<$ doc.name | dashCase $> <@ if doc.parent @> - (child of an <$ doc.parent.name | dashCase $> element) + (child of <$ doc.parent.name | dashCase $>) + + <@ endif @> + <@ if doc.controller @> + + (controller: <$ doc.controller.name $>) <@ endif @>

diff --git a/docs/templates/api/componentGroup.template.html b/docs/templates/api/componentGroup.template.html index 98cb010478..1a605e50c7 100644 --- a/docs/templates/api/componentGroup.template.html +++ b/docs/templates/api/componentGroup.template.html @@ -1,31 +1,27 @@ +--- +layout: docs_0.9.0 +active: javascript +title: "<@ if doc.title @><$ doc.title $><@ elif doc.module @><$ doc.groupType | title $>s in module ionic<@ else @>Pages<@ endif @>" +header_sub_title: "<$ doc.components.length $> <$ doc.groupType $>s" +doc: "<$ doc.groupType $>" +docType: "<$ doc.groupType $>" +--- + <@ block content @> -

- <@- if doc.title -@> - <$ doc.title $> - <@- elif doc.module -@> - <$ doc.groupType | title $> components in <$ doc.module | code $> - <@- else -@> - Pages - <@- endif -@> -

-<$ doc.description | marked $> +<$ doc.description $> -
-
- - - - - - <@ for page in doc.components @> - - - - - <@ endfor @> -
NameDescription
<$ page.id | link(page.name, page) $><$ page.description | firstParagraph | marked $>
-
-
+ + + + + + <@ for page in doc.components @> + + + + + <@ endfor @> +
NameDescription
<$ page.id | link(page.name, page) $><$ page.description | firstParagraph | marked $>
<@ endblock @> diff --git a/docs/templates/api/controller.template.html b/docs/templates/api/controller.template.html new file mode 100644 index 0000000000..f7c24b9b0b --- /dev/null +++ b/docs/templates/api/controller.template.html @@ -0,0 +1,9 @@ +<@ extends "api/object.template.html" @> + +<@ block related_components @> + <@ if doc.providerDoc -@> +
  • + - <$ doc.providerDoc.name $> +
  • + <@- endif @> +<@ endblock @> diff --git a/docs/templates/api/filter.template.html b/docs/templates/api/filter.template.html index a0e3ff491a..4465fb1b06 100644 --- a/docs/templates/api/filter.template.html +++ b/docs/templates/api/filter.template.html @@ -20,7 +20,7 @@ $filter('<$ doc.name $>')(<@ for param in doc.params @><$ sep() $><$ param.name $><@ endfor -@>) <@- endcode @> - <@ include "lib/params.template.html" @> + <$ paramTable(doc.params) $> <@ include "lib/this.template.html" @> <@ include "lib/returns.template.html" @> <@ endblock @> diff --git a/docs/templates/api/object.template.html b/docs/templates/api/object.template.html index bf8723a9fe..c602ca6b7d 100644 --- a/docs/templates/api/object.template.html +++ b/docs/templates/api/object.template.html @@ -1,4 +1,4 @@ -<@ include "lib/macros.html" @> +<@ include "lib/macros.html" -@> <@ extends "api/api.template.html" @> <@ block additional @> @@ -16,7 +16,7 @@ <$ functionSyntax(doc) $> <@ endif @> - <@ include "lib/params.template.html" @> + <$ paramTable(doc.params) $> <@ include "lib/this.template.html" @> <@ include "lib/returns.template.html" @> <@- endif @> diff --git a/docs/templates/base.template.html b/docs/templates/base.template.html index 488fc21173..3be474edef 100644 --- a/docs/templates/base.template.html +++ b/docs/templates/base.template.html @@ -4,6 +4,7 @@ active: javascript 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 $>" ---
    diff --git a/docs/templates/lib/macros.html b/docs/templates/lib/macros.html index 9e893330bc..b10069b1f8 100644 --- a/docs/templates/lib/macros.html +++ b/docs/templates/lib/macros.html @@ -1,5 +1,6 @@ <@ macro typeList(types) -@> -<@ for typeName in types @><$ typeName | escape $><@ endfor @> + <@ set separator = joiner("|") @> + <@ for type in types @><$ separator() $><$ type | code $><@ endfor @> <@- endmacro -@> <@ macro paramTable(params, isDirective) @> @@ -20,7 +21,7 @@ <@ if param.type.optional @>
    (optional)
    <@ endif @> - <$ param.type.name $> + <$ typeList(param.typeList) $> <$ param.description | marked $> @@ -49,10 +50,5 @@ <@ endmacro -@> <@- macro typeInfo(fn) -@> - - - - - -
    <$ typeList(fn.typeList) $><$ fn.description $>
    +<$ typeList(fn.typeList) $> <$ fn.description $> <@- endmacro -@> diff --git a/docs/templates/lib/methods.template.html b/docs/templates/lib/methods.template.html index a7d63e81ab..ec8ee172fd 100644 --- a/docs/templates/lib/methods.template.html +++ b/docs/templates/lib/methods.template.html @@ -15,10 +15,9 @@ #### Method's `this` <$ method.this $> <@ endif @> - + <@ if method.returns @> -**** Returns -<$ typeInfo(method.returns) $> +* Returns: <$ typeInfo(method.returns) $> <@ endif @> <@ endfor -@> diff --git a/docs/templates/lib/params.template.html b/docs/templates/lib/params.template.html deleted file mode 100644 index cc491b0dcb..0000000000 --- a/docs/templates/lib/params.template.html +++ /dev/null @@ -1,33 +0,0 @@ -<@- if doc.params @> - -## API - - - - - - - - - - - <@ for param in doc.params @> - - - - - - <@ endfor @> - -
    <@ if doc.docType == "directive" @>Attributes<@ else @>Paramaters<@ endif @>TypeDetails
    - <$ param.name $> - <@ if param.alias @>| <$ param.alias $><@ endif @> - <@ if param.type.optional @>
    (optional)
    <@ endif @> -
    - <$ param.type.name $> - - <$ param.description | marked $> - <@ if param.default @>

    (default: <$ param.default $>)

    <@ endif @> -
    - -<@- endif -@> diff --git a/docs/templates/lib/properties.template.html b/docs/templates/lib/properties.template.html index c98f666a97..ac60f8ed0d 100644 --- a/docs/templates/lib/properties.template.html +++ b/docs/templates/lib/properties.template.html @@ -4,7 +4,8 @@ <@- for property in doc.properties @>
  • <$ property.name | code $>

    - <$ typeInfo(property) $> + <$ property.returns.description $> + <$ property.description $>
  • <@ endfor -@> diff --git a/docs/templates/pages-data.template.html b/docs/templates/pages-data.template.html index f8910ab0eb..d0e3c0a235 100644 --- a/docs/templates/pages-data.template.html +++ b/docs/templates/pages-data.template.html @@ -12,6 +12,28 @@ {% endif %} + + {% include nav_links.html %} {% include header.html %} @@ -140,21 +162,28 @@ Javascript - <@ for navItem in doc.areas.api.navGroups[0].navItems @> - <@ if navItem.type == "section" @> - - <@ else @> - +
    " %} active{% endif %}"> + <@ for component in doc.areas.api.navGroups[0].navItems @> + <@ if component.type == section.name @> + + <@ endif @> + <@ endfor @> +
    <@ endif @> <@ endfor @> @@ -287,14 +316,5 @@ ol-b"> {% include footer.html %} {% include base_scripts.html %} - -