fixes to accomodate news post without image

This commit is contained in:
timurgordon
2023-01-04 10:21:36 +03:00
parent b37690ec82
commit e765e1a1d2
7 changed files with 34 additions and 22 deletions

View File

@@ -2,8 +2,10 @@
<div class="flex-1">
<a href={{ post.permalink }} class="block">
<div class="flex-shrink-0">
{% if post.extra.imgPath %}
{% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md', to=post.extra.imgPath)) %}
<img class="h-48 w-full mx-auto object-cover" src={{img_url}} alt="" />
{% endif %}
</div>
<div class="flex-1 bg-white p-4 flex flex-col justify-between">