-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.webc
25 lines (21 loc) · 820 Bytes
/
index.webc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
layout: layouts/main.webc
eleventyNavigation:
key: Home
order: 1
---
<script webc:setup>
const maxPosts = Math.min(collections.posts.length, 10)
const hasManyPosts = maxPosts > 1
const postsList = collections.posts.slice(-10)
const postsListCounter = maxPosts.length
</script>
<h1 class="post__heading font-family-system font-family-override-impact font-family-helvetica d-font-family-impact color-dark-gray">
Most Recent Post<span webc:if="hasManyPosts">s</span>
</h1>
<template webc:type="11ty" 11ty:type="njk">
{% set postslist = postsList %}
{% set postslistCounter = postsListCounter %}
{% include "postslist.njk" %}
</template>
<p class="font-family-etbook font-size-xlarge">More posts can be found in <a href="{{ '/pages/archive' | url }}" class="site-common-link">the archive</a>.</p>