From 59c76790af2590ff837bc706cfc1a22af0916ad3 Mon Sep 17 00:00:00 2001 From: Eric Jimenez Date: Mon, 25 Apr 2016 17:28:45 -0400 Subject: [PATCH] docs(class, decorator, directive, function, var) improve doc styling --- .../templates/class.template.html | 18 ++++++------- .../templates/decorator.template.html | 26 ++++++++++--------- .../templates/directive.template.html | 8 +++--- .../templates/function.template.html | 26 ++++++++++--------- .../templates/var.template.html | 16 ++++++------ 5 files changed, 49 insertions(+), 45 deletions(-) diff --git a/tools/api-builder/angular.io-package/templates/class.template.html b/tools/api-builder/angular.io-package/templates/class.template.html index f226434d61..81dce34619 100644 --- a/tools/api-builder/angular.io-package/templates/class.template.html +++ b/tools/api-builder/angular.io-package/templates/class.template.html @@ -5,7 +5,7 @@ {% block body %} include {$ relativePath(doc.path, '_util-fns') $} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") What it does div(flex="80" flex-xs="100") @@ -16,7 +16,7 @@ include {$ relativePath(doc.path, '_util-fns') $} *Not yet documented* {% endif %} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") How to use div(flex="80" flex-xs="100") @@ -27,7 +27,7 @@ include {$ relativePath(doc.path, '_util-fns') $} *Not yet documented* {% endif %} -.div(class="row-margin" layout="row" layout-xs="column") +.div(layout="row" layout-xs="column" class="ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Class Overview div(flex="80" flex-xs="100") @@ -64,7 +64,7 @@ include {$ relativePath(doc.path, '_util-fns') $} {% block additional %} {% endblock %} -.div(class="row-margin" layout="row" layout-xs="column") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Class Description div(class="code-links" flex="80" flex-xs="100") @@ -75,7 +75,7 @@ include {$ relativePath(doc.path, '_util-fns') $} *Not yet documented* {% endif %} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Class Export div(flex="80" flex-xs="100") @@ -85,7 +85,7 @@ include {$ relativePath(doc.path, '_util-fns') $} {%- if doc.decorators.length %} {% block annotations %} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Annotations div(flex="80" flex-xs="100") @@ -104,7 +104,7 @@ include {$ relativePath(doc.path, '_util-fns') $} {% endif %} {%- if doc.constructorDoc and not doc.constructorDoc.internal %} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Constructor div(flex="80" flex-xs="100") @@ -121,7 +121,7 @@ include {$ relativePath(doc.path, '_util-fns') $} {% endif %} {% if doc.statics.length %} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Static Members div(class="code-links" flex="80" flex-xs="100") @@ -145,7 +145,7 @@ include {$ relativePath(doc.path, '_util-fns') $} {% endif %} {% if doc.members.length %} -.div(layout="row" layout-xs="column" class="instance-members" class="row-margin") +.div(layout="row" layout-xs="column" class="instance-members" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Class Details div(class="code-links" flex="80" flex-xs="100") diff --git a/tools/api-builder/angular.io-package/templates/decorator.template.html b/tools/api-builder/angular.io-package/templates/decorator.template.html index 597de1783e..ee9ccc40ac 100644 --- a/tools/api-builder/angular.io-package/templates/decorator.template.html +++ b/tools/api-builder/angular.io-package/templates/decorator.template.html @@ -4,20 +4,22 @@ {% block body %} include {$ relativePath(doc.path, '_util-fns') $} -.l-main-section - h2(class="decorator export") - pre.prettyprint + +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") + div(flex="20" flex-xs="100") + h2(class="h2-api-docs") Variable Export + div(class="code-links" flex="80" flex-xs="100") + pre.prettyprint.no-bg code. export {$ doc.name $}(options : {@link {$ doc.decoratorType $} {$ doc.decoratorType | escape $}}){$ returnType(doc.returnType) $} + :marked + {%- if doc.notYetDocumented %} + *Not yet documented* + {% else %} +{$ doc.description | indentForMarkdown(6) | trimBlankLines $} + {% endif %} - p.location-badge. - exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} } - defined in {$ githubViewLink(doc) $} +p.location-badge. + exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} } defined in {$ githubViewLink(doc) $} - :marked -{%- if doc.notYetDocumented %} - *Not yet documented* -{% else %} -{$ doc.description | indentForMarkdown(4) | trimBlankLines $} -{% endif -%} {% endblock %} diff --git a/tools/api-builder/angular.io-package/templates/directive.template.html b/tools/api-builder/angular.io-package/templates/directive.template.html index 3602a50e54..9e8ab62766 100644 --- a/tools/api-builder/angular.io-package/templates/directive.template.html +++ b/tools/api-builder/angular.io-package/templates/directive.template.html @@ -8,7 +8,7 @@ {% block additional -%} {%- if doc.directiveOptions.selector.split(',').length %} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Selectors div(flex="80" flex-xs="100") @@ -19,7 +19,7 @@ {% endif %} {% if doc.outputs %} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Outputs div(flex="80" flex-xs="100") @@ -34,7 +34,7 @@ {% endif %} {% if doc.inputs %} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Inputs div(flex="80" flex-xs="100") @@ -49,7 +49,7 @@ {% endif %} {%- if doc.directiveOptions.exportAs %} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Exported as div(flex="80" flex-xs="100") diff --git a/tools/api-builder/angular.io-package/templates/function.template.html b/tools/api-builder/angular.io-package/templates/function.template.html index d02983310b..c85c6a9ec8 100644 --- a/tools/api-builder/angular.io-package/templates/function.template.html +++ b/tools/api-builder/angular.io-package/templates/function.template.html @@ -4,20 +4,22 @@ {% block body %} include {$ relativePath(doc.path, '_util-fns') $} -.l-main-section - h2(class="function export") - pre.prettyprint + +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") + div(flex="20" flex-xs="100") + h2(class="h2-api-docs") Class Export + div(class="code-links" flex="80" flex-xs="100") + pre.prettyprint.no-bg code. export {$ doc.name $}{$ paramList(doc.parameters) | indent(8, true) | trim $}{$ returnType(doc.returnType) $} + :marked + {%- if doc.notYetDocumented %} + *Not yet documented* + {% else %} +{$ doc.description | indentForMarkdown(6) | trimBlankLines $} + {% endif %} - p.location-badge. - exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} } - defined in {$ githubViewLink(doc) $} +p.location-badge. + exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} } defined in {$ githubViewLink(doc) $} - :marked -{%- if doc.notYetDocumented %} - *Not Yet Documented* -{% else %} -{$ doc.description | indentForMarkdown(4) | trimBlankLines $} -{% endif %} {% endblock %} \ No newline at end of file diff --git a/tools/api-builder/angular.io-package/templates/var.template.html b/tools/api-builder/angular.io-package/templates/var.template.html index 19c1b8789a..6a9db8905d 100644 --- a/tools/api-builder/angular.io-package/templates/var.template.html +++ b/tools/api-builder/angular.io-package/templates/var.template.html @@ -5,22 +5,22 @@ {% block body %} include {$ relativePath(doc.path, '_util-fns') $} -.div(layout="row" layout-xs="column" class="row-margin") +.div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") Variable Export - div(flex="80" flex-xs="100") + div(class="code-links" flex="80" flex-xs="100") pre.prettyprint.no-bg code. export {$ doc.name $}{$ returnType(doc.returnType) $} + :marked + {%- if doc.notYetDocumented %} + *Not yet documented* + {% else %} +{$ doc.description | indentForMarkdown(6) | trimBlankLines $} + {% endif %} p.location-badge. exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} } defined in {$ githubViewLink(doc) $} -:marked -{%- if doc.notYetDocumented %} - *Not Yet Documented* -{% else %} -{$ doc.description | indentForMarkdown(2) | trimBlankLines $} -{% endif -%} {% endblock %}