2024-09-26 14:12:55 +02:00
|
|
|
{% macro social_card_start(svg, url, heading, img, class) %}
|
2024-07-12 23:26:16 +02:00
|
|
|
|
2024-09-26 14:12:55 +02:00
|
|
|
<a href="{{url}}" class="block no-underline border rounded-md bg-pink-200 m-4 p-4 max-w-[392px] {{class}}">
|
2024-07-12 23:26:16 +02:00
|
|
|
<header class="flex text-center justify-center items-center gap-2 mb-2">
|
|
|
|
<svg aria-hidden="true" class="h-7 w-7 fill-blue-950">
|
|
|
|
<use xlink:href="/svg/icons-sprite.svg#{{svg}}" />
|
|
|
|
</svg>
|
2024-09-26 14:12:55 +02:00
|
|
|
<h3 class="text-lg font-medium mb-1 text-blue-950 visited:text-blue-950">{{heading|safe}}</h3>
|
2024-07-12 23:26:16 +02:00
|
|
|
</header>
|
2024-09-25 12:55:05 +02:00
|
|
|
{% let alt_text = format!("{svg} thumbnail") %}
|
2024-07-12 23:26:16 +02:00
|
|
|
|
2024-09-26 12:19:45 +02:00
|
|
|
{{ crate::picture_generator::picture_markup_generator::generate_picture_markup(img, 360, 128, alt_text, Some("h-auto mx-auto rounded-sm"), true).unwrap_or("thumbnail not found".to_string())|safe }}
|
2024-09-26 14:12:55 +02:00
|
|
|
</a>
|
2024-07-12 23:26:16 +02:00
|
|
|
{% endmacro %}
|