2024-10-25 17:13:01 +02:00
|
|
|
<a class="card hover:shadow-lg transition ease-linear transform hover:scale-105 shrink-0 grow-0 w-full md:w-[225px] lg:w-[400px]" href="/recipe/{{id}}">
|
|
|
|
<img src={{ image_url }} alt="noodles" class="w-full h-32 md:h-48 object-cover rounded-xl">
|
2024-10-22 15:18:23 +02:00
|
|
|
<div class="m-4">
|
|
|
|
<span class="font-bold">{{title}}</span>
|
|
|
|
{% match author %}
|
|
|
|
{% when Some with (author) %}
|
|
|
|
<span class="block text-gray-500 text-sm">{{author}}</span>
|
|
|
|
{% when None %}
|
|
|
|
{% endmatch %}
|
|
|
|
</div>
|
|
|
|
{% match time %}
|
|
|
|
{% when Some with (time) %}
|
2024-10-25 17:13:01 +02:00
|
|
|
<div class="badge flex gap-2 p-4">
|
2024-10-22 15:18:23 +02:00
|
|
|
<svg class="w-5 inline-block" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
|
|
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
|
|
</svg>
|
2024-10-25 17:13:01 +02:00
|
|
|
<span>{{time|duration}}</span>
|
2024-10-22 15:18:23 +02:00
|
|
|
</div>
|
|
|
|
{% when None %}
|
|
|
|
{% endmatch %}
|
2024-10-23 14:17:52 +02:00
|
|
|
</a>
|