bun-activitypub/_content/_includes/macro-entry.njk

14 lines
512 B
Text
Raw Permalink Normal View History

{% from "macro-card-head.njk" import cardHeadMacro %}
{% from "macro-summary.njk" import summaryMacro %}
{% macro entryMacro(item, author, url, content, summaryOnly=false) %}
<div class="h-entry type-{{ item.postType }}">
{{ cardHeadMacro(author, item.published, url) }}
<div class="card-body">
{{ summaryMacro(item, url) }}
{% if item.type == 'article' and summaryOnly %}
{% elseif content %}
<div class="e-content">{{ content | safe }}</div>
{% endif %}
</div>
</div>
{% endmacro %}