twig​2latte

Twig template - try to edit it!
{% use "blocks.twig" %}
<!DOCTYPE html>
<html>
	<head>
		<title>{{ block("title") }}</title>
	</head>
	<body>
		<h1>{% block title %}My Web{% endblock %}</h1>

		<ul id="navigation">
		{% for item in navigation %}
			{% if not item.active %}
				<li>{{ item.caption }}</li>
			{% else %}
				<li><a href="{{ item.href }}">{{ item.caption }}</a></li>
			{% endif %}
		{% endfor %}
		</ul>

		{% set foo = {"foo": "bar"} %}

		{% apply lower|replace("a", "b") %}
			<strong>SOME TEXT</strong>
		{% endapply %}

		<p class="{{ html_classes('main', {'pending': object.pending}) }}">How are you doing?</p>

		<footer>
			{% include "footer.twig" with {"lang": lang} %}
		</footer>
	</body>
</html>

{% macro input(name, value, type = "text", size = 20) %}
	<input type="{{ type }}" name="{{ name }}" value="{{ value|e }}" size="{{ size }}"/>
{% endmacro %}
{import 'blocks.latte'}
<!DOCTYPE html>
<html>
	<head>
		<title>{include title}</title>
	</head>
	<body>
		<h1>{block title}My Web{/block}</h1>

		<ul id="navigation">
		{foreach $navigation as $item}
			{if !$item->active}
				<li>{$item->caption}</li>
			{else}
				<li><a href="{$item->href}">{$item->caption}</a></li>
			{/if}
		{/foreach}
		</ul>

		{var $foo = [foo => bar]}

		{block|lower|replace:a, b}
			<strong>SOME TEXT</strong>
		{/block}

		<p n:class="main, $object->pending ? pending">How are you doing?</p>

		<footer>
			{include 'footer.latte', lang => $lang}
		</footer>
	</body>
</html>

{define input, $name, $value, $type = text, $size = 20}
	<input type="{$type}" name="{$name}" value="{$value}" size="{$size}"/>
{/define}