new-horizons/docs/content/base/schema/json/section_examples.jinja2
Ben C 2552d1b8a4
Added XML Schemas To Docs (#57)
* Add Bootstrap Extension

* Rename main.yml

* Artifact Upload

* Fix Bootstrap Reference Error

* BootstrapTreeProcessor

* getiterator removed

* keys function

* Style Images

* Update docs_build.yml

* Added Meta Files

* Template Get

* Fix Page Ref

* Update BASE_URL

* Sort Schemas

* Add Sitemaps

* Add favicons, open-graph, and setup guide

* Update Setup.md

* Update .gitignore

* Update Setup.md

* Use _blank on external links

* Restructured Docs

* Fix Links

* Added XML Schemas

* Name XML Schemas
2022-03-04 23:27:26 -08:00

19 lines
771 B
Django/Jinja

<br/>
<div class="badge badge-secondary">Example{% if examples|length > 1 %}s{% endif %}:</div>
<br/>
{% for example in examples %}
{% set example_id = schema.html_id ~ "_ex" ~ loop.index %}
{% set example_is_long = example is not description_short %}
{% if example_is_long %}
<button class="btn btn-light example-show collapsed" data-toggle="collapse" data-target="#{{ example_id }}" aria-controls="{{ example_id }}"></button>
{% endif %}
<div id="{{ example_id }}" class="{% if example_is_long %}collapse {% endif %}jumbotron examples">
{% if not examples_as_yaml %}
{{ example | highlight_json_example }}
{% else %}
{{ example | highlight_yaml_example }}
{% endif %}
</div>
{% endfor %}