michalvankodev-site/axum_server/templates/components/social_card.html
Michal Vanko 20d1314925
Some checks failed
test / cargo test (push) Failing after 1m12s
lol hide instagram between lg-xl
2024-09-25 16:21:35 +02:00

16 lines
655 B
HTML

{% macro social_card_start(svg, heading, img) %}
<section class="border rounded-md bg-pink-200 m-4 p-4 max-w-[440px]">
<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>
<h3 class="text-lg font-medium mb-1">{{heading|safe}}</h3>
</header>
{% let alt_text = format!("{svg} thumbnail") %}
{{ crate::picture_generator::picture_markup_generator::generate_picture_markup(img, 394, 160, alt_text, Some("h-auto mx-auto"), true).unwrap_or("thumbnail not found".to_string())|safe }}
</section>
{% endmacro %}