50 lines
1.6 KiB
HTML
50 lines
1.6 KiB
HTML
<article class="border rounded-md bg-white m-4 p-4 break-inside-avoid">
|
|
<header class="px-4 mb-3">
|
|
<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>
|
|
<section class="description text-slate-800 my-2 md:text-xl text-justify">
|
|
{{project.metadata.description|safe}}
|
|
</section>
|
|
</header>
|
|
<!-- <hr class="border-blue-950 my-5"> -->
|
|
|
|
{% match project.metadata.cover_image %}
|
|
{% when Some with (source) %}
|
|
{% let picture = crate::picture_generator::picture_markup_generator::generate_picture_markup(source, 420, 236, "Project cover", true).unwrap_or("cover not found".to_string()) %}
|
|
<figure class="mx-4 my-2 flex justify-center">
|
|
{% match project.metadata.link %}
|
|
{% when Some with (href) %}
|
|
<a href="{{href}}">
|
|
{{picture|safe}}
|
|
</a>
|
|
{% when None %}
|
|
{{picture|safe}}
|
|
{% endmatch %}
|
|
<!-- TODO <figure> generate_image -->
|
|
</figure>
|
|
{% when None %}
|
|
{% endmatch %}
|
|
|
|
|
|
<footer class="text-sm px-4 md:text-base">
|
|
<h3 class="text-xl font-semibold text-blue-900 my-2 md:text-2xl">
|
|
{{crate::projects::project_model::translate_classification(project.metadata.classification)}}
|
|
</h3>
|
|
<ul class="inline-block">
|
|
{% for tag in project.metadata.tags %}
|
|
<li class="inline-block text-pink-950">
|
|
{{tag}}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</footer>
|
|
</article>
|