michalvankodev-site/templates/components/project_preview_card.html

49 lines
1.7 KiB
HTML
Raw Permalink Normal View History

2024-10-09 11:18:47 +02:00
<section class="border rounded-md bg-white p-4 break-inside-avoid" style="view-transition-name: project_preview_{{project.slug}};">
<header class="px-4 mb-3">
2024-09-12 15:00:20 +02:00
<h2 class="text-xl font-semibold text-blue-900 md:text-2xl">
{% match project.metadata.link %}
{% when Some with (href) %}
<a href="{{href}}" class="text-blue-900 no-underline">
{{project.metadata.title}}
</a>
{% when None %}
{{project.metadata.title}}
{% endmatch %}
</h2>
2024-10-23 16:01:48 +02:00
<section class="description text-slate-800 my-2 md:text-xl text-justify leading-tight md:leading-tight">
2024-10-07 15:42:54 +02:00
{{project.body|parse_markdown|safe}}
2024-09-12 15:00:20 +02:00
</section>
</header>
<!-- <hr class="border-blue-950 my-5"> -->
{% match project.metadata.cover_image %}
{% when Some with (source) %}
2024-10-07 15:42:54 +02:00
{% let picture = crate::picture_generator::picture_markup_generator::generate_picture_markup(source, 420, 236, "Project cover", Some("max-h-[236px]")).unwrap_or("cover not found".to_string()) %}
2024-09-20 11:51:29 +02:00
<figure class="mx-4 my-2 flex justify-center">
{% match project.metadata.link %}
{% when Some with (href) %}
<a href="{{href}}">
2024-09-20 11:51:29 +02:00
{{picture|safe}}
</a>
{% when None %}
2024-09-20 11:51:29 +02:00
{{picture|safe}}
{% endmatch %}
</figure>
{% when None %}
{% endmatch %}
2024-09-12 15:00:20 +02:00
<footer class="text-sm px-4 md:text-base">
<h3 class="text-xl font-semibold text-blue-900 my-2 md:text-2xl">
2024-08-07 13:18:13 +02:00
{{crate::projects::project_model::translate_classification(project.metadata.classification)}}
</h3>
<ul class="inline-block">
{% for tag in project.metadata.tags %}
2024-08-07 19:21:29 +02:00
<li class="inline-block text-pink-950">
{{tag}}
</li>
{% endfor %}
</ul>
</footer>
2024-09-20 12:35:30 +02:00
</section>