{# ========================================================================== #}
{# :: Content #}
{# ========================================================================== #}
{#
	The content section of the page which contains the main title and the
	different content blocks.
#}

{# ========================================================================== #}
{# :: Imports #}
{# ========================================================================== #}
{% import "components/wysiwyg.njk" as wysiwyg %}
{% import "components/gallery.njk" as gallery %}
{% import "components/fallback.njk" as fallback %}
{% import "components/embed.njk" as embed %}
{% import "components/audio.njk" as audio %}
{% import "components/video.njk" as video %}

{# ========================================================================== #}
{# :: Variables #}
{# ========================================================================== #}
{% set CONTENT = ROUTEDATA.DETAIL %}

{# ========================================================================== #}
{# :: Partial #}
{# ========================================================================== #}
<section class="bp-l-section">
	<header class="bp-l-section__header">
		<h1 class="bp-l-section__title u-h1">
			{{CONTENT.title}}
		</h1>
	</header>

	{% for item in CONTENT.body %}
		<div class="bp-l-section__content">
			{% if item.type === "text" %}

				{{wysiwyg.default("", {
					content: item.data.content
				})}}

			{% elseif item.type === "audio" %}

				{% include "partials/api/audio.njk" %}

			{% elseif item.type === "video" %}

				{% include "partials/api/videos.njk" %}

			{% elseif item.type === "colors" %}

				{% include "partials/api/colors.njk" %}

			{% elseif item.type === "embed" %}

				{% include "partials/api/embed.njk" %}

			{% elseif item.type === "images" %}

				{% include "partials/api/images.njk" %}

			{% elseif item.type === "files" %}

				{% include "partials/api/files.njk" %}

			{% endif %}
		</div>
	{% endfor %}
</section>
