angular-cn/aio/tools/transforms/templates/api/base.template.html

45 lines
1.8 KiB
HTML
Raw Normal View History

{% import "lib/githubLinks.html" as github -%}
{% set comma = joiner(',') %}
{% set slash = joiner('/') %}
<article>
<div class="page-actions">
<a href="{$ github.githubEditHref(doc, versionInfo) $}" aria-label="Suggest Edits" title="Suggest Edits"><i class="material-icons" aria-hidden="true" role="img">mode_edit</i></a>
<a href="{$ github.githubViewHref(doc, versionInfo) $}" aria-label="View Source" title="View Source"><i class="material-icons" aria-hidden="true" role="img">code</i></a>
</div>
<div class="breadcrumb">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{% for crumb in doc.breadCrumbs %}
{$ comma() $}{
"@type": "ListItem",
"position": {$ loop.index $},
"item": {
"@id": "https://angular.io/{$ crumb.path $}",
"name": "{$ crumb.text $}"
}
}{% endfor %}
]
}
</script>
{% 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>
<header class="api-header">
{% 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.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>
<div class="api-body">
{% block body %}{% endblock %}
</div>
</article>