Add the latest /now entry to index page
This commit is contained in:
parent
049ba826dc
commit
a6bd281946
@ -4,11 +4,28 @@ eleventyNavigation:
|
|||||||
key: Home
|
key: Home
|
||||||
order: 1
|
order: 1
|
||||||
numberOfLatestPostsToShow: 5
|
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 class="link-button" href="/now/">
|
||||||
|
<button type="button">
|
||||||
|
See more on the “now” page
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% set postsCount = collections.posts | length %}
|
{% set postsCount = collections.posts | length %}
|
||||||
{% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %}
|
{% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %}
|
||||||
{% set postslist = collections.posts | head(-1 * numberOfLatestPostsToShow) %}
|
{% set postslist = collections.posts | head(-1 * numberOfLatestPostsToShow) %}
|
||||||
{% set postslistCounter = postsCount %}
|
{% set postslistCounter = postsCount %}
|
||||||
|
{% set showPostListHeader = true %}
|
||||||
{% include "postslist.njk" %}
|
{% include "postslist.njk" %}
|
||||||
|
|
||||||
{% set morePosts = postsCount - numberOfLatestPostsToShow %}
|
{% set morePosts = postsCount - numberOfLatestPostsToShow %}
|
||||||
|
@ -200,6 +200,11 @@ header, footer, main {
|
|||||||
nav {
|
nav {
|
||||||
grid-column: 2 / span 12;
|
grid-column: 2 / span 12;
|
||||||
}
|
}
|
||||||
|
.now {
|
||||||
|
display: grid;
|
||||||
|
grid-column: 1 / span 12;
|
||||||
|
padding-bottom: var(--space-xl);
|
||||||
|
}
|
||||||
section {
|
section {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-column: 1 / span 12;
|
grid-column: 1 / span 12;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user