Skip to content

Commit

Permalink
build(docs-infra): clean up API package template (#25453)
Browse files Browse the repository at this point in the history
PR Close #25453
  • Loading branch information
petebacondarwin authored and benlesh committed Aug 14, 2018
1 parent bf441e8 commit 2f85b16
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions aio/tools/transforms/templates/api/package.template.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{% extends 'base.template.html' -%}

{% macro listItems(items, title) %}
{% macro listItems(items, title, overridePath) %}
{% if items.length %}
<section class="export-list">
<h3>{$ title $}</h3>
<table class="is-full-width list-table">
{% for item in items %}
<tr>
<td><code class="code-anchor">
<a href="{$ item.path $}">{$ item.name $}</a></code></td>
<a href="{$ overridePath or item.path $}">{$ item.name $}</a></code></td>
<td>{% if item.shortDescription %}{$ item.shortDescription | marked $}{% endif %}</td>
</tr>
{% endfor %}
Expand All @@ -24,12 +24,13 @@ <h3>{$ title $}</h3>

{% include "includes/see-also.html" %}

{% if doc.isPrimaryPackage %}
<h2>Entry points</h2>
{$ listItems([doc.packageInfo.primary], 'Primary') $}
{$ listItems([doc.packageInfo.primary], 'Primary', '#primary-entry-point-exports') $}
{$ listItems(doc.packageInfo.secondary, 'Secondary') $}
{% endif %}


<h2>Exports</h2>
<h2>{% if doc.isPrimaryPackage %}Primary entry{% else %}Entry{% endif %} point exports</h2>
{$ listItems(doc.classes, 'Classes') $}
{$ listItems(doc.decorators, 'Decorators') $}
{$ listItems(doc.functions, 'Functions') $}
Expand Down

0 comments on commit 2f85b16

Please sign in to comment.