---
layout: layouts/home.njk
eleventyNavigation:
  key: Home
  order: 1
numberOfLatestPostsToShow: 5
numberOfNowPostsToShow: 1
---
<div class="now">
	<h2>What I've been up to:</h2>
{% set postsCount = collections.now | length %}
{% set latestPostsCount = postsCount | min(numberOfNowPostsToShow) %}
{% set postslist = collections.now | head(-1 * numberOfNowPostsToShow) %}
{% set postslistCounter = postsCount %}
{% set showPostListHeader = false %}
{% include "postslist.njk" %}
	<a href="/now/">
		<button type="button">
			See more on the “now” page »
		</button>
	</a>
</div>

{% set postsCount = collections.posts | length %}
{% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %}
{% set postslist = collections.posts | head(-1 * numberOfLatestPostsToShow) %}
{% set postslistCounter = postsCount %}
{% set showPostListHeader = true %}
{% include "postslist.njk" %}

{% set morePosts = postsCount - numberOfLatestPostsToShow %}
{% if morePosts > 0 %}
<a href="/blog/">
	<button type="button">
		See {{ morePosts }} more post{% if morePosts != 1 %}s{% endif %} in the blog »
	</button>
</a>
{% endif %}