bun-activitypub/_content/_includes/macro-author.njk
Gordon Pedersen 6647dabdc8 Added eleventy templates from death.id.au
Needed a little modification here and there to make it work with the activity pub data structure, but it's looking pretty good!
2023-09-27 17:06:56 +10:00

10 lines
No EOL
572 B
Text

{% macro authorMacro(author) %}
{# {{ author | getAuthorData | log }} #}
<a class="p-author h-card u-url" href="{{ author.canonical_uri if author.canonical_uri else author.url }}">
<img class="u-photo small-avatar" alt="{{ author.icon.name if author.icon.name else "Avatar for " + author.preferredUsername }}" src="{{ author.icon.url if author.icon.url else author.avatar }}"/>
<span class="display-name">
<span class="p-name">{{ author.name }}</span>
<span class="p-nickname">{{ author.preferredUsername }}</span>
</span>
</a>
{% endmacro %}