{# ========================================================================== #}
{# :: Hero  #}
{# ========================================================================== #}
{#
	The hero is located on the top level section of the home page containing a
	small introduction.
#}

{# ========================================================================== #}
{# :: Imports #}
{# ========================================================================== #}
{% import "components/hero.njk" as hero %}
{% import "components/article.njk" as article %}

{# ========================================================================== #}
{# :: Variables #}
{# ========================================================================== #}
{% set DATA = ROUTEDATA.PAGEDATA or {} %}
{% set title = DATA.title or "Little Miss Robot Brandplatform" %}
{% set description = DATA.description or "This is the a brandplatform made for Little Miss Robot which represents the branding of the company throughout all kinds of components." %}
{% set brandDescription = DATA["brand_description"] or "The philosophy behind our approach towards design and the reflection of our culture, values and promise to our customers." %}
{% set resourcesDescription = DATA["resource_description"] or "Get access to all kinds of assets that are used to visually communicate our brand." %}
{% set libraryDescription = DATA["styleguide_description"] or "Dive into our components and see how they are used in projects." %}

{% set content %}

	<div class="bp-l-grid bp-l-grid--with-spacing bp-l-grid--stretch">
		{% if CONFIG.server.api and CONFIG.pages.brand %}
			{{article.default("bp-l-grid__col bp-l-grid__col--6@viewport-7 bp-l-grid__col--4@viewport-9", {
				title: "home.cta.brand.title" | i18n,
				text: brandDescription,
				link: {
					iconBefore: { name: "chevron-right" },
					text: "home.cta.brand.link" | i18n,
					url: "/brand"
				}
			})}}
		{% endif %}

		{% if CONFIG.server.api and CONFIG.pages.resources %}
			{{article.default("bp-l-grid__col bp-l-grid__col--6@viewport-7 bp-l-grid__col--4@viewport-9", {
				title: "home.cta.resources.title" | i18n,
				text: resourcesDescription,
				link: {
					iconBefore: { name: "chevron-right" },
					text: "home.cta.resources.link" | i18n,
					url: "/resources"
				}
			})}}
		{% endif %}

		{% if CONFIG.pages.library %}
			{{article.default("bp-l-grid__col bp-l-grid__col--6@viewport-7 bp-l-grid__col--4@viewport-9", {
				title: "home.cta.library.title" | i18n,
				text: libraryDescription,
				link: {
					iconBefore: { name: "chevron-right" },
					text: "home.cta.library.link" | i18n,
					url: "/" + CONFIG.taxonomy.library.route
				}
			})}}
		{% endif %}
	</div>

{% endset %}

{% set illustration %}
	{% include "./illustrations/hero.svg" %}
{% endset %}

{# ========================================================================== #}
{# :: Partial #}
{# ========================================================================== #}
{{hero.default("", {
	title: title,
	text: description,
	illustration: illustration,
	extraContent: content
})}}

