Skip to content

Commit

Permalink
make abstract text small, remove mappings if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
sierra-moxon committed Nov 30, 2023
1 parent a3ff15b commit 4146a91
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/doc-templates/class.md.jinja2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <strong> Class: {{ gen.name(element) }} </strong> {% if element.deprecated %} <span style="color: red;"><strong> (DEPRECATED) </strong></span>{% endif %}{% if element.abstract %}<span style="color: purple;"><strong><small> (Abstract Class) </small> </strong></span> {% endif %}
# <strong> Class: {{ gen.name(element) }} </strong> {% if element.deprecated %} <span style="color: red;"><strong> (DEPRECATED) </strong></span>{% endif %}{% if element.abstract %}<span style="color: purple;"><strong><small> (Abstract) </small> </strong></span> {% endif %}
{% if element.description or element.aliases or element.multivalued or element.required or element.domain or element.range or element.inverse %}
<div class="highlight-box">{% if element.description %}<strong>Description:</strong><i> {{ element.description }}</i><br>{% endif %}
{% if element.aliases %}<strong>Aliases:</strong> {{ element.aliases | join(', ') }}<br>{% endif -%}
Expand Down
18 changes: 12 additions & 6 deletions src/doc-templates/common_metadata.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@ Instances of this class *should* have identifiers with one of the following pref
{% endfor %}
{% endif %}

{% if schemaview.get_mappings(element.name).items() %}
{% set mapping_items = schemaview.get_mappings(element.name).items() %}
{% set valid_mappings = [] %}

{% for m, mt in mapping_items %}
{% if mt and m != "self" and m != "native" %}
{% set valid_mappings = valid_mappings + [(m, mt)] %}
{% endif %}
{% endfor %}

{% if valid_mappings %}
## Mappings

| Mapping Type | Mapped Value |
| --- | --- |
{% for m, mt in schemaview.get_mappings(element.name).items() -%}
{% if mt and m != "self" and m != "native" -%}
| {{ m }} | {% for item in mt %}{{ item }}<br>{% endfor %} |
{% endif -%}
{% for m, mt in valid_mappings %}
| {{ m }} | {{ mt|join(', ') }} |
{% endfor %}
{% endif %}


2 changes: 1 addition & 1 deletion src/doc-templates/slot.md.jinja2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <strong> Slot: {{ gen.name(element) }} </strong> {% if element.deprecated %} <span style="color: red;"><strong> (DEPRECATED) </strong></span> {% endif %}{% if element.abstract %}<span style="color: purple;"><strong> (Abstract Slot) </strong></span> {% endif %}{% if element.multivalued %} (multivalued){% endif -%}
# <strong> Slot: {{ gen.name(element) }} </strong> {% if element.deprecated %} <span style="color: red;"><strong> (DEPRECATED) </strong></span> {% endif %}{% if element.abstract %}<span style="color: purple;"><strong><small> (Abstract) </small></strong></span> {% endif %}{% if element.multivalued %} (multivalued){% endif -%}
{% if element.description or element.aliases or element.multivalued or element.required or element.domain or element.range or element.inverse %}
<div class="highlight-box">{% if element.description %}<strong>Description:</strong><i> {{ element.description }}</i><br>{% endif %}
{% if element.aliases %} <strong>Aliases:</strong> {{ element.aliases | join(', ') }}<br>{% endif -%}
Expand Down

0 comments on commit 4146a91

Please sign in to comment.