{# ========================================================================== #}
{# :: Library template page #}
{# ========================================================================== #}
{#
	Library page used as a template for displaying a component or an item
	within a different category.
#}

{# ========================================================================== #}
{# :: Imports #}
{# ========================================================================== #}
{% import "components/header.njk" as header %}
{% import "components/navigator.njk" as navigator %}
{% import "components/aside.njk" as aside %}

{# ========================================================================== #}
{# :: Inheritance #}
{# ========================================================================== #}
{% extends "base/extends/content.njk" %}

{# ========================================================================== #}
{# :: Settings & variables #}
{# ========================================================================== #}
{% set pageParams = {
	bodyClass: "",
	loadProjectCSS: true,
	loadProjectJS: true
} %}

{% set TYPE = ROUTEDATA.TYPE %}

{# ========================================================================== #}
{# :: Header #}
{# ========================================================================== #}
{% block header %}

	{{header.aside("", {
		nav: { active: CONFIG.taxonomy.library.route }
	})}}

{% endblock %}

{# ========================================================================== #}
{# :: Aside #}
{# ========================================================================== #}
{% block aside %}

	{{aside.default("", {
		active: {
			item: ROUTEDATA.TYPE
		},
		search: {
			id: "library-search",
			name: "library-search",
			placeholder: "Search"
		} if ROUTEDATA.NAVIGATION,
		header: {
			title: ROUTEDATA.CATEGORY
		},
		toc: ROUTEDATA.NAVIGATION,
		meta: [
			{
				title: "Changelog",
				url: "/" + CONFIG.taxonomy.library.route + "/changelog",
				slug: "changelog"
			}
		],
		button: {
			text: "Getting started",
			url: "/" + CONFIG.taxonomy.library.route + "/manual"
		}
	})}}

{% endblock %}

{# ========================================================================== #}
{# :: Content #}
{# ========================================================================== #}
{% block content %}

	{% if TYPE === CONFIG.taxonomy.fundamentals %}

		{% include "partials/library/index.njk" %}

	{% elseif TYPE === CONFIG.taxonomy.pages %}

		{% include "partials/library/pages.njk" %}

	{% else %}

		{% include "partials/library/index.njk" %}

	{% endif %}

{% endblock %}

{# ========================================================================== #}
{# :: Footer #}
{# ========================================================================== #}
{% block footer %}

	{{navigator.default("", {
		previous: ROUTEDATA.PREVIOUSTOPIC,
		next: ROUTEDATA.NEXTTOPIC
	})}}

{% endblock %}
