add recent blog posts
This commit is contained in:
parent
5f6c8a3dfd
commit
f28561476c
3 changed files with 82 additions and 44 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
{% block content %}
|
||||
<article
|
||||
class="h-full mx-4 sm:mx-10 md:mx-16 md:mt-4 flex flex-col md:flex-row justify-center md:justify-start items-center"
|
||||
class="h-full mx-4 sm:mx-10 md:mx-16 md:mt-4 flex flex-col md:flex-row justify-center md:justify-between items-center"
|
||||
>
|
||||
<figure class="w-1/2" style="min-width: 24rem">
|
||||
<figcaption class="sr-only">
|
||||
|
@ -45,6 +45,36 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section class="mx-auto max-w-7xl px-6 lg:px-8">
|
||||
<h2 class="text-balance">From the blog</h2>
|
||||
<ul class="mx-auto mt-8 grid max-w-2xl grid-cols-1 gap-x-8 gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-3">
|
||||
{% for post in recent_blog_items %}
|
||||
{% with post=post.specific %}
|
||||
<article class="flex flex-col items-center justify-start max-w-xl">
|
||||
<div class="group relative w-full">
|
||||
<h3 class="">
|
||||
<a href="{% pageurl post %}">
|
||||
<span class="absolute inset-0"></span>
|
||||
{{ post.title }}
|
||||
</a>
|
||||
</h3>
|
||||
<p class="mt-5 leading-6">{{ post.intro }}</p>
|
||||
</div>
|
||||
{% if post.main_image %}
|
||||
<div class="relative mx-auto">
|
||||
{% with post.main_image as main_image %}
|
||||
{% if main_image %}
|
||||
{% image main_image width-1600 class="blog" %}{% endif %}
|
||||
{% endwith %}
|
||||
<div class="absolute inset-0 rounded-2xl ring-1 ring-inset ring-gray-900/10"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="px-0 md:px-4 lg:px-8 home-content">
|
||||
<div class="w-full px-2 lg:px-4">
|
||||
{{ page.body }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue