55 lines
2.4 KiB
HTML
55 lines
2.4 KiB
HTML
{% macro hEntry(entry, indent_width) -%}
|
|
{%- set i = ' ' * indent_width -%}
|
|
<article class="h-entry media">
|
|
{{i}}<aside class="info">
|
|
{{i}}<a class="p-author h-card" href="{{ entry.author.url }}">
|
|
{{i}}{% if entry.author.avatar %}<img class="u-photo img-fluid" src="{{ entry.author.avatar.url }}" alt="{{ entry.author.name }}" />{% endif %}
|
|
{{i}}<span class="p-name sr-only">{{ entry.author.name }}</span>
|
|
{{i}}</a>
|
|
{{i}}<a class="u-uid u-url" href="{{ entry.url }}">
|
|
{{i}}<time class="dt-published media" datetime="{{ entry.published.isoformat() }}" title="{{ entry.published.isoformat() }}">
|
|
{{i}}<i class="fas fa-fw fa-calendar" aria-hidden="true"></i>
|
|
{{i}}<div class="media-body">{{ entry.published | ago }}</div>
|
|
{{i}}</time>
|
|
{{i}}</a>
|
|
{{i}}<time class="dt-updated media" datetime="{{ entry.updated.isoformat() }}" title="{{ entry.updated.isoformat() }}"{% if (entry.updated | ago) == (entry.published | ago) %} hidden{% endif %}>
|
|
{{i}}<i class="fas fa-fw fa-pencil-alt" aria-hidden="true"></i>
|
|
{{i}}<div class="media-body">{{ entry.updated | ago }}</div>
|
|
{{i}}</time>
|
|
{{i}}<a class="u-url media" href="{{ entry.short_url }}">
|
|
{{i}}<i class="fas fa-fw fa-link" aria-hidden="true"></i>
|
|
{{i}}<div class="media-body">{{ entry.short_url | friendly_url }}</div>
|
|
{{i}}</a>
|
|
{{i}}</aside>
|
|
|
|
{{i}}<div class="card media-body">
|
|
{% if entry.photo %}
|
|
{{i}}<img class="card-img-top u-photo" src="{{ entry.photo.url }}" />
|
|
|
|
{% endif %}
|
|
{{i}}<div class="card-body">
|
|
{% if entry.name %}
|
|
{{i}}<h4 class="card-title p-name">{{ entry.name }}</h4>
|
|
{% endif %}
|
|
{{i}}<div class="e-content">
|
|
{{i}}{{ entry.content | markdown }}
|
|
{{i}}</div>
|
|
|
|
{% for c in entry.cats.all() %}
|
|
{{i}}<a class="p-category card-link" href="{{ c.url }}">
|
|
{{i}}<i class="fas fa-paw" aria-hidden="true"></i>
|
|
{{i}}{{ c.name }}
|
|
{{i}}</a>
|
|
{% endfor %}
|
|
{% for s in entry.syndications.all() %}
|
|
{{i}}<a class="u-syndication card-link" href="{{ s.url }}">
|
|
{{i}}<i class="{{ s.site.icon }}" aria-hidden="true"></i>
|
|
{{i}}{{ s.site.domain }}
|
|
{{i}}</a>
|
|
{% endfor %}
|
|
{{i}}</div>
|
|
{{i}}</div>
|
|
|
|
{{i}}<script class="p-json-ld" type="application/ld+json">{{ entry.json_ld | tojson }}</script>
|
|
{{i}}</article>
|
|
{%- endmacro %}
|