fix(docs-infra): render security risk labels (#25750)

PR Close #25750
This commit is contained in:
Pete Bacon Darwin 2018-09-17 17:32:45 +01:00 committed by Kara Erickson
parent 96f9f03d25
commit cea2e0477c
2 changed files with 5 additions and 0 deletions

View File

@ -49,6 +49,10 @@ label.raised, .api-header label {
&.api-status-label { &.api-status-label {
background-color: $mediumgray; background-color: $mediumgray;
&.security {
background-color: $brightred;
}
&.impure-pipe { &.impure-pipe {
background-color: $brightred; background-color: $brightred;
} }

View File

@ -19,6 +19,7 @@
<header class="api-header"> <header class="api-header">
<h1>{$ doc.name $}</h1> <h1>{$ doc.name $}</h1>
<label class="api-type-label {$ doc.docType $}">{$ doc.docType $}</label> <label class="api-type-label {$ doc.docType $}">{$ doc.docType $}</label>
{% if doc.security !== undefined %}<label class="api-status-label security">security</label>{% endif %}
{% if doc.pipeOptions.pure === 'false' %}<label class="api-status-label impure-pipe">impure</label>{% endif %} {% if doc.pipeOptions.pure === 'false' %}<label class="api-status-label impure-pipe">impure</label>{% endif %}
</header> </header>
<aio-toc class="embedded"></aio-toc> <aio-toc class="embedded"></aio-toc>