Skip to content

Commit 6a3b90f

Browse files
committed
added Latest News Section to home page
1 parent 357d979 commit 6a3b90f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/_includes/home/active-conf-home.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,29 @@ <h2 class="mb-4 text-3xl font-bold leading-relaxed font-heading lg:text-5xl">For
7878
<div class="block-container bg-white">
7979
<div class="wrapper">
8080
<h2 class="mb-8 text-2xl font-bold text-center font-heading lg:text-5xl max-w-[20ch] mx-auto">A friendly conference for a friendly community</h2>
81+
<div class="space-y-8">
82+
<section>
83+
<h2 class="mb-4 text-2xl font-bold font-heading lg:text-4xl">Latest News</h2>
84+
85+
<ol class="divide-y" reversed>
86+
{%- for post in collections.posts reversed -%}
87+
{% unless post.hidden or post.category == 'talk' or post.category == 'tutorial' %}
88+
{% if forloop.index0 < 3 %}
89+
<li>
90+
<article class="py-4">
91+
<time
92+
class="mb-2 text-sm tracking-wide text-gray-600 uppercase"
93+
datetime="{{ post.date }}">{{ post.data.published_datetime | formatDateTime: "MMMM d, yyyy" }}</time>
94+
<h3 class="text-xl font-semibold font-heading lg:text-2xl"><a href="{{ post.url }}" class="reverse-link">{{ post.data.title | escape }}</a></h3>
95+
</article>
96+
</li>
97+
{% endif %}
98+
{% endunless %}
99+
{%- endfor -%}
100+
</ol>
101+
102+
<a class="button" href="/news/">Read more news</a>
103+
</section>
81104

82105
<div class="grid gap-8 lg:grid-cols-3 lg:gap-16">
83106
<section class="relative flex flex-col gap-4 p-6 bg-white lg:pt-10 card-effect-1">

0 commit comments

Comments
 (0)