93 lines
2.5 KiB
Plaintext
93 lines
2.5 KiB
Plaintext
---
|
|
layout: layouts/home.njk
|
|
eleventyNavigation:
|
|
key: Home
|
|
order: 1
|
|
numberOfLatestPostsToShow: 3
|
|
numberOfNowPostsToShow: 1
|
|
numberOfGalleriesToShow: 1
|
|
numberOfQuizzesToShow: 1
|
|
hideGalleryDescriptions: 1
|
|
---
|
|
<section class="indexFeature">
|
|
<h2>Latest gallery:</h2>
|
|
{% set postsCount = galleries | length %}
|
|
{% set latestPostsCount = postsCount | min(numberOfGalleriesToShow) %}
|
|
{% set postslist = galleries | head(-1 * numberOfGalleriesToShow) %}
|
|
{% set postslistCounter = postsCount %}
|
|
{% set showPostListHeader = false %}
|
|
{% include "gallerieslist.njk" %}
|
|
|
|
{% set morePosts = postsCount - numberOfGalleriesToShow %}
|
|
{% if morePosts > 0 %}
|
|
<a href="/galleries/">
|
|
<button type="button">
|
|
See {{ morePosts }} more »
|
|
</button>
|
|
</a>
|
|
{% endif %}
|
|
</section>
|
|
|
|
<section class="indexFeature">
|
|
<h2>Latest quiz:</h2>
|
|
{% set postsCount = collections.quiz | length %}
|
|
{% set latestPostsCount = postsCount | min(numberOfQuizzesToShow) %}
|
|
{% set postslist = collections.quiz | head(-1 * numberOfQuizzesToShow) %}
|
|
{% set postslistCounter = postsCount %}
|
|
{% set showPostListHeader = false %}
|
|
{% include "postslist.njk" %}
|
|
|
|
{% set morePosts = postsCount - numberOfQuizzesToShow %}
|
|
{% if morePosts > 0 %}
|
|
<a href="/quizzes/">
|
|
<button type="button">
|
|
See {{ morePosts }} more »
|
|
</button>
|
|
</a>
|
|
{% endif %}
|
|
</section>
|
|
|
|
<section class="indexFeature">
|
|
<div class="now">
|
|
<h2>Life updates:</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" %}
|
|
|
|
{% set morePosts = postsCount - numberOfNowPostsToShow %}
|
|
{% if morePosts > 0 %}
|
|
<a href="/now/">
|
|
<button type="button">
|
|
See {{ morePosts }} more »
|
|
</button>
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</section>
|
|
|
|
<section class="indexFeature">
|
|
{% 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 %}
|
|
<div class="buttonContainer">
|
|
<a href="/blog/">
|
|
<button type="button">
|
|
See {{ morePosts }} more »
|
|
</button>
|
|
</a>
|
|
{% endif %}
|
|
<a href="/tags/">
|
|
<button type="button">Topics »</button>
|
|
</a>
|
|
</div>
|
|
</section>
|