fixup! feat(aio): allow template to position embedded ToC (#22565)

PR Close #22565
This commit is contained in:
Pete Bacon Darwin 2018-03-04 20:30:23 +00:00 committed by Alex Eagle
parent 41064fcb36
commit 405d97431f
4 changed files with 30 additions and 31 deletions

View File

@ -37,14 +37,3 @@ aio-shell.page-docs {
margin: 24px 0px;
background: $lightgray;
}
.page-actions {
float: right;
.material-icons {
border-radius: 4px;
padding: 4px;
font-size: 20px;
background-color: $mist;
color: $mediumgray;
}
}

View File

@ -1,3 +1,15 @@
.page-actions {
float: right;
.material-icons {
border-radius: 4px;
padding: 4px;
font-size: 20px;
&:hover {
background-color: $mist;
}
}
}
.api-body {
.class-overview {
@ -24,6 +36,11 @@
.api-heading {
padding: 5px 0;
font-size: 16px;
font-weight: bold;
}
.short-description {
margin: 6px 0 0 10px;
}
.properties-table {

View File

@ -2,32 +2,22 @@
{% 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">
<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 %}
{%- 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 %}
</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 %}

View File

@ -4,5 +4,8 @@ https://github.com/{$ versionInfo.gitRepoInfo.owner $}/{$ versionInfo.gitRepoInf
{% macro githubEditHref(doc, versionInfo) -%}
https://github.com/{$ versionInfo.gitRepoInfo.owner $}/{$ versionInfo.gitRepoInfo.repo $}/edit/master/packages/{$ doc.fileInfo.realProjectRelativePath $}?message=docs({$ doc.moduleDoc.id | escape $})%3A%20describe%20your%20change...#L{$ doc.startingLine + 1 $}-L{$ doc.endingLine + 1 $}
https://github.com/{$ versionInfo.gitRepoInfo.owner $}/{$ versionInfo.gitRepoInfo.repo $}/edit/master/packages/{$ doc.fileInfo.realProjectRelativePath $}?message=docs(
{%- if doc.moduleDoc %}{$ doc.moduleDoc.id.split('/')[0] $}
{%- if doc.docType === 'module' %}{$ doc.id.split('/')[0] $}
{%- else %}...{%- endif%})%3A%20describe%20your%20change...#L{$ doc.startingLine + 1 $}-L{$ doc.endingLine + 1 $}
{%- endmacro %}