2024-09-25 12:55:05 +02:00
|
|
|
<article class="sm:grid sm:grid-cols-[max-content_1fr] sm:grid-rows-[max-content_1fr_max-content] sm:grid-flow-col sm:gap-4 md:gap-x-8 break-inside-avoid clear-both sm:clear-none">
|
|
|
|
<aside class="row-span-3 self-center float-start sm:float-none mr-3 mb-3 sm:ml-0 sm:mb-0">
|
2024-09-04 15:43:47 +02:00
|
|
|
{% match post.metadata.thumbnail %}
|
|
|
|
{% when Some with (orig_path) %}
|
2024-09-25 12:55:05 +02:00
|
|
|
{{ crate::picture_generator::picture_markup_generator::generate_picture_markup(orig_path, 180, 240, "Article thumbnail", None, true).unwrap_or("thumbnail not found".to_string())|safe }}
|
2024-09-04 15:43:47 +02:00
|
|
|
{% when None %}
|
2024-09-13 13:10:33 +02:00
|
|
|
<div>
|
|
|
|
{% include "components/blog_post_default_thumbnail.html" %}
|
|
|
|
</div>
|
2024-09-04 15:43:47 +02:00
|
|
|
{% endmatch %}
|
2024-05-09 23:26:06 +02:00
|
|
|
</aside>
|
|
|
|
<header>
|
2024-09-12 17:03:11 +02:00
|
|
|
<h3 class="text-lg font-bold mb-1 md:text-3xl">
|
2024-10-02 15:32:40 +02:00
|
|
|
<a rel="prefetch" href="/{{segment}}/{{post.slug}}" class="text-blue-950 visited:text-purple-700 no-underline">{{post.metadata.title}}</a>
|
2024-09-12 17:03:11 +02:00
|
|
|
</h3>
|
2024-05-09 23:26:06 +02:00
|
|
|
</header>
|
2024-10-07 15:35:22 +02:00
|
|
|
<section class="text-base leading-5 text-slate-800 md:text-xl text-justify">{{post.body|truncate_md(2)|parse_markdown|escape("none")}}</section>
|
2024-09-27 13:34:07 +02:00
|
|
|
<footer class="text-sm md:text-base lg:text-lg mt-3 sm:mt-0 clear-both sm:clear-none">
|
2024-07-09 22:16:55 +02:00
|
|
|
<ul class="inline-block">
|
|
|
|
{% for tag in post.metadata.tags %}
|
|
|
|
<li class="inline-block">
|
2024-10-02 15:32:40 +02:00
|
|
|
<a href="/{{segment}}/tags/{{tag}}" class="text-pink-950 no-underline">#{{tag|capitalize}}</a>
|
2024-07-09 22:16:55 +02:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
<time datetime="{{post.metadata.date}}" class="text-pink-950"> {{post.metadata.date|pretty_date}} </time>
|
2024-05-09 23:26:06 +02:00
|
|
|
</footer>
|
|
|
|
</article>
|
|
|
|
|