fix(aio): reposition and shrink the API badges (#22570)

Closes #22130

PR Close #22570
This commit is contained in:
Pete Bacon Darwin 2018-03-03 13:13:33 +00:00 committed by Alex Eagle
parent 53b0fe8144
commit 8ea4c57174
4 changed files with 22 additions and 4 deletions

View File

@ -10,6 +10,16 @@
} }
} }
.api-header {
display: flex;
align-items: center;
@media screen and (max-width: 600px) {
flex-direction: column;
align-items: flex-start;
}
}
.api-body { .api-body {
.class-overview { .class-overview {

View File

@ -3,7 +3,7 @@
.header-link { .header-link {
color: $mediumgray; color: $mediumgray;
margin-left: 8px; margin: 0 4px;
text-decoration: none; text-decoration: none;
user-select: none; user-select: none;
visibility: hidden; visibility: hidden;

View File

@ -38,6 +38,14 @@ label.raised, .api-header label {
.api-header label { .api-header label {
// The API badges should be a little smaller
padding: 2px 10px;
font-size: 12px;
@media screen and (max-width: 600px) {
margin: 4px 0;
}
&.api-status-label { &.api-status-label {
background-color: $mediumgray; background-color: $mediumgray;
} }

View File

@ -20,13 +20,13 @@
{% for crumb in doc.breadCrumbs %}{% if not loop.last %} {$ slash() $} {% if crumb.path %}<a href="{$ crumb.path $}">{$ crumb.text $}</a>{% else %}{$ crumb.text $}{% endif %}{% endif %}{% endfor %} {% for crumb in doc.breadCrumbs %}{% if not loop.last %} {$ slash() $} {% if crumb.path %}<a href="{$ crumb.path $}">{$ crumb.text $}</a>{% else %}{$ crumb.text $}{% endif %}{% endif %}{% endfor %}
</div> </div>
<header class="api-header"> <header class="api-header">
<h1>{$ doc.name $}</h1>
<label class="api-type-label {$ doc.docType $}">{$ doc.docType $}</label>
{% if doc.deprecated !== undefined %}<label class="api-status-label deprecated">deprecated</label>{% endif %} {% if doc.deprecated !== undefined %}<label class="api-status-label deprecated">deprecated</label>{% endif %}
{% if doc.experimental !== undefined %}<label class="api-status-label experimental">experimental</label>{% endif %} {% if doc.experimental !== undefined %}<label class="api-status-label experimental">experimental</label>{% endif %}
{% if doc.stable !== undefined %}<label class="api-status-label stable">stable</label>{% endif %} {% if doc.stable !== undefined %}<label class="api-status-label stable">stable</label>{% endif %}
<label class="api-type-label {$ doc.docType $}">{$ doc.docType $}</label>
<h1>{$ doc.name $}</h1>
<span class="version">{$ version $}</span>
</header> </header>
<aio-toc class="embedded"></aio-toc>
<div class="api-body"> <div class="api-body">
{% block body %}{% endblock %} {% block body %}{% endblock %}