new-horizons/docs/content/base/schema/json/section_conditional_subschema.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

58 lines
2.0 KiB
Django/Jinja

<h2 class="handle">
<label>Conditional Sub-schema</label>
</h2>
<p>If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected.
Otherwise, the conditions in the "Else" tab should be respected.</p>
<ul class="nav nav-tabs" id="{{ schema.html_id }}_condition_tabs" role="tablist">
{% set tab_id = schema.kw_if.html_id %}
<li class="nav-item">
<a class="nav-link active"
id="{{ tab_id }}" data-toggle="tab" href="#tab-pane_{{ tab_id }}" role="tab"
onclick="setAnchor('#{{ tab_id }}')"
>If</a>
</li>
{% if schema.kw_then %}
{% set tab_id = schema.kw_then.html_id %}
<li class="nav-item">
<a class="nav-link"
id="{{ tab_id }}" data-toggle="tab" href="#tab-pane_{{ tab_id }}" role="tab"
onclick="setAnchor('#{{ tab_id }}')"
>Then</a>
</li>
{%- endif -%}
{%- if schema.kw_else -%}
{%- set tab_id = schema.kw_else.html_id -%}
<li class="nav-item">
<a class="nav-link"
id="{{ tab_id }}" data-toggle="tab" href="#tab-pane_{{ tab_id }}" role="tab"
onclick="setAnchor('#{{ tab_id }}')"
>Else</a>
</li>
{%- endif -%}
</ul>
<div class="tab-content card">
{% set tab_id = schema.kw_if.html_id %}
<div class="tab-pane fade card-body active show"
id="tab-pane_{{ tab_id }}" role="tabpanel">
{{ content(schema.kw_if) }}
</div>
{% if schema.kw_then %}
{% set tab_id = schema.kw_then.html_id %}
<div class="tab-pane fade card-body"
id="tab-pane_{{ tab_id }}" role="tabpanel">
{{ content(schema.kw_then) }}
</div>
{%- endif -%}
{%- if schema.kw_else -%}
{% set tab_id = schema.kw_else.html_id %}
<div class="tab-pane fade card-body"
id="tab-pane_{{ tab_id }}" role="tabpanel">
{{ content(schema.kw_else) }}
</div>
{%- endif -%}
</div>