File tree 4 files changed +19
-10
lines changed
4 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,11 @@ module.exports = function categorizer() {
68
68
}
69
69
70
70
/**
71
- * Decorates public exposed docs. Creates a property with CSS classes that will be
72
- * added to the template .
71
+ * Decorates public exposed docs. Creates a property on the doc that indicates whether
72
+ * the item is deprecated or not .
73
73
**/
74
74
function decoratePublicDoc ( doc ) {
75
- // Specific classes that will can added to the Dgeni doc template.
76
- doc . docClasses = [
77
- isDeprecatedDoc ( doc ) ? 'docs-api-deprecated' : ''
78
- ] . join ( ' ' ) ;
75
+ doc . isDeprecated = isDeprecatedDoc ( doc ) ;
79
76
}
80
77
} ;
81
78
Original file line number Diff line number Diff line change 1
- < div class =" {$ class.docClasses $} " >
1
+ < div >
2
2
< h4 class ="docs-api-h4 docs-api-class-name ">
3
3
< code > {$ class.name $}</ code >
4
4
</ h4 >
@@ -9,6 +9,10 @@ <h4 class="docs-api-h4 docs-api-class-name">
9
9
< span class ="docs-api-class-export-name "> {$ class.directiveExportAs $}</ span >
10
10
{%- endif -%}
11
11
12
+ {%- if class.isDeprecated -%}
13
+ < div class ="docs-api-class-deprecated-marker "> Deprecated</ div >
14
+ {%- endif -%}
15
+
12
16
{$ propertyList(class.properties) $}
13
17
14
18
{$ methodList(class.methods) $}
Original file line number Diff line number Diff line change 1
- < table class ="docs-api-method-table {$ method.docClasses $} ">
1
+ < table class ="docs-api-method-table ">
2
2
< thead >
3
3
< tr class ="docs-api-method-name-row ">
4
- < th colspan ="2 " class ="docs-api-method-name-cell "> {$ method.name $}</ th >
4
+ < th colspan ="2 " class ="docs-api-method-name-cell ">
5
+ {%- if method.isDeprecated -%}
6
+ < div class ="docs-api-deprecated-marker "> Deprecated</ div >
7
+ {%- endif -%}
8
+ {$ method.name $}
9
+ </ th >
5
10
</ tr >
6
11
</ thead >
7
12
< tr class ="docs-api-method-description-row ">
Original file line number Diff line number Diff line change 1
- < tr class ="docs-api-properties-row {$ property.docClasses $} ">
1
+ < tr class ="docs-api-properties-row ">
2
2
< td class ="docs-api-properties-name-cell ">
3
3
{%- if property.isDirectiveInput -%}
4
4
< div class ="docs-api-input-marker ">
18
18
{%- endif -%}
19
19
</ div >
20
20
{%- endif -%}
21
+ {%- if property.isDeprecated -%}
22
+ < div class ="docs-api-deprecated-marker "> Deprecated</ div >
23
+ {%- endif -%}
21
24
22
25
< p class ="docs-api-property-name ">
23
26
{$ property.name $}
You can’t perform that action at this time.
0 commit comments