This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +34
-2
lines changed
tools/api-builder/angular.io-package Expand file tree Collapse file tree 6 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ header(class="hero background-sky")
2020 // badge circle is filled based on stability by matching a css selector in _hero.scss
2121 span( class ="status-circle status-#{stability} " )
2222 span Stability: #{capitalize (stability)}
23+ if security
24+ span( class ="status-badge security-risk-badge" ) .
25+ Security Risk
2326
2427 if subtitle
2528 h2.hero-subtitle.text-subhead #{subtitle}
Original file line number Diff line number Diff line change @@ -83,9 +83,18 @@ $hero-padding: ($unit * 10) ($unit * 6) ($unit * 7);
8383 margin-left : 0 ;
8484 }
8585 }
86+
87+ .security-risk-badge {
88+ background-color : #FFF59D ;
89+ }
8690 }
8791
8892 @media screen and (max-width : 599px ) {
93+ /* three items */
94+ .badges .status-badge :nth-child (3 ) {
95+ margin-left : 0 ;
96+ margin-top : 4px ;
97+ }
8998
9099 .hero-title-with-badges {
91100 margin-bottom : $unit * 2 ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ module.exports = function addJadeDataDocsProcessor() {
7575 } else if ( _ . has ( exportDoc , 'deprecated' ) ) {
7676 stability = 'deprecated' ;
7777 }
78-
78+
7979 var howToUse = '' ;
8080 if ( _ . has ( exportDoc , 'howToUse' ) ) {
8181 var howToUseArray = exportDoc . tags . tags . filter ( function ( tag ) {
@@ -96,14 +96,25 @@ module.exports = function addJadeDataDocsProcessor() {
9696 whatItDoes = whatItDoesArray [ 0 ] . description . replace ( / ( \r \n | \n | \r ) / gm, "" ) ;
9797 }
9898
99+ // SECURITY STATUS
100+ // Supported tags:
101+ // @security
102+ // Default is no security risk assessed for api
103+ var security = false ;
104+ if ( _ . has ( exportDoc , 'security' ) ) {
105+ security = true ;
106+ }
107+
108+ // Data inserted into jade-data.template.html
99109 var dataDoc = {
100110 name : exportDoc . name + '-' + exportDoc . docType ,
101111 title : exportDoc . name ,
102112 docType : exportDoc . docType ,
103113 exportDoc : exportDoc ,
104114 stability : stability ,
105115 howToUse : howToUse ,
106- whatItDoes : whatItDoes
116+ whatItDoes : whatItDoes ,
117+ security : security
107118 } ;
108119
109120 if ( exportDoc . symbolTypeName ) dataDoc . varType = titleCase ( exportDoc . symbolTypeName ) ;
Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ module.exports = [
66 require ( './stable' ) ,
77 require ( './experimental' ) ,
88 require ( './docsNotRequired' ) ,
9+ require ( './security' ) ,
910] ;
Original file line number Diff line number Diff line change 1+ module . exports = function ( ) {
2+ return {
3+ name : 'security'
4+ } ;
5+ } ;
Original file line number Diff line number Diff line change 1515 {%- if item.stability %}
1616 "stability" : "{$ item.stability $}",
1717 {%- endif %}
18+ {%- if item.security %}
19+ "security" : "{$ item.security $}",
20+ {%- endif %}
1821 "docType": "{$ item.docType $}"
1922 }{% if not loop.last %},{% endif %}
2023{% endfor -%}
You can’t perform that action at this time.
0 commit comments