Skip to content

Add class annotation to HTML templates for different kinds of entities #1929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/templates/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5><span class="package-name">{{parent.name}}</span> <span class="package-kind"

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<h1>{{name}} {{kind}}</h1>
<h1><span class="kind-category">{{name}}</span> {{kind}}</h1>
{{>documentation}}

{{#hasPublicLibraries}}
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/class.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{nameWithGenerics}}} {{kind}} {{>categorization}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-class">{{{nameWithGenerics}}}</span> {{kind}} {{>categorization}}</h1></div>
{{/self}}

{{#clazz}}
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/constant.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{name}}} {{kind}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-constant">{{{name}}}</span> {{kind}}</h1></div>
{{/self}}

<section class="multi-line-signature">
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/constructor.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{nameWithGenerics}}} {{kind}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-constructor">{{{nameWithGenerics}}}</span> {{kind}}</h1></div>
{{/self}}

{{#constructor}}
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/enum.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{name}}} {{kind}} {{>categorization}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-enum">{{{name}}}</span> {{kind}} {{>categorization}}</h1></div>
{{/self}}

{{#eNum}}
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/function.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{nameWithGenerics}}} {{kind}} {{>categorization}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-function">{{{nameWithGenerics}}}</span> {{kind}} {{>categorization}}</h1></div>
{{/self}}

{{#function}}
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/library.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5><span class="package-name">{{parent.name}}</span> <span class="package-kind"

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{name}}} {{kind}} {{>categorization}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-library">{{{name}}}</span> {{kind}} {{>categorization}}</h1></div>
{{/self}}

{{#library}}
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/method.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{nameWithGenerics}}} {{kind}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-method">{{{nameWithGenerics}}}</span> {{kind}}</h1></div>
{{/self}}

{{#method}}
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{nameWithGenerics}}} {{kind}} {{>categorization}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-mixin">{{{nameWithGenerics}}}</span> {{kind}} {{>categorization}}</h1></div>
{{/self}}

{{#mixin}}
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/property.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{name}} {{kind}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-property">{{name}}</span> {{kind}}</h1></div>
{{/self}}

{{#self}}
Expand Down
19 changes: 9 additions & 10 deletions lib/templates/top_level_constant.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{name}}} {{kind}} {{>categorization}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-top-level-constant">{{{name}}}</span> {{kind}} {{>categorization}}</h1></div>

<section class="multi-line-signature">
{{>name_summary}}
=
<span class="constant-value">{{{ constantValue }}}</span>
{{>features}}
</section>

{{>documentation}}
{{>source_code}}
<section class="multi-line-signature">
{{>name_summary}}
=
<span class="constant-value">{{{ constantValue }}}</span>
{{>features}}
</section>
{{>documentation}}
{{>source_code}}
{{/self}}

</div> <!-- /.main-content -->
Expand Down
32 changes: 16 additions & 16 deletions lib/templates/top_level_property.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{name}}} {{kind}} {{>categorization}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-top-level-property">{{{name}}}</span> {{kind}} {{>categorization}}</h1></div>

{{#hasNoGetterSetter}}
<section class="multi-line-signature">
<span class="returntype">{{{ linkedReturnType }}}</span>
{{>name_summary}}
{{>features}}
</section>
{{>documentation}}
{{>source_code}}
{{/hasNoGetterSetter}}
{{#hasNoGetterSetter}}
<section class="multi-line-signature">
<span class="returntype">{{{ linkedReturnType }}}</span>
{{>name_summary}}
{{>features}}
</section>
{{>documentation}}
{{>source_code}}
{{/hasNoGetterSetter}}

{{#hasExplicitGetter}}
{{>accessor_getter}}
{{/hasExplicitGetter}}
{{#hasExplicitGetter}}
{{>accessor_getter}}
{{/hasExplicitGetter}}

{{#hasExplicitSetter}}
{{>accessor_setter}}
{{/hasExplicitSetter}}
{{#hasExplicitSetter}}
{{>accessor_setter}}
{{/hasExplicitSetter}}
{{/self}}
</div> <!-- /.main-content -->

Expand Down
2 changes: 1 addition & 1 deletion lib/templates/typedef.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h5>{{parent.name}} {{parent.kind}}</h5>

<div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
{{#self}}
<div>{{>source_link}}<h1>{{{nameWithGenerics}}} {{kind}} {{>categorization}}</h1></div>
<div>{{>source_link}}<h1><span class="kind-typedef">{{{nameWithGenerics}}}</span> {{kind}} {{>categorization}}</h1></div>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was making it match the other templates... I'll make them all match: I think they need the indent because the {{#self}} wraps it with tags.

{{/self}}

<section class="multi-line-signature">
Expand Down