{% extends "../core/document.html" %}

{% comment ******************* %}
{% comment Emit navigation     %}
{% comment ******************* %}
{% block doc-nav %}
<nav>
    <ul>
	    <li><a href="#{{ doc.ext.full_id }}-details">Details</a></li>
    	{% if doc.ext.component_tree %}
	    <li><a href="#{{ doc.ext.full_id }}-components">Components</a></li>
		{% end %}
    </ul>
</nav>
{% end %}

{% comment ***************** %}
{% comment Emit content      %}
{% comment ***************** %}
{% block doc-content %}

	{% comment ************************************************** %}
	{% comment Sub-section: details 		    				  %}
	{% comment ************************************************** %}
	<section id="{{ doc.ext.full_id }}-details">
		{% include software_model_component_details.html %}
	</section>

	{% comment ************************************************** %}
	{% comment Sub-section: component tree 				    	  %}
	{% comment ************************************************** %}
	{% if doc.ext.component_tree %}
	<section id="{{ doc.ext.full_id }}-components" class="{{ doc.ext.css_class }}-components">
		<nav>
			<ul class="depth-0">
			{% for c in [c for c in doc.ext.component_tree if c.ext.depth == 1] %}
				{% include software_model_component_hierarchy_nav.html %}
			{% end %}
			</ul>
		</nav>
		{% for c in doc.ext.component_tree %}
			{% include software_model_component_hierarchy_details.html %}
	    {% end %}
	</section>
    {% end %}

{% end %}
